From comp.sources.d Tue Jul 30 04:54:11 1991 From: chip@tct.com (Chip Salzenberg) Newsgroups: alt.sources,comp.sources.d,comp.unix.sysv386,comp.unix.aix Subject: Patches for Zoo 2.1: AIX, SCO UNIX Message-ID: <289426E8.6A0A@tct.com> Date: 29 Jul 91 14:32:08 GMT Organization: TC Telemanagement, Clearwater, FL With the below patches, Zoo 2.1 works fine under AIX 3.1 and SCO UNIX 3.2v2. Shar and enjoy. Index: makefile *************** *** 110,113 **** --- 115,122 ---- sysv: $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS) + + # SysV.2, V.3, SCO Xenix with ANSI C + sysvansi: + $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V -DANSI_HDRS" $(TARGETS) # DOS version cross compiled from SCO Xenix/UNIX Index: ar.h *************** *** 16,22 **** --- 16,24 ---- /* typedef unsigned char uchar; -- already in zoo.h */ + #ifndef _AIX typedef unsigned int uint; /* 16 bits or more */ typedef unsigned short ushort; /* 16 bits or more */ typedef unsigned long ulong; /* 32 bits or more */ + #endif /* T_UINT16 must be #defined in options.h to be Index: portable.h *************** *** 77,81 **** #ifdef SYS_V #define NIX_IO /* standard **IX I/O */ ! #define MKDIR(x) mkdir(x) /* define this in sysv.c */ #endif --- 77,81 ---- #ifdef SYS_V #define NIX_IO /* standard **IX I/O */ ! #define MKDIR(x) mkdir(x, 0777) /* define this in sysv.c */ #endif Index: sysv.c *************** *** 130,135 **** */ ! int mkdir(dirname) char *dirname; { char cmd[PATHSIZE+11+1]; /* room for "/bin/mkdir " used below + 1 spare */ --- 130,138 ---- */ ! #if !defined(_AIX) && !defined(M_UNIX) /* AIX and SCO have mkdir() */ ! ! int mkdir(dirname,mode) char *dirname; + int mode; { char cmd[PATHSIZE+11+1]; /* room for "/bin/mkdir " used below + 1 spare */ *************** *** 141,144 **** --- 144,149 ---- return (0); } + + #endif /* neither AIX nor SCO */ /* No file truncate system call in older System V. If yours has one, Index: zoo.h *************** *** 91,95 **** --- 91,99 ---- #endif + #ifdef _AIX + #include /* defines uchar */ + #else typedef unsigned char uchar; + #endif /* WARNING: Static initialization in zooadd.c or zooext.c depends on the