egcs, does gcc fixincludes etc guarantee a stdlib.h exists?

Jim Wilson wilson@cygnus.com
Thu Apr 16 16:34:00 GMT 1998


	IIRC there are some functions for which the generated prototype is wrong on
	some platforms (I do not remember which functions), but if you only want to get
	the prototype for malloc then it is safe to define __USE_FIXED_PROTOTYPES__.

On SunOS4, and other BSD 4.[23] derived systems, the prototype for sprintf
and related functions are dangerously wrong.  The prototypes return int,
the actual (obsolete) library functions return char *.  This is in stdio.h
though.

Also, some gid_t/uid_t related functions are a problem, but I think those
were solved by not emitting full prototypes for them.  This is because these
types changed from int to short (or vice versa?).

In any case, it doesn't really matter.  We don't need to define
__USE_FIXED_PROTOTYPES__.  It is true that some systems will be missing
a malloc prototype, but we only need a prototype if char * and int are
different sizes, and we can be sure that all of those systems do have
a malloc prototype already.

Jim



More information about the Gcc mailing list