Commit 35f08c38 authored by Paul Eggert's avatar Paul Eggert

* emacs.c: Make symbols static if they're not exported.

(malloc_state_ptr, malloc_using_checking, syms_of_emacs):
(fatal_error_code, fatal_error_signal_hook, standard_args):
Now static.
(fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
(DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
(__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
* lisp.h (fatal_error_signal_hook): Remove decl.
(fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
parent f44bd759
2011-04-13 Paul Eggert <eggert@cs.ucla.edu>
* emacs.c: Make symbols static if they're not exported.
(malloc_state_ptr, malloc_using_checking, syms_of_emacs):
(fatal_error_code, fatal_error_signal_hook, standard_args):
Now static.
(fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
(DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
(__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
* lisp.h (fatal_error_signal_hook): Remove decl.
(fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
* editfns.c: Move a (normally-unused) function to its only use.
* editfns.c, lisp.h (get_operating_system_release): Remove.
* process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
......
......@@ -127,14 +127,14 @@ int initialized;
#ifdef DOUG_LEA_MALLOC
/* Preserves a pointer to the memory allocated that copies that
static data inside glibc's malloc. */
void *malloc_state_ptr;
static void *malloc_state_ptr;
/* From glibc, a routine that returns a copy of the malloc internal state. */
extern void *malloc_get_state (void);
/* From glibc, a routine that overwrites the malloc internal state. */
extern int malloc_set_state (void*);
/* Non-zero if the MALLOC_CHECK_ environment variable was set while
dumping. Used to work around a bug in glibc's malloc. */
int malloc_using_checking;
static int malloc_using_checking;
#endif
Lisp_Object Qfile_name_handler_alist;
......@@ -186,7 +186,7 @@ char **initial_argv;
int initial_argc;
static void sort_args (int argc, char **argv);
void syms_of_emacs (void);
static void syms_of_emacs (void);
/* MSVC needs each string be shorter than 2048 bytes, so the usage
strings below are split to not overflow this limit. */
......@@ -288,7 +288,7 @@ section of the Emacs manual or the file BUGS.\n"
/* Signal code for the fatal signal that was received. */
int fatal_error_code;
static int fatal_error_code;
/* Nonzero if handling a fatal error already. */
int fatal_error_in_progress;
......@@ -296,7 +296,7 @@ int fatal_error_in_progress;
/* If non-null, call this function from fatal_error_signal before
committing suicide. */
void (*fatal_error_signal_hook) (void);
static void (*fatal_error_signal_hook) (void);
#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
/* When compiled with GTK and running under Gnome,
......@@ -308,6 +308,9 @@ pthread_t main_thread;
/* Handle bus errors, invalid instruction, etc. */
#ifndef FLOAT_CATCH_SIGILL
static
#endif
void
fatal_error_signal (int sig)
{
......@@ -549,7 +552,8 @@ static char dump_tz[] = "UtC0";
/* Define a dummy function F. Declare F too, to pacify gcc
-Wmissing-prototypes. */
#define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {}
#define DEFINE_DUMMY_FUNCTION(f) \
void f (void) EXTERNALLY_VISIBLE; void f (void) {}
#ifndef GCC_CTORS_IN_LIBC
DEFINE_DUMMY_FUNCTION (__do_global_ctors)
......@@ -557,9 +561,9 @@ DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux)
DEFINE_DUMMY_FUNCTION (__do_global_dtors)
/* GNU/Linux has a bug in its library; avoid an error. */
#ifndef GNU_LINUX
char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
char * __CTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 };
#endif
char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
char * __DTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 };
#endif /* GCC_CTORS_IN_LIBC */
DEFINE_DUMMY_FUNCTION (__main)
#endif /* __GNUC__ */
......@@ -1700,7 +1704,7 @@ struct standard_args
int nargs;
};
const struct standard_args standard_args[] =
static const struct standard_args standard_args[] =
{
{ "-version", "--version", 150, 0 },
{ "-chdir", "--chdir", 130, 1 },
......
......@@ -3179,8 +3179,9 @@ extern int display_arg;
extern Lisp_Object decode_env_path (const char *, const char *);
extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
extern Lisp_Object Qfile_name_handler_alist;
extern void (*fatal_error_signal_hook) (void);
#ifdef FLOAT_CATCH_SIGILL
extern void fatal_error_signal (int);
#endif
EXFUN (Fkill_emacs, 1) NO_RETURN;
#if HAVE_SETLOCALE
void fixup_locale (void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment