]> gcc.gnu.org Git - gcc.git/commitdiff
cccp.c (absolute_filename): Drive specifiers make the pathname absolute in cygwin32.
authorDoug Evans <dje@gnu.org>
Sun, 18 Aug 1996 01:37:23 +0000 (01:37 +0000)
committerDoug Evans <dje@gnu.org>
Sun, 18 Aug 1996 01:37:23 +0000 (01:37 +0000)
* cccp.c (absolute_filename): Drive specifiers make the pathname
absolute in cygwin32.

From-SVN: r12655

gcc/cccp.c

index ecc4b3b65cd1394d0111736c1b00718ae5b02ced..eff9c915e25f1b26ab50212c4309cfa6985955f6 100644 (file)
@@ -4626,8 +4626,12 @@ static int
 absolute_filename (filename)
      char *filename;
 {
-#if defined (__MSDOS__) || defined (_WIN32)
+#if defined (__MSDOS__) || (defined (_WIN32) && !defined (__CYGWIN32__))
   if (isalpha (filename[0]) && filename[1] == ':') filename += 2;
+#endif
+#if defined (__CYGWIN32__)
+  /* At present, any path that begins with a drive spec is absolute.  */
+  if (isalpha (filename[0]) && filename[1] == ':') return 1;
 #endif
   if (filename[0] == '/') return 1;
 #ifdef DIR_SEPARATOR
This page took 0.06517 seconds and 5 git commands to generate.