* c-incpath.c (add_path): Canonicalize paths to use '/' if
HAVE_DOS_BASED_FILESYSTEM.
From-SVN: r82481
+2004-05-31 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * c-incpath.c (add_path): Canonicalize paths to use '/' if
+ HAVE_DOS_BASED_FILESYSTEM.
+
2004-05-31 Steven Bosscher <stevenb@suse.de>
* tree-ssa-dom.c (record_equivalences_from_incoming_edge):
{
cpp_dir *p;
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Convert all backslashes to slashes. The native CRT stat()
+ function does not recognise a directory that ends in a backslash
+ (unless it is a drive root dir, such "c:\"). Forward slashes,
+ trailing or otherwise, cause no problems for stat(). */
+ char* c;
+ for (c = path; *c; c++)
+ if (*c == '\\') *c = '/';
+#endif
+
p = xmalloc (sizeof (cpp_dir));
p->next = NULL;
p->name = path;