Mercurial > emacs
changeset 96620:3bea8ede5bd0
* 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.
* movemail.c (main): Use int instead of WAITTYPE.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 12 Jul 2008 05:31:23 +0000 |
parents | 029de4e224b6 |
children | bf6f87d07e3b |
files | admin/CPP-DEFINES lib-src/ChangeLog lib-src/movemail.c src/ChangeLog src/m/mips.h src/process.c src/s/aix4-2.h src/s/bsd-common.h src/s/freebsd.h src/s/gnu-linux.h src/s/gnu.h src/s/netbsd.h src/s/usg5-4.h src/syswait.h |
diffstat | 14 files changed, 29 insertions(+), 128 deletions(-) [+] |
line wrap: on
line diff
--- a/admin/CPP-DEFINES Sat Jul 12 03:19:38 2008 +0000 +++ b/admin/CPP-DEFINES Sat Jul 12 05:31:23 2008 +0000 @@ -200,12 +200,10 @@ 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 @@ -369,8 +367,6 @@ VALBITS VIRT_ADDR_VARIES VMS -WAITTYPE -WAIT_USE_INT WORDS_BIG_ENDIAN WRETCODE X11R5_INHIBIT_I18N
--- a/lib-src/ChangeLog Sat Jul 12 03:19:38 2008 +0000 +++ b/lib-src/ChangeLog Sat Jul 12 05:31:23 2008 +0000 @@ -1,3 +1,7 @@ +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):
--- a/lib-src/movemail.c Sat Jul 12 03:19:38 2008 +0000 +++ b/lib-src/movemail.c Sat Jul 12 05:31:23 2008 +0000 @@ -173,7 +173,7 @@ char *inname, *outname; int indesc, outdesc; int nread; - WAITTYPE status; + int status; int c, preserve_mail = 0; #ifndef MAIL_USE_SYSTEM_LOCK
--- a/src/ChangeLog Sat Jul 12 03:19:38 2008 +0000 +++ b/src/ChangeLog Sat Jul 12 05:31:23 2008 +0000 @@ -1,3 +1,22 @@ +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
--- a/src/m/mips.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/m/mips.h Sat Jul 12 05:31:23 2008 +0000 @@ -198,7 +198,6 @@ #define COFF #define TERMINFO #undef MAIL_USE_FLOCK /* Someone should check this. */ -#undef HAVE_UNION_WAIT #endif /* BSD_SYSTEM */ #endif /* not __linux__ */
--- a/src/process.c Sat Jul 12 03:19:38 2008 +0000 +++ b/src/process.c Sat Jul 12 05:31:23 2008 +0000 @@ -407,16 +407,14 @@ /* 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; } @@ -424,8 +422,7 @@ 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)); @@ -6698,7 +6695,7 @@ while (1) { pid_t pid; - WAITTYPE w; + int w; Lisp_Object tail; #ifdef WNOHANG @@ -6770,12 +6767,10 @@ /* 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. */
--- a/src/s/aix4-2.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/aix4-2.h Sat Jul 12 05:31:23 2008 +0000 @@ -172,10 +172,6 @@ #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
--- a/src/s/bsd-common.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/bsd-common.h Sat Jul 12 05:31:23 2008 +0000 @@ -59,10 +59,6 @@ #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
--- a/src/s/freebsd.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/freebsd.h Sat Jul 12 05:31:23 2008 +0000 @@ -110,7 +110,6 @@ #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
--- a/src/s/gnu-linux.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/gnu-linux.h Sat Jul 12 05:31:23 2008 +0000 @@ -204,8 +204,6 @@ #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 */
--- a/src/s/gnu.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/gnu.h Sat Jul 12 05:31:23 2008 +0000 @@ -64,10 +64,6 @@ #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; })
--- a/src/s/netbsd.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/netbsd.h Sat Jul 12 05:31:23 2008 +0000 @@ -33,8 +33,6 @@ #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) @@ -92,9 +90,6 @@ #define END_FILES_1 #endif -#define HAVE_WAIT_HEADER -#define WAIT_USE_INT - #define AMPERSAND_FULL_NAME #ifdef __ELF__
--- a/src/s/usg5-4.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/s/usg5-4.h Sat Jul 12 05:31:23 2008 +0000 @@ -82,11 +82,6 @@ #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 @@ -137,12 +132,6 @@ #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) @@ -185,12 +174,6 @@ #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. @@ -229,8 +212,6 @@ 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)
--- a/src/syswait.h Sat Jul 12 03:19:38 2008 +0000 +++ b/src/syswait.h Sat Jul 12 05:31:23 2008 +0000 @@ -26,11 +26,6 @@ #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. */ @@ -59,79 +54,11 @@ #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)