diff options
| author | Andrew Choi | 2002-04-26 23:39:06 +0000 |
|---|---|---|
| committer | Andrew Choi | 2002-04-26 23:39:06 +0000 |
| commit | e0f712ba55fa0d073f6ab93606e428f61fc7caf2 (patch) | |
| tree | 7dc6d3403fafcbee1a83288ac840f7eba1d92b44 /src/callproc.c | |
| parent | 501d8923ae2cdec4ef50f050bb66d3715ba2a8f6 (diff) | |
| download | emacs-e0f712ba55fa0d073f6ab93606e428f61fc7caf2.tar.gz emacs-e0f712ba55fa0d073f6ab93606e428f61fc7caf2.zip | |
Patch for building Emacs on Mac OS X. April 26, 2002. See ChangeLog,
lisp/ChangeLog, and src/ChangeLog for list of changes.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/callproc.c b/src/callproc.c index 92e6e479eaf..77d8b40e921 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -154,14 +154,14 @@ Lisp_Object | |||
| 154 | call_process_cleanup (fdpid) | 154 | call_process_cleanup (fdpid) |
| 155 | Lisp_Object fdpid; | 155 | Lisp_Object fdpid; |
| 156 | { | 156 | { |
| 157 | #if defined (MSDOS) || defined (macintosh) | 157 | #if defined (MSDOS) || defined (MAC_OS8) |
| 158 | /* for MSDOS fdpid is really (fd . tempfile) */ | 158 | /* for MSDOS fdpid is really (fd . tempfile) */ |
| 159 | register Lisp_Object file; | 159 | register Lisp_Object file; |
| 160 | file = Fcdr (fdpid); | 160 | file = Fcdr (fdpid); |
| 161 | emacs_close (XFASTINT (Fcar (fdpid))); | 161 | emacs_close (XFASTINT (Fcar (fdpid))); |
| 162 | if (strcmp (XSTRING (file)-> data, NULL_DEVICE) != 0) | 162 | if (strcmp (XSTRING (file)-> data, NULL_DEVICE) != 0) |
| 163 | unlink (XSTRING (file)->data); | 163 | unlink (XSTRING (file)->data); |
| 164 | #else /* not MSDOS and not macintosh */ | 164 | #else /* not MSDOS and not MAC_OS8 */ |
| 165 | register int pid = XFASTINT (Fcdr (fdpid)); | 165 | register int pid = XFASTINT (Fcdr (fdpid)); |
| 166 | 166 | ||
| 167 | if (call_process_exited) | 167 | if (call_process_exited) |
| @@ -232,7 +232,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 232 | char *outf, *tempfile; | 232 | char *outf, *tempfile; |
| 233 | int outfilefd; | 233 | int outfilefd; |
| 234 | #endif | 234 | #endif |
| 235 | #ifdef macintosh | 235 | #ifdef MAC_OS8 |
| 236 | char *tempfile; | 236 | char *tempfile; |
| 237 | int outfilefd; | 237 | int outfilefd; |
| 238 | #endif | 238 | #endif |
| @@ -440,7 +440,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 440 | fd[1] = outfilefd; | 440 | fd[1] = outfilefd; |
| 441 | #endif /* MSDOS */ | 441 | #endif /* MSDOS */ |
| 442 | 442 | ||
| 443 | #ifdef macintosh | 443 | #ifdef MAC_OS8 |
| 444 | /* Since we don't have pipes on the Mac, create a temporary file to | 444 | /* Since we don't have pipes on the Mac, create a temporary file to |
| 445 | hold the output of the subprocess. */ | 445 | hold the output of the subprocess. */ |
| 446 | tempfile = (char *) alloca (STRING_BYTES (XSTRING (Vtemp_file_name_pattern)) + 1); | 446 | tempfile = (char *) alloca (STRING_BYTES (XSTRING (Vtemp_file_name_pattern)) + 1); |
| @@ -458,14 +458,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 458 | } | 458 | } |
| 459 | fd[0] = filefd; | 459 | fd[0] = filefd; |
| 460 | fd[1] = outfilefd; | 460 | fd[1] = outfilefd; |
| 461 | #endif /* macintosh */ | 461 | #endif /* MAC_OS8 */ |
| 462 | 462 | ||
| 463 | if (INTEGERP (buffer)) | 463 | if (INTEGERP (buffer)) |
| 464 | fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1; | 464 | fd[1] = emacs_open (NULL_DEVICE, O_WRONLY, 0), fd[0] = -1; |
| 465 | else | 465 | else |
| 466 | { | 466 | { |
| 467 | #ifndef MSDOS | 467 | #ifndef MSDOS |
| 468 | #ifndef macintosh | 468 | #ifndef MAC_OS8 |
| 469 | errno = 0; | 469 | errno = 0; |
| 470 | if (pipe (fd) == -1) | 470 | if (pipe (fd) == -1) |
| 471 | { | 471 | { |
| @@ -531,7 +531,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 531 | 531 | ||
| 532 | current_dir = ENCODE_FILE (current_dir); | 532 | current_dir = ENCODE_FILE (current_dir); |
| 533 | 533 | ||
| 534 | #ifdef macintosh | 534 | #ifdef MAC_OS8 |
| 535 | { | 535 | { |
| 536 | /* Call run_mac_command in sysdep.c here directly instead of doing | 536 | /* Call run_mac_command in sysdep.c here directly instead of doing |
| 537 | a child_setup as for MSDOS and other platforms. Note that this | 537 | a child_setup as for MSDOS and other platforms. Note that this |
| @@ -576,7 +576,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 576 | report_file_error ("Cannot re-open temporary file", Qnil); | 576 | report_file_error ("Cannot re-open temporary file", Qnil); |
| 577 | } | 577 | } |
| 578 | } | 578 | } |
| 579 | #else /* not macintosh */ | 579 | #else /* not MAC_OS8 */ |
| 580 | #ifdef MSDOS /* MW, July 1993 */ | 580 | #ifdef MSDOS /* MW, July 1993 */ |
| 581 | /* Note that on MSDOS `child_setup' actually returns the child process | 581 | /* Note that on MSDOS `child_setup' actually returns the child process |
| 582 | exit status, not its PID, so we assign it to `synch_process_retcode' | 582 | exit status, not its PID, so we assign it to `synch_process_retcode' |
| @@ -635,7 +635,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 635 | if (fd_error >= 0) | 635 | if (fd_error >= 0) |
| 636 | emacs_close (fd_error); | 636 | emacs_close (fd_error); |
| 637 | #endif /* not MSDOS */ | 637 | #endif /* not MSDOS */ |
| 638 | #endif /* not macintosh */ | 638 | #endif /* not MAC_OS8 */ |
| 639 | 639 | ||
| 640 | environ = save_environ; | 640 | environ = save_environ; |
| 641 | 641 | ||
| @@ -669,14 +669,14 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 669 | /* Enable sending signal if user quits below. */ | 669 | /* Enable sending signal if user quits below. */ |
| 670 | call_process_exited = 0; | 670 | call_process_exited = 0; |
| 671 | 671 | ||
| 672 | #if defined(MSDOS) || defined(macintosh) | 672 | #if defined(MSDOS) || defined(MAC_OS8) |
| 673 | /* MSDOS needs different cleanup information. */ | 673 | /* MSDOS needs different cleanup information. */ |
| 674 | record_unwind_protect (call_process_cleanup, | 674 | record_unwind_protect (call_process_cleanup, |
| 675 | Fcons (make_number (fd[0]), build_string (tempfile))); | 675 | Fcons (make_number (fd[0]), build_string (tempfile))); |
| 676 | #else | 676 | #else |
| 677 | record_unwind_protect (call_process_cleanup, | 677 | record_unwind_protect (call_process_cleanup, |
| 678 | Fcons (make_number (fd[0]), make_number (pid))); | 678 | Fcons (make_number (fd[0]), make_number (pid))); |
| 679 | #endif /* not MSDOS and not macintosh */ | 679 | #endif /* not MSDOS and not MAC_OS8 */ |
| 680 | 680 | ||
| 681 | 681 | ||
| 682 | if (BUFFERP (buffer)) | 682 | if (BUFFERP (buffer)) |