[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syswait.h

From: Klaus Zeitler
Subject: Re: syswait.h
Date: 29 Jul 2002 13:08:08 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Richard" == Richard Stallman <address@hidden> writes:
    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> 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?
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)
#  define WIFSIGNALED(_X)       ((_X).w_stopval != WSTOPFLG && (_X).w_termsig 
!= 0)
#  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 

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?
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 Zeitler      Lucent Technologies  |
|  Email:             address@hidden  |
The economy depends about as much on economists as the weather
does on weather forecasters.            -- Jean-Paul Kauffmann

reply via email to

[Prev in Thread] Current Thread [Next in Thread]