Newsgroups: comp.unix.sysv386 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!van-bc!netsoft!robert From: robert@netsoft.wimsey.bc.ca (Robert B. Nelson) Subject: Smail3.1.21 on Sys V and ESIX (was Re: Smail3 on ESIX V.3.2) Organization: NetSoft Systems Inc, Vancouver, British Columbia, Canada Date: Mon, 3 Jun 1991 08:58:11 GMT Message-ID: <1991Jun3.085811.19290@netsoft.wimsey.bc.ca> References: <368@fallst.UUCP> <1991May30.114514.29079@netsoft.uucp> Lines: 54 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/. 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 #endif #if defined(UNIX_SYS5) || defined(HAVE_UTIME) +#if defined(HAVE_UTIME_H) # include +#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 +#include #include #include #include --------------------------------C-U-T---H-E-R-E-------------------------------- -- Robert B. Nelson NetSoft Systems Inc Phone: (604) 261-3652 1102 West 48th Avenue INTERNET: robert@netsoft.wimsey.bc.ca Vancouver, BC, CANADA, V6M 2N5