Formerly dir.c.~11~

This commit is contained in:
Roland McGrath 1993-04-12 20:51:44 +00:00
parent 8c01d0459a
commit d8b7640a81

31
dir.c
View file

@ -18,33 +18,26 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "make.h" #include "make.h"
#if defined (USGr3) && !defined (DIRENT) #if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__)
#define DIRENT
#endif /* USGr3 */
#if defined (Xenix) && !defined (SYSNDIR)
#define SYSNDIR
#endif /* Xenix */
#if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__)
#include <dirent.h> #include <dirent.h>
#ifndef __GNU_LIBRARY__ #ifndef __GNU_LIBRARY__
#define D_NAMLEN(d) strlen((d)->d_name) #define D_NAMLEN(d) strlen((d)->d_name)
#else #else /* GNU C library. */
#define D_NAMLEN(d) ((d)->d_namlen) #define D_NAMLEN(d) ((d)->d_namlen)
#endif #endif /* Not GNU C library. */
#else /* not POSIX or DIRENT */ #else /* Not POSIX or DIRENT. */
#define direct dirent #define direct dirent
#define D_NAMLEN(d) ((d)->d_namlen) #define D_NAMLEN(d) ((d)->d_namlen)
#if defined (USG) && !defined (sgi) #ifdef SYSNDIR
#if defined (SYSNDIR)
#include <sys/ndir.h> #include <sys/ndir.h>
#else /* SYSNDIR */ #endif /* SYSNDIR */
#include "ndir.h" #ifdef SYSDIR
#endif /* not SYSNDIR */
#else /* not USG */
#include <sys/dir.h> #include <sys/dir.h>
#endif /* USG */ #endif /* SYSDIR */
#endif /* POSIX or DIRENT or __GNU_LIBRARY__ */ #ifdef NDIR
#include <ndir.h>
#endif /* NDIR */
#endif /* POSIX or DIRENT or __GNU_LIBRARY__. */
#if defined (POSIX) && !defined (__GNU_LIBRARY__) #if defined (POSIX) && !defined (__GNU_LIBRARY__)
/* Posix does not require that the d_ino field be present, and some /* Posix does not require that the d_ino field be present, and some