]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
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 e037f8398d8a743422079389045b79aa3d8e58fd..d02d8195d9f40c6f272564b16bac82ae8ddddb82 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 4d2746714f67b6c742e9ed0217831410ae5c346b..e87a6d8cc3697bee63bf858a3654bc5921bc68fb 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 0db8095b9fbb7e86fff2c7c1dae78af4a5d715d4..95965b2d7d668c04ff1e17c9ae500037fd91aa37 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 a71def35a469df7712a206d37b81704b1f35637b..957518a940bee4742867e202be70a302b1300d7b 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 857701dfc4288799a8c2497f09908ed47f30f61c..a1c293aa703737b49e074222da77a7b055d4f53d 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 ae11791df67b75775a0031e42b3ff8d20bc24a64..1acb28ad4227c270c063b09dc5938d5e7bf03101 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 49d7bf4ca702c7bf449ef9595a59363b1a255591..e9f5f444f5314b93e4bd86401f0889e97d89f300 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 9ae948496a557a6cf465d509aa4acf1a0cd699e4..5f609edea1a7f04bca7e7976ee25af6a0dc3602d 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 2620dcd933295d74fe56b9f1e427ca0d21426033..ae323b657ba3c3b4821fa126e9ada2830e5d7244 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 2adee0f110496f749138d47091914e13d9fa17b2..b9d0a5c266a262f3b51cc2ed9f0f2cccf9d2eade 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 d8463e6724636b6d47ebc07bb058fdbc6e928b44..fb0373af94ea590518fff5a145827334d841a837 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 9a8ee54e8601cb6a40f6ab8194d2209b2fb42092..078e95726745e77393236e2424be7138035dcdc0 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 01c5b474c468849ca7eac3698a12000f32a470ba..82a15cdf24308caab3309b12563405a8000366af 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 cf4b12ca82f8a587b5567af0217dec5c4c60901c..89edab474689322f09c415affa4243a31dc9905f 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 2f255c0e54a0387f1b7994c0bf808f4320b9b054..a4f388dedb411073a46f7a34e99ce4ef96189cc5 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 3e72ab402f1549bd832c7e3c6e5528ad2c393dec..8722f146b9297c5e66466990b596ac262ca4b72f 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 0770cc3a503e2c32d0a39df9830fb8926c32ac6b..c6b96795cfc3218f5470d839199ced19fd735154 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 bf5722727ddb7e562d193f6e899d12dd2cc30422..c8fcddbec1b52d21f347858c2cca25e31a2b90ea 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 ef142aad3a10bcdf46b865dc4b149b7a4be230c8..e57c010383db00f9da113274488d1e9a5fb5877a 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 ef052bd1a8328a3e06853be116177df5972a0fb0..e826ca0e56f8ae70dd16454fffd7bfdae4881347 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 99b82ece16abd659733ed96f59b7e2e987d1ce0d..d34ccbef1162e9946e31ceab69fe302cef24f7a6 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 b8b3edb56fee5db11a8b5dc9875733ad6e32f8c6..b41f3c20d47269c3eaee5d73b5eaf686272abae3 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 a5a78c8a279583a9c8f6370c4ad42460a79770bc..5ee67c7378c180a0f4261b0cda244e66b033cace 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 fe9e4d233e3e47e25fee3e16929ea44096ed1dec..b97f6bc7a021d999c759497e5aca5e27defcbf4f 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 5e1017f4f7dc01c39ea8cb490586706fd6d1df34..c5ced876caf880c9da3e7c34579452f13307a3c4 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 95cf7acd9bf1954fcdfae813ae881bbb2fb49070..7a8d90d82484cc6db621f1a3dd3894fa209f8377 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 95d42363f8af1b59840275ab1d12b05ffe273064..5663191ce1e2671c96be137f56379312a1453f29 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 d2efcf28b7aa00e93cdfd1ef30c220a3dbb234e8..efafd6d110332ab2917d0b6fd21c8cc85d24efee 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 26a79e24cff017117da64ed38cf614d3f04b4373..39be7984067e8c2b94584a165ef989eef86efd6f 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 9a25986773effa8e7bfe46c4df4de55ae4d87f65..a1ccea76947bfb236523183d3db621a4884bd688 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 a9d92b5750592a95c336b5c3503210b2b8648810..dd821154e42718eb4c642e155c1a857115c4dc73 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 d1872230ce44153ed799a32b94cac9c8e7ec54ec..b432515600702ccef9b7a36394306c0bdb02d875 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 7a0e53c5df93d5a25162dc17d6fe7394445d4a3a..e193abb4bf58c8f728b3e24a27bb34abc60c70b8 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 bdf207763b61dbeddfeed85ec601c2fbf58af8f0..5bab41d740425d39da113a6212574e2517d67620 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 52c02920f6152f1e9d92bf6c7616f26335f57a43..109d01d977322c3e709d895e2bf49b2072c18444 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 1d270a44a246eda174befbef2668e4b73f4fc27d..e820b28e51a00637333fa7accc73eb1ae2673a41 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 e67bb4634e7ead94631bdf2f74f73ec0912657ee..12590f88111097fbcf6f796df9ba3ce6af56f113 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 7654180563f5a33f4a8597aa4f6bd01515096bc1..06407041e698b96ff9e44993bc667f08ff1c6a96 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 06cc0482fcd3c1374e09876a45514d3464375156..39cd8befee4f3ad3dd58a1b7e70a21ebf504ccb9 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 e9c0fb535f09d8bd08e8115d910a58c7146c477c..59c6cdd4676de91c50ecbb42c2daa5707096e8e3 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 012d1c022299676c8f20c54811adf2b7d0d6dcd1..70c216b743953c8499ced8df3033b09aabc5483a 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 c59a12c22106aa277db068fe0d189d8d30300c83..a98ac13787bf577bc226abfcf0d0bea0e80ccc8d 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 ee080aad6061deca701fd9aed76a1c9bf8ce11e7..756fd1ffb3535159ba333194c41ad234c6e8b972 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 90c568c9bc57add10380a20ec1749ff16476dd78..8411f2f722d4b41f72a4b8daa8a1a0813ada6824 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 c3d1ccd6f57a2417bce9ba14717e79577f1a2e3b..a510bff8da397d15a9db315a25fbb0dde2085aed 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 80e550d0587b95daad1b8b927db10c85c2cd93ee..919c9fd90d9a6768032f59c6e5cb3ac3ff120b59 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 0b655a1a1d656405c9d5cc1032a3e0beb6617c01..ebb14d98c16e1a74ceade78bb0c8af2b139f4f1a 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 a13ac25040e2dc9f98ead7b683879ec958e19562..0142aaa93b6196be6d52e26cc442b0068b5e6609 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 a48c86d2ac25ad375c53aabb09d14488f402ba62..2be6fe8c90425d2037d719540e9c0f20c49a5237 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 a48c86d2ac25ad375c53aabb09d14488f402ba62..2be6fe8c90425d2037d719540e9c0f20c49a5237 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>