X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/b6682dd96f61d85fd6c6727706f36c60e7dbd693..54a72868e6b4d3001918d57884c8cf74ec8f9b8b:/src/sysdep.c diff --git a/src/sysdep.c b/src/sysdep.c index f75da6a9c2..20d60400dc 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1,6 +1,6 @@ /* Interfaces to system-dependent kernel and library entries. Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, - 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -47,13 +47,9 @@ extern void srandom P_ ((unsigned int)); #endif #include "blockinput.h" -#undef NULL #ifdef MAC_OS8 -/* It is essential to include stdlib.h so that this file picks up - the correct definitions of rand, srand, and RAND_MAX. - Otherwise random numbers will not work correctly. */ -#include +#include #ifndef subprocesses /* Nonzero means delete a process right away if it exits (process.c). */ @@ -248,7 +244,7 @@ int emacs_ospeed; under VMS, we place the input channel number here. */ int input_fd; -void croak P_ ((char *)); +void croak P_ ((char *)) NO_RETURN; #ifdef AIXHFT void hft_init (); @@ -260,7 +256,7 @@ void hft_reset (); SIGMASKTYPE sigprocmask_set; -#ifndef HAVE_CURRENT_DIR_NAME +#if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME) /* Return the current working directory. Returns NULL on errors. Any other returned value must be freed with free. This is used @@ -1016,7 +1012,7 @@ reset_sigio () void request_sigio () { - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; #ifdef SIGWINCH @@ -1030,7 +1026,7 @@ request_sigio () void unrequest_sigio () { - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; #ifdef SIGWINCH @@ -1048,7 +1044,7 @@ request_sigio () { int on = 1; - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; ioctl (input_fd, FIOASYNC, &on); @@ -1060,7 +1056,7 @@ unrequest_sigio () { int off = 0; - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; ioctl (input_fd, FIOASYNC, &off); @@ -1079,7 +1075,7 @@ request_sigio () int on = 1; sigset_t st; - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; sigemptyset (&st); @@ -1094,7 +1090,7 @@ unrequest_sigio () { int off = 0; - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; ioctl (input_fd, FIOASYNC, &off); @@ -1107,7 +1103,7 @@ unrequest_sigio () void request_sigio () { - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; croak ("request_sigio"); @@ -1116,7 +1112,7 @@ request_sigio () void unrequest_sigio () { - if (read_socket_hook) + if (noninteractive || read_socket_hook) return; croak ("unrequest_sigio"); @@ -1377,16 +1373,6 @@ init_sys_modes () { struct emacs_tty tty; -#ifdef MAC_OS8 -/* cus-start.el complains if delete-exited-processes is not defined */ -#ifndef subprocesses - DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, - doc: /* *Non-nil means delete processes immediately when they exit. -nil means don't delete them until `list-processes' is run. */); - delete_exited_processes = 0; -#endif -#endif /* MAC_OS8 */ - #ifdef VMS #if 0 static int oob_chars[2] = {0, 1 << 7}; /* catch C-g's */ @@ -2239,12 +2225,16 @@ reset_sigio () void request_sigio () { + if (noninteractive) + return; croak ("request sigio"); } void unrequest_sigio () { + if (noninteractive) + return; croak ("unrequest sigio"); } @@ -2779,6 +2769,8 @@ reset_sigio () void request_sigio () { + if (noninteractive) + return; sigrelse (SIGTINT); interrupts_deferred = 0; @@ -2787,6 +2779,8 @@ request_sigio () void unrequest_sigio () { + if (noninteractive) + return; sighold (SIGTINT); interrupts_deferred = 1; @@ -3762,7 +3756,7 @@ set_file_times (filename, atime, mtime) * sdcsvax!rmr or rmr@uscd * * Severely hacked over by John Gilmore to make a 4.2BSD compatible - * subroutine. 11Mar86; hoptoad!gnu + * subroutine. 11Mar86; hoptoad!gnu * * Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir, * subroutine didn't return EEXIST. It does now.