* 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.
This commit is contained in:
Christopher Faylor 2001-04-05 02:02:13 +00:00
parent 6457bd4761
commit 608506ed67
6 changed files with 20 additions and 9 deletions

View file

@ -1,3 +1,15 @@
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().

View file

@ -91,7 +91,6 @@ extern int enable_external_editor;
extern char *external_editor_command;
#ifdef __CYGWIN__
#include <windows.h> /* for MAX_PATH */
#include <sys/cygwin.h> /* for cygwin32_conv_to_posix_path */
#endif
@ -535,13 +534,13 @@ extern int gdbtk_test (char *);
*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

View file

@ -543,7 +543,7 @@ or \t\ttarget e7000 tcp_remote <host>[:<port>]\n\
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)
{

View file

@ -29,7 +29,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
#ifndef __CYGWIN32__
#ifndef __CYGWIN__
#include <netinet/tcp.h>
#endif

View file

@ -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

View file

@ -1052,7 +1052,7 @@ symfile_bfd_open (char *name)
/* 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);