🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Chip Salzenberg Mon, 22 Jan 1990 18:47
Bash 1.04 patch: readdir() for Xenix
#854
Author: Chip Salzenberg
Date: Mon, 22 Jan 1990 18:47
98 lines
2732 bytes
These patches make Bash compile with SCO Xenix 2.3 directory reading routines,
which use <sys/ndir.h> to declare BSD-compatible opendir(), readdir(), etc.

Index: glob.c
***************
*** 22,39 ****
  #include <sys/types.h>
  
! #if	defined(USGr3) || defined(DIRENT)
  #include <dirent.h>
  #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 <sys/dir.h>
! #	endif	/* USG.  */
! #endif	/* USGr3 or DIRENT.  */
  
! #ifdef USG
  #include <memory.h>
  #include <string.h>
--- 22,43 ----
  #include <sys/types.h>
  
! #if     defined(SYSVR3) || defined(DIRENT)
  #include <dirent.h>
  #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 <sys/ndir.h>
! #       else    /* Not Xenix. */
! #       ifdef   SYSV
  #include "ndir.h"   /* Get ndir.h from the Emacs distribution.  */
! #       else    /* Not SYSV.  */
  #include <sys/dir.h>
! #       endif   /* SYSV.  */
! #       endif   /* Xenix. */
! #endif  /* SYSVR3 or DIRENT.  */
  
! #ifdef SYSV
  #include <memory.h>
  #include <string.h>
***************
*** 41,49 ****
  #define rindex	strrchr
  
! #else /* not USG */
  #include <strings.h>
  
  extern void bcopy ();
! #endif /* not USG */
  
  #ifdef	__GNUC__
--- 45,53 ----
  #define rindex	strrchr
  
! #else /* not SYSV */
  #include <strings.h>
  
  extern void bcopy ();
! #endif /* not SYSV */
  
  #ifdef	__GNUC__

Index: readline/readline.c
***************
*** 72,78 ****
  #include <sys/dir.h>
  #else  /* SYSV */
  #ifdef hpux
  #include <ndir.h>
! #else
  #include <dirent.h>
  #define direct dirent
--- 72,81 ----
  #include <sys/dir.h>
  #else  /* SYSV */
+ #ifdef   M_XENIX
+ #include <sys/ndir.h>
+ #else    /* not Xenix */
  #ifdef hpux
  #include <ndir.h>
! #else    /* not hpux */
  #include <dirent.h>
  #define direct dirent
***************
*** 79,82 ****
--- 82,86 ----
  #define d_namlen d_reclen
  #endif  /* hpux */
+ #endif  /* Xenix */
  #endif  /* SYSV */
  
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads