[MPlayer-dev-eng] PATCH: sdl test in configure

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed Apr 22 22:19:09 CEST 2009


On Wed, 2009-04-22 at 23:24 +0400, Andrew Savchenko wrote:
> Hi,
> 
> On Wednesday 22 April 2009, vmrsss wrote:
> > The SDL test in configure fails for SDL-1.2 because of a type
> > mismatch for function main in the test itself. Perhaps this
> > patch can be considered for inclusion (though I am not sure
> > anybody uses SDL in fact).
> 
> Huh? I'm using sdl-1.2.13 and configure test works ok (gcc-4.3.3).
> main() is allowed to be used with void argument.

SDL headers contain a hack that renames the original main(), so SDL can
first execute some code in its own main() and then call the renamed
main(). Looking at /usr/include/SDL/SDL_main.h shows a comment saying
"Redefine main() on Win32 and MacOS" so I suppose it only happens on
those platforms. A type mismatch with what SDL expects when using the
rename hack can of course cause problems even if the standard allows
something else.




More information about the MPlayer-dev-eng mailing list