[Scummvm-devel] Header files.

J.Brown (Ender) ender at scummvm.org
Sun Dec 21 09:21:02 CET 2003


The general idea sounds good, however changing the naming of stdafx is
somewhat annoying. MSVC precompiled headers require that exact filename in
a C++ application. Whilst the name CAN, I believe, be changed in some IDE
setting.. it's rather inconvienant.

Mind you, most of the ugly hacks in ScummVM are to cope for the stupid
behavior of various MSVC versions. However, despite the fact I havn't
really solidly used a Windows machine for years so I personally don't
care, I still believe we should support this brain-dead compiler as set in
many default configurations as possible.

 - Ender

   http://www.scummvm.org/   | "Amen! Attempts to eradicate humour from
   http://www.quakesrc.org/  |  our distribution should be ignored with
   http://www.enderboi.com/  |  extreme prejudice" - cjwatson at debian.org

On Sun, 21 Dec 2003, Marcus Comstedt wrote:

> Date: Sun, 21 Dec 2003 17:49:33 +0100
> From: Marcus Comstedt <marcus at mc.pp.se>
> To: scummvm-devel at lists.sourceforge.net
> Subject: [Scummvm-devel] Header files.
>
>
> Hi all.
>
> I've become increasinly annoyed with the current situation concerning
> header files in ScummVM.  Right now, <scummsys.h> always gets included
> one way or another.  However, because of the the trickery involved
> with free_check, the system headers defining the prototype for the
> real free() must be included _first_.  This is handled by <stdafx.h>,
> which is included directly by the individual C++ files.  Both
> <scummsys.h> and <stdafx.h> contain a lot of #ifdefs on the OS, and
> <stdafx.h> additionally includes <portdefs.h>, iff NONSTANDARD_PORT is
> defined.
>
> Isn't this a bit messy and over-complicated?  Can't we do this
> instead:
>
> * <scummsys.h> always includes <portdefs.h> (after config.h, probably)
>
> * The backends which don't have a portdefs.h get one (initially empty)
>
> * Everything from <stdafx.h> goes into the respective <portdefs.h>.
>   Nothing includes <stdafx.h> anymore.
>
> * <stdafx.h> goes away.  => NONSTANDARD_PORT goes away.
>
> * OS-dependent #ifdefs from <scummsys.h> also goes into <portdefs.h>.
>   Stuff that are not tied to a particular port, such as big/little
>   endian and alignment/nonalignment #ifdefs, stay.
>
> * Should common elements be found in multiple <portdefs.h> files, they
>   can be considered for moving into <scummsys.h>.
>
> ?  The x11, sdl and null backends should probably share <portdefs.h>,
> but that seems simple enought to fix.
>
>
>   // Marcus
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>





More information about the Scummvm-devel mailing list