OSDN Git Service

* ggc-common.c (ggc_rlimit_bound): Don't check RSS limit.
[pf3gnuchains/gcc-fork.git] / gcc / c-incpath.c
index 8bd18c6..2f00d62 100644 (file)
@@ -327,6 +327,16 @@ add_path (char *path, int chain, int cxx_aware, bool user_supplied_p)
 {
   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;