always defined as int.
* s/netbsd.h (HAVE_UNION_WAIT, HAVE_WAIT_HEADER, WAIT_USE_INT):
* s/gnu.h (HAVE_WAIT_HEADER, WAIT_USE_INT, HAVE_UNION_WAIT):
* s/gnu-linux.h (HAVE_WAIT_HEADER):
* s/freebsd.h (HAVE_WAIT_HEADER):
* s/bsd-common.h (HAVE_UNION_WAIT):
* s/aix4-2.h (HAVE_WAIT_HEADER):
* m/mips.h (HAVE_UNION_WAIT):
* s/usg5-4.h (HAVE_WAIT_HEADER, WAITTYPE): Do not define, not used.
(COFF, static): Do not define, they are undefined later in the file.
* process.c (update_status): Don't use a union.
(status_convert):
(sigchld_handler): Use int instead of WAITTYPE.
* movemail.c (main): Use int instead of WAITTYPE.
HAVE_TIMEVAL
HAVE_TM_ZONE
HAVE_TZSET
-HAVE_UNION_WAIT
HAVE_UNISTD_H
HAVE_UTIMES
HAVE_UTIME_H
HAVE_VOLATILE
-HAVE_WAIT_HEADER
HAVE_WINDOW_SYSTEM
HAVE_WORKING_VFORK
HAVE_XRMSETDATABASE
VALBITS
VIRT_ADDR_VARIES
VMS
-WAITTYPE
-WAIT_USE_INT
WORDS_BIG_ENDIAN
WRETCODE
X11R5_INHIBIT_I18N
+2008-07-12 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * movemail.c (main): Use int instead of WAITTYPE.
+
2008-07-05 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (OTHER_PLATFORM_SUPPORT):
char *inname, *outname;
int indesc, outdesc;
int nread;
- WAITTYPE status;
+ int status;
int c, preserve_mail = 0;
#ifndef MAIL_USE_SYSTEM_LOCK
+2008-07-12 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * syswait.h: Remove old if 0 code. Do not define WAITTYPE, it was
+ always defined as int.
+
+ * s/netbsd.h (HAVE_UNION_WAIT, HAVE_WAIT_HEADER, WAIT_USE_INT):
+ * s/gnu.h (HAVE_WAIT_HEADER, WAIT_USE_INT, HAVE_UNION_WAIT):
+ * s/gnu-linux.h (HAVE_WAIT_HEADER):
+ * s/freebsd.h (HAVE_WAIT_HEADER):
+ * s/bsd-common.h (HAVE_UNION_WAIT):
+ * s/aix4-2.h (HAVE_WAIT_HEADER):
+ * m/mips.h (HAVE_UNION_WAIT):
+ * s/usg5-4.h (HAVE_WAIT_HEADER, WAITTYPE): Do not define, not used.
+ (COFF, static): Do not define, they are undefined later in the file.
+
+ * process.c (update_status): Don't use a union.
+ (status_convert):
+ (sigchld_handler): Use int instead of WAITTYPE.
+
2008-07-12 Chong Yidong <cyd@stupidchicken.com>
* indent.c (Fvertical_motion): Restore hscroll before moving to
#define COFF
#define TERMINFO
#undef MAIL_USE_FLOCK /* Someone should check this. */
-#undef HAVE_UNION_WAIT
#endif /* BSD_SYSTEM */
#endif /* not __linux__ */
/* Compute the Lisp form of the process status, p->status, from
the numeric status that was returned by `wait'. */
-static Lisp_Object status_convert ();
+static Lisp_Object status_convert (int);
static void
update_status (p)
struct Lisp_Process *p;
{
- union { int i; WAITTYPE wt; } u;
eassert (p->raw_status_new);
- u.i = p->raw_status;
- p->status = status_convert (u.wt);
+ p->status = status_convert (p->raw_status);
p->raw_status_new = 0;
}
the list that we use internally. */
static Lisp_Object
-status_convert (w)
- WAITTYPE w;
+status_convert (int w)
{
if (WIFSTOPPED (w))
return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil));
while (1)
{
pid_t pid;
- WAITTYPE w;
+ int w;
Lisp_Object tail;
#ifdef WNOHANG
/* Change the status of the process that was found. */
if (p != 0)
{
- union { int i; WAITTYPE wt; } u;
int clear_desc_flag = 0;
p->tick = ++process_tick;
- u.wt = w;
- p->raw_status = u.i;
+ p->raw_status = w;
p->raw_status_new = 1;
/* If process has terminated, stop waiting for its output. */
#define POSIX_SIGNALS
#undef sigmask
-/* Dave Love <d.love@dl.ac.uk> reported this as needed on AIX 4.1.
- It is just a guess which versions of AIX need this definition. */
-#define HAVE_WAIT_HEADER
-
/* olson@mcs.anl.gov says -li18n is needed by -lXm. */
#define LIB_MOTIF -lXm -li18n
#define HAVE_PTYS
-/* Define this macro if system defines a type `union wait'. */
-
-#define HAVE_UNION_WAIT
-
/* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */
#define HAVE_SOCKETS
#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_1 -L/usr/local/lib
-#define HAVE_WAIT_HEADER
#define HAVE_GETLOADAVG 1
#define HAVE_TERMIOS
#define NO_TERMIO
#define NO_SIOCTL_H /* don't have sioctl.h */
-#define HAVE_WAIT_HEADER
-
#define SYSV_SYSTEM_DIR /* use dirent.h */
#define POSIX /* affects getpagesize.h and systty.h */
#undef REL_ALLOC
#endif
-#define HAVE_WAIT_HEADER
-#define WAIT_USE_INT
-#define HAVE_UNION_WAIT
-
/* GNU needs its own crt0, and libc defines data_start. */
#define ORDINARY_LINK
#define DATA_START ({ extern int data_start; (char *) &data_start; })
#undef LDAV_SYMBOL
#define HAVE_GETLOADAVG 1
-#define HAVE_UNION_WAIT
-
#define SIGNALS_VIA_CHARACTERS
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
#define END_FILES_1
#endif
-#define HAVE_WAIT_HEADER
-#define WAIT_USE_INT
-
#define AMPERSAND_FULL_NAME
#ifdef __ELF__
#define subprocesses
-/* If your system uses COFF (Common Object File Format) then define the
- preprocessor symbol "COFF". */
-
-#define COFF
-
/* define MAIL_USE_FLOCK if the mailer uses flock
to interlock access to /usr/spool/mail/$USER.
The alternative is that a lock file named
#define rindex strrchr
#endif /* ! defined (HAVE_RINDEX) */
-/* USG systems tend to put everything declared static
- into the initialized data area, which becomes pure after dumping Emacs.
- Foil this. Emacs carefully avoids static vars inside functions. */
-
-#define static
-
/* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
#define ADDR_CORRECT(x) (x)
#define UNEXEC unexelf.o
-/* <sys/stat.h> *defines* stat(2) as a static function. If "static"
- * is blank, then many files will have a public definition for stat(2).
- */
-
-#undef static
-
/* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct
* tchars. But get <termio.h> first to make sure ttold.h doesn't
* interfere. And don't try to use SIGIO yet.
without clearing the SIGCHLD pending info. So, use a non-blocking
wait3 instead, which maps to waitpid(2) in SysVr4. */
-#define HAVE_WAIT_HEADER
-#define WAITTYPE int
#define wait3(status, options, rusage) \
waitpid ((pid_t) -1, (status), (options))
#define WRETCODE(w) (w >> 8)
#ifndef VMS
-/* This is now really the approach recommended by Autoconf. If this
- doesn't cause trouble anywhere, remove the original code, which is
- #if'd out below. */
-
-#if 1
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H /* We have sys/wait.h with POSIXoid definitions. */
#define WTERMSIG(status) ((status) & 0x7f)
#endif
-#undef WAITTYPE
-#define WAITTYPE int
#undef WRETCODE
#define WRETCODE(status) WEXITSTATUS (status)
-#else /* 0 */
-
-#ifndef WAITTYPE
-
-#ifdef WAIT_USE_INT
-/* Some systems have union wait in their header, but we should use
- int regardless of that. */
-#include <sys/wait.h>
-#define WAITTYPE int
-#define WRETCODE(w) WEXITSTATUS (w)
-
-#else /* not WAIT_USE_INT */
-
-#if (!defined (BSD_SYSTEM) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER))
-#define WAITTYPE int
-#define WIFSTOPPED(w) ((w&0377) == 0177)
-#define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0)
-#define WIFEXITED(w) ((w&0377) == 0)
-#define WRETCODE(w) (w >> 8)
-#define WSTOPSIG(w) (w >> 8)
-#define WTERMSIG(w) (w & 0177)
-#ifndef WCOREDUMP
-#define WCOREDUMP(w) ((w&0200) != 0)
-#endif
-
-#else
-
-#include <sys/wait.h>
-
-#define WAITTYPE union wait
-#define WRETCODE(w) w.w_retcode
-#undef WCOREDUMP /* Later BSDs define this name differently. */
-#define WCOREDUMP(w) w.w_coredump
-
-#if defined (HPUX) || defined (convex)
-/* HPUX version 7 has broken definitions of these. */
-/* pvogel@convex.com says the convex does too. */
-#undef WTERMSIG
-#undef WSTOPSIG
-#undef WIFSTOPPED
-#undef WIFSIGNALED
-#undef WIFEXITED
-#endif /* HPUX | convex */
-
-#ifndef WTERMSIG
-#define WTERMSIG(w) w.w_termsig
-#endif
-#ifndef WSTOPSIG
-#define WSTOPSIG(w) w.w_stopsig
-#endif
-#ifndef WIFSTOPPED
-#define WIFSTOPPED(w) (WTERMSIG (w) == 0177)
-#endif
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(w) (WTERMSIG (w) != 0177 && (WSTOPSIG (w)) == 0)
-#endif
-#ifndef WIFEXITED
-#define WIFEXITED(w) (WTERMSIG (w) == 0)
-#endif
-#endif /* BSD_SYSTEM || HPUX */
-#endif /* not WAIT_USE_INT */
-#endif /* no WAITTYPE */
-
-#endif /* 0 */
-
#else /* VMS */
-#define WAITTYPE int
#define WIFSTOPPED(w) 0
#define WIFSIGNALED(w) 0
#define WIFEXITED(w) ((w) != -1)