]> Dogcows Code - chaz/tar/blobdiff - src/port.h
Fix Solaris bug where chmod fails if we don't have PRIV_SYS_LINKDIR
[chaz/tar] / src / port.h
index b57ba0ff5bb19ecfa593ec82bfa6307408b062af..4e65a9ace886cd611bd00fb0b168b75e38905652 100644 (file)
@@ -25,7 +25,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <alloca.h>
 #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 <string.h>
 #if !defined(__MSDOS__) && !defined(STDC_HEADERS)
 #include <memory.h>
@@ -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 <dirent.h>
+#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 <sys/ndir.h>
+#endif /* SYSNDIR */
+#ifdef SYSDIR
+#include <sys/dir.h>
+#endif /* SYSDIR */
+#ifdef NDIR
+#include <ndir.h>
+#endif /* NDIR */
+#endif /* DIRENT or _POSIX_VERSION */
+
+#endif /* not __MSDOS__ */
This page took 0.020971 seconds and 4 git commands to generate.