Replace ../include/wait.h with gdb_wait.h.
authorAndrew Cagney <cagney@redhat.com>
Wed, 9 Feb 2000 08:52:47 +0000 (08:52 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 9 Feb 2000 08:52:47 +0000 (08:52 +0000)
51 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/command.c
gdb/convex-tdep.c
gdb/convex-xdep.c
gdb/fork-child.c
gdb/gdb_wait.h [new file with mode: 0644]
gdb/gdbarch.c
gdb/gnu-nat.c
gdb/go32-nat.c
gdb/hppa-tdep.c
gdb/infptrace.c
gdb/infrun.c
gdb/inftarg.c
gdb/infttrace.c
gdb/lin-thread.c
gdb/linux-thread.c
gdb/m3-nat.c
gdb/mac-nat.c
gdb/monitor.c
gdb/ocd.c
gdb/ppc-bdm.c
gdb/remote-adapt.c
gdb/remote-array.c
gdb/remote-bug.c
gdb/remote-e7000.c
gdb/remote-eb.c
gdb/remote-es.c
gdb/remote-mips.c
gdb/remote-mm.c
gdb/remote-nindy.c
gdb/remote-os9k.c
gdb/remote-rdi.c
gdb/remote-rdp.c
gdb/remote-sds.c
gdb/remote-sim.c
gdb/remote-st.c
gdb/remote-udi.c
gdb/remote-vx.c
gdb/remote-vx29k.c
gdb/remote-vx68.c
gdb/remote-vx960.c
gdb/remote-vxmips.c
gdb/remote-vxsparc.c
gdb/remote.c
gdb/ser-pipe.c
gdb/ser-unix.c
gdb/standalone.c
gdb/target.c
gdb/win32-nat.c
gdb/windows-nat.c

index e037f83..d02d819 100644 (file)
@@ -1,3 +1,23 @@
+Wed Feb  9 18:59:16 2000  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * Makefile.in (wait_h): Delete macro.  Update all dependencies
+       specifying gdb_wait.h instead.
+
+       * ser-unix.c, ser-pipe.c, remote.c, remote-udi.c, remote-sds.c,
+       remote-os9k.c, remote-es.c, remote-rdp.c, remote-vx960.c,
+       remote-vx.c, remote-st.c, remote-nindy.c, remote-mm.c,
+       convex-xdep.c, convex-tdep.c, target.c, win32-nat.c, standalone.c,
+       remote-vxmips.c, remote-vxsparc.c, remote-vx68.c, remote-vx29k.c,
+       remote-sim.c, remote-rdi.c, remote-mips.c, remote-eb.c,
+       remote-e7000.c, remote-bug.c, remote-array.c, remote-adapt.c,
+       ppc-bdm.c, ocd.c, monitor.c, m3-nat.c, linux-thread.c,
+       infttrace.c, lin-thread.c, infptrace.c, gnu-nat.c, gdbarch.c,
+       fork-child.c, command.c: Include "gdb_wait.h" instead of <wait.h>
+       or <sys/wait.h>.
+
+       * gdb_wait.h: New file.  Based on ../include/wait.h. Include
+       <sys/wait.h> or <wait.h> and then define any missing WIF macros.
+
 Wed Feb  9 01:14:54 2000  Andrew Cagney  <cagney@amy.cygnus.com>
 
        * config/d10v/tm-d10v.h (NO_EXTRA_ALIGNMENT_NEEDED): Define.
index 4d27467..e87a6d8 100644 (file)
@@ -461,7 +461,6 @@ getopt_h =  $(INCLUDE_DIR)/getopt.h
 floatformat_h =        $(INCLUDE_DIR)/floatformat.h
 bfd_h =                $(BFD_DIR)/bfd.h
 elf_bfd_h =     $(BFD_SRC)/elf-bfd.h
-wait_h =       $(INCLUDE_DIR)/wait.h
 dis-asm_h =    $(INCLUDE_DIR)/dis-asm.h 
 remote-sim_h = $(INCLUDE_DIR)/remote-sim.h
 
@@ -1146,11 +1145,11 @@ coffread.o: coffread.c $(bfd_h) $(breakpoint_h) buildsym.h \
        gdb_string.h
 
 command.o: command.c $(defs_h) $(expression_h) $(gdbcmd_h) \
-       $(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h $(wait_h)
+       $(gdbtypes_h) $(symtab_h) $(value_h) gdb_string.h gdb_wait.h
 
 complaints.o: complaints.c complaints.h $(defs_h) $(gdbcmd_h)
 
-# OBSOLETE convex-tdep.o: convex-tdep.c $(wait_h) $(defs_h) $(gdbcmd_h) \
+# OBSOLETE convex-tdep.o: convex-tdep.c gdb_wait.h $(defs_h) $(gdbcmd_h) \
 # OBSOLETE     $(gdbcore_h) $(inferior_h)
 
 # OBSOLETE convex-xdep.o: convex-xdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
@@ -1186,7 +1185,7 @@ delta68-nat.o: delta68-nat.c $(defs_h)
 
 demangle.o: demangle.c $(defs_h) $(gdbcmd_h) gdb_string.h
 
-dink32-rom.o: dink32-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+dink32-rom.o: dink32-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h serial.h terminal.h symfile.h
 
 dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) gdb_string.h
@@ -1229,7 +1228,7 @@ expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
        gdb_string.h
 
-fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
+fork-child.o: fork-child.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
 
 gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
@@ -1314,7 +1313,7 @@ h8500-tdep.o: h8500-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) \
 
 hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(gdbcore_h) $(inferior_h)
 
