# HG changeset patch # User Paul Eggert # Date 1325366393 28800 # Node ID 98a6ed2516bf3d0c41aa79dfe13f2c65ce05eae9 # Parent c1c37f0242bca014f2b5d2f639e54012faebf375 same-inode: port to OpenVMS * lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all three st_ino values. diff --git a/ChangeLog b/ChangeLog --- 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 --- 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