This is a wrapper to map BSD functionality of OS into POSIX subsystem. More...
Go to the source code of this file.
Variables | |
int | posix_bsd_dummy = 0 |
This is a wrapper to map BSD functionality of OS into POSIX subsystem.
Copyright (c) 2012-2021 by the developers. See the LICENSE file for details.
BSD functions not defined in POSIX.1-1990 or XSI extension should be called from here.
Why do it this way: The POSIX subsystem defines '_POSIX_C_SOURCE' because otherwise some systems by default expose functions that are not POSIX conformant (for preserving compatibility to historical versions). Indeed in many cases they have conformant versions too, and with the definition they get exposed instead of the default ones so we can use them. That is in general the desired behaviour. But as a side effect we can't access all non-POSIX functions any more. We have asked for POSIX and we got POSIX. This wrapper pulls in the historical BSD stuff that can't be avoided. And because using it this way is a pain in the ass, the programmer is forced to use it only if POSIX offers no other option.
Definition in file bsd.c.