summaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2001-04-05 02:02:14 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2001-04-05 02:02:14 +0000
commit2a40973a4157973188397d65d1438a269fe7cb74 (patch)
treecde289fea546960b8a9652be567fe6aa0bb3ca83 /gdb/source.c
parente2515a3df3a130d42e8abab3afa478549a2fb788 (diff)
downloadgdb-2a40973a4157973188397d65d1438a269fe7cb74.tar.gz
* main.c: Remove windows.h use.
(gdbtk_test): Use PATH_MAX for home var calculation. * remote-e7000.c (e7000_parse_device): Accomodate Cygwin as well as Win32 in test. * ser-tcp.c: Use modern __CYGWIN__ conditional. * source.c (mod_path): Add __CYGWIN__ conditional to WIN32 test. (openp): Ditto. * symfile.c (symfile_bfd_open): Ditto. * gdbtk/generic/gdbtk.c: Ditto.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/source.c b/gdb/source.c
index d3ae4e4a9c2..9a6d60de0ba 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -331,7 +331,7 @@ mod_path (char *dirname, char **which_path)
}
if (!(SLASH_P (*name) && p <= name + 1) /* "/" */
-#if defined(_WIN32) || defined(__MSDOS__)
+#if defined(_WIN32) || defined(__MSDOS__) || defined(__CYGWIN__)
/* On MS-DOS and MS-Windows, h:\ is different from h: */
&& !(!SLASH_P (*name) && ROOTED_P (name) && p <= name + 3) /* d:/ */
#endif
@@ -370,7 +370,7 @@ mod_path (char *dirname, char **which_path)
if (name[0] == '~')
name = tilde_expand (name);
-#if defined(_WIN32) || defined(__MSDOS__)
+#if defined(_WIN32) || defined(__MSDOS__) || defined(__CYGWIN__)
else if (ROOTED_P (name) && p == name + 2) /* "d:" => "d:." */
name = concat (name, ".", NULL);
#endif
@@ -526,7 +526,7 @@ openp (char *path, int try_cwd_first, char *string, int mode, int prot,
if (!path)
path = ".";
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
mode |= O_BINARY;
#endif