Freebsd standards compliance
keramida at ceid.upatras.gr
Fri Jan 16 17:21:32 PST 2009
On Sat, 17 Jan 2009 10:03:39 +1000, Da Rock <rock_on_the_web at comcen.com.au> wrote:
> According to wikipedia Freebsd is only mostly compliant with POSIX, yet
> BSD/OS is fully- why would this be?
There are parts of FreeBSD that are deliberately "BSD compliant" instead
of POSIX compliant, because this is how they traditionally worked. I am
not a standards' expert, so if you want more details it may be better to
ask by email to the freebsd-standards mailing list.
> From what I can tell ANSI C is the standard, and POSIX is an
> implementation(?) of that standard (threads, i/o, etc)? Which version of
> these standards is Freebsd at- c89, c90, c99, POSIX 1(b,c, etc)?
ISO/IEC 9899:1999 is the standard for the C programming language (ANSI C
is a bit ambiguous, because it may refer to an older standard depending
on the context).
This standard has a non-zero intersection with more than one standard of
the IEEE 1003 series (what is commonly referred to as "POSIX"), but they
are not the same, and it is nto correct to say that one of them is just
an `implementation' of the other.
There is a bit of information about 'c89', 'c90' and 'ANSI C' in the
Texinfo manual of GCC. It may help clarify some of the terms:
% info '(gcc)'
and look at the ``Language Standards Supported by GCC'' section.
Most of FreeBSD compiles in 'c90' mode. There are a few parts of the
kernel and userland source that use GCC extensions. There are also
parts that use C99 features, i.e. (a) declaration of local variables in
the block they are used, instead of the start of a function, (b) the C99
syntax for partially initializing structures, and so on.
Then there are ISO/IEC 9899:1999 features that are not available in the
combination of GCC version and our system libraries.
So you can't really say that the entire FreeBSD source is `at c90' or
The `FreeBSD C99 and POSIX Comformance Project' is an effort to work on
these issues. More information is available online at:
More information about the freebsd-questions