summaryrefslogtreecommitdiff
path: root/gcc/incpath.c
diff options
context:
space:
mode:
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-30 00:57:56 +0000
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-30 00:57:56 +0000
commitf4d024852012349701a3c6d3b37b2fe4eda86d75 (patch)
tree35dcdd0c466cec159fe8d590dfb3a71beab2939f /gcc/incpath.c
parentc7ca41d18156e051b3ff64bc0618dd4dc69b5e52 (diff)
downloadgcc-f4d024852012349701a3c6d3b37b2fe4eda86d75.tar.gz
libcpp/ChangeLog
* include/cpplib.h (struct cpp_dir): Add new field, canonical_name. gcc/ChangeLog * incpath.c: Use HOST_LACKS_INODE_NUMBERS conditional rather than OS names to choose INO_T_EQ definition. (DIRS_EQ) [!INO_T_EQ]: Don't worry about case in comparison. (add_path) [!INO_T_EQ]: Use lrealpath to fill canonical_name field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/incpath.c')
-rw-r--r--gcc/incpath.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/incpath.c b/gcc/incpath.c
index e5fe8db23ca..761b1cf6305 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -31,13 +31,12 @@
#include "incpath.h"
#include "cppdefault.h"
-/* Windows does not natively support inodes, and neither does MSDOS.
- Cygwin's emulation can generate non-unique inodes, so don't use it.
+/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
#ifdef VMS
# define INO_T_EQ(A, B) (!memcmp (&(A), &(B), sizeof (A)))
# define INO_T_COPY(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof (SRC))
-#elif !((defined _WIN32 && !defined (_UWIN)) || defined __MSDOS__)
+#elif !defined (HOST_LACKS_INODE_NUMBERS)
# define INO_T_EQ(A, B) ((A) == (B))
# define INO_T_COPY(DEST, SRC) (DEST) = (SRC)
#endif
@@ -46,7 +45,7 @@
#define DIRS_EQ(A, B) ((A)->dev == (B)->dev \
&& INO_T_EQ((A)->ino, (B)->ino))
#else
-#define DIRS_EQ(A, B) (!strcasecmp ((A)->name, (B)->name))
+#define DIRS_EQ(A, B) (!strcmp ((A)->canonical_name, (B)->canonical_name))
#endif
static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
@@ -408,6 +407,9 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p)
p = XNEW (cpp_dir);
p->next = NULL;
p->name = path;
+#ifndef INO_T_EQ
+ p->canonical_name = lrealpath (path);
+#endif
if (chain == SYSTEM || chain == AFTER)
p->sysp = 1 + !cxx_aware;
else