* dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c

mdebugread.c os9kread.c source.c top.c utils.c:  Don't
	include param.h or sys/file.h (or unistd.h in some cases).
	* defs.h exec.c inflow.c remote-array.c remote-e7000.c
	sparcl-tdep.c terminal.h utils.c:  Replace all occurances of
	__WIN32__, WINGDB, WIN32, etc... with _WIN32.
	* main.c:  Remove #ifndef WINGDB around option processing.  Fix
	bug with passing argc==0 and argv==NULL to getopt.
	* (main) Remove calls to access() before source_command.  Let
	soure_command handle access errors.
	* maint.c (maintenance_dump_me):  #ifdef out for _WIN32.
	* symtab.c (operator_chars):  Make this global for wingdb.
	* top.c (disconnect):  #ifdef out for _WIN32.
	* (source_command):  If got an error and from_tty, then call print
	error, else just return quietly.
	* utils.c (fatal_dump_core):  Can't kill ourselves under windows.
	Just exit.
	* (pollquit notice_quit):  #ifdef out stuff that doesn't exist
	under windows.
This commit is contained in:
Stu Grossman 1996-08-08 02:50:22 +00:00
parent 7b25dea587
commit 9e77e83d30
12 changed files with 48 additions and 49 deletions

View file

@ -1,3 +1,25 @@
Wed Aug 7 17:18:37 1996 Stu Grossman (grossman@critters.cygnus.com)
* dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.c
mdebugread.c os9kread.c source.c top.c utils.c: Don't
include param.h or sys/file.h (or unistd.h in some cases).
* defs.h exec.c inflow.c remote-array.c remote-e7000.c
sparcl-tdep.c terminal.h utils.c: Replace all occurances of
__WIN32__, WINGDB, WIN32, etc... with _WIN32.
* main.c: Remove #ifndef WINGDB around option processing. Fix
bug with passing argc==0 and argv==NULL to getopt.
* (main) Remove calls to access() before source_command. Let
soure_command handle access errors.
* maint.c (maintenance_dump_me): #ifdef out for _WIN32.
* symtab.c (operator_chars): Make this global for wingdb.
* top.c (disconnect): #ifdef out for _WIN32.
* (source_command): If got an error and from_tty, then call print
error, else just return quietly.
* utils.c (fatal_dump_core): Can't kill ourselves under windows.
Just exit.
* (pollquit notice_quit): #ifdef out stuff that doesn't exist
under windows.
Wed Aug 7 09:59:19 1996 Jeffrey A Law (law@cygnus.com) Wed Aug 7 09:59:19 1996 Jeffrey A Law (law@cygnus.com)
* config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Tweak for * config/pa/tm-hppa.h (EXTRACT_RETURN_VALUE): Tweak for

View file

@ -985,7 +985,7 @@ extern int use_windows;
#endif #endif
#ifndef SLASH_P #ifndef SLASH_P
#if defined(__GO32__)||defined(__WIN32__) #if defined(__GO32__)||defined(_WIN32)
#define SLASH_P(X) ((X)=='\\') #define SLASH_P(X) ((X)=='\\')
#else #else
#define SLASH_P(X) ((X)=='/') #define SLASH_P(X) ((X)=='/')
@ -993,7 +993,7 @@ extern int use_windows;
#endif #endif
#ifndef SLASH_CHAR #ifndef SLASH_CHAR
#if defined(__GO32__)||defined(__WIN32__) #if defined(__GO32__)||defined(_WIN32)
#define SLASH_CHAR '\\' #define SLASH_CHAR '\\'
#else #else
#define SLASH_CHAR '/' #define SLASH_CHAR '/'
@ -1001,7 +1001,7 @@ extern int use_windows;
#endif #endif
#ifndef SLASH_STRING #ifndef SLASH_STRING
#if defined(__GO32__)||defined(__WIN32__) #if defined(__GO32__)||defined(_WIN32)
#define SLASH_STRING "\\" #define SLASH_STRING "\\"
#else #else
#define SLASH_STRING "/" #define SLASH_STRING "/"

View file

@ -40,10 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
/* .debug_info header for a compilation unit /* .debug_info header for a compilation unit
Because of alignment constraints, this structure has padding and cannot Because of alignment constraints, this structure has padding and cannot
be mapped directly onto the beginning of the .debug_info section. */ be mapped directly onto the beginning of the .debug_info section. */

View file

@ -54,10 +54,6 @@ other things to work on, if you get bored. :-)
#include <fcntl.h> #include <fcntl.h>
#include "gdb_string.h" #include "gdb_string.h"
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
/* Some macros to provide DIE info for complaints. */ /* Some macros to provide DIE info for complaints. */
#define DIE_ID (curdie!=NULL ? curdie->die_ref : 0) #define DIE_ID (curdie!=NULL ? curdie->die_ref : 0)

View file

