diff options
author | Po Lu <luangruo@yahoo.com> | 2021-12-10 21:36:59 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2021-12-11 19:49:40 +0800 |
commit | a37484992651fa6bdee9d5181fb6b096dbf41426 (patch) | |
tree | 6d8ed65a07f9da3bc7565be1db166b5090c42378 /src/process.c | |
parent | 5708da48d1c7017b937e0fbfeb7de77bb3ba084e (diff) | |
download | emacs-a37484992651fa6bdee9d5181fb6b096dbf41426.tar.gz emacs-a37484992651fa6bdee9d5181fb6b096dbf41426.tar.bz2 emacs-a37484992651fa6bdee9d5181fb6b096dbf41426.zip |
Fix the DJGPP port
* config.bat:
* msdos/sed1v2.inp:
* msdos/sed2v2.inp:
* msdos/sed3v2.inp:
* msdos/sedlibmk.inp: Update for Emacs 28.
* msdos/langinfo.h: New file.
* lisp/loadup.el: Use correct path to temacs when dumping on
MS-DOS.
* src/callproc.c (environ) [MSDOS]: New declaration.
(child_setup, emacs_spawn): Update MS-DOS parts for Emacs 28.
* src/fileio.c (Fcopy_file): Don't use copy_file_range on
MS-DOS.
* src/msdos.c (initialize_msdos_display): Add
`defined_color_hook'.
(openat, fchmodat, futimens, utimensat): New functions.
* src/msdos.h (FRAME_X_DISPLAY): New macro.
* src/process.c: Make some more things conditional on
subprocess support.
(PIPECONN_P, PIPECONN1_P) [!subprocesses]: New placeholder
macros.
(Fnum_processors): Return 1 on MSDOS.
(open_channel_for_module): Avoid subprocess specific code
on MSDOS.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 6731f8808f5..75ba191fa10 100644 --- a/src/process.c +++ b/src/process.c @@ -40,7 +40,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include <netinet/in.h> #include <arpa/inet.h> -#endif /* subprocesses */ +#else +#define PIPECONN_P(p) false +#define PIPECONN1_P(p) false +#endif #ifdef HAVE_SETRLIMIT # include <sys/resource.h> @@ -152,6 +155,7 @@ static bool kbd_is_on_hold; when exiting. */ bool inhibit_sentinels; +#ifdef subprocesses union u_sockaddr { struct sockaddr sa; @@ -164,8 +168,6 @@ union u_sockaddr #endif }; -#ifdef subprocesses - #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC 0 #endif @@ -8238,9 +8240,13 @@ If optional argument QUERY is `current', ignore OMP_NUM_THREADS. If QUERY is `all', also count processors not available. */) (Lisp_Object query) { +#ifndef MSDOS return make_uint (num_processors (EQ (query, Qall) ? NPROC_ALL : EQ (query, Qcurrent) ? NPROC_CURRENT : NPROC_CURRENT_OVERRIDABLE)); +#else + return make_fixnum (1); +#endif } #ifdef subprocesses @@ -8285,10 +8291,15 @@ open_channel_for_module (Lisp_Object process) { CHECK_PROCESS (process); CHECK_TYPE (PIPECONN_P (process), Qpipe_process_p, process); +#ifndef MSDOS int fd = dup (XPROCESS (process)->open_fd[SUBPROCESS_STDOUT]); if (fd == -1) report_file_error ("Cannot duplicate file descriptor", Qnil); return fd; +#else + /* PIPECONN_P returning true shouldn't be possible on MSDOS. */ + emacs_abort (); +#endif } |