same-inode: port to OpenVMS
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Dec 2011 21:19:53 +0000 (13:19 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Dec 2011 21:20:15 +0000 (13:20 -0800)
* lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all
three st_ino values.

ChangeLog
lib/same-inode.h

index ff9c84a..e6065e5 100644 (file)
--- 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()
index d434b94..7956a7d 100644 (file)
 #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