diff options
Diffstat (limited to 'src/emacs.c')
| -rw-r--r-- | src/emacs.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/emacs.c b/src/emacs.c index 6bdd2550ed1..cccd07417e1 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -127,14 +127,14 @@ int initialized; | |||
| 127 | #ifdef DOUG_LEA_MALLOC | 127 | #ifdef DOUG_LEA_MALLOC |
| 128 | /* Preserves a pointer to the memory allocated that copies that | 128 | /* Preserves a pointer to the memory allocated that copies that |
| 129 | static data inside glibc's malloc. */ | 129 | static data inside glibc's malloc. */ |
| 130 | void *malloc_state_ptr; | 130 | static void *malloc_state_ptr; |
| 131 | /* From glibc, a routine that returns a copy of the malloc internal state. */ | 131 | /* From glibc, a routine that returns a copy of the malloc internal state. */ |
| 132 | extern void *malloc_get_state (void); | 132 | extern void *malloc_get_state (void); |
| 133 | /* From glibc, a routine that overwrites the malloc internal state. */ | 133 | /* From glibc, a routine that overwrites the malloc internal state. */ |
| 134 | extern int malloc_set_state (void*); | 134 | extern int malloc_set_state (void*); |
| 135 | /* Non-zero if the MALLOC_CHECK_ environment variable was set while | 135 | /* Non-zero if the MALLOC_CHECK_ environment variable was set while |
| 136 | dumping. Used to work around a bug in glibc's malloc. */ | 136 | dumping. Used to work around a bug in glibc's malloc. */ |
| 137 | int malloc_using_checking; | 137 | static int malloc_using_checking; |
| 138 | #endif | 138 | #endif |
| 139 | 139 | ||
| 140 | Lisp_Object Qfile_name_handler_alist; | 140 | Lisp_Object Qfile_name_handler_alist; |
| @@ -186,7 +186,7 @@ char **initial_argv; | |||
| 186 | int initial_argc; | 186 | int initial_argc; |
| 187 | 187 | ||
| 188 | static void sort_args (int argc, char **argv); | 188 | static void sort_args (int argc, char **argv); |
| 189 | void syms_of_emacs (void); | 189 | static void syms_of_emacs (void); |
| 190 | 190 | ||
| 191 | /* MSVC needs each string be shorter than 2048 bytes, so the usage | 191 | /* MSVC needs each string be shorter than 2048 bytes, so the usage |
| 192 | strings below are split to not overflow this limit. */ | 192 | strings below are split to not overflow this limit. */ |
| @@ -288,7 +288,7 @@ section of the Emacs manual or the file BUGS.\n" | |||
| 288 | 288 | ||
| 289 | 289 | ||
| 290 | /* Signal code for the fatal signal that was received. */ | 290 | /* Signal code for the fatal signal that was received. */ |
| 291 | int fatal_error_code; | 291 | static int fatal_error_code; |
| 292 | 292 | ||
| 293 | /* Nonzero if handling a fatal error already. */ | 293 | /* Nonzero if handling a fatal error already. */ |
| 294 | int fatal_error_in_progress; | 294 | int fatal_error_in_progress; |
| @@ -296,7 +296,7 @@ int fatal_error_in_progress; | |||
| 296 | /* If non-null, call this function from fatal_error_signal before | 296 | /* If non-null, call this function from fatal_error_signal before |
| 297 | committing suicide. */ | 297 | committing suicide. */ |
| 298 | 298 | ||
| 299 | void (*fatal_error_signal_hook) (void); | 299 | static void (*fatal_error_signal_hook) (void); |
| 300 | 300 | ||
| 301 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD | 301 | #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD |
| 302 | /* When compiled with GTK and running under Gnome, | 302 | /* When compiled with GTK and running under Gnome, |
| @@ -308,6 +308,9 @@ pthread_t main_thread; | |||
| 308 | 308 | ||
| 309 | 309 | ||
| 310 | /* Handle bus errors, invalid instruction, etc. */ | 310 | /* Handle bus errors, invalid instruction, etc. */ |
| 311 | #ifndef FLOAT_CATCH_SIGILL | ||
| 312 | static | ||
| 313 | #endif | ||
| 311 | void | 314 | void |
| 312 | fatal_error_signal (int sig) | 315 | fatal_error_signal (int sig) |
| 313 | { | 316 | { |
| @@ -549,7 +552,8 @@ static char dump_tz[] = "UtC0"; | |||
| 549 | 552 | ||
| 550 | /* Define a dummy function F. Declare F too, to pacify gcc | 553 | /* Define a dummy function F. Declare F too, to pacify gcc |
| 551 | -Wmissing-prototypes. */ | 554 | -Wmissing-prototypes. */ |
| 552 | #define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {} | 555 | #define DEFINE_DUMMY_FUNCTION(f) \ |
| 556 | void f (void) EXTERNALLY_VISIBLE; void f (void) {} | ||
| 553 | 557 | ||
| 554 | #ifndef GCC_CTORS_IN_LIBC | 558 | #ifndef GCC_CTORS_IN_LIBC |
| 555 | DEFINE_DUMMY_FUNCTION (__do_global_ctors) | 559 | DEFINE_DUMMY_FUNCTION (__do_global_ctors) |
| @@ -557,9 +561,9 @@ DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux) | |||
| 557 | DEFINE_DUMMY_FUNCTION (__do_global_dtors) | 561 | DEFINE_DUMMY_FUNCTION (__do_global_dtors) |
| 558 | /* GNU/Linux has a bug in its library; avoid an error. */ | 562 | /* GNU/Linux has a bug in its library; avoid an error. */ |
| 559 | #ifndef GNU_LINUX | 563 | #ifndef GNU_LINUX |
| 560 | char * __CTOR_LIST__[2] = { (char *) (-1), 0 }; | 564 | char * __CTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 }; |
| 561 | #endif | 565 | #endif |
| 562 | char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; | 566 | char * __DTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 }; |
| 563 | #endif /* GCC_CTORS_IN_LIBC */ | 567 | #endif /* GCC_CTORS_IN_LIBC */ |
| 564 | DEFINE_DUMMY_FUNCTION (__main) | 568 | DEFINE_DUMMY_FUNCTION (__main) |
| 565 | #endif /* __GNUC__ */ | 569 | #endif /* __GNUC__ */ |
| @@ -1700,7 +1704,7 @@ struct standard_args | |||
| 1700 | int nargs; | 1704 | int nargs; |
| 1701 | }; | 1705 | }; |
| 1702 | 1706 | ||
| 1703 | const struct standard_args standard_args[] = | 1707 | static const struct standard_args standard_args[] = |
| 1704 | { | 1708 | { |
| 1705 | { "-version", "--version", 150, 0 }, | 1709 | { "-version", "--version", 150, 0 }, |
| 1706 | { "-chdir", "--chdir", 130, 1 }, | 1710 | { "-chdir", "--chdir", 130, 1 }, |