Vanilla List Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bobs recent changes in the CVS tree
Hi,
The last changelog says:
* $Log: config.h.in,v $
* Revision 1.7 1999/03/13 01:08:37 tanner
* Changes to get the server to -compile- on Solaris 2.5.1.
*
* There are lots of program files that #include #defined macro. I started
* to move all this stuff into config.h, where I think it should be located.
No please don't do that. The config.h file should only include the things
required for every file. In fact it should not include anything and should
be placed as the first include it each C-file. It's only purpose is to
set all the config variables.
The #include #defined macro is used to select the system dependend
name for an include file only where it is really required.
So for example for the xpm lib in the config.h you will have:
#ifdef HAVE_XPM
#ifdef HAVE_X11_XPM_H
#define INC_XPM <X11/xpm.h>
#else
#define INC_XPM <xpm.h>
#endif
#else
#define INC_XPM NULLFILE
#endif
And only where you really need the xpm.h lib you will include:
#include INC_XPM
Everything else whould increase the overhead.
Note: If the include file is not required at all the define must point to the
empty NULLFILE to prevent compiler problems.
So please undo your recent changes.
Kurt (007)
PS: Someone should add a $Log CVS comment into each file so that we
may check the version history easier. I did this already for COW.
--
Kurt Siegl / Franzberg 4, A-4483 Hargelsberg, Austria
Email: 007@netrek.org Tel (ISDN): *(7225)7017
URL: http://www.ooenet.at/user/siegl/kurt/