* configure.in: Check for unistd.h.

* configure: Regenerated.

* command.c, cp-valprint.c, fork-child.c, i386-tdep.c,
i386b-nat.c, inflow.c, main.c, maint.c, objfiles.c, solib.c,
source.c, stack.c, symfile.c, top.c, utils.c: Include strings.h
and/or unistd.h to bring prototypes into scope.
This commit is contained in:
J.T. Conklin
1995-07-31 22:46:03 +00:00
parent f641906be5
commit 1a49497348
18 changed files with 564 additions and 319 deletions

View File

@ -1,5 +1,5 @@
/* Low level interface to ptrace, for GDB when running under Unix.
Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
Copyright 1986, 1987, 1989, 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of GDB.
@ -27,10 +27,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "target.h"
#include "thread.h"
#include <string.h>
#include <signal.h>
#include <fcntl.h>
#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY) && !defined (__GO32__)
#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY) && !defined (__GO32__) && !defined(WIN32)
#define HAVE_SGTTY
#endif
@ -483,7 +484,7 @@ new_tty ()
if (inferior_thisrun_terminal == 0)
return;
#if !defined(__GO32__)
#if !defined(__GO32__) && !defined(WIN32)
#ifdef TIOCNOTTY
/* Disconnect the child process from our controlling terminal. On some
systems (SVR4 for example), this may cause a SIGTTOU, so temporarily
@ -522,7 +523,7 @@ new_tty ()
{ close (2); dup (tty); }
if (tty > 2)
close(tty);
#endif /* !go32 */
#endif /* !go32 && !win32*/
}
/* Kill the inferior process. Make us have no inferior. */
@ -533,7 +534,11 @@ kill_command (arg, from_tty)
char *arg;
int from_tty;
{
if (!target_has_execution)
/* FIXME: This should not really be inferior_pid (or target_has_execution).
It should be a distinct flag that indicates that a target is active, cuz
some targets don't have processes! */
if (inferior_pid == 0)
error ("The program is not being run.");
if (!query ("Kill the program being debugged? "))
error ("Not confirmed.");
@ -568,13 +573,19 @@ static void (*osig)();
void
set_sigint_trap()
{
osig = (void (*) ()) signal (SIGINT, pass_signal);
if (attach_flag || inferior_thisrun_terminal)
{
osig = (void (*) ()) signal (SIGINT, pass_signal);
}
}
void
clear_sigint_trap()
{
signal (SIGINT, osig);
if (attach_flag || inferior_thisrun_terminal)
{
signal (SIGINT, osig);
}
}
#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN)