Commit 32676c08 authored by Jim Blandy's avatar Jim Blandy

*** empty log message ***

parent d9a0f717
...@@ -127,8 +127,7 @@ src/paths.h: Makefile src/paths.h.in ...@@ -127,8 +127,7 @@ src/paths.h: Makefile src/paths.h.in
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \ -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
-e 's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \ -e 's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \
-e 's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \ -e 's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \
-e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";' \ -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";'
-e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "${lockdir}/!!!SuperLock!!!";'
src: lib-src src: lib-src
......
...@@ -551,8 +551,9 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, ...@@ -551,8 +551,9 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
register struct Lisp_Marker *p; register struct Lisp_Marker *p;
/* Detact the bug that seems to have caused this to be called from /* Detact the bug that seems to have caused this to be called from
a signal handler. */ a signal handler. */
int mask = sigsetmask (-1); int mask, dummy;
sigsetmask (mask); EMACS_SIGSETMASK (-1, mask);
EMACS_SIGSETMASK (mask, dummy);
if (mask != 0) if (mask != 0)
abort (); abort ();
......
...@@ -224,7 +224,11 @@ If you quit, the process is killed with SIGKILL.") ...@@ -224,7 +224,11 @@ If you quit, the process is killed with SIGKILL.")
/* Tell SIGCHLD handler to look for this pid. */ /* Tell SIGCHLD handler to look for this pid. */
synch_process_pid = pid; synch_process_pid = pid;
/* Now let SIGCHLD come through. */ /* Now let SIGCHLD come through. */
sigsetmask (mask); {
int dummy;
EMACS_SIGSETMASK (mask, dummy);
}
#endif #endif
environ = save_environ; environ = save_environ;
...@@ -530,11 +534,17 @@ init_callproc () ...@@ -530,11 +534,17 @@ init_callproc ()
register char **envp; register char **envp;
Lisp_Object tempdir; Lisp_Object tempdir;
Vdata_directory = Ffile_name_as_directory (build_string (PATH_DATA)); {
char *data_dir = egetenv ("EMACSDATA");
Vdata_directory =
Ffile_name_as_directory
(build_string (data_dir ? data_dir : PATH_DATA));
}
/* Turn PATH_EXEC into a path. `==' is just a string which we know /* Check the EMACSPATH environment variable, defaulting to the
will not be the name of an environment variable. */ PATH_EXEC path from paths.h. */
Vexec_path = decode_env_path ("==", PATH_EXEC); Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC);
Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
......
...@@ -1959,7 +1959,11 @@ arith_error (signo) ...@@ -1959,7 +1959,11 @@ arith_error (signo)
#ifdef BSD4_1 #ifdef BSD4_1
sigrelse (SIGFPE); sigrelse (SIGFPE);
#else /* not BSD4_1 */ #else /* not BSD4_1 */
sigsetmask (SIGEMPTYMASK); {
int dummy;
EMACS_SIGSETMASK (SIGEMPTYMASK, dummy);
}
#endif /* not BSD4_1 */ #endif /* not BSD4_1 */
Fsignal (Qarith_error, Qnil); Fsignal (Qarith_error, Qnil);
......
...@@ -442,6 +442,9 @@ main (argc, argv, envp) ...@@ -442,6 +442,9 @@ main (argc, argv, envp)
init_vmsfns (); init_vmsfns ();
#endif /* VMS */ #endif /* VMS */
init_process (); init_process ();
#ifdef CLASH_DETECTION
init_filelock ();
#endif /* CLASH_DETECTION */
/* Intern the names of all standard functions and variables; define standard keys */ /* Intern the names of all standard functions and variables; define standard keys */
......
/* Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. /* Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
This file is part of GNU Emacs. This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Emacs is distributed in the hope that it will be useful, GNU Emacs is distributed in the hope that it will be useful,
...@@ -39,6 +39,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -39,6 +39,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
extern int errno; extern int errno;
extern char *egetenv ();
#ifdef CLASH_DETECTION #ifdef CLASH_DETECTION
/* If system does not have symbolic links, it does not have lstat. /* If system does not have symbolic links, it does not have lstat.
...@@ -48,6 +50,44 @@ extern int errno; ...@@ -48,6 +50,44 @@ extern int errno;
#define lstat stat #define lstat stat
#endif #endif
/* The name of the directory in which we keep lock files, with a '/'
appended. */
char *lock_path;
/* The name of the file in the lock directory which is used to
arbitrate access to the entire directory. */
#define SUPERLOCK_NAME "!!!SuperLock!!!"
/* The path to the superlock file. This is SUPERLOCK_NAME appended to
lock_path. */
char *superlock_path;
/* Set LOCK to the name of the lock file for the filename FILE.
char *LOCK; Lisp_Object FILE; */
#define MAKE_LOCK_PATH (lock, file) \
(lock = (char *) alloca (XSTRING (file)->size + strlen (lock_path) + 1), \
fill_in_lock_file_name (lock, (file)))
fill_in_lock_file_name (lockfile, fn)
register char *lockfile;
register Lisp_Object fn;
{
register char *p;
strcpy (lockfile, lock_path);
p = lockfile + strlen (lockfile);
strcpy (p, XSTRING (fn)->data);
for (; *p; p++)
{
if (*p == '/')
*p = '!';
}
}
static Lisp_Object static Lisp_Object
lock_file_owner_name (lfname) lock_file_owner_name (lfname)
char *lfname; char *lfname;
...@@ -90,11 +130,10 @@ lock_file (fn) ...@@ -90,11 +130,10 @@ lock_file (fn)
register Lisp_Object attack; register Lisp_Object attack;
register char *lfname; register char *lfname;
/* Create the name of the lock-file for file fn */ MAKE_LOCK_PATH (lfname, fn);
lfname = (char *) alloca (XSTRING (fn)->size + strlen (PATH_LOCK) + 1);
fill_in_lock_file_name (lfname, fn);
/* See if this file is visited and has changed on disk since it was visited. */ /* See if this file is visited and has changed on disk since it was
visited. */
{ {
register Lisp_Object subject_buf = Fget_file_buffer (fn); register Lisp_Object subject_buf = Fget_file_buffer (fn);
if (!NILP (subject_buf) if (!NILP (subject_buf)
...@@ -116,31 +155,12 @@ lock_file (fn) ...@@ -116,31 +155,12 @@ lock_file (fn)
{ {
lock_superlock (lfname); lock_superlock (lfname);
lock_file_1 (lfname, O_WRONLY) ; lock_file_1 (lfname, O_WRONLY) ;
unlink (PATH_SUPERLOCK); unlink (superlock_path);
return; return;
} }
/* User says ignore the lock */ /* User says ignore the lock */
} }
fill_in_lock_file_name (lockfile, fn)
register char *lockfile;
register Lisp_Object fn;
{
register char *p;
strcpy (lockfile, PATH_LOCK);
p = lockfile + strlen (lockfile);
strcpy (p, XSTRING (fn)->data);
for (; *p; p++)
{
if (*p == '/')
*p = '!';
}
}
/* Lock the lock file named LFNAME. /* Lock the lock file named LFNAME.
If MODE is O_WRONLY, we do so even if it is already locked. If MODE is O_WRONLY, we do so even if it is already locked.
If MODE is O_WRONLY | O_EXCL | O_CREAT, we do so only if it is free. If MODE is O_WRONLY | O_EXCL | O_CREAT, we do so only if it is free.
...@@ -236,15 +256,14 @@ unlock_file (fn) ...@@ -236,15 +256,14 @@ unlock_file (fn)
{ {
register char *lfname; register char *lfname;
lfname = (char *) alloca (XSTRING (fn)->size + strlen (PATH_LOCK) + 1); MAKE_LOCK_PATH (lfname, fn);
fill_in_lock_file_name (lfname, fn);
lock_superlock (lfname); lock_superlock (lfname);
if (current_lock_owner_1 (lfname) == getpid ()) if (current_lock_owner_1 (lfname) == getpid ())
unlink (lfname); unlink (lfname);
unlink (PATH_SUPERLOCK); unlink (superlock_path);
} }
lock_superlock (lfname) lock_superlock (lfname)
...@@ -252,7 +271,7 @@ lock_superlock (lfname) ...@@ -252,7 +271,7 @@ lock_superlock (lfname)
{ {
register int i, fd; register int i, fd;
for (i = -20; i < 0 && (fd = open (PATH_SUPERLOCK, for (i = -20; i < 0 && (fd = open (superlock_path,
O_WRONLY | O_EXCL | O_CREAT, 0666)) < 0; O_WRONLY | O_EXCL | O_CREAT, 0666)) < 0;
i++) i++)
{ {
...@@ -263,7 +282,7 @@ lock_superlock (lfname) ...@@ -263,7 +282,7 @@ lock_superlock (lfname)
if (fd >= 0) if (fd >= 0)
{ {
#ifdef USG #ifdef USG
chmod (PATH_SUPERLOCK, 0666); chmod (superlock_path, 0666);
#else #else
fchmod (fd, 0666); fchmod (fd, 0666);
#endif #endif
...@@ -341,9 +360,7 @@ t if it is locked by you, else a string of the name of the locker.") ...@@ -341,9 +360,7 @@ t if it is locked by you, else a string of the name of the locker.")
fn = Fexpand_file_name (fn, Qnil); fn = Fexpand_file_name (fn, Qnil);
/* Create the name of the lock-file for file filename */ MAKE_LOCK_PATH (lfname, fn);
lfname = (char *) alloca (XSTRING (fn)->size + strlen (PATH_LOCK) + 1);
fill_in_lock_file_name (lfname, fn);
owner = current_lock_owner (lfname); owner = current_lock_owner (lfname);
if (owner <= 0) if (owner <= 0)
...@@ -354,6 +371,29 @@ t if it is locked by you, else a string of the name of the locker.") ...@@ -354,6 +371,29 @@ t if it is locked by you, else a string of the name of the locker.")
return (lock_file_owner_name (lfname)); return (lock_file_owner_name (lfname));
} }
/* Initialization functions. */
init_filelock ()
{
lock_path = egetenv ("EMACSLOCKDIR");
if (! lock_path)
lock_path = PATH_LOCK;
/* Make sure it ends with a slash. */
if (lock_path[strlen (lock_path) - 1] != '/')
{
lock_path = strcpy ((char *) xmalloc (strlen (lock_path) + 2),
lock_path);
strcat (lock_path, "/");
}
superlock_path = (char *) xmalloc ((strlen (lock_path)
+ sizeof (SUPERLOCK_NAME)));
strcpy (superlock_path, lock_path);
strcat (superlock_path, SUPERLOCK_NAME);
}
syms_of_filelock () syms_of_filelock ()
{ {
defsubr (&Sunlock_buffer); defsubr (&Sunlock_buffer);
......
...@@ -509,7 +509,11 @@ float_error (signo) ...@@ -509,7 +509,11 @@ float_error (signo)
#ifdef BSD4_1 #ifdef BSD4_1
sigrelse (SIGILL); sigrelse (SIGILL);
#else /* not BSD4_1 */ #else /* not BSD4_1 */
sigsetmask (0); {
int dummy;
EMACS_SIGSETMASK (0, dummy);
}
#endif /* not BSD4_1 */ #endif /* not BSD4_1 */
#else #else
/* Must reestablish handler each time it is called. */ /* Must reestablish handler each time it is called. */
......
...@@ -2104,9 +2104,10 @@ gobble_input (expected) ...@@ -2104,9 +2104,10 @@ gobble_input (expected)
#ifdef SIGIO #ifdef SIGIO
if (interrupt_input) if (interrupt_input)
{ {
SIGMASKTYPE mask = sigblockx (SIGIO); SIGMASKTYPE mask;
EMACS_SIGBLOCKX (SIGIO, mask);
read_avail_input (expected); read_avail_input (expected);
sigsetmask (mask); EMACS_SIGSETMASK (mask, mask);
} }
else else
#endif #endif
......
...@@ -108,8 +108,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -108,8 +108,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "termhooks.h" #include "termhooks.h"
#include "termopts.h" #include "termopts.h"
#include "commands.h" #include "commands.h"
#include "dispextern.h"
extern int screen_garbaged;
Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed; Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed;
/* Qexit is declared and initialized in eval.c. */ /* Qexit is declared and initialized in eval.c. */
...@@ -419,6 +418,13 @@ allocate_pty () ...@@ -419,6 +418,13 @@ allocate_pty ()
register c, i; register c, i;
int fd; int fd;
/* Some systems name their pseudoterminals so that there are gaps in
the usual sequence - for example, on HP9000/S700 systems, there
are no pseudoterminals with names ending in 'f'. So we wait for
three failures in a row before deciding that we've reached the
end of the ptys. */
int failed_count = 0;
#ifdef PTY_ITERATION #ifdef PTY_ITERATION
PTY_ITERATION PTY_ITERATION
#else #else
...@@ -440,20 +446,27 @@ allocate_pty () ...@@ -440,20 +446,27 @@ allocate_pty ()
#endif /* not HPUX */ #endif /* not HPUX */
#endif /* no PTY_NAME_SPRINTF */ #endif /* no PTY_NAME_SPRINTF */
#ifndef IRIS #ifdef IRIS
if (stat (pty_name, &stb) < 0) /* Unusual IRIS code */
*ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0);
if (fd < 0)
return -1;
if (fstat (fd, &stb) < 0)
return -1; return -1;
#else
if (stat (pty_name, &stb) < 0)
{
failed_count++;
if (failed_count >= 3)
return -1;
}
else
failed_count = 0;
#ifdef O_NONBLOCK #ifdef O_NONBLOCK
fd = open (pty_name, O_RDWR | O_NONBLOCK, 0); fd = open (pty_name, O_RDWR | O_NONBLOCK, 0);
#else #else
fd = open (pty_name, O_RDWR | O_NDELAY, 0); fd = open (pty_name, O_RDWR | O_NDELAY, 0);
#endif #endif
#else /* Unusual IRIS code */
*ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0);
if (fd < 0)
return -1;
if (fstat (fd, &stb) < 0)
return -1;
#endif /* IRIS */ #endif /* IRIS */
if (fd >= 0) if (fd >= 0)
...@@ -1742,11 +1755,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) ...@@ -1742,11 +1755,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
if (!read_kbd) if (!read_kbd)
FD_CLR (0, &Available); FD_CLR (0, &Available);
/* If a screen has been newly mapped and needs updating,
reprocess its display stuff. */
if (screen_garbaged)
redisplay_preserve_echo_area ();
if (read_kbd && detect_input_pending ()) if (read_kbd && detect_input_pending ())
nfds = 0; nfds = 0;
else else
...@@ -1829,6 +1837,16 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) ...@@ -1829,6 +1837,16 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
if (! wait_proc) if (! wait_proc)
got_some_input |= nfds > 0; got_some_input |= nfds > 0;
/* If checking input just got us a size-change event from X,
obey it now if we should. */
if (read_kbd)
do_pending_window_change ();
/* If screen size has changed, redisplay now
for either sit-for or keyboard input. */
if (read_kbd && screen_garbaged)
redisplay_preserve_echo_area ();
/* Check for data from a process or a command channel */ /* Check for data from a process or a command channel */
for (channel = FIRST_PROC_DESC; channel < MAXDESC; channel++) for (channel = FIRST_PROC_DESC; channel < MAXDESC; channel++)
{ {
......
...@@ -208,7 +208,7 @@ and this notice must be preserved on all copies. */ ...@@ -208,7 +208,7 @@ and this notice must be preserved on all copies. */
/* #define ADDR_CORRECT(x) (x) */ /* #define ADDR_CORRECT(x) (x) */
#define LD_CMD cc #define LINKER cc
/* Prevent -lg from being used for debugging. Not needed. */ /* Prevent -lg from being used for debugging. Not needed. */
......
...@@ -158,12 +158,13 @@ DEFUN ("modify-syntax-entry", foo, bar, 0, 0, 0, ...@@ -158,12 +158,13 @@ DEFUN ("modify-syntax-entry", foo, bar, 0, 0, 0,
The syntax is changed only for table TABLE, which defaults to\n\ The syntax is changed only for table TABLE, which defaults to\n\
the current buffer's syntax table.\n\ the current buffer's syntax table.\n\
The first character of S should be one of the following:\n\ The first character of S should be one of the following:\n\
Space whitespace syntax. w word constituent.\n\ Space or - whitespace syntax. w word constituent.\n\
_ symbol constituent. . punctuation.\n\ _ symbol constituent. . punctuation.\n\
( open-parenthesis. ) close-parenthesis.\n\ ( open-parenthesis. ) close-parenthesis.\n\
\" string quote. \\ character-quote.\n\ \" string quote. \\ escape.\n\
$ paired delimiter. ' expression quote or prefix operator.\n\ $ paired delimiter. ' expression quote or prefix operator.\n\
< comment starter. > comment ender.\n\ < comment starter. > comment ender.\n\
/ character-quote.\n\
Only single-character comment start and end sequences are represented thus.\n\ Only single-character comment start and end sequences are represented thus.\n\
Two-character sequences are represented as described below.\n\ Two-character sequences are represented as described below.\n\
The second character of S is the matching parenthesis,\n\ The second character of S is the matching parenthesis,\n\
......
...@@ -638,7 +638,11 @@ reset_sigio () ...@@ -638,7 +638,11 @@ reset_sigio ()
request_sigio () request_sigio ()
{ {
#ifdef SIGWINCH #ifdef SIGWINCH
sigunblock (sigmask (SIGWINCH)); {
int dummy;
EMACS_SIGUNBLOCKX (SIGWINCH, dummy);
}
#endif #endif
fcntl (0, F_SETFL, old_fcntl_flags | FASYNC); fcntl (0, F_SETFL, old_fcntl_flags | FASYNC);
...@@ -648,7 +652,11 @@ request_sigio () ...@@ -648,7 +652,11 @@ request_sigio ()
unrequest_sigio () unrequest_sigio ()
{ {
#ifdef SIGWINCH #ifdef SIGWINCH
sigblock (sigmask (SIGWINCH)); {
int dummy;
EMACS_SIGBLOCK (SIGWINCH, dummy);
}
#endif #endif
fcntl (0, F_SETFL, old_fcntl_flags); fcntl (0, F_SETFL, old_fcntl_flags);
interrupts_deferred = 1; interrupts_deferred = 1;
......
...@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License ...@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef POSIX_SIGNALS #ifdef POSIX_SIGNALS
#define SIGMASKTYPE sigset_t #define SIGMASKTYPE sigset_t
...@@ -27,14 +28,19 @@ extern sigset_t empty_mask, full_mask, temp_mask; ...@@ -27,14 +28,19 @@ extern sigset_t empty_mask, full_mask, temp_mask;
#define sigmask(SIG) \ #define sigmask(SIG) \
(sigemptyset (&temp_mask), sigaddset (&temp_mask, SIG), temp_mask) (sigemptyset (&temp_mask), sigaddset (&temp_mask, SIG), temp_mask)
/* May need a local mask. There could be problems if code using any /* The below routines may need a local mask. There could be problems
of the 3 macros below could be reentered due to a signal occurring. if code using any of the 3 macros below could be reentered due to a
This can't happen in Emacs 18.57, so we don't worry. - DJB signal occurring. This can't happen in Emacs 18.57, so we don't
These macros also require GCC. */ worry. - DJB */
#define sigpause(SIG) ({ sigset_t _mask; sys_sigpause(SIG); })
#define sigblock(SIG) ({ sigset_t _mask; sys_sigblock(SIG); }) #define EMACS_SIGPAUSE(sigset) \
#define sigunblock(SIG) ({ sigset_t _mask; sys_sigunblock(SIG); }) do { sigset_t _mask; sys_sigpause (sigset); } while (0)
#define sigsetmask(SIG) ({ sigset_t _mask; sys_sigsetmask(SIG); }) #define EMACS_SIGBLOCK(new_sig, old_sig) \
do { sigset_t _mask; (old_sig) = sys_sigblock (new_sig); } while (0)
#define EMACS_SIGUNBLOCK(new_sig, old_sig) \
do { sigset_t _mask; (old_sig) = sys_sigunblock (new_sig); } while (0)
#define EMACS_SIGSETMASK(new_sig, old_sig) \
do { sigset_t _mask; (old_sig) = sys_sigsetmask (new_sig); } while (0)
#define sighold(SIG) ONLY_USED_IN_BSD_4_1 #define sighold(SIG) ONLY_USED_IN_BSD_4_1
#define sigrelse(SIG) ONLY_USED_IN_BSD_4_1 #define sigrelse(SIG) ONLY_USED_IN_BSD_4_1
...@@ -46,12 +52,12 @@ sigset_t sys_sigsetmask (sigset_t new_mask); ...@@ -46,12 +52,12 @@ sigset_t sys_sigsetmask (sigset_t new_mask);
#define sys_sigdel(MASK,SIG) sigdelset(&MASK,SIG) #define sys_sigdel(MASK,SIG) sigdelset(&MASK,SIG)
#else /* not POSIX_SIGNALS */ #else /* ! defined (POSIX_SIGNALS) */
#define sigunblock(SIG) \ #define sigunblock(SIG) \
{ SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); } { SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); }
#endif /* not POSIX_SIGNALS */ #endif /* ! defined (POSIX_SIGNALS) */
#ifndef SIGMASKTYPE #ifndef SIGMASKTYPE
#define SIGMASKTYPE int #define SIGMASKTYPE int
...@@ -65,21 +71,38 @@ sigset_t sys_sigsetmask (sigset_t new_mask); ...@@ -65,21 +71,38 @@ sigset_t sys_sigsetmask (sigset_t new_mask);
#define sigmask(no) (1L << ((no) - 1)) #define sigmask(no) (1L << ((no) - 1))
#endif #endif
#ifndef BSD4_1
#define sigfree() sigsetmask (SIGEMPTYMASK)
#define sigholdx(sig) sigsetmask (sigmask (sig))
#define sigblockx(sig) sigblock (sigmask (sig))
#define sigunblockx(sig) sigblock (SIGEMPTYMASK)
#define sigpausex(sig) sigpause (0)
#endif /* not BSD4_1 */
#ifdef BSD4_1 #ifdef BSD4_1
#define SIGIO SIGTINT #define SIGIO SIGTINT
/* sigfree and sigholdx are in sysdep.c */ /* sigfree and sigholdx are in sysdep.c */
#define sigblockx(sig) sighold (sig) #define EMACS_SIGFREE () sigfree ()
#define sigunblockx(sig) sigrelse (sig)
#define sigpausex(sig) sigpause (sig)