X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fsame-inode.h;h=cf1c96e3ba0e5f93e8f7411f533ba1ccab570468;hb=refs%2Fheads%2Fsandbox%2Fjinwang.an%2Fm4-1.4.19_20211228;hp=3843b0707858bc23af608b7563dd0869ae2831bc;hpb=931b01b091932a1f796c23379ea32abb68bd5895;p=platform%2Fupstream%2Fm4.git diff --git a/lib/same-inode.h b/lib/same-inode.h index 3843b07..cf1c96e 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. +/* Determine whether two stat buffers are known to refer to the same file. - Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2021 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 @@ -13,17 +13,31 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ #ifndef SAME_INODE_H # define SAME_INODE_H 1 -# ifdef __VMS +# include + +# if defined __VMS && __CRTL_VER < 80200000 # 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) +# elif defined _WIN32 && ! defined __CYGWIN__ + /* Native Windows. */ +# if _GL_WINDOWS_STAT_INODES + /* stat() and fstat() set st_dev and st_ino to 0 if information about + the inode is not available. */ +# define SAME_INODE(a, b) \ + (!((a).st_ino == 0 && (a).st_dev == 0) \ + && (a).st_ino == (b).st_ino && (a).st_dev == (b).st_dev) +# else + /* stat() and fstat() set st_ino to 0 always. */ +# define SAME_INODE(a, b) 0 +# endif # else # define SAME_INODE(a, b) \ ((a).st_ino == (b).st_ino \