From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Zeitler Newsgroups: gmane.emacs.devel Subject: Re: syswait.h Date: 29 Jul 2002 13:08:08 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200207261843.g6QIhxX09256@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027940937 24779 127.0.0.1 (29 Jul 2002 11:08:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2002 11:08:57 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Z8OW-0006RY-00 for ; Mon, 29 Jul 2002 13:08:56 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17Z8fi-0001q5-00 for ; Mon, 29 Jul 2002 13:26:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Z8Os-0006H1-00; Mon, 29 Jul 2002 07:09:18 -0400 Original-Received: from hoemail2.lucent.com ([192.11.226.163] helo=hoemail2.firewall.lucent.com) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Z8Np-00068Y-00; Mon, 29 Jul 2002 07:08:13 -0400 Original-Received: from nbgif1.de.lucent.com (h135-248-192-26.lucent.com [135.248.192.26]) by hoemail2.firewall.lucent.com (Switch-2.2.2/Switch-2.2.0) with ESMTP id g6TB8Bk26843; Mon, 29 Jul 2002 07:08:11 -0400 (EDT) Original-Received: from sfsws1.de.lucent.com (sfsws1 [135.248.217.84]) by nbgif1.de.lucent.com (8.8.8/8.8.5) with ESMTP id NAA07373; Mon, 29 Jul 2002 13:08:09 +0200 (MEST) Original-Received: from sfsw51.de.lucent.com (sfsw51 [135.248.210.168]) by sfsws1.de.lucent.com (8.11.6+Sun/8.8.5) with ESMTP id g6TB88Q29672; Mon, 29 Jul 2002 13:08:09 +0200 (MEST) Original-Received: (from kzeitler@localhost) by sfsw51.de.lucent.com (8.11.6+Sun/8.8.8) id g6TB88Z03927; Mon, 29 Jul 2002 13:08:08 +0200 (MEST) X-Authentication-Warning: sfsw51.de.lucent.com: kzeitler set sender to kzeitler@lucent.com using -f Original-To: rms@gnu.org X-Meat: Calimari In-Reply-To: <200207261843.g6QIhxX09256@aztec.santafe.edu> Original-Lines: 61 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6135 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6135 >>>>> "Richard" == Richard Stallman writes: Richard> Richard> It looks like your system's sys/wait.h defines macros to access Richard> the wait argument as a structure, but that is not what Emacs Richard> expects on a POSIX system. I don't have a copy of the POSIX spec Richard> here; does anyone know what it says about this? Richard> Richard> Meanwhile, I think some people have build Emacs on HPUX 11 Richard> and do not have this problem. Why is that? Could others who Richard> have HPUX 11 see how these macros are defined in sys/wait.h? Richard> Do they expect to operate on a struct or on an int? Richard> this is amazing, so here's an excerpt from /usr/include/sys/wait.h, i.e. the last 20 lines: #ifdef _BSD # undef WIFEXITED # define WIFEXITED(_X) ((_X).w_stopval != WSTOPFLG && (_X).w_termsig == 0) # undef WIFSTOPPED # define WIFSTOPPED(_X) ((_X).w_stopval == WSTOPFLG) # undef WIFSIGNALED # define WIFSIGNALED(_X) ((_X).w_stopval != WSTOPFLG && (_X).w_termsig != 0) # undef WEXITSTATUS # define WEXITSTATUS(_X) ((_X).w_retcode) # undef WTERMSIG # define WTERMSIG(_X) ((_X).w_termsig) # undef WCOREDUMP # define WCOREDUMP(_X) ((_X).w_coredump) # undef WSTOPSIG # define WSTOPSIG(_X) ((_X).w_stopsig) #endif /* _BSD */ #endif /* _SYS_WAIT_INCLUDED */ now looking at wait.h I thought maybe an #undef of _BSD would do also and yes it works when I remove those 2 -D_BSD definitions from: gcc -c -D_BSD -Demacs -DHAVE_CONFIG_H -DUSE_MOTIF -I. -I/vol/freeware/source/emacs-cvs/emacs/src -D_BSD -I/usr/include/X11R6 -I/usr/local/gnu/include -I/usr/include/X11R6 -I/usr/include/X11R5 -I/usr/include/Motif1.2 -I/usr/contrib/X11R6/include -I/usr/contrib/X11R5/include -g -O2 /vol/freeware/source/emacs-cvs/emacs/src/process.c a quick grep for _BSD showed that this is hardly used, but set in Makefile, so I removed it and emacs compiled fine (under HP-UX-B.11.11). So maybe it would be a better idea to remove -D_BSD instead of an undef of HAVE_SYS_WAIT_H Richard> If you add #undef HAVE_SYS_WAIT_H to s/hpux11.h, does that make it Richard> work? Richard> I've put it in s/hpux10.h since I had the same problems under 10.20 and yes that works for 10.20 and 11.11, but as I said above I think it'd be better to remove _BSD (for HP-UX 10.20 and above that is) Klaus -- ------------------------------------------ | Klaus Zeitler Lucent Technologies | | Email: kzeitler@lucent.com | ------------------------------------------ --- The economy depends about as much on economists as the weather does on weather forecasters. -- Jean-Paul Kauffmann