This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Disabling fixproto: OS-less embedded targets?
- From: Per Bothner <per at bothner dot com>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc at gcc dot gnu dot org, corsepou at faw dot uni-ulm dot de
- Date: Mon, 06 Oct 2003 22:17:19 -0700
- Subject: Re: Disabling fixproto: OS-less embedded targets?
- References: <20030930105644.GA3892@twcny.rr.com>
Nathanael Nerode wrote:
'fixproto' mostly inserts prototypes for unprototyped functions.
(It inserts protoypes for functions which appear without prototypes,
and for certain standard functions if they don't appear at all.)
But fixproto also makes the following curious little changes, which if they
are needed by themselves should be moved to fixincludes:
* Creates dummy unistd.h, stdlib.h, string.h, time.h if they don't exist
* Declares 'errno' in errno.h if it was missing
* Adds S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK and S_ISREG to sys/stat.h
if they were missing *and* the S_IFxxx macros were present
I wrote fixproto to make header files suitable for C++. Earlier,
C++-suitable header files were distributed as part of libg++,
where they didn't really belong. Extending on the fixincludes
idea of fixing/extending the existing vendor header files allowed
us to rmove the header files from libg++. The extra "curious
little changes" were all to fix common problems in pre-ANSI/Posix
system headers.
It may be reasonable at this much later time to try turning off
fixproto for all targets except those that specifically need it,
only only enable it if it is specifically needed for a target.
--
--Per Bothner
per@bothner.com http://per.bothner.com/