[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/callproc.c,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/src/callproc.c,v |
Date: |
Sun, 13 Jan 2008 00:44:00 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 08/01/13 00:43:56
Index: src/callproc.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/callproc.c,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -b -r1.233 -r1.234
--- src/callproc.c 8 Jan 2008 20:44:23 -0000 1.233
+++ src/callproc.c 13 Jan 2008 00:43:54 -0000 1.234
@@ -160,14 +160,14 @@
call_process_cleanup (fdpid)
Lisp_Object fdpid;
{
-#if defined (MSDOS) || defined (MAC_OS8)
+#if defined (MSDOS)
/* for MSDOS fdpid is really (fd . tempfile) */
register Lisp_Object file;
file = Fcdr (fdpid);
emacs_close (XFASTINT (Fcar (fdpid)));
if (strcmp (SDATA (file), NULL_DEVICE) != 0)
unlink (SDATA (file));
-#else /* not MSDOS and not MAC_OS8 */
+#else /* not MSDOS */
register int pid = XFASTINT (Fcdr (fdpid));
if (call_process_exited)
@@ -244,10 +244,6 @@
char *outf, *tempfile;
int outfilefd;
#endif
-#ifdef MAC_OS8
- char *tempfile;
- int outfilefd;
-#endif
#if 0
int mask;
#endif
@@ -470,39 +466,11 @@
fd[1] = outfilefd;
#endif /* MSDOS */
-#ifdef MAC_OS8
- /* Since we don't have pipes on the Mac, create a temporary file to
- hold the output of the subprocess. */
- tempfile = (char *) alloca (SBYTES (Vtemp_file_name_pattern) + 1);
- bcopy (SDATA (Vtemp_file_name_pattern), tempfile,
- SBYTES (Vtemp_file_name_pattern) + 1);
-
- mktemp (tempfile);
-
- outfilefd = creat (tempfile, S_IREAD | S_IWRITE);
- if (outfilefd < 0)
- {
- close (filefd);
- report_file_error ("Opening process output file",
- Fcons (build_string (tempfile), Qnil));
- }
- fd[0] = filefd;
- fd[1] = outfilefd;
-#endif /* MAC_OS8 */
-
if (INTEGERP (buffer))
fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1;
else
{
#ifndef MSDOS
-#ifndef MAC_OS8
- errno = 0;
- if (pipe (fd) == -1)
- {
- emacs_close (filefd);
- report_file_error ("Creating process pipe", Qnil);
- }
-#endif
#endif
#if 0
/* Replaced by close_process_descs */
@@ -561,52 +529,6 @@
report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil));
}
-#ifdef MAC_OS8
- {
- /* Call run_mac_command in sysdep.c here directly instead of doing
- a child_setup as for MSDOS and other platforms. Note that this
- code does not handle passing the environment to the synchronous
- Mac subprocess. */
- char *infn, *outfn, *errfn, *currdn;
-
- /* close these files so subprocess can write to them */
- close (outfilefd);
- if (fd_error != outfilefd)
- close (fd_error);
- fd1 = -1; /* No harm in closing that one! */
-
- infn = SDATA (infile);
- outfn = tempfile;
- if (NILP (error_file))
- errfn = NULL_DEVICE;
- else if (EQ (Qt, error_file))
- errfn = outfn;
- else
- errfn = SDATA (error_file);
- currdn = SDATA (current_dir);
- pid = run_mac_command (new_argv, currdn, infn, outfn, errfn);
-
- /* Record that the synchronous process exited and note its
- termination status. */
- synch_process_alive = 0;
- synch_process_retcode = pid;
- if (synch_process_retcode < 0) /* means it couldn't be exec'ed */
- {
- synchronize_system_messages_locale ();
- synch_process_death = strerror (errno);
- }
-
- /* Since CRLF is converted to LF within `decode_coding', we can
- always open a file with binary mode. */
- fd[0] = open (tempfile, O_BINARY);
- if (fd[0] < 0)
- {
- unlink (tempfile);
- close (filefd);
- report_file_error ("Cannot re-open temporary file", Qnil);
- }
- }
-#else /* not MAC_OS8 */
#ifdef MSDOS /* MW, July 1993 */
/* Note that on MSDOS `child_setup' actually returns the child process
exit status, not its PID, so we assign it to `synch_process_retcode'
@@ -669,7 +591,6 @@
if (fd_error >= 0)
emacs_close (fd_error);
#endif /* not MSDOS */
-#endif /* not MAC_OS8 */
environ = save_environ;
@@ -703,14 +624,14 @@
/* Enable sending signal if user quits below. */
call_process_exited = 0;
-#if defined(MSDOS) || defined(MAC_OS8)
+#if defined(MSDOS)
/* MSDOS needs different cleanup information. */
record_unwind_protect (call_process_cleanup,
Fcons (make_number (fd[0]), build_string (tempfile)));
#else
record_unwind_protect (call_process_cleanup,
Fcons (make_number (fd[0]), make_number (pid)));
-#endif /* not MSDOS and not MAC_OS8 */
+#endif /* not MSDOS */
if (BUFFERP (buffer))