X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fport.h;h=4e65a9ace886cd611bd00fb0b168b75e38905652;hb=6901594ac45b88e68a19dd7221511ddf9ff44f66;hp=b57ba0ff5bb19ecfa593ec82bfa6307408b062af;hpb=3bf00060f38666b91c7c286ea6cc62f5d72bdd5b;p=chaz%2Ftar diff --git a/src/port.h b/src/port.h index b57ba0f..4e65a9a 100644 --- a/src/port.h +++ b/src/port.h @@ -25,7 +25,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #else /* not HAVE_ALLOCA_H */ #ifdef _AIX -#pragma alloca + #pragma alloca #else /* not _AIX */ char *alloca (); #endif /* not _AIX */ @@ -93,7 +93,7 @@ typedef long off_t; #endif #undef HAVE_MAJOR -#if defined(STDC_HEADERS) || defined(USG) +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include #if !defined(__MSDOS__) && !defined(STDC_HEADERS) #include @@ -188,3 +188,28 @@ char *getcwd (); #if !defined(S_ISVTX) #define S_ISVTX 0001000 #endif + +#ifdef __MSDOS__ +#include "msd_dir.h" +#define NLENGTH(direct) ((direct)->d_namlen) + +#else /* not __MSDOS__ */ + +#if defined(DIRENT) || defined(_POSIX_VERSION) +#include +#define NLENGTH(direct) (strlen((direct)->d_name)) +#else /* not (DIRENT or _POSIX_VERSION) */ +#define dirent direct +#define NLENGTH(direct) ((direct)->d_namlen) +#ifdef SYSNDIR +#include +#endif /* SYSNDIR */ +#ifdef SYSDIR +#include +#endif /* SYSDIR */ +#ifdef NDIR +#include +#endif /* NDIR */ +#endif /* DIRENT or _POSIX_VERSION */ + +#endif /* not __MSDOS__ */