-hppa-tdep.o: hppa-tdep.c $(wait_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
+hppa-tdep.o: hppa-tdep.c gdb_wait.h $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
        $(inferior_h) objfiles.h symfile.h target.h
 
 hppab-nat.o: hppab-nat.c $(bfd_h) $(defs_h) $(inferior_h) target.h
@@ -1361,13 +1360,13 @@ inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
        signals.h target.h terminal.h gdbthread.h gdb_string.h
 
 infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
-       gdb_string.h $(wait_h) $(command_h)
+       gdb_string.h gdb_wait.h $(command_h)
 
-infrun.o: infrun.c $(wait_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
+infrun.o: infrun.c gdb_wait.h $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
        $(inferior_h) target.h gdbthread.h gdb_string.h $(event_loop_h) \
        $(event_top_h) target.h
 
-inftarg.o: inftarg.c $(wait_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
+inftarg.o: inftarg.c gdb_wait.h $(defs_h) $(gdbcore_h) $(inferior_h) \
        target.h terminal.h $(command_h)
 
 irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h)
@@ -1411,7 +1410,7 @@ m2-valprint.o: m2-valprint.c $(defs_h) $(gdbtypes_h) $(symtab_h) \
        valprint.h m2-lang.h
 
 m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(value_h) language.h target.h \
-       $(wait_h) $(gdbcmd_h) $(gdbcore_h)
+       gdb_wait.h $(gdbcmd_h) $(gdbcore_h)
 
 m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
        $(gdbcore_h) gdb_string.h
@@ -1466,16 +1465,16 @@ mipsread.o: mipsread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
 
 mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h
 
-monitor.o: monitor.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+monitor.o: monitor.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h serial.h terminal.h gdb_string.h
 
 news-xdep.o: news-xdep.c
 
-Onindy.o: nindy-share/Onindy.c $(wait_h) nindy-share/block_io.h \
+Onindy.o: nindy-share/Onindy.c gdb_wait.h nindy-share/block_io.h \
        nindy-share/env.h
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/Onindy.c
 
-nindy.o: nindy-share/nindy.c $(wait_h) nindy-share/block_io.h \
+nindy.o: nindy-share/nindy.c gdb_wait.h nindy-share/block_io.h \
        nindy-share/env.h
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/nindy.c
 
@@ -1526,10 +1525,10 @@ parse.o: parse.c $(command_h) $(defs_h) $(expression_h) $(frame_h) \
        gdb_string.h
 
 ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) gdb_string.h $(frame_h) \
-       $(inferior_h) $(bfd_h) symfile.h target.h $(wait_h) $(gdbcmd_h) \
+       $(inferior_h) $(bfd_h) symfile.h target.h gdb_wait.h $(gdbcmd_h) \
        objfiles.h gdb-stabs.h serial.h ocd.h
 
-ppcbug-rom.o: ppcbug-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+ppcbug-rom.o: ppcbug-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h serial.h terminal.h
 
 printcmd.o: printcmd.c $(breakpoint_h) $(defs_h) $(expression_h) \
@@ -1553,7 +1552,7 @@ proc-why.o: proc-why.c $(defs_h) proc-utils.h
 sol-thread.o: sol-thread.c $(defs_h) gdbthread.h target.h $(inferior_h) \
        $(gdbcmd_h)
 
-linux-thread.o: linux-thread.c $(breakpoint_h) $(gdbcmd_h) $(wait_h) \
+linux-thread.o: linux-thread.c $(breakpoint_h) $(gdbcmd_h) gdb_wait.h \
        gdbthread.h $(gdbcore_h) $(inferior_h) target.h $(defs_h)
 
 # OBSOLETE pyr-tdep.o: pyr-tdep.c $(defs_h) 
@@ -1562,14 +1561,14 @@ linux-thread.o: linux-thread.c $(breakpoint_h) $(gdbcmd_h) $(wait_h) \
 
 gnu-regex.o: gnu-regex.c gnu-regex.h $(defs_h) gdb_string.h
 
-remote-adapt.o: remote-adapt.c $(wait_h) $(defs_h) $(gdbcore_h) \
+remote-adapt.o: remote-adapt.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) target.h terminal.h gdb_string.h
 
