From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24534 invoked by alias); 16 Nov 2012 17:52:24 -0000 Received: (qmail 24525 invoked by uid 22791); 16 Nov 2012 17:52:23 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Nov 2012 17:52:18 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MDL00400DHQHJ00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Fri, 16 Nov 2012 19:52:16 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MDL004K9DN4H910@a-mtaout21.012.net.il>; Fri, 16 Nov 2012 19:52:16 +0200 (IST) Date: Fri, 16 Nov 2012 17:52:00 -0000 From: Eli Zaretskii Subject: Re: [10/10] RFC: remove gdb_wait.h In-reply-to: <50A67797.7050005@redhat.com> To: Pedro Alves Cc: tromey@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83d2zd4ery.fsf@gnu.org> References: <87obiyzns7.fsf@fleche.redhat.com> <87wqxmwthq.fsf@fleche.redhat.com> <50A67797.7050005@redhat.com> X-IsSubscribed: yes 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 X-SW-Source: 2012-11/txt/msg00465.txt.bz2 > Date: Fri, 16 Nov 2012 17:27:51 +0000 > From: Pedro Alves > CC: gdb-patches@sourceware.org > > Assuming sys/wait.h doesn't get replaced on older GNU/Linux systems, > this loses these bits: > > /* 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 > > I'm not sure whether we still encounter systems without these, and > if gdb works on them at all. AFAIU, the first 2 are already available on every Posix platform, see this discussion on the emacs-devel list: http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-11/msg00446.html The 3rd one seems to be used only on Linux, so perhaps we could depend on its being in sys/wait.h? > We could move them to say, common/linux-ptrace.h. __WALL is already there. That's another option. Coincidentally, I didn't really object to including the gnulib module, I was just saying that it might need to be fixed to DTRT on Windows.