chiark / gitweb /
Portability fixes. release-0-55-2
authorian <ian>
Sun, 5 Oct 1997 17:00:01 +0000 (17:00 +0000)
committerian <ian>
Sun, 5 Oct 1997 17:00:01 +0000 (17:00 +0000)
Changelog
INSTALL
README
acconfig.h
common.h
configure.in
lexer.l.m4
overlord.c
process.c

index 67de3ca6781c45142c30d30416b049dd2e821a2b..71a09a4e2640574c2692e612bbe31190e31b0900 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,10 +1,19 @@
 userv (0.55.2); urgency=low
 
+  * Added info about WWW page, mailing lists and bug reporting to README.  
+  
   * clean targets except realclean don't remove spec.html, spec.ps,
     lexer.[lc], tokens.h, overview.ps.  New totalclean target for
     removing configure and config.h.in.
-
- --
+  
+  * Added <sys/types.h> and <errno.h> to lexer.l.m4.
+  * <sys/wait.h> instead of <wait.h>; %d instead of %ld for WEXITSTATUS
+    in overlord.c; PIPEMAXLEN etc. #defines include cast to int to avoid
+    problems with sizeof and size_t; EPROTO missing workaround.
+  * Note about SIG_IGN and `function declaration isn't a prototype' added
+    to INSTALL file in new PROBLEMS section.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Sun, 5 Oct 1997 17:55:32 +0100
 
 userv (0.55.1); urgency=low
 
diff --git a/INSTALL b/INSTALL
index baf762f9d8e797449bde81be112f698a83bbbd43..dee95972656f39753b378d1ff4d835b5f49fa981 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -84,3 +84,20 @@ malloc, unless stdio makes gratuitous mallocs).  openlog will already
 have been called (but syslog will not necessarily have been called).
 
 We assume that strerror is completely reentrant.
+
+PROBLEMS
+
+* `function declaration isn't a prototype'
+
+  One some systems (at least some versions of NetBSD, for example),
+  the SIG_IGN and SIG_DFL macros contain function declarations (as part
+  of a typecast, presumably) which are not prototypes.  The warning
+  options that are used by default if the configure script detects that
+  you're using a good GCC then cause the compilation to fail.  You must
+  use
+    make CFLAGS=-O2
+  instead of just `make', thus suppressing warnings.
+
+  The bug is actually in your system header files, for not specifying
+  the number and types of arguments to signal handler functions when
+  they cast in the SIG_IGN and SIG_DFL macros.
diff --git a/README b/README
index c327d7a9b617783afaa80cdce7d4dcceeaba5220..33d4a03cc48a4074257a997ddab47ef65a60cb37 100644 (file)
--- a/README
+++ b/README
@@ -11,6 +11,15 @@ For installation requirements and instructions please see INSTALL.
 For usage documentation and discussion see the manual in spec.*
 (various formats via Debiandoc-SGML in spec.sgml).
 
+The WWW page is <URL:http://www.chiark.greenend.org.uk/~ian/userv/>.
+There are two mailing lists: userv-discuss and userv-announce; both
+are managed by majordomo@chiark.greenend.org.uk.  Send majordomo the
+word `help' for instructions on how to subscribe and unsubscribe.
+
+Please send bug reports and suggestions to
+userv-maint@chiark.greenend.org.uk, or to the userv-discuss mailing
+list if you are subscribed to it.
+
 userv is Copyright (C)1996-7 Ian Jackson <ian@chiark.greenend.org.uk>.
 
 userv is free software; you can redistribute it and/or modify it under
index 160a27c9240e4f3cbc8dacf01f1a85cfb7168f6f..6e2356e6be2f643cfd9d31cfa59fcb6888c8d6da 100644 (file)
@@ -19,6 +19,9 @@
  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/* Define if EPROTO exists.  */
+#undef HAVE_EPROTO
+
 /* Define if function attributes a la GCC 2.5 and higher are available.  */
 #undef HAVE_GNUC25_ATTRIB
 
 
 @BOTTOM@
 
+/* EPROTO */
+#ifndef HAVE_EPROTO
+#define EPROTO 0
+#endif
+
 /* GNU C attributes. */
 #ifndef FUNCATTR
 #ifdef HAVE_GNUC25_ATTRIB
