including <stdlib.h>

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Wed Feb 11 11:23:00 GMT 1998


 > From: John Carr <jfc@mit.edu>
 > 
 > The *config.h files I referred to are the autoconf-generated config.h,
 > hconfig.h, tconfig.h, and auto-config.h in the gcc build directory.
 > 
 > For example, in auto-config.h replace
 > 	#define HAVE_STDLIB_H 1
 > with
 > 	#include <stdlib.h>

John,

	This approach removes some of the control one might want since,
if you include auto-config.h, you are forced to include the header file
rather than being able to check a macro.  It also removes the ability of
a config/ directory file from being able to override what autoconf tells
us. 

	Another approach would be to supply a "system.h" file which
includes various headers (eg stdlib.h), provides possibly missing system
prototypes (eg bcopy) and possibly missing system macros (eg R_OK),
etc., and each gcc source file could then include this file if desired
to get default stuff.  (Or the source file could instead enumerate these
things manually if the default system.h is not appropriate.)

	I've submitted a draft version of this to Jeff, mostly copied
from the same approach used in the fileutils package.

	Hmmm, I just checked the list archive and for some reason the
file I submitted seems to have stripped all the include statements so
they appear without the file its trying to include inside <>.  Wierd... 

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.



More information about the Gcc mailing list