@ -32,12 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <ctype.h> #include <ctype.h>
#include "gdb_string.h" #include "gdb_string.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
/* Temporary variable for SET_TOP_LEVEL. */ /* Temporary variable for SET_TOP_LEVEL. */
@ -140,7 +134,6 @@ main (argc, argv)
current_directory = gdb_dirbuf; current_directory = gdb_dirbuf;
/* Parse arguments and options. */ /* Parse arguments and options. */
#ifndef WINGDB
{ {
int c; int c;
/* When var field is 0, use flag field to record the equivalent /* When var field is 0, use flag field to record the equivalent
@ -340,7 +333,6 @@ main (argc, argv)
quiet = 1; quiet = 1;
} }
#endif
gdb_init (); gdb_init ();
/* Do these (and anything which might call wrap_here or *_filtered) /* Do these (and anything which might call wrap_here or *_filtered)
@ -435,7 +427,7 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
strcat (homeinit, "/"); strcat (homeinit, "/");
strcat (homeinit, gdbinit); strcat (homeinit, gdbinit);
if (!inhibit_gdbinit && access (homeinit, R_OK) == 0) if (!inhibit_gdbinit)
{ {
if (!SET_TOP_LEVEL ()) if (!SET_TOP_LEVEL ())
source_command (homeinit, 0); source_command (homeinit, 0);
@ -529,7 +521,7 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
if (!homedir if (!homedir
|| memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
if (!inhibit_gdbinit && access (gdbinit, R_OK) == 0) if (!inhibit_gdbinit)
{ {
if (!SET_TOP_LEVEL ()) if (!SET_TOP_LEVEL ())
source_command (gdbinit, 0); source_command (gdbinit, 0);
@ -591,7 +583,7 @@ GDB manual (available as on-line info or a printed manual).\n", gdb_stdout);
/* The default command loop. /* The default command loop.
The WIN32 Gui calls this main to set up gdb's state, and The WIN32 Gui calls this main to set up gdb's state, and
has its own command loop. */ has its own command loop. */
#if !defined (WINGDB) #ifndef _WIN32
while (1) while (1)
{ {
if (!SET_TOP_LEVEL ()) if (!SET_TOP_LEVEL ())

View file

@ -88,7 +88,7 @@ maintenance_command (args, from_tty)
help_list (maintenancelist, "maintenance ", -1, gdb_stdout); help_list (maintenancelist, "maintenance ", -1, gdb_stdout);
} }
#ifndef _WIN32
/* ARGSUSED */ /* ARGSUSED */
static void static void
maintenance_dump_me (args, from_tty) maintenance_dump_me (args, from_tty)
@ -101,6 +101,7 @@ maintenance_dump_me (args, from_tty)
kill (getpid (), SIGQUIT); kill (getpid (), SIGQUIT);
} }
} }
#endif
/* Someday we should allow demangling for things other than just /* Someday we should allow demangling for things other than just
explicit strings. For example, we might want to be able to explicit strings. For example, we might want to be able to
@ -307,11 +308,13 @@ to test internal functions such as the C++ demangler, etc.",
&maintenanceprintlist, "maintenance print ", 0, &maintenanceprintlist, "maintenance print ", 0,
&maintenancelist); &maintenancelist);
#ifndef _WIN32
add_cmd ("dump-me", class_maintenance, maintenance_dump_me, add_cmd ("dump-me", class_maintenance, maintenance_dump_me,
"Get fatal error; make debugger dump its core.\n\ "Get fatal error; make debugger dump its core.\n\
GDB sets it's handling of SIGQUIT back to SIG_DFL and then sends\n\ GDB sets it's handling of SIGQUIT back to SIG_DFL and then sends\n\
itself a SIGQUIT signal.", itself a SIGQUIT signal.",
&maintenancelist); &maintenancelist);
#endif
add_cmd ("demangle", class_maintenance, maintenance_demangle, add_cmd ("demangle", class_maintenance, maintenance_demangle,
"Demangle a C++ mangled name.\n\ "Demangle a C++ mangled name.\n\

View file

@ -72,8 +72,6 @@ typedef struct mips_extra_func_info {
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <sys/param.h>
#include <sys/file.h>
#include "gdb_stat.h" #include "gdb_stat.h"
#include "gdb_string.h" #include "gdb_string.h"

View file

@ -42,10 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif #endif
#include "obstack.h" #include "obstack.h"
#include <sys/param.h>
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
#include "gdb_stat.h" #include "gdb_stat.h"
#include <ctype.h> #include <ctype.h>
#include "symtab.h" #include "symtab.h"

View file

@ -727,7 +727,7 @@ array_wait (pid, status)
timeout = 0; /* Don't time out -- user program is running. */ timeout = 0; /* Don't time out -- user program is running. */
#if !defined(__GO32__) && !defined(__MSDOS__) && !defined(__WIN32__) #if !defined(__GO32__) && !defined(__MSDOS__) && !defined(_WIN32)
tty_desc = SERIAL_FDOPEN (0); tty_desc = SERIAL_FDOPEN (0);
ttystate = SERIAL_GET_TTY_STATE (tty_desc); ttystate = SERIAL_GET_TTY_STATE (tty_desc);
SERIAL_RAW (tty_desc); SERIAL_RAW (tty_desc);

