/* Set up combined include path chain for the preprocessor.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Broken out of cppinit.c and cppfiles.c and rewritten Mar 2003.
#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
#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 };
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