delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/05/09:17:52

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3E411BD6.14E13847@phekda.freeserve.co.uk>
Date: Wed, 05 Feb 2003 14:12:38 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
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: djgpp: djgpp/include/string.h,strings.h
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1030205082604 DOT 15128I-100000 AT is> <Pine DOT OSF DOT 4 DOT 51 DOT 0302051345410 DOT 1814 AT sirppi DOT helsinki DOT fi>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Esa A E Peuha wrote:
> 
> On Wed, 5 Feb 2003, Eli Zaretskii wrote:
> 
> > On Tue, 4 Feb 2003, cvs-richdawe AT delorie DOT com wrote:
> 
> > > + #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
> > > +   || !defined(__STRICT_ANSI__)
> > > +
> > > + #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
> 
> > Richard, did you try to see whether an old GCC version swallows this
> > successfully?  Like compile a program with GCC 2.7.2.x or 2.8?  If not,
> > could someone please try that?
> 
> I don't see how that would be a problem, but won't this pollute POSIX
> namespace?  The older POSIX standard includes all ANSI C89 functions,
> but not all C99 functions (if any; I haven't checked).

Yes, that's true.

> So that #if should also check for strict POSIX compliance, and if it's
> required, what version of POSIX is requested (presumably the newer POSIX
> includes all ANSI C99 functions).

A draft of new POSIX appears to include all the new ANSI C99 things.

> If there are any functions that are both C99 and older POSIX, they need
> yet another section with its own test.

Yes.

I don't have a copy of old POSIX. I have a draft copy of new POSIX. How I can
tell the POSIX standard version? I'm primarily interested in old POSIX here,
since I don't have that. But if anyone has new POSIX, then that would be good
to know too. It looks like it's controlled by _POSIX_C_SOURCE, which obsoletes
_POSIX_SOURCE.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019