diff options
| author | Eli Zaretskii | 2014-04-16 16:27:28 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-04-16 16:27:28 +0300 |
| commit | bf6b4923f7eedea193dee2130bf7fa597a5932d4 (patch) | |
| tree | 62bd144e45df20c0fc1600eedb3f744dcfe959a2 /src/callproc.c | |
| parent | 3a31cae4677c7c5e501dcf7e5c520e49db16f75e (diff) | |
| download | emacs-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/callproc.c')
| -rw-r--r-- | src/callproc.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/callproc.c b/src/callproc.c index 2ce4a7dcc0d..9e60ba11bcf 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -105,6 +105,8 @@ enum | |||
| 105 | 105 | ||
| 106 | static Lisp_Object call_process (ptrdiff_t, Lisp_Object *, int, ptrdiff_t); | 106 | static Lisp_Object call_process (ptrdiff_t, Lisp_Object *, int, ptrdiff_t); |
| 107 | 107 | ||
| 108 | |||
| 109 | #ifndef MSDOS | ||
| 108 | /* Block SIGCHLD. */ | 110 | /* Block SIGCHLD. */ |
| 109 | 111 | ||
| 110 | void | 112 | void |
| @@ -124,6 +126,8 @@ unblock_child_signal (void) | |||
| 124 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); | 126 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); |
| 125 | } | 127 | } |
| 126 | 128 | ||
| 129 | #endif /* !MSDOS */ | ||
| 130 | |||
| 127 | /* Return the current buffer's working directory, or the home | 131 | /* Return the current buffer's working directory, or the home |
| 128 | directory if it's unreachable, as a string suitable for a system call. | 132 | directory if it's unreachable, as a string suitable for a system call. |
| 129 | Signal an error if the result would not be an accessible directory. */ | 133 | Signal an error if the result would not be an accessible directory. */ |
| @@ -162,6 +166,7 @@ encode_current_directory (void) | |||
| 162 | void | 166 | void |
| 163 | record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile) | 167 | record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile) |
| 164 | { | 168 | { |
| 169 | #ifndef MSDOS | ||
| 165 | block_child_signal (); | 170 | block_child_signal (); |
| 166 | 171 | ||
| 167 | if (p->alive) | 172 | if (p->alive) |
| @@ -172,6 +177,7 @@ record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile) | |||
| 172 | } | 177 | } |
| 173 | 178 | ||
| 174 | unblock_child_signal (); | 179 | unblock_child_signal (); |
| 180 | #endif /* !MSDOS */ | ||
| 175 | } | 181 | } |
| 176 | 182 | ||
| 177 | /* Clean up files, file descriptors and processes created by Fcall_process. */ | 183 | /* Clean up files, file descriptors and processes created by Fcall_process. */ |
| @@ -211,6 +217,7 @@ call_process_cleanup (Lisp_Object buffer) | |||
| 211 | { | 217 | { |
| 212 | Fset_buffer (buffer); | 218 | Fset_buffer (buffer); |
| 213 | 219 | ||
| 220 | #ifndef MSDOS | ||
| 214 | if (synch_process_pid) | 221 | if (synch_process_pid) |
| 215 | { | 222 | { |
| 216 | kill (-synch_process_pid, SIGINT); | 223 | kill (-synch_process_pid, SIGINT); |
| @@ -222,6 +229,7 @@ call_process_cleanup (Lisp_Object buffer) | |||
| 222 | immediate_quit = 0; | 229 | immediate_quit = 0; |
| 223 | message1 ("Waiting for process to die...done"); | 230 | message1 ("Waiting for process to die...done"); |
| 224 | } | 231 | } |
| 232 | #endif /* !MSDOS */ | ||
| 225 | } | 233 | } |
| 226 | 234 | ||
| 227 | #ifdef DOS_NT | 235 | #ifdef DOS_NT |
| @@ -518,10 +526,10 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, | |||
| 518 | char const *outf = tmpdir ? tmpdir : ""; | 526 | char const *outf = tmpdir ? tmpdir : ""; |
| 519 | tempfile = alloca (strlen (outf) + 20); | 527 | tempfile = alloca (strlen (outf) + 20); |
| 520 | strcpy (tempfile, outf); | 528 | strcpy (tempfile, outf); |
| 521 | dostounix_filename (tempfile, 0); | 529 | dostounix_filename (tempfile); |
| 522 | if (*tempfile == '\0' || tempfile[strlen (tempfile) - 1] != '/') | 530 | if (*tempfile == '\0' || tempfile[strlen (tempfile) - 1] != '/') |
| 523 | strcat (tempfile, "/"); | 531 | strcat (tempfile, "/"); |
| 524 | strcat (tempfile, "detmp.XXX"); | 532 | strcat (tempfile, "emXXXXXX"); |
| 525 | mktemp (tempfile); | 533 | mktemp (tempfile); |
| 526 | if (!*tempfile) | 534 | if (!*tempfile) |
| 527 | report_file_error ("Opening process output file", Qnil); | 535 | report_file_error ("Opening process output file", Qnil); |
| @@ -710,8 +718,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, | |||
| 710 | unblock_child_signal (); | 718 | unblock_child_signal (); |
| 711 | unblock_input (); | 719 | unblock_input (); |
| 712 | 720 | ||
| 713 | #endif /* not MSDOS */ | ||
| 714 | |||
| 715 | if (pid < 0) | 721 | if (pid < 0) |
| 716 | report_file_errno ("Doing vfork", Qnil, child_errno); | 722 | report_file_errno ("Doing vfork", Qnil, child_errno); |
| 717 | 723 | ||
| @@ -726,6 +732,8 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, | |||
| 726 | emacs_close (filefd); | 732 | emacs_close (filefd); |
| 727 | clear_unwind_protect (count - 1); | 733 | clear_unwind_protect (count - 1); |
| 728 | 734 | ||
| 735 | #endif /* not MSDOS */ | ||
| 736 | |||
| 729 | if (INTEGERP (buffer)) | 737 | if (INTEGERP (buffer)) |
| 730 | return unbind_to (count, Qnil); | 738 | return unbind_to (count, Qnil); |
| 731 | 739 | ||
| @@ -1672,10 +1680,8 @@ syms_of_callproc (void) | |||
| 1672 | { | 1680 | { |
| 1673 | #ifndef DOS_NT | 1681 | #ifndef DOS_NT |
| 1674 | Vtemp_file_name_pattern = build_string ("emacsXXXXXX"); | 1682 | Vtemp_file_name_pattern = build_string ("emacsXXXXXX"); |
| 1675 | #elif defined (WINDOWSNT) | 1683 | #else /* DOS_NT */ |
| 1676 | Vtemp_file_name_pattern = build_string ("emXXXXXX"); | 1684 | Vtemp_file_name_pattern = build_string ("emXXXXXX"); |
| 1677 | #else | ||
| 1678 | Vtemp_file_name_pattern = build_string ("detmp.XXX"); | ||
| 1679 | #endif | 1685 | #endif |
| 1680 | staticpro (&Vtemp_file_name_pattern); | 1686 | staticpro (&Vtemp_file_name_pattern); |
| 1681 | 1687 | ||