-remote-array.o: remote-array.c $(wait_h) $(defs_h) $(gdbcore_h) target.h \
+remote-array.o: remote-array.c gdb_wait.h $(defs_h) $(gdbcore_h) target.h \
       gdb_string.h $(command_h) serial.h monitor.h $(remote_utils_h) \
        $(version_h)
 
-remote-rdi.o: remote-rdi.c $(wait_h) $(defs_h) $(gdbcore_h) \
+remote-rdi.o: remote-rdi.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) gdb_string.h
 
 rdi-share/libangsd.a:  force
@@ -1582,13 +1581,13 @@ rdi-share/libangsd.a:   force
          true; \
        fi
 
-remote-d10v.o: remote-d10v.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+remote-d10v.o: remote-d10v.c $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h
 
-remote-rdp.o: remote-rdp.c $(wait_h) $(defs_h) $(gdbcore_h) \
+remote-rdp.o: remote-rdp.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) gdb_string.h
 
-remote-bug.o: remote-bug.c $(wait_h) $(defs_h) $(gdbcore_h) \
+remote-bug.o: remote-bug.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) target.h terminal.h $(remote_utils_h) gdb_string.h
 
 # FIXME: For the SH target, remote-e7000 contains numerous -Wformat
@@ -1596,73 +1595,73 @@ remote-bug.o: remote-bug.c $(wait_h) $(defs_h) $(gdbcore_h) \
 # handles the SH remote protocol the changes need to be tested against
 # an SH board before they can be committed. cagney 1999-09-01.
 remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) target.h \
-       $(wait_h) serial.h gdb_string.h
+       gdb_wait.h serial.h gdb_string.h
        $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
 
-remote-eb.o: remote-eb.c $(wait_h) $(srcdir)/config/a29k/tm-a29k.h \
+remote-eb.o: remote-eb.c gdb_wait.h $(srcdir)/config/a29k/tm-a29k.h \
        $(defs_h) $(gdbcore_h) $(inferior_h) symfile.h target.h terminal.h \
        gdb_string.h
 
-remote-es.o: remote-es.c $(bfd_h) $(wait_h) $(command_h) $(defs_h) \
+remote-es.o: remote-es.c $(bfd_h) gdb_wait.h $(command_h) $(defs_h) \
        $(inferior_h) $(remote_utils_h) terminal.h gdb_string.h
 
-remote-hms.o: remote-hms.c $(wait_h) $(defs_h) $(gdbcore_h) \
+remote-hms.o: remote-hms.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) serial.h target.h terminal.h gdb_string.h
 
-remote-mips.o: remote-mips.c $(wait_h) $(defs_h) $(gdbcmd_h) \
+remote-mips.o: remote-mips.c gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(gdbcore_h) $(inferior_h) serial.h symfile.h target.h
 
-remote-mm.o: remote-mm.c $(bfd_h) $(wait_h) $(defs_h) $(inferior_h) \
+remote-mm.o: remote-mm.c $(bfd_h) gdb_wait.h $(defs_h) $(inferior_h) \
        minimon.h target.h terminal.h gdb_string.h
 
-remote-nindy.o: remote-nindy.c $(floatformat_h) $(wait_h) $(command_h) \
+remote-nindy.o: remote-nindy.c $(floatformat_h) gdb_wait.h $(command_h) \
        $(defs_h) $(gdbcore_h) $(inferior_h) \
        nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
        symfile.h
 
-remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) $(wait_h) \
+remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) gdb_wait.h \
        $(command_h) monitor.h $(remote_utils_h) $(symtab_h) symfile.h \
        objfiles.h gdb-stabs.h gdb_string.h
 
-remote-sds.o: remote-sds.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+remote-sds.o: remote-sds.c $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h
 
-remote-sim.o: remote-sim.c $(wait_h) $(defs_h) $(gdbcore_h) \
+remote-sim.o: remote-sim.c gdb_wait.h $(defs_h) $(gdbcore_h) \
        $(inferior_h) target.h terminal.h gdb_string.h \
        $(INCLUDE_DIR)/callback.h
 
-remote-st.o: remote-st.c $(wait_h) $(defs_h) $(gdbcore_h) serial.h \
+remote-st.o: remote-st.c gdb_wait.h $(defs_h) $(gdbcore_h) serial.h \
        target.h gdb_string.h
 
-remote-udi.o: remote-udi.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+remote-udi.o: remote-udi.c $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h terminal.h $(udiheaders) gdb_string.h
 
-remote-vx.o: remote-vx.c $(wait_h) complaints.h $(defs_h) $(gdbcmd_h) \
+remote-vx.o: remote-vx.c gdb_wait.h complaints.h $(defs_h) $(gdbcmd_h) \
        $(gdbcore_h) $(inferior_h) target.h vx-share/dbgRpcLib.h \
        vx-share/ptrace.h vx-share/xdr_ld.h vx-share/xdr_ptrace.h \
        vx-share/xdr_rdb.h gdb-stabs.h objfiles.h symfile.h $(bfd_h) \
        gdb_string.h
 
-remote-vx29k.o: remote-vx29k.c $(wait_h) complaints.h $(defs_h) $(gdbcmd_h) \
+remote-vx29k.o: remote-vx29k.c gdb_wait.h complaints.h $(defs_h) $(gdbcmd_h) \
         $(gdbcore_h) $(inferior_h) target.h vx-share/dbgRpcLib.h \
         vx-share/ptrace.h vx-share/xdr_ld.h vx-share/xdr_ptrace.h \
         vx-share/xdr_rdb.h gdb_string.h
 
 ocd.o: ocd.c ocd.h $(gdbcore_h) gdb_string.h $(frame_h) $(inferior_h) \
-       $(bfd_h) symfile.h target.h $(wait_h) $(gdbcmd_h) objfiles.h \
+       $(bfd_h) symfile.h target.h gdb_wait.h $(gdbcmd_h) objfiles.h \
        gdb-stabs.h $(dcache_h) serial.h
 
 remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
        $(inferior_h) $(remote_utils_h) gdb_string.h
 
-remote.o: remote.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+remote.o: remote.c $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h \
        $(event_loop_h) $(event_top_h) $(remote_h) $(inf_loop_h)
 
-remote-nrom.o: remote-nrom.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+remote-nrom.o: remote-nrom.c $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) $(remote_utils_h) symfile.h terminal.h
 
-rom68k-rom.o: rom68k-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+rom68k-rom.o: rom68k-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h serial.h terminal.h
 
 rs6000-nat.o: rs6000-nat.c $(bfd_h) $(defs_h) $(inferior_h) target.h \
@@ -1698,10 +1697,10 @@ sh-tdep.o: sh-tdep.c $(bfd_h) $(dis-asm_h) \
        $(srcdir)/../opcodes/sh-opc.h $(defs_h) $(expression_h) $(frame_h) \
        $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(value_h)
 
-sh3-rom.o: sh3-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+sh3-rom.o: sh3-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h serial.h terminal.h
 
-mon960-rom.o: mon960-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
+mon960-rom.o: mon960-rom.c monitor.h $(bfd_h) gdb_wait.h $(defs_h) $(gdbcmd_h) \
        $(inferior_h) target.h serial.h terminal.h
 
 solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
index 0db8095..95965b2 100644 (file)
 #include "ui-out.h"
 #endif
 
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#elif HAVE_WAIT_H
-#include <wait.h>
-#endif
-
-#include "wait.h"
+#include "gdb_wait.h"
 
 /* FIXME: this should be auto-configured!  */
 #ifdef __MSDOS__
