unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* syswait.h
@ 2002-07-26 18:43 Richard Stallman
  2002-07-26 18:52 ` syswait.h Andreas Schwab
  2002-07-29 11:08 ` syswait.h Klaus Zeitler
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2002-07-26 18:43 UTC (permalink / raw)


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: rms@gnu.org
Cc: emacs-pretest-bug@gnu.org
Subject: Re: build under HP-UX-B.10.20 or 11.11 fails in process.c
References: <q5gd6tmwixu.fsf@lucent.com>
	<200207181455.g6IEtRe25036@aztec.santafe.edu>
X-Uboat-Death-Message: 
   ATTACKED BY ATOMIC BOMB. CAPTAIN INTOXICATED. SINKING. U-144.
From: Klaus Zeitler <kzeitler@lucent.com>
Date: 19 Jul 2002 17:42:46 +0200
In-Reply-To: <200207181455.g6IEtRe25036@aztec.santafe.edu>
Message-ID: <q5g7kjrn2q1.fsf@lucent.com>
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 <rms@gnu.org> 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:             kzeitler@lucent.com  |
 ------------------------------------------
---
Never let your sense of morals prevent you from doing
what is right.         -- Salvor Hardin, "Foundation"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-07-30  0:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-26 18:43 syswait.h Richard Stallman
2002-07-26 18:52 ` syswait.h Andreas Schwab
2002-07-29 11:08 ` syswait.h Klaus Zeitler
2002-07-30  0:59   ` syswait.h Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).