From ce4450fa09dafa36b069185fe198f14d038a1985 Mon Sep 17 00:00:00 2001 From: Felix Lee Date: Mon, 28 Jul 1997 22:34:36 +0000 Subject: [PATCH] * Makefile.in (init.c): don't try to scan mswin for _initialize funcs. (generates misleading error message because files have .cpp suffix, not .c suffix) * ser-e7kpc.c: -> "mswin/w32sut.h" * mon960-rom.c: removed unused #includes; no ioctl.h in Windows. * nindy-share/ttyflush.c: find sleep() for _MSC_VER. * remote-array.c: #include for isascii(). * utils.c (notice_quit,pollquit): cleanup. _WIN32 -> _MSC_VER. --- gdb/ChangeLog | 17 +++++++++ gdb/Makefile.in | 1 + gdb/mon960-rom.c | 12 ------- gdb/remote-array.c | 1 + gdb/ser-e7kpc.c | 2 +- gdb/utils.c | 87 ++++++++++++++-------------------------------- 6 files changed, 47 insertions(+), 73 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd62f501de8..bb2d82b2a40 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,8 +1,25 @@ +Mon Jul 28 14:04:39 1997 Felix Lee + + * Makefile.in (init.c): don't try to scan mswin for _initialize + funcs. (generates misleading error message because files have + .cpp suffix, not .c suffix) + +Mon Jul 28 13:27:21 1997 Felix Lee + + * ser-e7kpc.c: -> "mswin/w32sut.h" + Mon Jul 28 02:54:31 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * xcoffread.c (coff_getfilename): Do not strip directory component of filename. +Fri Jul 25 15:16:15 1997 Felix Lee + + * mon960-rom.c: removed unused #includes; no ioctl.h in Windows. + * nindy-share/ttyflush.c: find sleep() for _MSC_VER. + * remote-array.c: #include for isascii(). + * utils.c (notice_quit,pollquit): cleanup. _WIN32 -> _MSC_VER. + Fri Jul 25 16:48:18 1997 Jeffrey A Law (law@cygnus.com) * top.c (execute_command): Force cleanup of alloca areas. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index bec9aa8276d..48700af5f6b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -620,6 +620,7 @@ init.c: $(OBS) $(TSOBS) tr ' ' '\012' | \ sed -e '/^Onindy.o/d' \ -e '/^nindy.o/d' \ + -e '/^mswin/d' \ -e '/ttyflush.o/d' \ -e '/xdr_ld.o/d' \ -e '/xdr_ptrace.o/d' \ diff --git a/gdb/mon960-rom.c b/gdb/mon960-rom.c index 0468a8b2cd5..0987802ae51 100644 --- a/gdb/mon960-rom.c +++ b/gdb/mon960-rom.c @@ -28,18 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "symtab.h" #include "symfile.h" /* for generic_load */ -#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY) -#define HAVE_SGTTY -#endif - -#ifdef HAVE_SGTTY -#include -#endif - -#include /* Needed by file.h on Sys V */ -#include -#include -#include #define USE_GENERIC_LOAD diff --git a/gdb/remote-array.c b/gdb/remote-array.c index 42aa2dab682..4f832a4b4c5 100644 --- a/gdb/remote-array.c +++ b/gdb/remote-array.c @@ -33,6 +33,7 @@ #else #include #endif +#include #include #include #include "gdb_string.h" diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c index b0976df75cd..a2adef9585a 100644 --- a/gdb/ser-e7kpc.c +++ b/gdb/ser-e7kpc.c @@ -29,7 +29,7 @@ #define WIN32_LEAN_AND_MEAN #include #define W32SUT_32 -#include +#include "mswin/w32sut.h" #endif #ifdef __GO32__ diff --git a/gdb/utils.c b/gdb/utils.c index 716f92ef831..a2699d6f9f4 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -607,97 +607,64 @@ quit () } -#if defined(__GO32__) || defined (_WIN32) +#if defined(__GO32__) -#ifndef _MSC_VER /* In the absence of signals, poll keyboard for a quit. Called from #define QUIT pollquit() in xm-go32.h. */ void -pollquit() +notice_quit() { if (kbhit ()) - { - int k = getkey (); - if (k == 1) { + switch (getkey ()) + { + case 1: quit_flag = 1; - quit(); - } - else if (k == 2) { - immediate_quit = 1; - quit (); + break; + case 2: + immediate_quit = 2; + break; + default: + /* We just ignore it */ + /* FIXME!! Don't think this actually works! */ + fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n"); + break; } - else - { - /* We just ignore it */ - /* FIXME!! Don't think this actually works! */ - fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n"); - } - } } -#else /* !_MSC_VER */ -/* This above code is not valid for wingdb unless - * getkey and kbhit were to be rewritten. +#elif defined(_MSC_VER) /* should test for wingdb instead? */ + +/* * Windows translates all keyboard and mouse events * into a message which is appended to the message * queue for the process. */ -void -pollquit() + +void notice_quit() { int k = win32pollquit(); if (k == 1) - { quit_flag = 1; - quit (); - } else if (k == 2) - { immediate_quit = 1; - quit (); - } } -#endif /* !_MSC_VER */ +#else /* !defined(__GO32__) && !defined(_MSC_VER) */ -#ifndef _MSC_VER void notice_quit() { - if (kbhit ()) - { - int k = getkey (); - if (k == 1) { - quit_flag = 1; - } - else if (k == 2) - { - immediate_quit = 1; - } - else - { - fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n"); - } - } + /* Done by signals */ } -#else /* !_MSC_VER */ -void notice_quit() -{ - int k = win32pollquit(); - if (k == 1) - quit_flag = 1; - else if (k == 2) - immediate_quit = 1; -} -#endif /* !_MSC_VER */ +#endif /* !defined(__GO32__) && !defined(_MSC_VER) */ -#else -void notice_quit() +void +pollquit() { - /* Done by signals */ + notice_quit (); + if (quit_flag || immediate_quit) + quit (); } -#endif /* defined(__GO32__) || defined(_WIN32) */ /* Control C comes here */ -- 2.30.2