diff options
author | Florian Walpen <dev@submerge.ch> | 2021-12-23 13:40:39 +0100 |
---|---|---|
committer | 0EVSG <dev@submerge.ch> | 2021-12-27 20:45:57 +0100 |
commit | a50aeb1f331546e86c1f35f26e67692c1cdfc9a5 (patch) | |
tree | ccc3077d04aad418e5df99aaa1a28ea3d2892a3c | |
parent | 302b8e540cf0d7bf266007235cad950465788e89 (diff) | |
download | jack2-a50aeb1f331546e86c1f35f26e67692c1cdfc9a5.tar.gz |
POSIX: Remove unnecessary feature test macro.
This is a no-op since the line was already commented out, to make it
compile on FreeBSD. But it deserves an explanation:
The _POSIX_C_SOURCE macro is meant to restrict the C library to a
certain POSIX standard, not to enable features. This is inappropriate
here because:
1. Jack already uses non-POSIX functions. E.g. JackPosixSemaphore.cpp
references gettimeofday(), which is part of the X/Open specs.
2. C++ does not define a POSIX level to be based on. Headers from the
C++ standard library may (and do) break when the POSIX feature level
is restricted.
The canonical way is to only set the feature level through the
"--std=gnu++11" compile options.
-rw-r--r-- | posix/JackPosixSemaphore.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/posix/JackPosixSemaphore.cpp b/posix/JackPosixSemaphore.cpp index 5103f1cf..49012312 100644 --- a/posix/JackPosixSemaphore.cpp +++ b/posix/JackPosixSemaphore.cpp @@ -17,8 +17,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// #define _POSIX_C_SOURCE 200112L - #include "JackPosixSemaphore.h" #include "JackTools.h" #include "JackConstants.h" |