Re: [AD] Darwin/MacOS X port

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


On 2002-01-31, Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
> 
> Now, Allegro has got a built-in main() function on Unix systems
> (src/unix/umain.c), so when USE_CONSOLE is defined on MacOS X, the
> compilation aborts at the linking stage because of the duplicated _main
> symbol.
> 
> Therefore I'm proposing to borrow the solution of the Windows port (for
> 4.1.x of course): renaming Allegro's main() to _main(), adding the main()
> function to the END_OF_MAIN() macro and making it pass the _mangled_main()
> address to the _main() function (see include/allegro/platfrom/alwin.h)

Seems fine.  I'll also request that main mangling and END_OF_MAIN to
be optional, e.g. #define ALLEGRO_NO_MAIN_MANGLING, since your change
would allow it.



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