Re: [AD] Magic main UNIX, final (?) take

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:

Unless someone starts complaining, I'm going to apply the attached patch.
It's basically the same as the last one, but it retains the __crt0_* variables.

Commited.

The #undef END_OF_MAIN broke the tree.  Why do you need it?

Patch attached.

Peter
Index: include/allegro/platform/alunix.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro/platform/alunix.h,v
retrieving revision 1.13
diff -u -r1.13 alunix.h
--- include/allegro/platform/alunix.h	28 Aug 2004 19:56:55 -0000	1.13
+++ include/allegro/platform/alunix.h	29 Aug 2004 02:49:07 -0000
@@ -25,16 +25,15 @@
 extern int    __crt0_argc;
 extern char **__crt0_argv;
 
-#undef END_OF_MAIN
 #ifdef ALLEGRO_WITH_MAGIC_MAIN
 
-#ifndef ALLEGRO_NO_MAGIC_MAIN
-   #define ALLEGRO_MAGIC_MAIN
-   #define main _mangled_main
-   #define END_OF_MAIN() void *_mangled_main_address = (void*) _mangled_main;
-#else
-   #define END_OF_MAIN() void *_mangled_main_address;
-#endif
+   #ifndef ALLEGRO_NO_MAGIC_MAIN
+      #define ALLEGRO_MAGIC_MAIN
+      #define main _mangled_main
+      #define END_OF_MAIN() void *_mangled_main_address = (void*) _mangled_main;
+   #else
+      #define END_OF_MAIN() void *_mangled_main_address;
+   #endif
 
 #endif
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/