summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-02-26 10:03:17 +0000
committerJim Meyering <jim@meyering.net>2006-02-26 10:03:17 +0000
commit7561654142fbdb1d6e90846fad8fd74fffc0acaa (patch)
tree50642aa95bb055541aea4a1229d67655bca6e005 /src/system.h
parent083f6ad61c8ad729440978aff0c2cd9b00aa6afb (diff)
downloadcoreutils-7561654142fbdb1d6e90846fad8fd74fffc0acaa.tar.xz
(NOT_AN_INODE_NUMBER, D_INO): Define (moved here from pwd.c).
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index 0f471e5d1..a9244f04c 100644
--- a/src/system.h
+++ b/src/system.h
@@ -244,6 +244,18 @@ initialize_exit_failure (int status)
# define CLOSEDIR(d) closedir (d)
#endif
+enum
+{
+ NOT_AN_INODE_NUMBER = 0
+};
+
+#ifdef D_INO_IN_DIRENT
+# define D_INO(dp) ((dp)->d_ino)
+#else
+/* Some systems don't have inodes, so fake them to avoid lots of ifdefs. */
+# define D_INO(dp) NOT_AN_INODE_NUMBER
+#endif
+
/* Get or fake the disk device blocksize.
Usually defined by sys/param.h (if at all). */
#if !defined DEV_BSIZE && defined BSIZE