changeset 16197:98a6ed2516bf

same-inode: port to OpenVMS * lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all three st_ino values.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 31 Dec 2011 13:19:53 -0800
parents c1c37f0242bc
children 79e42746e843
files ChangeLog lib/same-inode.h
diffstat 2 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-31  Paul Eggert  <eggert@cs.ucla.edu>
+
+	same-inode: port to OpenVMS
+	* lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all
+	three st_ino values.
+
 2011-12-30  Pádraig Brady  <P@draigBrady.com>
 
 	canonicalize: fix references to stat() and lstat()
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -18,8 +18,16 @@
 #ifndef SAME_INODE_H
 # define SAME_INODE_H 1
 
-# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
-   ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
-    && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
+# ifdef __VMS
+#  define SAME_INODE(a, b)             \
+    ((a).st_ino[0] == (b).st_ino[0]    \
+     && (a).st_ino[1] == (b).st_ino[1] \
+     && (a).st_ino[2] == (b).st_ino[2] \
+     && (a).st_dev == (b).st_dev)
+# else
+#  define SAME_INODE(a, b)    \
+    ((a).st_ino == (b).st_ino \
+     && (a).st_dev == (b).st_dev)
+# endif
 
 #endif