Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2002 12:39:49 -0800
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Marc Recht <marc@informatik.uni-bremen.de>
Cc:        freebsd-standards@FreeBSD.ORG
Subject:   Re: POSIX and the real life or FreeBSD too strict ?
Message-ID:  <20021208203949.GA535@HAL9000.homeunix.com>
In-Reply-To: <584000000.1039360297@leeloo.intern.geht.de>
References:  <584000000.1039360297@leeloo.intern.geht.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Marc Recht <marc@informatik.uni-bremen.de>:
> I became conviced that FreeBSD is (way) too strict. IMHO no non-POSIX is 
> available isn't workable in the real world and isn't neccessary regarding 
> the standard. (IMHO it isn't even in the spirit of the standard..) If I 
> catched the standard correctly it demands only that the POSIX 
> function/defines/headers are available not that others are not. (Please 
> correct me if I'm wrong.)
> And, most important, it isn't done on the other UNIX implementations out 
> there (at least none I know about..). So we get needlessly a lot of 
> uncompileable code. Which forces vendors to do extra work to deal with 
> specifically.
> Are there any plans to change FreeBSD's behaviour to be less strict ?

What you're asking for is reasonable, but there's a problem of
namespace pollution.  A application that uses only POSIX features
is supposed to compile on a conforming implementation when
_POSIX_C_SOURCE is appropriately defined.  If standard headers add
extra symbols and macros that are not specified in POSIX, you
can't make that guarantee due to potential name conflicts.  The
whole point of using _POSIX_SOURCE is to turn of extensions that
might break things.

By the way, Solaris also has the behavior you're complaining
about, but there is a workaround.  If you define _POSIX_C_SOURCE,
you get precisely the features specified in POSIX, and if you
additionally define __EXTENSIONS__, you get everything.  I'm not
sure what ``other UNIX implementations'' you've been looking at,
but a cursory glance at glibc reveals that it is in the same boat
as FreeBSD.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021208203949.GA535>