Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ateng.ateng.com!chip From: chip@ateng.ateng.com (Chip Salzenberg) Newsgroups: gnu.bash.bug Subject: Bash 1.04 patch: readdir() for Xenix Message-ID: Date: 22 Jan 90 18:47:30 GMT Sender: pollack@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 98 These patches make Bash compile with SCO Xenix 2.3 directory reading routines, which use to declare BSD-compatible opendir(), readdir(), etc. Index: glob.c *************** *** 22,39 **** #include ! #if defined(USGr3) || defined(DIRENT) #include #define direct dirent #define D_NAMLEN(d) strlen((d)->d_name) ! #else /* Not USGr3 and not DIRENT. */ #define D_NAMLEN(d) ((d)->d_namlen) ! # ifdef USG #include "ndir.h" /* Get ndir.h from the Emacs distribution. */ ! # else /* Not USG. */ #include ! # endif /* USG. */ ! #endif /* USGr3 or DIRENT. */ ! #ifdef USG #include #include --- 22,43 ---- #include ! #if defined(SYSVR3) || defined(DIRENT) #include #define direct dirent #define D_NAMLEN(d) strlen((d)->d_name) ! #else /* Not SYSVR3 and not DIRENT. */ #define D_NAMLEN(d) ((d)->d_namlen) ! # ifdef M_XENIX ! #include ! # else /* Not Xenix. */ ! # ifdef SYSV #include "ndir.h" /* Get ndir.h from the Emacs distribution. */ ! # else /* Not SYSV. */ #include ! # endif /* SYSV. */ ! # endif /* Xenix. */ ! #endif /* SYSVR3 or DIRENT. */ ! #ifdef SYSV #include #include *************** *** 41,49 **** #define rindex strrchr ! #else /* not USG */ #include extern void bcopy (); ! #endif /* not USG */ #ifdef __GNUC__ --- 45,53 ---- #define rindex strrchr ! #else /* not SYSV */ #include extern void bcopy (); ! #endif /* not SYSV */ #ifdef __GNUC__ Index: readline/readline.c *************** *** 72,78 **** #include #else /* SYSV */ #ifdef hpux #include ! #else #include #define direct dirent --- 72,81 ---- #include #else /* SYSV */ + #ifdef M_XENIX + #include + #else /* not Xenix */ #ifdef hpux #include ! #else /* not hpux */ #include #define direct dirent *************** *** 79,82 **** --- 82,86 ---- #define d_namlen d_reclen #endif /* hpux */ + #endif /* Xenix */ #endif /* SYSV */