Non-POSIX compliant portions of FreeBSD

Garrett Wollman wollman at csail.mit.edu
Wed Apr 14 19:08:14 UTC 2010


<<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.

> 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.

> 3. We don't define SIGPOLL -
> http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html

Marked as OB (obsolete), XSR (STREAMS interface).

> 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).

> 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).

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

POSIX_CLOCK_SELECTION option group.

-GAWollman


More information about the freebsd-standards mailing list