summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-01-22 13:27:20 +0000
committerJim Meyering <jim@meyering.net>2003-01-22 13:27:20 +0000
commit5b7ab2372d0c73b51cb22ff67d74a4ac7dcd9c54 (patch)
tree97fccfe61c2f6a05dc953a824f5f1fcd10f28b68 /lib
parenteb7d21ab94be6ffaa14e8b5eb1e4d5836b04dcfe (diff)
downloadcoreutils-5b7ab2372d0c73b51cb22ff67d74a4ac7dcd9c54.tar.xz
[!_LIBC && !__USE_XOPEN_EXTENDED]: Define __USE_XOPEN_EXTENDED
and FTW_H_STANDALONE. [ enum] (FTW_DCH): New member. (FTW_DCH): Define.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftw_.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/ftw_.h b/lib/ftw_.h
index 375e0b835..0102da6ba 100644
--- a/lib/ftw_.h
+++ b/lib/ftw_.h
@@ -38,6 +38,13 @@
# include <sys/types.h>
# include <sys/stat.h>
+/* When compiling stand-alone on a system that does not define
+ __USE_XOPEN_EXTENDED, define that symbol so that all the
+ required declarations appear. */
+# if ! defined _LIBC && ! defined __USE_XOPEN_EXTENDED
+# define FTW_H_STANDALONE 1
+# define __USE_XOPEN_EXTENDED 1
+# endif
__BEGIN_DECLS
@@ -53,6 +60,8 @@ enum
# define FTW_DNR FTW_DNR
FTW_NS, /* Unstatable file. */
# define FTW_NS FTW_NS
+ FTW_DCH, /* Can't chdir to directory. */
+# define FTW_DCH FTW_DCH
# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -150,6 +159,11 @@ extern int nftw64 (__const char *__dir, __nftw64_func_t __func,
# endif
# endif
+/* If we defined __USE_XOPEN_EXTENDED above, undefine it here. */
+# ifdef FTW_H_STANDALONE
+# undef __USE_XOPEN_EXTENDED
+# endif
+
__END_DECLS
#endif /* ftw.h */