aix: handle 64bit inodes for include directories
On AIX, stat will store inodes in 32bit even when using LARGE_FILES. If the inode is larger, it will return -1 in st_ino. Thus, in incpath.c when comparing include directories, if several of them have 64bit inodes, they will be considered as duplicated. gcc/ChangeLog: 2022-01-12 Clément Chigot <clement.chigot@atos.net> * configure.ac: Check sizeof ino_t and dev_t. (HOST_STAT_FOR_64BIT_INODES): New AC_DEFINE to provide stat syscall being able to handle 64bit inodes. * config.in: Regenerate. * configure: Regenerate. * incpath.c (HOST_STAT_FOR_64BIT_INODES): New define. (remove_duplicates): Use it. libcpp/ChangeLog: 2022-01-12 Clément Chigot <clement.chigot@atos.net> * configure.ac: Check sizeof ino_t and dev_t. * config.in: Regenerate. * configure: Regenerate. * include/cpplib.h (INO_T_CPP): Change for AIX. (DEV_T_CPP): New macro. (struct cpp_dir): Use it.
This commit is contained in:
@@ -752,10 +752,18 @@ struct cpp_callbacks
|
||||
|
||||
#ifdef VMS
|
||||
#define INO_T_CPP ino_t ino[3]
|
||||
#elif defined (_AIX) && SIZEOF_INO_T == 4
|
||||
#define INO_T_CPP ino64_t ino
|
||||
#else
|
||||
#define INO_T_CPP ino_t ino
|
||||
#endif
|
||||
|
||||
#if defined (_AIX) && SIZEOF_DEV_T == 4
|
||||
#define DEV_T_CPP dev64_t dev
|
||||
#else
|
||||
#define DEV_T_CPP dev_t dev
|
||||
#endif
|
||||
|
||||
/* Chain of directories to look for include files in. */
|
||||
struct cpp_dir
|
||||
{
|
||||
@@ -790,7 +798,7 @@ struct cpp_dir
|
||||
/* The C front end uses these to recognize duplicated
|
||||
directories in the search path. */
|
||||
INO_T_CPP;
|
||||
dev_t dev;
|
||||
DEV_T_CPP;
|
||||
};
|
||||
|
||||
/* The kind of the cpp_macro. */
|
||||
|
||||
Reference in New Issue
Block a user