diff options
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/emacs.c b/src/emacs.c index 0b508fb5be..54e59a3f3c 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -547,21 +547,22 @@ static char dump_tz[] = "UtC0"; Provide dummy definitions to avoid error. (We don't have any real constructors or destructors.) */ #ifdef __GNUC__ + +/* Define a dummy function F. Declare F too, to pacify gcc + -Wmissing-prototypes. */ +#define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {} + #ifndef GCC_CTORS_IN_LIBC -void __do_global_ctors (void) -{} -void __do_global_ctors_aux (void) -{} -void __do_global_dtors (void) -{} +DEFINE_DUMMY_FUNCTION (__do_global_ctors) +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 }; #endif char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; #endif /* GCC_CTORS_IN_LIBC */ -void __main (void) -{} +DEFINE_DUMMY_FUNCTION (__main) #endif /* __GNUC__ */ #endif /* ORDINARY_LINK */ |