[Scummvm-devel] Header files.

Marcus Comstedt marcus at mc.pp.se
Sun Dec 21 09:48:01 CET 2003


Max Horn <max at quendi.de> writes:

> Hm. You mean there are systems which don't declare free() in stdlib.h
> (which is always included by scummsys.h) ?

It can be declared in more places than one (as long as the
declarations are compatible).  On the Dreamcast, it is declared in
both <stdlib.h> (which is part of newlib) and in <ronin/notlibc.h>
(which is part of libronin).  If <ronin/notlibc.h> gets included after
the #define of free, the build blows up (because free_check() gets
redeclared as a non-C++ function).


>> ?  The x11, sdl and null backends should probably share <portdefs.h>,
>> but that seems simple enought to fix.
>
> In fact, that is nothing to worry about at all... They simply would
> have separate portdefs.h files, no problem there. Not that the X11
> (nor the null) backend seems to be maintained by anybody currently...

Ok.  I figured there might be some #ifdefs you'd want to share among
these backends, but maybe it's not worth the trouble to avoid
duplicating them.  There's also the possibility to use config.h for
things relating to all these backends, I suppose.


  // Marcus






More information about the Scummvm-devel mailing list