index 2a2db41eb2c315b63ff26c0549b44ffca324f74a..f73ea4d876c73da5780310d1369ba3f3152cfe32 100644 (file)
--- a/common.h
+++ b/common.h
@@ -43,13 +43,13 @@ static const unsigned char protocolchecksumversion[PCSUMSIZE]= {
 #ifndef PIPEFORMAT
 # define PIPEFORMAT "%lx.%lx.%x"
 # define PIPEPATTERN "[0-9a-f]*.[0-9a-f]*.*[0-9a-f]"
-# define PIPEFORMATEXTEND (sizeof(unsigned long)*2*2+sizeof(int)*2+3)
-# define PIPEMAXLEN (sizeof(PIPEFORMAT)+PIPEFORMATEXTEND)
+# define PIPEFORMATEXTEND ((int)(sizeof(unsigned long)*2*2+(int)sizeof(int)*2+3))
+# define PIPEMAXLEN ((int)(sizeof(PIPEFORMAT)+PIPEFORMATEXTEND))
 #endif
 
 #ifndef PIPEPATHFORMAT
 # define PIPEPATHFORMAT VARDIR "/" PIPEFORMAT
-# define PIPEPATHMAXLEN (sizeof(PIPEPATHFORMAT)+PIPEFORMATEXTEND)
+# define PIPEPATHMAXLEN ((int)(sizeof(PIPEPATHFORMAT)+PIPEFORMATEXTEND))
 #endif
 
 #define MAX_ALLOW_FD 1024
index 86ce18feb3e64dc1d3865ed24cfc0e74357e4c34..7b842ce1a93b1e9400f557e9a35c8f2b11709dad 100644 (file)
@@ -39,8 +39,22 @@ AC_ARG_ENABLE(debug,
 ])
 
 AC_PROG_CC
+AC_PROG_CPP
 AC_PROG_INSTALL
 
+AC_CACHE_CHECK(for EPROTO,userv_cv_hdr_eproto,
+ AC_EGREP_CPP(yes,
+[
+#include <errno.h>
+#ifdef EPROTO
+ yes
+#endif
+],userv_cv_hdr_eproto=yes,userv_cv_hdr_eproto=no))
+if test $userv_cv_hdr_eproto = yes
+then
+       AC_DEFINE(HAVE_EPROTO)
+fi
+
 AC_SUBST(OPTIMISE)
 if test "${GCC-no}" = yes; then
  OPTIMISE=-O2
index 849f233115545749f24e1f0ff6d78e574789dc14..0b7e705f8f521ea57f2d3c84a7c65c27bcdbaad0 100644 (file)
@@ -33,8 +33,10 @@ include(language.i4)
 #include <fnmatch.h>
 #include <limits.h>
 #include <dirent.h>
+#include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
+#include <errno.h>
 
 #include "config.h"
 #include "common.h"
index 7f66c4ea354307512365fc9f1cdaf7e7fcaf96d4..241bb0de60d00a2d1fc19b85e6cff15cc57e5739 100644 (file)
@@ -19,7 +19,6 @@
  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#include <wait.h>
 #include <unistd.h>
 #include <signal.h>
 #include <syslog.h>
@@ -28,6 +27,7 @@
 #include <stdio.h>
 #include <assert.h>
 #include <fnmatch.h>
+#include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/stat.h>
@@ -94,7 +94,7 @@ static void sighandler_chld(int x) {
             (long)r,status);
     } else if (WEXITSTATUS(status)>12) {
       if (WEXITSTATUS(status)>24)
-       syslog(LOG_ERR,"call pid %ld exited with status %ld >24",
+       syslog(LOG_ERR,"call pid %ld exited with status %d >24",
               (long)r,WEXITSTATUS(status));
       checkstalepipes();
     }
index 35eba59ccd115c9091a277637b6b38e422a0f22a..c88c3c9bee277d2551f446f2fe7ad22889e2ab38 100644 (file)
--- a/process.c
+++ b/process.c
@@ -41,7 +41,6 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <unistd.h>
-#include <wait.h>
 #include <assert.h>
 #include <signal.h>
 #include <string.h>
@@ -52,6 +51,7 @@
 #include <grp.h>
 #include <ctype.h>
 #include <limits.h>
+#include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/fcntl.h>
 #include <sys/stat.h>