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
#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;
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. */
\f
/* 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;
/* 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,
/* Handle bus errors, invalid instruction, etc. */
+#ifndef FLOAT_CATCH_SIGILL
+static
+#endif
void
fatal_error_signal (int sig)
{
/* 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)
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__ */
int nargs;
};
-const struct standard_args standard_args[] =
+static const struct standard_args standard_args[] =
{
{ "-version", "--version", 150, 0 },
{ "-chdir", "--chdir", 130, 1 },