OSDN Git Service

* cccp.c (absolute_filename): Drive specifiers make the pathname
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Aug 1996 01:37:23 +0000 (01:37 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Aug 1996 01:37:23 +0000 (01:37 +0000)
absolute in cygwin32.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12655 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cccp.c

index ecc4b3b..eff9c91 100644 (file)
@@ -4626,9 +4626,13 @@ 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
   if (filename[0] == DIR_SEPARATOR) return 1;