emacs-devel
[Top][All Lists]
Advanced

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

syswait.h


From: Richard Stallman
Subject: syswait.h
Date: Fri, 26 Jul 2002 12:43:59 -0600 (MDT)

It looks like your system's sys/wait.h defines macros to access the
wait argument as a structure, but that is not what Emacs expects on a
POSIX system.  I don't have a copy of the POSIX spec here; does anyone
know what it says about this?

Meanwhile, I think some people have build Emacs on HPUX 11
and do not have this problem.  Why is that?  Could others who
have HPUX 11 see how these macros are defined in sys/wait.h?
Do they expect to operate on a struct or on an int?

If you add #undef HAVE_SYS_WAIT_H to s/hpux11.h, does that make it
work?


To: address@hidden
Cc: address@hidden
Subject: Re: build under HP-UX-B.10.20 or 11.11 fails in process.c
References: <address@hidden>
        <address@hidden>
X-Uboat-Death-Message: 
   ATTACKED BY ATOMIC BOMB. CAPTAIN INTOXICATED. SINKING. U-144.
From: Klaus Zeitler <address@hidden>
Date: 19 Jul 2002 17:42:46 +0200
In-Reply-To: <address@hidden>
Message-ID: <address@hidden>
Lines: 60
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Length: 1510

>>>>> "Richard" == Richard Stallman <address@hidden> writes:
    Richard> 
    Richard> Can you figure out what caused the problem?

WAITTYPE is defined as int in syswait.h, but macros defined in
/usr/include/sys/wait.h that deal with WAITTYPE,
e.g. WIFSTOPPED, try to access variables of type WAITTYPE as a struct.

e.g. status_convert from process.c:


Lisp_Object
status_convert (w)
     WAITTYPE w;
{
  if (WIFSTOPPED (w))
    return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil));


looks in preprocessor file like:


int
status_convert (w)
     int w;
{
  if (((w).w_S.w_Stopval == 0177))
    return Fcons (Qstop, Fcons (((((int) (((w).w_S.w_Stopsig))) & ((((int) 
1)<<(32 - 4)) - 1)) | ((int) Lisp_Int) << (32 - 4)), Qnil));



So either the definition or the macros need to change.
I've done it the bold way, by undefining HAVE_SYS_WAIT_H
(first I changed config.h but hpux8.h explicitly defines HAVE_SYS_WAIT_H
so I went ahead and inserted in syswait.h:

#if defined(HPUX10) || defined(HPUX11)
#undef HAVE_SYS_WAIT_H
#endif

right after the line:
#include <sys/types.h>


that works, but may not be the developers intention, but with this change
emacs cvs compiles on HP-UX 10.20 and 11.11


Klaus



-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             address@hidden  |
 ------------------------------------------
---
Never let your sense of morals prevent you from doing
what is right.         -- Salvor Hardin, "Foundation"




reply via email to

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