View file

@ -23,16 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "target.h" #include "target.h"
#include "serial.h" #include "serial.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h>
#if defined(__GO32__) || defined(WIN32) #if !defined(__GO32__) && !defined(_WIN32)
#undef HAVE_SOCKETS
#else
#define HAVE_SOCKETS #define HAVE_SOCKETS
#endif #include <sys/time.h>
#ifdef HAVE_SOCKETS
#include <unistd.h> #include <unistd.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>

View file

@ -24,19 +24,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* If we're using autoconf, it will define HAVE_TERMIOS_H, /* If we're using autoconf, it will define HAVE_TERMIOS_H,
HAVE_TERMIO_H and HAVE_SGTTY_H for us. One day we can rewrite HAVE_TERMIO_H and HAVE_SGTTY_H for us. One day we can rewrite
ser-unix.c and inflow.c to inspect those names instead of ser-unix.c and inflow.c to inspect those names instead of
HAVE_TERMIOS, HAVE_TERMIO and the implicit HAVE_SGTYY (when neither HAVE_TERMIOS, HAVE_TERMIO and the implicit HAVE_SGTTY (when neither
HAVE_TERMIOS or HAVE_TERMIO is set). Until then, make sure that HAVE_TERMIOS or HAVE_TERMIO is set). Until then, make sure that
nothing has already defined the one of the names, and do the right nothing has already defined the one of the names, and do the right
thing. */ thing. */
/* nothing works with go32, and the headers aren't complete */ /* nothing works with go32, and the headers aren't complete */
#if !defined (__GO32__) #if !defined (__GO32__) && !defined (_WIN32)
#if !defined (HAVE_TERMIOS) && !defined(HAVE_TERMIO) && !defined(HAVE_SGTTY) #if !defined (HAVE_TERMIOS) && !defined(HAVE_TERMIO) && !defined(HAVE_SGTTY)
#if defined(HAVE_TERMIOS_H) #if defined(HAVE_TERMIOS_H)
#define HAVE_TERMIOS #define HAVE_TERMIOS
#elif defined(HAVE_TERMIO_H) #elif defined(HAVE_TERMIO_H)
#define HAVE_TERMIO #define HAVE_TERMIO
#elif defined(HAVE_SGTTY) #elif defined(HAVE_SGTTY_H)
#define HAVE_SGTTY #define HAVE_SGTTY
#endif #endif
#endif #endif
@ -46,8 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <termios.h> #include <termios.h>
#endif #endif
#if !defined(__GO32__) && !defined(_WIN32) && !defined (HAVE_TERMIOS)
#if !defined(__GO32__) && !defined(__WIN32__) && !defined (HAVE_TERMIOS)
/* Define a common set of macros -- BSD based -- and redefine whatever /* Define a common set of macros -- BSD based -- and redefine whatever
the system offers to make it look like that. FIXME: serial.h and the system offers to make it look like that. FIXME: serial.h and

View file

@ -48,10 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif #endif
#include "gdb_string.h" #include "gdb_string.h"
#ifndef NO_SYS_FILE
#include <sys/file.h>
#endif
#include <sys/param.h>
#include "gdb_stat.h" #include "gdb_stat.h"
#include <ctype.h> #include <ctype.h>
@ -575,6 +571,7 @@ catch_errors (func, args, errstring, mask)
/* Handler for SIGHUP. */ /* Handler for SIGHUP. */
#ifndef _WIN32
static void static void
disconnect (signo) disconnect (signo)
int signo; int signo;
@ -584,6 +581,7 @@ int signo;
signal (SIGHUP, SIG_DFL); signal (SIGHUP, SIG_DFL);
kill (getpid (), SIGHUP); kill (getpid (), SIGHUP);
} }
#endif
/* Just a little helper function for disconnect(). */ /* Just a little helper function for disconnect(). */
@ -1895,9 +1893,11 @@ init_signals ()
might be in memory, shared between the two). Since we establish might be in memory, shared between the two). Since we establish
a handler for SIGQUIT, when we call exec it will set the signal a handler for SIGQUIT, when we call exec it will set the signal
to SIG_DFL for us. */ to SIG_DFL for us. */
#ifndef _WIN32
signal (SIGQUIT, do_nothing); signal (SIGQUIT, do_nothing);
if (signal (SIGHUP, do_nothing) != SIG_IGN) if (signal (SIGHUP, do_nothing) != SIG_IGN)
signal (SIGHUP, disconnect); signal (SIGHUP, disconnect);
#endif
signal (SIGFPE, float_handler); signal (SIGFPE, float_handler);
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) #if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
@ -2987,8 +2987,11 @@ source_command (args, from_tty)
old_cleanups = make_cleanup (free, file); old_cleanups = make_cleanup (free, file);
stream = fopen (file, FOPEN_RT); stream = fopen (file, FOPEN_RT);
if (stream == 0) if (!stream)
perror_with_name (file); if (from_tty)
perror_with_name (file);
else
return;
make_cleanup (fclose, stream); make_cleanup (fclose, stream);