Smail3.1.21 on Sys V and ESIX (was Re: Smail3 on ESIX V.3.2)

Robert B. Nelson robert at netsoft.wimsey.bc.ca
Mon Jun 3 18:58:11 AEST 1991


The patches I posted for ESIX earlier will work unchanged on patch 21
of Smail 3.1.  However the changes introduced in patch 21 contain a
couple of bugs which need fixing before it will compile.  I believe
the changes apply to most System V versions not just ESIX.

The first problem is with the resetting of the mail files access time.
The routine which was added assumes a utime.h file declaring the structure
utimbuf.  Three or four of the System Vs I've used don't have this file.
The only place I remember seeing it is in the 88/Open version.  The fix I've
come up with is to add a new feature variable for the conf/os/<file>.  This new
variable is called UTIME_H.  If the variable is not defined then the utimbuf
structure is declared as per the SVID otherwise utime.h is included.  This
variable is only required for systems which don't conform to the SVID and
supply the utime.h file.

The second problem is the use of isprint() without including ctype.h.

The diffs to correct these two problems follow:

--------------------------------C-U-T---H-E-R-E--------------------------------
--- ../smail3_1_21/src/transports/appendfile.c	1991/06/03 01:02:36
+++ ./src/transports/appendfile.c	1991/06/03 07:50:12
@@ -80,7 +80,14 @@
 # include <sys/file.h>
 #endif
 #if defined(UNIX_SYS5) || defined(HAVE_UTIME)
+#if defined(HAVE_UTIME_H)
 # include <utime.h>
+#else
+struct utimbuf	{
+    time_t	actime;		/* access time */
+    time_t	modtime;	/* modification time */
+}   times;
+#endif
 # define RESTORE_ATIME
 #else	/* not UNIX_SYS5 && not HAVE_UTIME */
 # if defined(UNIX_BSD) || defined(HAVE_UTIMES)
===================================================================
--- ../smail3_1_21/src/transports/pipe.c	1991/06/03 04:57:33
+++ ./src/transports/pipe.c	1991/06/03 04:58:47
@@ -47,6 +47,7 @@
  *		write failed on the pipe.
  */
 #include <stdio.h>
+#include <ctype.h>
 #include <pwd.h>
 #include <grp.h>
 #include <signal.h>
--------------------------------C-U-T---H-E-R-E--------------------------------

-- 
Robert B. Nelson                               NetSoft Systems Inc
Phone: (604) 261-3652                          1102 West 48th Avenue
INTERNET: robert at netsoft.wimsey.bc.ca          Vancouver, BC, CANADA, V6M 2N5



More information about the Comp.unix.sysv386 mailing list