aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-07-12 21:36:48 +0300
committerEli Zaretskii2010-07-12 21:36:48 +0300
commit10a44998028756566a173999178603f33dcb11a1 (patch)
tree0bbd79a55b7f5e746747cdcee40d7987aa18090f /src
parent5dddb7a8b16f6d4ccad4edee93f5ea944cdd9337 (diff)
parentfc549af9e08b8c54c9632f69053affc95112bde0 (diff)
downloademacs-10a44998028756566a173999178603f33dcb11a1.tar.gz
emacs-10a44998028756566a173999178603f33dcb11a1.zip
Fix the MS-DOS build (fallout from 2010-07-12T14:16:38Z!schwab@linux-m68k.org, 2010-07-12T17:04:38Z!dann@ics.uci.edu, 2010-07-12T17:21:11Z!dann@ics.uci.edu).
src/process.c (setup_process_coding_systems): Move to the part shared by non-subprocesses systems, and make its body empty when subprocesses is not defined. (close_process_descs): Move to the part shared by non-subprocesses systems. msdos/sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS): Edit to empty. msdos/sed3v2.inp(C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS): Edit to empty.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/process.c118
2 files changed, 69 insertions, 57 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2849373e1a2..599b197ad72 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-07-12 Eli Zaretskii <eliz@gnu.org>
2
3 * process.c (setup_process_coding_systems): Move to the part
4 shared by non-subprocesses systems, and make its body empty when
5 subprocesses is not defined.
6 (close_process_descs): Move to the part shared by non-subprocesses
7 systems.
8
12010-07-12 Andreas Schwab <schwab@linux-m68k.org> 92010-07-12 Andreas Schwab <schwab@linux-m68k.org>
2 10
3 * editfns.c (transpose_markers): Convert old-style definition. 11 * editfns.c (transpose_markers): Convert old-style definition.
diff --git a/src/process.c b/src/process.c
index 233513efe9a..44036b555bd 100644
--- a/src/process.c
+++ b/src/process.c
@@ -642,38 +642,6 @@ remove_process (register Lisp_Object proc)
642 deactivate_process (proc); 642 deactivate_process (proc);
643} 643}
644 644
645/* Setup coding systems of PROCESS. */
646
647void
648setup_process_coding_systems (Lisp_Object process)
649{
650 struct Lisp_Process *p = XPROCESS (process);
651 int inch = p->infd;
652 int outch = p->outfd;
653 Lisp_Object coding_system;
654
655 if (inch < 0 || outch < 0)
656 return;
657
658 if (!proc_decode_coding_system[inch])
659 proc_decode_coding_system[inch]
660 = (struct coding_system *) xmalloc (sizeof (struct coding_system));
661 coding_system = p->decode_coding_system;
662 if (! NILP (p->filter))
663 ;
664 else if (BUFFERP (p->buffer))
665 {
666 if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
667 coding_system = raw_text_coding_system (coding_system);
668 }
669 setup_coding_system (coding_system, proc_decode_coding_system[inch]);
670
671 if (!proc_encode_coding_system[outch])
672 proc_encode_coding_system[outch]
673 = (struct coding_system *) xmalloc (sizeof (struct coding_system));
674 setup_coding_system (p->encode_coding_system,
675 proc_encode_coding_system[outch]);
676}
677 645
678DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, 646DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
679 doc: /* Return t if OBJECT is a process. */) 647 doc: /* Return t if OBJECT is a process. */)
@@ -4113,31 +4081,6 @@ deactivate_process (Lisp_Object proc)
4113 } 4081 }
4114} 4082}
4115 4083
4116/* Close all descriptors currently in use for communication
4117 with subprocess. This is used in a newly-forked subprocess
4118 to get rid of irrelevant descriptors. */
4119
4120void
4121close_process_descs (void)
4122{
4123#ifndef DOS_NT
4124 int i;
4125 for (i = 0; i < MAXDESC; i++)
4126 {
4127 Lisp_Object process;
4128 process = chan_process[i];
4129 if (!NILP (process))
4130 {
4131 int in = XPROCESS (process)->infd;
4132 int out = XPROCESS (process)->outfd;
4133 if (in >= 0)
4134 emacs_close (in);
4135 if (out >= 0 && in != out)
4136 emacs_close (out);
4137 }
4138 }
4139#endif
4140}
4141 4084
4142DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, 4085DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output,
4143 0, 4, 0, 4086 0, 4, 0,
@@ -7206,6 +7149,67 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
7206/* The following functions are needed even if async subprocesses are 7149/* The following functions are needed even if async subprocesses are
7207 not supported. Some of them are no-op stubs in that case. */ 7150 not supported. Some of them are no-op stubs in that case. */
7208 7151
7152/* Setup coding systems of PROCESS. */
7153
7154void
7155setup_process_coding_systems (Lisp_Object process)
7156{
7157#ifdef subprocesses
7158 struct Lisp_Process *p = XPROCESS (process);
7159 int inch = p->infd;
7160 int outch = p->outfd;
7161 Lisp_Object coding_system;
7162
7163 if (inch < 0 || outch < 0)
7164 return;
7165
7166 if (!proc_decode_coding_system[inch])
7167 proc_decode_coding_system[inch]
7168 = (struct coding_system *) xmalloc (sizeof (struct coding_system));
7169 coding_system = p->decode_coding_system;
7170 if (! NILP (p->filter))
7171 ;
7172 else if (BUFFERP (p->buffer))
7173 {
7174 if (NILP (XBUFFER (p->buffer)->enable_multibyte_characters))
7175 coding_system = raw_text_coding_system (coding_system);
7176 }
7177 setup_coding_system (coding_system, proc_decode_coding_system[inch]);
7178
7179 if (!proc_encode_coding_system[outch])
7180 proc_encode_coding_system[outch]
7181 = (struct coding_system *) xmalloc (sizeof (struct coding_system));
7182 setup_coding_system (p->encode_coding_system,
7183 proc_encode_coding_system[outch]);
7184#endif
7185}
7186
7187/* Close all descriptors currently in use for communication
7188 with subprocess. This is used in a newly-forked subprocess
7189 to get rid of irrelevant descriptors. */
7190
7191void
7192close_process_descs (void)
7193{
7194#ifndef DOS_NT
7195 int i;
7196 for (i = 0; i < MAXDESC; i++)
7197 {
7198 Lisp_Object process;
7199 process = chan_process[i];
7200 if (!NILP (process))
7201 {
7202 int in = XPROCESS (process)->infd;
7203 int out = XPROCESS (process)->outfd;
7204 if (in >= 0)
7205 emacs_close (in);
7206 if (out >= 0 && in != out)
7207 emacs_close (out);
7208 }
7209 }
7210#endif
7211}
7212
7209DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, 7213DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0,
7210 doc: /* Return the (or a) process associated with BUFFER. 7214 doc: /* Return the (or a) process associated with BUFFER.
7211BUFFER may be a buffer or the name of one. */) 7215BUFFER may be a buffer or the name of one. */)