index a71def3..957518a 100644 (file)
@@ -23,7 +23,7 @@
 /* OBSOLETE #include "value.h" */
 /* OBSOLETE #include "frame.h" */
 /* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "wait.h" */
+/* OBSOLETE #include "gdb_wait.h" */
 /* OBSOLETE  */
 /* OBSOLETE #include <signal.h> */
 /* OBSOLETE #include <fcntl.h> */
index 857701d..a1c293a 100644 (file)
@@ -23,7 +23,7 @@
 /* OBSOLETE #include "value.h" */
 /* OBSOLETE #include "frame.h" */
 /* OBSOLETE #include "inferior.h" */
-/* OBSOLETE #include "wait.h" */
+/* OBSOLETE #include "gdb_wait.h" */
 /* OBSOLETE  */
 /* OBSOLETE #include <signal.h> */
 /* OBSOLETE #include <fcntl.h> */
index ae11791..1acb28a 100644 (file)
@@ -24,7 +24,7 @@
 #include "frame.h"             /* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "terminal.h"
 #include "gdbthread.h"
diff --git a/gdb/gdb_wait.h b/gdb/gdb_wait.h
new file mode 100644 (file)
index 0000000..d0f94f3
--- /dev/null
@@ -0,0 +1,115 @@
+/* Standard wait macros.
+   Copyright 2000 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef GDB_WAIT_H
+#define GDB_WAIT_H
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h> /* POSIX */
+#else
+#ifdef HAVE_WAIT_H
+#include <wait.h> /* legacy */
+#endif
+#endif
+
+/* Define how to access the int that the wait system call stores.
+   This has been compatible in all Unix systems since time immemorial,
+   but various well-meaning people have defined various different
+   words for the same old bits in the same old int (sometimes claimed
+   to be a struct).  We just know it's an int and we use these macros
+   to access the bits.  */
+
+/* The following macros are defined equivalently to their definitions
+   in POSIX.1.  We fail to define WNOHANG and WUNTRACED, which POSIX.1
+   <sys/wait.h> defines, since our code does not use waitpid() (but
+   NOTE exception for Linux below).
+   We also fail to declare wait() and waitpid().  */   
+
+#ifndef        WIFEXITED
+#define WIFEXITED(w)   (((w)&0377) == 0)
+#endif
+
+#ifndef        WIFSIGNALED
+#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0)
+#endif
+
+#ifndef        WIFSTOPPED
+#ifdef IBM6000
+
+/* Unfortunately, the above comment (about being compatible in all Unix 
+   systems) is not quite correct for AIX, sigh.  And AIX 3.2 can generate
+   status words like 0x57c (sigtrap received after load), and gdb would
+   choke on it. */
+
+#define WIFSTOPPED(w)  ((w)&0x40)
+
+#else
+#define WIFSTOPPED(w)  (((w)&0377) == 0177)
+#endif
+#endif
+
+#ifndef        WEXITSTATUS
+#define WEXITSTATUS(w) (((w) >> 8) & 0377) /* same as WRETCODE */
+#endif
+
+#ifndef        WTERMSIG
+#define WTERMSIG(w)    ((w) & 0177)
+#endif
+
+#ifndef        WSTOPSIG
+#define WSTOPSIG       WEXITSTATUS
+#endif
+
+/* These are not defined in POSIX, but are used by our programs.  */
+
+#define WAITTYPE       int
+
+#ifndef        WCOREDUMP
+#define WCOREDUMP(w)   (((w)&0200) != 0)
+#endif
+
+#ifndef        WSETEXIT
+#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8)))
+#endif
+
+#ifndef        WSETSTOP
+#define WSETSTOP(w,sig)           ((w) = (0177 | ((sig) << 8)))
+#endif
+
+/*
+ * For native Linux we may use waitpid and the __WCLONE option.
+ *  <GRIPE> It is of course dangerous not to use the REAL header file...
+ * </GRIPE>
+ */
+
+/* Bits in the third argument to `waitpid'.  */
+#ifndef WNOHANG
+#define        WNOHANG         1       /* Don't block waiting.  */
+#endif
+
+#ifndef WUNTRACED
+#define        WUNTRACED       2       /* Report status of stopped children.  */
+#endif
+
+#ifndef __WCLONE
+#define __WCLONE       0x80000000 /* Wait for cloned process.  */
+#endif
+
+#endif
index 49d7bf4..e9f5f44 100644 (file)
@@ -47,7 +47,7 @@
 #include "frame.h"
 #include "inferior.h"
 #include "breakpoint.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "gdbcmd.h"
 #include "target.h"
