Non-POSIX compliant portions of FreeBSD

Garrett Cooper yanefbsd at gmail.com
Mon Apr 19 02:29:11 UTC 2010


On Wed, Apr 14, 2010 at 11:32 AM, Garrett Wollman <wollman at csail.mit.edu> wrote:
> <<On Wed, 7 Apr 2010 22:00:41 -0700, Garrett Cooper <yanefbsd at gmail.com> said:
>
>>     I was recently piqued by Warner to look into open_posix_testsuite,
>> and I've noticed that there are some discrepancies in our compliance
>> with POSIX standards:
>
> Please take note of the broad variety of options in the POSIX
> specification.  There are many options which we do not implement,
> either because they are bad ideas (e.g., XSI, tracing), or because
> nobody has gotten around to implementing them (e.g., synchronous
> I/O).  A correct application will check (using getconf(1), sysconf(3),
> or both) whether the interface it desires is available before
> attempting to use it.  A broken application will use autoconf.

autoconf is pretty foolhardy, unless one's checking to make sure that
a function or struct conforms to the POSIX spec (I've seen that
before...).

>> 1. We don't implement any of the pieces in errno.h relating to POSIX
>> STREAMs (I assume this is intentional?).
>
> It is intentional.
>
>> 2. We don't define daylight or timezone in time.h -
>> http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html
>
> This interface is broken as designed and impossible to implement
> correctly.  The POSIX "timezone" interface conflicts with the
> traditional BSD "timezone" interface (which is also broken as
> designed) and I don't think anyone has ever done the work to
> disentangle this particular mess.

Yeah... I assume that the same thing is true for tzname.

>> 3. We don't define SIGPOLL -
>> http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
>
> Marked as OB (obsolete), XSR (STREAMS interface).

Where does it say obsolete?

>> 4. We don't define SCHED_SPORADIC and friends -
>> http://www.opengroup.org/onlinepubs/000095399/basedefs/sched.h.html
>> 5. We don't define the sched_param struct  -
>> http://www.opengroup.org/onlinepubs/000095399/basedefs/sched.h.html
>
> Marked as SS | TPS (options we don't implement).

4. Is SS|TPS, but 5. isn't listed with any clauses.

>> 6. We don't define bsd_signal (snickers) -
>> http://www.opengroup.org/onlinepubs/000095399/functions/bsd_signal.html
>
> Interface removed in SUSv7 (along with bcmp, bcopy, bzero, ecvt, fcvt,
> ftime, gcvt, getcontext, gethostbyaddr, gethostbyname, getwd, h_errno,
> index, makecontext, mktemp, pthread_attr_[gs]etstackaddr, rindex,
> scalb, setcontext, swapcontext, ualarm, usleep, vfork, and wcswcs).

Ok.

>> 7. We don't have clock_nanosleep, clock_getcpuclockid, or getdate
>> defined using the POSIX defined headers.
>
> POSIX_CLOCK_SELECTION option group.

Thanks,
-Garrett


More information about the freebsd-standards mailing list