From c8600ac1d7ad136d9f4e71ccea78134d9dbeb55a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 31 Dec 2011 13:19:53 -0800 Subject: [PATCH] same-inode: port to OpenVMS * lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all three st_ino values. --- ChangeLog | 6 ++++++ lib/same-inode.h | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff9c84a3a..e6065e52c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-12-31 Paul Eggert + + 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 canonicalize: fix references to stat() and lstat() diff --git a/lib/same-inode.h b/lib/same-inode.h index d434b9436..7956a7d26 100644 --- 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 -- 2.11.0