Re: [AD] Magic main in Windows

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


On Monday 02 August 2004 09:28, Elias Pschernig wrote:
> Btw, does that function ordering change in gcc someone recently
> mentioned also affect END_OF_MAIN()?

From what I've seen of how END_OF_MAIN() works, it shouldn't.

> Maybe we can remove END_OF_MAIN() by some other #define magic.. defining
> "main" to something else in allegro.h, then calling that (from another
> thread e.g. in the case of OSX).

The problem is the number of possible ways main can be defined. We don't 
know if we're dealing with main(int, char **)  or main(void).
That could be worked around by using a function pointer and a cast though, 
as Allegro currently does on UNIX (see src/unix/umain.c).

Evert





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