chiark / gitweb /
Upgrade licence to GPLv3+.
[userv.git] / lib.h
diff --git a/lib.h b/lib.h
index fc9d01604a596e0dd1dde1522a2bbba3960c36b0..4f3cf32e41575f282692c49025d4d4802204d6f7 100644 (file)
--- a/lib.h
+++ b/lib.h
@@ -2,11 +2,14 @@
  * userv - lib.c
  * useful utility routines' imports and exports, used in daemon
  *
- * Copyright (C)1996-1997 Ian Jackson
+ * userv is
+ * Copyright 1996-2017 Ian Jackson <ian@davenant.greenend.org.uk>.
+ * Copyright 2000      Ben Harris <bjh21@cam.ac.uk>
+ * Copyright 2016-2017 Peter Benie <pjb1008@cam.ac.uk>
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with userv; if not, write to the Free Software
- * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with userv; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef LIB_H
 #define LIB_H
 
 char *xstrcat3save(const char *a, const char *b, const char *c);
-char *xstrsave(const char *s);
 char *xstrsubsave(const char *begin, int len);
 
 void miscerror(const char *what) NONRETURNING;
-void syscallerror(const char *what) NONRETURNING;
-void *xmalloc(size_t s);
-void *xrealloc(void *p, size_t s);
-void makeroom(char **buffer, int *size, int needed);
+int makeroom(char **buffer, int *size, int needed);
+/* makeroom returns -1 if needed was far too large; otherwise returns 0. */
 
 /* It doesn't appear to be documented whether [v]snprintf put a null
  * in if they overrun.  GNU libc does, but I don't want to rely on
@@ -55,4 +54,8 @@ void vsnytprintfcat(char *buffer, size_t size, const char *fmt, va_list al);
 void snytprintfcat(char *buffer, size_t size, const char *fmt, ...) PRINTFFORMAT(3,4);
 void strnytcat(char *dest, const char *src, size_t size);
 
+#ifndef HAVE_SETENV
+int setenv(const char *name, const char *value, int overwrite);
+#endif /* HAVE_SETENV */
+
 #endif /* LIB_H */