aboutsummaryrefslogtreecommitdiffstats
path: root/src/emacs.c
diff options
context:
space:
mode:
authorPaul Eggert2011-04-15 00:48:51 -0700
committerPaul Eggert2011-04-15 00:48:51 -0700
commit4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9 (patch)
treee993b231bb5555c9c961f5d0b20d90ac76f77bbd /src/emacs.c
parent1963a2e0bb07cc8dee6d27f972f93d9cfd7c6b2d (diff)
parent49093f601b69d91126aefd328ee8f6bfeb797407 (diff)
downloademacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.tar.gz
emacs-4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9.zip
Merge from mainline.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c22
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. */
130void *malloc_state_ptr; 130static 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. */
132extern void *malloc_get_state (void); 132extern 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. */
134extern int malloc_set_state (void*); 134extern 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. */
137int malloc_using_checking; 137static int malloc_using_checking;
138#endif 138#endif
139 139
140Lisp_Object Qfile_name_handler_alist; 140Lisp_Object Qfile_name_handler_alist;
@@ -186,7 +186,7 @@ char **initial_argv;
186int initial_argc; 186int initial_argc;
187 187
188static void sort_args (int argc, char **argv); 188static void sort_args (int argc, char **argv);
189void syms_of_emacs (void); 189static 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. */
291int fatal_error_code; 291static int fatal_error_code;
292 292
293/* Nonzero if handling a fatal error already. */ 293/* Nonzero if handling a fatal error already. */
294int fatal_error_in_progress; 294int 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
299void (*fatal_error_signal_hook) (void); 299static 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
312static
313#endif
311void 314void
312fatal_error_signal (int sig) 315fatal_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
555DEFINE_DUMMY_FUNCTION (__do_global_ctors) 559DEFINE_DUMMY_FUNCTION (__do_global_ctors)
@@ -557,9 +561,9 @@ DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux)
557DEFINE_DUMMY_FUNCTION (__do_global_dtors) 561DEFINE_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
560char * __CTOR_LIST__[2] = { (char *) (-1), 0 }; 564char * __CTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 };
561#endif 565#endif
562char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; 566char * __DTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 };
563#endif /* GCC_CTORS_IN_LIBC */ 567#endif /* GCC_CTORS_IN_LIBC */
564DEFINE_DUMMY_FUNCTION (__main) 568DEFINE_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
1703const struct standard_args standard_args[] = 1707static 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 },