From 1fa530214b68560d962c10c786a562f11a479444 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:38:06 -0700 Subject: [PATCH] * sysdep.c: Make symbols static if they're not exported. (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner): Now static. (sigprocmask_set, full_mask): Remove; unused. (wait_debugging): Mark as visible. * syssignal.h (SIGFULLMASK, full_mask): Remove decls. * systty.h (emacs_get_tty, emacs_set_tty): Remove decls. --- src/ChangeLog | 8 ++++++++ src/sysdep.c | 19 +++++++++---------- src/syssignal.h | 3 +-- src/systty.h | 3 --- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b54fdf8053..1f8bae9cce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-14 Paul Eggert + * sysdep.c: Make symbols static if they're not exported. + (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner): + Now static. + (sigprocmask_set, full_mask): Remove; unused. + (wait_debugging): Mark as visible. + * syssignal.h (SIGFULLMASK, full_mask): Remove decls. + * systty.h (emacs_get_tty, emacs_set_tty): Remove decls. + * syntax.c (syntax_temp): Define only if !__GNUC__. * sound.c (current_sound_device, current_sound): Now static. diff --git a/src/sysdep.c b/src/sysdep.c index f9e8ee746c..a9ad4b4dea 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -118,6 +118,9 @@ struct utimbuf { #endif #endif +static int emacs_get_tty (int, struct emacs_tty *); +static int emacs_set_tty (int, struct emacs_tty *, int); + /* Declare here, including term.h is problematic on some systems. */ extern void tputs (const char *, int, int (*)(int)); @@ -127,10 +130,6 @@ static const int baud_convert[] = 1800, 2400, 4800, 9600, 19200, 38400 }; -/* Temporary used by `sigblock' when defined in terms of signprocmask. */ - -SIGMASKTYPE sigprocmask_set; - #if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME) @@ -289,8 +288,9 @@ init_baud_rate (int fd) -int wait_debugging; /* Set nonzero to make following function work under dbx - (at least for bsd). */ +/* Set nonzero to make following function work under dbx + (at least for bsd). */ +int wait_debugging EXTERNALLY_VISIBLE; #ifndef MSDOS /* Wait for subprocess with process id `pid' to terminate and @@ -648,7 +648,7 @@ unrequest_sigio (void) #else #ifdef F_SETFL -int old_fcntl_flags[MAXDESC]; +static int old_fcntl_flags[MAXDESC]; void init_sigio (int fd) @@ -807,7 +807,7 @@ emacs_set_tty (int fd, struct emacs_tty *settings, int flushp) #ifdef F_SETOWN -int old_fcntl_owner[MAXDESC]; +static int old_fcntl_owner[MAXDESC]; #endif /* F_SETOWN */ /* This may also be defined in stdio, @@ -1449,7 +1449,7 @@ init_system_name (void) /* POSIX signals support - DJB */ /* Anyone with POSIX signals should have ANSI C declarations */ -sigset_t empty_mask, full_mask; +sigset_t empty_mask; #ifndef WINDOWSNT @@ -1538,7 +1538,6 @@ void init_signals (void) { sigemptyset (&empty_mask); - sigfillset (&full_mask); #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST if (! initialized) diff --git a/src/syssignal.h b/src/syssignal.h index 083d70d6c1..a2329fd0fd 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -35,8 +35,7 @@ extern void init_signals (void); #define SIGMASKTYPE sigset_t #define SIGEMPTYMASK (empty_mask) -#define SIGFULLMASK (full_mask) -extern sigset_t empty_mask, full_mask; +extern sigset_t empty_mask; /* POSIX pretty much destroys any possibility of writing sigmask as a macro in standard C. We always define our own version because the diff --git a/src/systty.h b/src/systty.h index 1548952e7a..647cfa23ce 100644 --- a/src/systty.h +++ b/src/systty.h @@ -115,9 +115,6 @@ struct emacs_tty { #endif /* DOS_NT */ }; -extern int emacs_get_tty (int, struct emacs_tty *); -extern int emacs_set_tty (int, struct emacs_tty *, int); - /* From sysdep.c or w32.c */ extern int serial_open (char *); extern void serial_configure (struct Lisp_Process *, Lisp_Object); -- 2.20.1