aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog3
-rw-r--r--src/emacs.c17
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 951732a1306..76da9676289 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,9 @@
12011-03-14 Paul Eggert <eggert@cs.ucla.edu> 12011-03-14 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * emacs.c (init_cmdargs): Rename local to avoid shadowing. 3 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
4 (DEFINE_DUMMY_FUNCTION): New macro.
5 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
6 Use it.
4 7
5 * lisp.h (fatal_error_signal): Add decl, since it's exported. 8 * lisp.h (fatal_error_signal): Add decl, since it's exported.
6 9
diff --git a/src/emacs.c b/src/emacs.c
index 0b508fb5be7..54e59a3f3c8 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -547,21 +547,22 @@ static char dump_tz[] = "UtC0";
547 Provide dummy definitions to avoid error. 547 Provide dummy definitions to avoid error.
548 (We don't have any real constructors or destructors.) */ 548 (We don't have any real constructors or destructors.) */
549#ifdef __GNUC__ 549#ifdef __GNUC__
550
551/* Define a dummy function F. Declare F too, to pacify gcc
552 -Wmissing-prototypes. */
553#define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {}
554
550#ifndef GCC_CTORS_IN_LIBC 555#ifndef GCC_CTORS_IN_LIBC
551void __do_global_ctors (void) 556DEFINE_DUMMY_FUNCTION (__do_global_ctors)
552{} 557DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux)
553void __do_global_ctors_aux (void) 558DEFINE_DUMMY_FUNCTION (__do_global_dtors)
554{}
555void __do_global_dtors (void)
556{}
557/* GNU/Linux has a bug in its library; avoid an error. */ 559/* GNU/Linux has a bug in its library; avoid an error. */
558#ifndef GNU_LINUX 560#ifndef GNU_LINUX
559char * __CTOR_LIST__[2] = { (char *) (-1), 0 }; 561char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
560#endif 562#endif
561char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; 563char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
562#endif /* GCC_CTORS_IN_LIBC */ 564#endif /* GCC_CTORS_IN_LIBC */
563void __main (void) 565DEFINE_DUMMY_FUNCTION (__main)
564{}
565#endif /* __GNUC__ */ 566#endif /* __GNUC__ */
566#endif /* ORDINARY_LINK */ 567#endif /* ORDINARY_LINK */
567 568