index 9ae9484..5f609ed 100644 (file)
@@ -60,7 +60,7 @@
 #include "value.h"
 #include "language.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
 
index 2620dcd..ae323b6 100644 (file)
@@ -25,7 +25,7 @@
 #include "frame.h"             /* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "command.h"
 #include "floatformat.h"
index 2adee0f..b9d0a5c 100644 (file)
@@ -49,7 +49,7 @@
 /*#include <sys/user.h>         After a.out.h  */
 #include <sys/file.h>
 #include "gdb_stat.h"
-#include "wait.h"
+#include "gdb_wait.h"
 
 #include "gdbcore.h"
 #include "gdbcmd.h"
index d8463e6..fb0373a 100644 (file)
 #include "target.h"
 #include "gdb_string.h"
 
-#ifdef HAVE_WAIT_H
-#include <wait.h>
-#else
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#endif
-
-/* "wait.h" fills in the gaps left by <wait.h> */
-#include "wait.h"      /* NOTE: This is ../include/wait.h */
+#include "gdb_wait.h"
 
 #include "command.h"
 
index 9a8ee54..078e957 100644 (file)
@@ -25,7 +25,7 @@
 #include "frame.h"
 #include "inferior.h"
 #include "breakpoint.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "gdbcmd.h"
 #include "target.h"
index 01c5b47..82a15cd 100644 (file)
 #include <sys/types.h>
 #include <fcntl.h>
 
-#ifdef HAVE_WAIT_H
-#include <wait.h>
-#else
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#endif
-
-/* "wait.h" fills in the gaps left by <wait.h> */
-#include "wait.h"
+#include "gdb_wait.h"
 
 extern struct symtab_and_line *
   child_enable_exception_callback PARAMS ((enum exception_event_kind, int));
index cf4b12c..89edab4 100644 (file)
@@ -24,7 +24,7 @@
 #include "inferior.h"
 #include "target.h"
 #include "gdb_string.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "command.h"
 
 /* Some hackery to work around a use of the #define name NO_FLAGS
index 2f255c0..a4f388d 100644 (file)
 #include "inferior.h"
 #include "gdbcmd.h"
 
-#ifdef HAVE_WAIT_H
-#include <wait.h>
-#else
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#endif
-
-/* "wait.h" fills in the gaps left by <wait.h> */
-#include "wait.h"
+#include "gdb_wait.h"
 
 #include <time.h>
 
index 3e72ab4..8722f14 100644 (file)
@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <sys/types.h> /* for pid_t */
 #include <sys/ptrace.h> /* for PT_* flags */
-#include <sys/wait.h> /* for WUNTRACED and __WCLONE flags */
+#include "gdb_wait.h" /* for WUNTRACED and __WCLONE flags */
 #include <signal.h> /* for struct sigaction and NSIG */
 #include <sys/utsname.h>
 
@@ -58,7 +58,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "inferior.h"
 #include "gdbcore.h"
 #include "gdbthread.h"
-#include "wait.h"
 #include "gdbcmd.h"
 #include "breakpoint.h"
 
index 0770cc3..c6b9679 100644 (file)
@@ -53,7 +53,7 @@
 #include "value.h"
 #include "language.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
 
index bf57227..c8fcddb 100644 (file)
@@ -26,7 +26,7 @@
 #include "frame.h"             /* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "command.h"
 #include <signal.h>
index ef142aa..e57c010 100644 (file)
@@ -40,7 +40,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include <signal.h>
 #include <ctype.h>
 #include "gdb_string.h"
index ef052bd..e826ca0 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -27,7 +27,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "objfiles.h"
 #include "gdb-stabs.h"
index 99b82ec..d34ccbe 100644 (file)
@@ -28,7 +28,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "objfiles.h"
 #include "gdb-stabs.h"
index b8b3edb..b41f3c2 100644 (file)
@@ -35,7 +35,7 @@
 #include "defs.h"
 #include "gdb_string.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include <ctype.h>
 #include <fcntl.h>
index a5a78c8..5ee67c7 100644 (file)
@@ -28,7 +28,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include <ctype.h>
 #include <signal.h>
 #include <sys/types.h>
