summaryrefslogtreecommitdiff
path: root/lib/same-inode.h
diff options
context:
space:
mode:
authorLi Jinjing <jinjingx.li@intel.com>2014-10-26 22:28:15 +0800
committerLi Jinjing <jinjingx.li@intel.com>2014-10-26 22:28:15 +0800
commit931b01b091932a1f796c23379ea32abb68bd5895 (patch)
tree3aa9e1125da84f7e3bd764bbff577c42a766508b /lib/same-inode.h
parent7be93f2d05131d061bd4790ae33c8d50f50010d7 (diff)
downloadm4-upstream/1.4.17.tar.gz
m4-upstream/1.4.17.tar.bz2
m4-upstream/1.4.17.zip
Imported Upstream version 1.4.17upstream/1.4.17sandbox/jinjingx/upstream
Diffstat (limited to 'lib/same-inode.h')
-rw-r--r--lib/same-inode.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/same-inode.h b/lib/same-inode.h
index d434b94..3843b07 100644
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers refer to the same file.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -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