Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3EAA4432.E5FD11A6@phekda.freeserve.co.uk> Date: Sat, 26 Apr 2003 09:32:50 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: nmalloc revisited References: <10304260325 DOT AA18541 AT clio DOT rice DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Charles Sandmann wrote: > > > And that is the point. -ansi -pedantic HAS to exclude it. > > Otherwise the system is non-compliant. > > There is an entire section in stdlib.h which is already > excluded - no need to put things in additional files. To elaborate, there are some defines which control what is visible in a module's namespace: __STRICT_ANSI__ (__STDC_VERSION__ && __STDC_VERSION__ > 199901L) || !__STRICT_ANSI__ _POSIX_SOURCE If you don't define anything, you get everything. If you define _POSIX_SOURCE, you get all the C and POSIX things. If you define __STRICT_ANSI__, you get just C89 stuff. If you define __STRICT_ANSI__ and __STDC_VERSION__ appropriately for C99, you get C99 stuff. Note that the compiler will define __STRICT_ANSI__, __STDC_VERSION__ for you, depending on the switches. I think _POSIX_SOURCE has to be defined using -D or #define before including the appropriate file. So all the "de facto" standard stuff would go in the section marked: #ifndef _POSIX_SOURCE ... #endif /* !_POSIX_SOURCE */ The C99 sections are in CVS or, now, alpha 1. Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]