index fe9e4d2..b97f6bc 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 
 #include "gdb_string.h"
 #include <ctype.h>
index 5e1017f..c5ced87 100644 (file)
@@ -37,7 +37,7 @@
 #include "gdbarch.h"
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include "command.h"
 #include <signal.h>
index 95cf7ac..7a8d90d 100644 (file)
@@ -32,7 +32,7 @@
 #include "inferior.h"
 #include "bfd.h"
 #include "symfile.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include <ctype.h>
 #include <fcntl.h>
index 95d4236..5663191 100644 (file)
 #include "frame.h"
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "command.h"
 #include "remote-utils.h"
 #include "gdbcore.h"
index d2efcf2..efafd6d 100644 (file)
@@ -24,7 +24,7 @@
 #include "inferior.h"
 #include "bfd.h"
 #include "symfile.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
 #include "serial.h"
index 26a79e2..39be798 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include <ctype.h>
 #include <fcntl.h>
index 9a25986..a1ccea7 100644 (file)
 #include "command.h"
 #include "floatformat.h"
 
-#include "wait.h"
+#include "gdb_wait.h"
 #include <sys/file.h>
 #include <ctype.h>
 #include "serial.h"
index a9d92b5..dd82115 100644 (file)
@@ -40,7 +40,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include <signal.h>
 #include "gdb_string.h"
 #include <sys/types.h>
index d187223..b432515 100644 (file)
@@ -26,7 +26,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "objfiles.h"
 #include "gdb-stabs.h"
index 7a0e53c..e193abb 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include "callback.h"
 #include "command.h"
index bdf2077..5bab41d 100644 (file)
@@ -31,7 +31,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcmd.h"
 #include "objfiles.h"
 #include "gdb-stabs.h"
index 52c0292..109d01d 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include "gdb_string.h"
 #include <ctype.h>
index 1d270a4..e820b28 100644 (file)
@@ -38,7 +38,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include <signal.h>
 #include "gdb_string.h"
 #include <sys/types.h>
index e67bb46..12590f8 100644 (file)
@@ -35,7 +35,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "value.h"
 #include <ctype.h>
 #include <fcntl.h>
index 7654180..0640704 100644 (file)
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
index 06cc048..39cd8be 100644 (file)
@@ -26,7 +26,7 @@
 #include "vx-share/regPacket.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
index e9c0fb5..59c6cdd 100644 (file)
@@ -26,7 +26,7 @@
 #include "vx-share/regPacket.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
index 012d1c0..70c216b 100644 (file)
@@ -26,7 +26,7 @@
 #include "vx-share/regPacket.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
index c59a12c..a98ac13 100644 (file)
@@ -26,7 +26,7 @@
 #include "vx-share/regPacket.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
index ee080aa..756fd1f 100644 (file)
@@ -26,7 +26,7 @@
 #include "vx-share/regPacket.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
index 90c568c..8411f2f 100644 (file)
@@ -29,7 +29,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 /*#include "terminal.h" */
 #include "gdbcmd.h"
 #include "objfiles.h"
index c3d1ccd..a510bff 100644 (file)
@@ -25,9 +25,7 @@
 #include "ser-unix.h"
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
+#include "gdb_wait.h"
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <fcntl.h>
index 80e550d..919c9fd 100644 (file)
@@ -25,9 +25,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include "terminal.h"
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
+#include "gdb_wait.h"
 #include <sys/socket.h>
 #include <sys/time.h>
 
index 0b655a1..ebb14d9 100644 (file)
@@ -34,7 +34,7 @@
 #include "symtab.h"
 #include "frame.h"
 #include "inferior.h"
-#include "wait.h"
+#include "gdb_wait.h"
 \f
 
 /* Random system calls, mostly no-ops to prevent link problems  */
index a13ac25..0142aaa 100644 (file)
@@ -30,7 +30,7 @@
 #include "bfd.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include <signal.h>
 
 extern int errno;
index a48c86d..2be6fe8 100644 (file)
@@ -28,7 +28,7 @@
 #include "frame.h"             /* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "command.h"
 #include <signal.h>
index a48c86d..2be6fe8 100644 (file)
@@ -28,7 +28,7 @@
 #include "frame.h"             /* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
-#include "wait.h"
+#include "gdb_wait.h"
 #include "gdbcore.h"
 #include "command.h"
 #include <signal.h>