diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-07-26 21:00:16 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-07-26 21:00:16 +0000 |
commit | 0c945479ab144f661e7c136d28b4b7e9615c0a4b (patch) | |
tree | cd47a0f680520947fa48d4b6edadcf1637647db6 /gcc/libgcc2.c | |
parent | 90ed9d61751698c14e2ea46dff66f5add55a3b39 (diff) | |
download | gcc-0c945479ab144f661e7c136d28b4b7e9615c0a4b.tar.gz |
(__main): Use macro SYMBOL__MAIN instead of invoking directly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4992 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 9dcccbe3d01..c4f35c83e62 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -1593,6 +1593,14 @@ __enable_execute_stack () #ifdef L__main #include "gbl-ctors.h" +/* Some systems use __main in a way incompatible with its use in gcc, in these + cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to + give the same symbol without quotes for an alternative entry point. You + must define both, or niether. */ +#ifndef NAME__MAIN +#define NAME__MAIN "__main" +#define SYMBOL__MAIN __main +#endif /* Run all the global destructors on exit from the program. */ @@ -1652,7 +1660,7 @@ __do_global_ctors () to run __do_global_ctors, so we need not do anything here. */ void -__main () +SYMBOL__MAIN () { /* Support recursive calls to `main': run initializers just once. */ static int initialized = 0; |