aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1996-08-18 01:37:23 +0000
committerDoug Evans <dje@gnu.org>1996-08-18 01:37:23 +0000
commita7521e654fd38143f944873d55bee9be615e480b (patch)
tree9bf7b30b1735bea9daf01fe758633c1206d2fcbd /gcc/cccp.c
parent00290b64c40a793486b49f966d3cd1765690d7a1 (diff)
downloadgcc-a7521e654fd38143f944873d55bee9be615e480b.zip
gcc-a7521e654fd38143f944873d55bee9be615e480b.tar.gz
gcc-a7521e654fd38143f944873d55bee9be615e480b.tar.bz2
cccp.c (absolute_filename): Drive specifiers make the pathname absolute in cygwin32.
* cccp.c (absolute_filename): Drive specifiers make the pathname absolute in cygwin32. From-SVN: r12655
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index ecc4b3b..eff9c91 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -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;