From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3825 invoked by alias); 6 Nov 2013 19:04:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3775 invoked by uid 89); 6 Nov 2013 19:04:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Nov 2013 19:04:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA6HAN5s030949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Nov 2013 12:10:23 -0500 Received: from barimba.redhat.com (ovpn-113-94.phx2.redhat.com [10.3.113.94]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rA6HA207014519; Wed, 6 Nov 2013 12:10:22 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 16/16] remove gdb_wait.h Date: Wed, 06 Nov 2013 19:05:00 -0000 Message-Id: <1383757800-6332-17-git-send-email-tromey@redhat.com> In-Reply-To: <1383757800-6332-1-git-send-email-tromey@redhat.com> References: <1383757800-6332-1-git-send-email-tromey@redhat.com> X-SW-Source: 2013-11/txt/msg00140.txt.bz2 This removes gdb_wait.h and changes all the code to use sys/wait.h instead. 2013-11-06 Tom Tromey * common/gdb_wait.h: Remove. * common/common.m4 (GDB_AC_COMMON): Don't check for sys/wait.h or wait.h. * config.in, configure: Rebuild. * charset.c: Use sys/wait.h, not gdb_wait.h. * cli/cli-cmds.c: Use sys/wait.h, not gdb_wait.h. * common/linux-btrace.c: Use sys/wait.h, not gdb_wait.h. * common/linux-ptrace.c: Use sys/wait.h, not gdb_wait.h. * config.in: Use sys/wait.h, not gdb_wait.h. * configure: Use sys/wait.h, not gdb_wait.h. * fork-child.c: Use sys/wait.h, not gdb_wait.h. * gnu-nat.c: Use sys/wait.h, not gdb_wait.h. * go32-nat.c: Use sys/wait.h, not gdb_wait.h. * ia64-linux-nat.c: Use sys/wait.h, not gdb_wait.h. * inf-child.c: Use sys/wait.h, not gdb_wait.h. * inf-ptrace.c: Use sys/wait.h, not gdb_wait.h. * infrun.c: Use sys/wait.h, not gdb_wait.h. * linux-fork.c: Use sys/wait.h, not gdb_wait.h. * linux-nat.c: Use sys/wait.h, not gdb_wait.h. * nat/linux-waitpid.c: Use sys/wait.h, not gdb_wait.h. * ppc-linux-nat.c: Use sys/wait.h, not gdb_wait.h. * proc-api.c: Use sys/wait.h, not gdb_wait.h. * procfs.c: Use sys/wait.h, not gdb_wait.h. * remote-fileio.c: Use sys/wait.h, not gdb_wait.h. * sparc-nat.c: Use sys/wait.h, not gdb_wait.h. * spu-linux-nat.c: Use sys/wait.h, not gdb_wait.h. * utils.c: Use sys/wait.h, not gdb_wait.h. * xtensa-linux-nat.c: Use sys/wait.h, not gdb_wait.h. 2013-11-06 Tom Tromey * config.in, configure: Rebuild. * linux-low.c: Use sys/wait.h, not gdb_wait.h. * lynx-low.c: Use sys/wait.h, not gdb_wait.h. * server.c: Use sys/wait.h, not gdb_wait.h. * spu-low.c: Use sys/wait.h, not gdb_wait.h. --- gdb/ChangeLog | 31 +++++++++++++ gdb/charset.c | 2 +- gdb/cli/cli-cmds.c | 2 +- gdb/common/common.m4 | 3 +- gdb/common/gdb_wait.h | 113 ---------------------------------------------- gdb/common/linux-btrace.c | 2 +- gdb/common/linux-ptrace.c | 2 +- gdb/config.in | 6 --- gdb/configure | 2 +- gdb/fork-child.c | 2 +- gdb/gdbserver/ChangeLog | 8 ++++ gdb/gdbserver/config.in | 6 --- gdb/gdbserver/configure | 2 +- gdb/gdbserver/linux-low.c | 2 +- gdb/gdbserver/lynx-low.c | 2 +- gdb/gdbserver/server.c | 2 +- gdb/gdbserver/spu-low.c | 2 +- gdb/gnu-nat.c | 2 +- gdb/go32-nat.c | 2 +- gdb/ia64-linux-nat.c | 2 +- gdb/inf-child.c | 2 +- gdb/inf-ptrace.c | 2 +- gdb/infrun.c | 2 +- gdb/linux-fork.c | 2 +- gdb/linux-nat.c | 2 +- gdb/nat/linux-waitpid.c | 2 +- gdb/ppc-linux-nat.c | 2 +- gdb/proc-api.c | 2 +- gdb/procfs.c | 2 +- gdb/remote-fileio.c | 2 +- gdb/sparc-nat.c | 2 +- gdb/spu-linux-nat.c | 2 +- gdb/utils.c | 2 +- gdb/xtensa-linux-nat.c | 2 +- 34 files changed, 68 insertions(+), 155 deletions(-) delete mode 100644 gdb/common/gdb_wait.h diff --git a/gdb/charset.c b/gdb/charset.c index 1f44e8f..a127059 100644 --- a/gdb/charset.c +++ b/gdb/charset.c @@ -22,7 +22,7 @@ #include "gdbcmd.h" #include "gdb_assert.h" #include "gdb_obstack.h" -#include "gdb_wait.h" +#include #include "charset-list.h" #include "vec.h" #include "environ.h" diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 85f1713..a9ccab9 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -25,7 +25,7 @@ #include "readline/tilde.h" #include "completer.h" #include "target.h" /* For baud_rate, remote_debug and remote_timeout. */ -#include "gdb_wait.h" /* For shell escape implementation. */ +#include /* For shell escape implementation. */ #include "gdb_regex.h" /* Used by apropos_command. */ #include #include "gdb_vfork.h" diff --git a/gdb/common/common.m4 b/gdb/common/common.m4 index a2d06e4..3324321 100644 --- a/gdb/common/common.m4 +++ b/gdb/common/common.m4 @@ -25,8 +25,7 @@ AC_DEFUN([GDB_AC_COMMON], [ AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl sys/resource.h sys/socket.h sys/syscall.h dnl - sys/un.h sys/wait.h dnl - thread_db.h wait.h) + sys/un.h thread_db.h) AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair]) diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h deleted file mode 100644 index 1c234c4..0000000 --- a/gdb/common/gdb_wait.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Standard wait macros. - Copyright (C) 2000-2013 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 3 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, see . */ - -#ifndef GDB_WAIT_H -#define GDB_WAIT_H - -#ifdef HAVE_SYS_WAIT_H -#include /* POSIX */ -#else -#ifdef HAVE_WAIT_H -#include /* 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 - defines, since our code does not use waitpid() (but - NOTE exception for GNU/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. */ - -#ifndef WSETEXIT -# ifdef W_EXITCODE -#define WSETEXIT(w,status) ((w) = W_EXITCODE(status,0)) -# else -#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8))) -# endif -#endif - -#ifndef WSETSTOP -# ifdef W_STOPCODE -#define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig)) -# else -#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) -# endif -#endif - -/* For native GNU/Linux we may use waitpid and the __WCLONE option. - It is of course dangerous not to use the REAL header file... - . */ - -/* 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 diff --git a/gdb/common/linux-btrace.c b/gdb/common/linux-btrace.c index 7e20745..fb0170d 100644 --- a/gdb/common/linux-btrace.c +++ b/gdb/common/linux-btrace.c @@ -30,7 +30,7 @@ #include "gdb_assert.h" #include "regcache.h" #include "gdbthread.h" -#include "gdb_wait.h" +#include #include "i386-cpuid.h" #ifdef HAVE_SYS_SYSCALL_H diff --git a/gdb/common/linux-ptrace.c b/gdb/common/linux-ptrace.c index 2b12a68..86e2f00 100644 --- a/gdb/common/linux-ptrace.c +++ b/gdb/common/linux-ptrace.c @@ -28,7 +28,7 @@ #include "nat/linux-waitpid.h" #include "buffer.h" #include "gdb_assert.h" -#include "gdb_wait.h" +#include #include diff --git a/gdb/config.in b/gdb/config.in index 802127f..304591d 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -474,9 +474,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_USER_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H @@ -510,9 +507,6 @@ /* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID -/* Define to 1 if you have the header file. */ -#undef HAVE_WAIT_H - /* Define to 1 if you have the `wborder' function. */ #undef HAVE_WBORDER diff --git a/gdb/configure b/gdb/configure index e00a06b..933492e 100755 --- a/gdb/configure +++ b/gdb/configure @@ -10349,7 +10349,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi - for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h + for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h thread_db.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 61785fe..a814874 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -24,7 +24,7 @@ #include "inferior.h" #include "terminal.h" #include "target.h" -#include "gdb_wait.h" +#include #include "gdb_vfork.h" #include "gdbcore.h" #include "terminal.h" diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in index e33cdea..60b3b60 100644 --- a/gdb/gdbserver/config.in +++ b/gdb/gdbserver/config.in @@ -208,9 +208,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_WAIT_H - /* Define if TD_VERSION is available. */ #undef HAVE_TD_VERSION @@ -235,9 +232,6 @@ /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define to 1 if you have the header file. */ -#undef HAVE_WAIT_H - /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index fac7fb3..411f86c 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -5102,7 +5102,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi - for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h sys/wait.h thread_db.h wait.h + for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/syscall.h sys/un.h thread_db.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 6355fa8..5f09299 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -23,7 +23,7 @@ #include "nat/linux-nat.h" #include "nat/linux-waitpid.h" -#include "gdb_wait.h" +#include #include #include #include "linux-ptrace.h" diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 3c061b8..124e513 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -25,7 +25,7 @@ #include #include #include -#include "gdb_wait.h" +#include #include #include "filestuff.h" diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index e0af785..6c42c50 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -26,7 +26,7 @@ #if HAVE_SIGNAL_H #include #endif -#include "gdb_wait.h" +#include #include "btrace-common.h" #include "filestuff.h" #include "tracepoint.h" diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index 49b02a6..34985d6 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -20,7 +20,7 @@ #include "server.h" -#include "gdb_wait.h" +#include #include #include #include diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index de88f83..b98b89a 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -57,7 +57,7 @@ #include "value.h" #include "language.h" #include "target.h" -#include "gdb_wait.h" +#include #include "gdbcmd.h" #include "gdbcore.h" #include "gdbthread.h" diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c index ec483ce..2bb952e 100644 --- a/gdb/go32-nat.c +++ b/gdb/go32-nat.c @@ -88,7 +88,7 @@ #include "i386-nat.h" #include "inferior.h" #include "gdbthread.h" -#include "gdb_wait.h" +#include #include "gdbcore.h" #include "command.h" #include "gdbcmd.h" diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index edc1e23..20d7c03 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -29,7 +29,7 @@ #include #include -#include "gdb_wait.h" +#include #ifdef HAVE_SYS_REG_H #include #endif diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 3db09c9..9b67a00 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -29,7 +29,7 @@ #include "inf-child.h" #include "gdb/fileio.h" #include "agent.h" -#include "gdb_wait.h" +#include #include "filestuff.h" #include diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 1d187b5..02e1839 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -28,7 +28,7 @@ #include "gdb_assert.h" #include #include "gdb_ptrace.h" -#include "gdb_wait.h" +#include #include #include "inf-ptrace.h" diff --git a/gdb/infrun.c b/gdb/infrun.c index 8ec246a..f1a564e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -26,7 +26,7 @@ #include "inferior.h" #include "exceptions.h" #include "breakpoint.h" -#include "gdb_wait.h" +#include #include "gdbcore.h" #include "gdbcmd.h" #include "cli/cli-script.h" diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 383aa70..de61221 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -32,7 +32,7 @@ #include "source.h" #include -#include "gdb_wait.h" +#include #include #include diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 229b5a2..87e1273 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -23,7 +23,7 @@ #include "nat/linux-nat.h" #include "nat/linux-waitpid.h" #include -#include "gdb_wait.h" +#include #include "gdb_assert.h" #ifdef HAVE_TKILL_SYSCALL #include diff --git a/gdb/nat/linux-waitpid.c b/gdb/nat/linux-waitpid.c index 2debea4..a212786 100644 --- a/gdb/nat/linux-waitpid.c +++ b/gdb/nat/linux-waitpid.c @@ -26,7 +26,7 @@ #include "nat/linux-nat.h" #include "nat/linux-waitpid.h" -#include "gdb_wait.h" +#include /* Print debugging output based on the format string FORMAT and its parameters. */ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index d6820be..95724f2 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -34,7 +34,7 @@ #include #include #include -#include "gdb_wait.h" +#include #include #include #include diff --git a/gdb/proc-api.c b/gdb/proc-api.c index 249aca1..bb5322e 100644 --- a/gdb/proc-api.c +++ b/gdb/proc-api.c @@ -44,7 +44,7 @@ #include /* for struct user */ #endif #include /* for O_RDWR etc. */ -#include "gdb_wait.h" +#include #include "proc-utils.h" diff --git a/gdb/procfs.c b/gdb/procfs.c index fff66a0..923e0bb 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -42,7 +42,7 @@ #include #endif #include -#include "gdb_wait.h" +#include #include #include #include "gdb_bfd.h" diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index c6e7ece..4ce39fc 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -24,7 +24,7 @@ #include "gdbcmd.h" #include "remote.h" #include "gdb/fileio.h" -#include "gdb_wait.h" +#include #include #include "exceptions.h" #include "remote-fileio.h" diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index d90ef96..d720a99 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -26,7 +26,7 @@ #include #include #include -#include "gdb_wait.h" +#include #ifdef HAVE_MACHINE_REG_H #include #endif diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index 22ed483..4dbee97 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -27,7 +27,7 @@ #include "inf-ptrace.h" #include "regcache.h" #include "symfile.h" -#include "gdb_wait.h" +#include #include "gdbthread.h" #include "gdb_bfd.h" diff --git a/gdb/utils.c b/gdb/utils.c index 10c73d3..fe98245 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -22,7 +22,7 @@ #include "gdb_assert.h" #include #include -#include "gdb_wait.h" +#include #include "event-top.h" #include "exceptions.h" #include "gdbthread.h" diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c index ed60429..ca88654 100644 --- a/gdb/xtensa-linux-nat.c +++ b/gdb/xtensa-linux-nat.c @@ -32,7 +32,7 @@ #include #include #include -#include "gdb_wait.h" +#include #include #include #include -- 1.8.1.4