I don't said that the application is _strictly_ POSIX conforming. It only wants to use POSIX functions and RPC.A conforming application cannot make use of facilities outside the scope of the standard. This means that if you define _POSIX_C_SOURCE=200112L you don't want RPC.
FreeBSD's way seems to be not to define POSIX/XSI (and so) on to _indirectly_ get it and the BSD stuff
But more in a kind of aggregation like I want "this and that" (POSIX and stuff..).4.4BSD (and earlier?) and most derived systems have many conditionals to prevent namespace pollution in the standards-case.
Hmm. The questions what makes more problems.. Maybe a solution could be to make a supported way to change the __BSD_VISIBLE from the "outside". Another idea would be to make a WANT_STRICT_POSIX.So why do we do this? To prevent screwage of perfectly valid applications that use the same keywords as system extentions to the standard. For instance, the major() macro in <sys/types.h> is a very common and likely to be used word, so it is not defined in the standards case to prevent POSIX applications that define a different major() macro from failing to compile.
I had this in mind.Not really. Conforming applications have no trouble (obviously), pseudo-conforming applications only need a little work (removing bogus POSIX keywords that specify conformance), and non-conforming BSD applications (the majority of software) have no problems.
http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap02.html:
A conforming implementation shall meet all of the following criteria:
[...]
4. The system may provide additional utilities, functions, or facilities not required by IEEE Std 1003.1-2001. Non-standard extensions of the utilities, functions, or facilities specified in IEEE Std 1003.1-2001 should be identified as such in the system documentation. Non-standard extensions, when used, may change the behavior of utilities, functions, or facilities defined by IEEE Std 1003.1-2001. The conformance document shall define an environment in which an application can be run with the behavior specified by IEEE Std 1003.1-2001. In no case shall such an environment require modification of a Strictly Conforming POSIX Application (see Strictly Conforming POSIX Application ).
So, defining POSIX should guarantee that a strictly POSIX conforming runs/compiles correctly. But not that a non-strictly POSIX conforming application won't.
No. Eg. the rpc example works out-of-the-box on NetBSD 1.6. And only a _very_ small part of the UNIX world is BSD.FreeBSD's behaviour is consistent with BSD's behaviour.
Regards,
Marc
"Premature optimization is the root of all evil." -- Donald E. Knuth
msg48359/pgp00000.pgp
Description: PGP signature