(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.
+Wed Apr 4 21:48:42 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * 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 colon 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.
+
2001-04-04 Martin M. Hunt <hunt@redhat.com>
* main.c (captured_main): For GDBtk, don't use tui_fileopen().
extern char *external_editor_command;
#ifdef __CYGWIN__
-#include <windows.h> /* for MAX_PATH */
#include <sys/cygwin.h> /* for cygwin32_conv_to_posix_path */
#endif
*before* all the command line arguments are processed; it sets
global parameters, which are independent of what file you are
debugging or what directory you are in. */
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
{
char *tmp = getenv ("HOME");
if (tmp != NULL)
{
- homedir = (char *) alloca (MAX_PATH + 1);
+ homedir = (char *) alloca (PATH_MAX + 1);
cygwin32_conv_to_posix_path (tmp, homedir);
}
else
or \t\ttarget e7000 pc\n");
}
-#if !defined(__GO32__) && !defined(_WIN32)
+#if !defined(__GO32__) && !defined(_WIN32) && !defined(__CYGWIN__)
/* FIXME! test for ':' is ambiguous */
if (n == 1 && strchr (dev_name, ':') == 0)
{
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
-#ifndef __CYGWIN32__
+#ifndef __CYGWIN__
#include <netinet/tcp.h>
#endif
}
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
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
if (!path)
path = ".";
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
mode |= O_BINARY;
#endif
/* Look down path for it, allocate 2nd new malloc'd copy. */
desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name);
-#if defined(__GO32__) || defined(_WIN32)
+#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__)
if (desc < 0)
{
char *exename = alloca (strlen (name) + 5);