From bf6b4923f7eedea193dee2130bf7fa597a5932d4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 16 Apr 2014 16:27:28 +0300 Subject: Fix the MSDOS build. src/unexcoff.c [MSDOS]: Include libc/atexit.h. (copy_text_and_data): Zero out the atexit chain pointer before dumping Emacs. src/termhooks.h (encode_terminal_code): Update prototype. src/term.c (encode_terminal_code) [DOS_NT]: Make it externally visible for all DOS_NT ports, not just WINDOWSNT. (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS. src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD unless it is defined. (emacs_pipe) [MSDOS]: Redirect to 'pipe'. src/process.c (close_on_exec, accept4, process_socket): Move into the "ifdef subprocesses" part. (catch_child_signal): Condition by "ifdef subprocesses". (syms_of_process) : Condition by "ifdef subprocesses". src/msdos.h: Add prototypes for new functions. (EINPROGRESS): Define. (O_CLOEXEC): Define to zero. src/msdos.c (check_window_system): Remove unnecessary an incompatible duplicate function. (sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New functions in support of new functionality. src/menu.c (single_menu_item): Add visual indication of submenu also for menus on MSDOS frames. (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS. src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define when async subprocesses aren't supported. src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition. src/emacs.c (close_output_streams): Zero out errno before calling close_stream. src/dired.c [MSDOS]: Include msdos.h. src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir. (DATA_START) [MSDOS]: Define. (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K. src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]: Ifdef away for MSDOS. (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS. (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant for MSDOS. (call_process) [MSDOS]: Fix call sequence of dostounix_filename. Use temporary file template that is compatible with mkostemp. Move vfork-related portions under #ifndef MSDOS. (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT. lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide doc strings, as required by snarf-documentation. msdos/sedlisp.inp: msdos/sedlibmk.inp: msdos/sedleim.inp: msdos/sed3v2.inp: msdos/sed2v2.inp: msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4. msdos/inttypes.h: Add PRIdMAX. msdos/INSTALL: Update for Emacs 24.4. msdos/sedadmin.inp: New file. --- src/process.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index fd34eb08d9d..2c66b9e976e 100644 --- a/src/process.c +++ b/src/process.c @@ -134,6 +134,29 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *, struct timespec *, void *); #endif +/* Work around GCC 4.7.0 bug with strict overflow checking; see + . + These lines can be removed once the GCC bug is fixed. */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) +# pragma GCC diagnostic ignored "-Wstrict-overflow" +#endif + +Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; +Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; +Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; +Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime; +Lisp_Object QCname, QCtype; + +/* True if keyboard input is on hold, zero otherwise. */ + +static bool kbd_is_on_hold; + +/* Nonzero means don't run process sentinels. This is used + when exiting. */ +bool inhibit_sentinels; + +#ifdef subprocesses + #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC 0 #endif @@ -165,29 +188,6 @@ process_socket (int domain, int type, int protocol) # define socket(domain, type, protocol) process_socket (domain, type, protocol) #endif -/* Work around GCC 4.7.0 bug with strict overflow checking; see - . - These lines can be removed once the GCC bug is fixed. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) -# pragma GCC diagnostic ignored "-Wstrict-overflow" -#endif - -Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; -Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; -Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; -Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime; -Lisp_Object QCname, QCtype; - -/* True if keyboard input is on hold, zero otherwise. */ - -static bool kbd_is_on_hold; - -/* Nonzero means don't run process sentinels. This is used - when exiting. */ -bool inhibit_sentinels; - -#ifdef subprocesses - Lisp_Object Qprocessp; static Lisp_Object Qrun, Qstop, Qsignal; static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; @@ -7058,6 +7058,7 @@ integer or floating point values. return system_process_attributes (pid); } +#ifdef subprocesses /* Arrange to catch SIGCHLD if this hasn't already been arranged. Invoke this after init_process_emacs, and after glib and/or GNUstep futz with the SIGCHLD handler, but before Emacs forks any children. @@ -7082,6 +7083,7 @@ catch_child_signal (void) : old_action.sa_handler); unblock_child_signal (); } +#endif /* subprocesses */ /* This is not called "init_process" because that is the name of a @@ -7288,10 +7290,12 @@ syms_of_process (void) DEFSYM (Qcutime, "cutime"); DEFSYM (Qcstime, "cstime"); DEFSYM (Qctime, "ctime"); +#ifdef subprocesses DEFSYM (Qinternal_default_process_sentinel, "internal-default-process-sentinel"); DEFSYM (Qinternal_default_process_filter, "internal-default-process-filter"); +#endif DEFSYM (Qpri, "pri"); DEFSYM (Qnice, "nice"); DEFSYM (Qthcount, "thcount"); -- cgit v1.2.1