aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorEli Zaretskii2014-04-16 16:27:28 +0300
committerEli Zaretskii2014-04-16 16:27:28 +0300
commitbf6b4923f7eedea193dee2130bf7fa597a5932d4 (patch)
tree62bd144e45df20c0fc1600eedb3f744dcfe959a2 /src/process.c
parent3a31cae4677c7c5e501dcf7e5c520e49db16f75e (diff)
downloademacs-bf6b4923f7eedea193dee2130bf7fa597a5932d4.tar.gz
emacs-bf6b4923f7eedea193dee2130bf7fa597a5932d4.zip
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) <Qinternal_default_process_sentinel> <Qinternal_default_process_filter>: 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.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c50
1 files changed, 27 insertions, 23 deletions
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 *,
134 struct timespec *, void *); 134 struct timespec *, void *);
135#endif 135#endif
136 136
137/* Work around GCC 4.7.0 bug with strict overflow checking; see
138 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>.
139 These lines can be removed once the GCC bug is fixed. */
140#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
141# pragma GCC diagnostic ignored "-Wstrict-overflow"
142#endif
143
144Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
145Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
146Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
147Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime;
148Lisp_Object QCname, QCtype;
149
150/* True if keyboard input is on hold, zero otherwise. */
151
152static bool kbd_is_on_hold;
153
154/* Nonzero means don't run process sentinels. This is used
155 when exiting. */
156bool inhibit_sentinels;
157
158#ifdef subprocesses
159
137#ifndef SOCK_CLOEXEC 160#ifndef SOCK_CLOEXEC
138# define SOCK_CLOEXEC 0 161# define SOCK_CLOEXEC 0
139#endif 162#endif
@@ -165,29 +188,6 @@ process_socket (int domain, int type, int protocol)
165# define socket(domain, type, protocol) process_socket (domain, type, protocol) 188# define socket(domain, type, protocol) process_socket (domain, type, protocol)
166#endif 189#endif
167 190
168/* Work around GCC 4.7.0 bug with strict overflow checking; see
169 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>.
170 These lines can be removed once the GCC bug is fixed. */
171#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
172# pragma GCC diagnostic ignored "-Wstrict-overflow"
173#endif
174
175Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
176Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
177Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
178Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtime, Qctime;
179Lisp_Object QCname, QCtype;
180
181/* True if keyboard input is on hold, zero otherwise. */
182
183static bool kbd_is_on_hold;
184
185/* Nonzero means don't run process sentinels. This is used
186 when exiting. */
187bool inhibit_sentinels;
188
189#ifdef subprocesses
190
191Lisp_Object Qprocessp; 191Lisp_Object Qprocessp;
192static Lisp_Object Qrun, Qstop, Qsignal; 192static Lisp_Object Qrun, Qstop, Qsignal;
193static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; 193static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten;
@@ -7058,6 +7058,7 @@ integer or floating point values.
7058 return system_process_attributes (pid); 7058 return system_process_attributes (pid);
7059} 7059}
7060 7060
7061#ifdef subprocesses
7061/* Arrange to catch SIGCHLD if this hasn't already been arranged. 7062/* Arrange to catch SIGCHLD if this hasn't already been arranged.
7062 Invoke this after init_process_emacs, and after glib and/or GNUstep 7063 Invoke this after init_process_emacs, and after glib and/or GNUstep
7063 futz with the SIGCHLD handler, but before Emacs forks any children. 7064 futz with the SIGCHLD handler, but before Emacs forks any children.
@@ -7082,6 +7083,7 @@ catch_child_signal (void)
7082 : old_action.sa_handler); 7083 : old_action.sa_handler);
7083 unblock_child_signal (); 7084 unblock_child_signal ();
7084} 7085}
7086#endif /* subprocesses */
7085 7087
7086 7088
7087/* This is not called "init_process" because that is the name of a 7089/* This is not called "init_process" because that is the name of a
@@ -7288,10 +7290,12 @@ syms_of_process (void)
7288 DEFSYM (Qcutime, "cutime"); 7290 DEFSYM (Qcutime, "cutime");
7289 DEFSYM (Qcstime, "cstime"); 7291 DEFSYM (Qcstime, "cstime");
7290 DEFSYM (Qctime, "ctime"); 7292 DEFSYM (Qctime, "ctime");
7293#ifdef subprocesses
7291 DEFSYM (Qinternal_default_process_sentinel, 7294 DEFSYM (Qinternal_default_process_sentinel,
7292 "internal-default-process-sentinel"); 7295 "internal-default-process-sentinel");
7293 DEFSYM (Qinternal_default_process_filter, 7296 DEFSYM (Qinternal_default_process_filter,
7294 "internal-default-process-filter"); 7297 "internal-default-process-filter");
7298#endif
7295 DEFSYM (Qpri, "pri"); 7299 DEFSYM (Qpri, "pri");
7296 DEFSYM (Qnice, "nice"); 7300 DEFSYM (Qnice, "nice");
7297 DEFSYM (Qthcount, "thcount"); 7301 DEFSYM (Qthcount, "thcount");