From dc371f98231b7bc0f0554624443f4fd144af574e Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Sun, 23 Sep 2018 20:19:59 +0200 Subject: Build: Remove cargo-cult macro definitions - _REENTRANT and _THREAD_SAFE were taken from the VLC build system and have since been removed there, so it seems safe to remove those here as well. - _POSIX_PTHREAD_SEMANTICS is required for POSIX thread flavor of threading functions but instead we can define _POSIX_C_SOURCE to a value higher than 199506L, when including , see https://docs.oracle.com/cd/E19455-01/806-5257/compile-3/index.html - __EXTENSIONS__ is used to enable Solaris extensions, as far as I know we are not using any. - _FILE_OFFSET_BITS is already defined to 64 by meson. - _ISOC99_SOURCE should not be required as we do not support compiling with -std c89. - _ISOC11_SOURCE should not be required as we set -std c11, so we do not need any C11 extensions to C99 as we already use C11. - _POSIX_SOURCE is not required as we already set _POSIX_C_SOURCE to a positive integer. * _XOPEN_SOURCE should not be needed as we already have _POSIX_C_SOURCE. * _XOPEN_SOURCE_EXTENDED should not be required as we do not need any X/Open Unix extensions to my knowledge. * _BSD_SOURCE should not be required as we already set _POSIX_C_SOURCE. * _SVID_SOURCE should not be required as we already set _POSIX_C_SOURCE. --- meson.build | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 463f6b2..149fc82 100644 --- a/meson.build +++ b/meson.build @@ -55,12 +55,8 @@ endforeach # feature_defines = [ - ['_REENTRANT', 1], # Define so that reentrant versions of several functions get declared - ['_THREAD_SAFE', 1], # Same as _REENTANT for some other OSes ['_GNU_SOURCE', 1], # Enable GNU extensions on systems that have them - ['_POSIX_PTHREAD_SEMANTICS', 1], # Enable threading extensions on Solaris - ['__EXTENSIONS__', 1], # Enable general extensions on Solaris - ['_FILE_OFFSET_BITS', 64], # Define to 64 for large files support + ['_POSIX_C_SOURCE', '200809L'], #IEEE Std 1003.1 ] if host_machine.system() == 'windows' @@ -69,14 +65,6 @@ if host_machine.system() == 'windows' ['UNICODE', 1], # Define to 1 for Unicode (Wide Chars) APIs ['_UNICODE', 1], # Define to 1 for Unicode (Wide Chars) APIs ['__USE_MINGW_ANSI_STDIO', 1], # Define to force use of MinGW printf - ['_ISOC99_SOURCE', 1], # Extensions to ISO C89 from ISO C99 - ['_ISOC11_SOURCE', 1], # Extensions to ISO C99 from ISO C11 - ['_POSIX_SOURCE', 1], # IEEE Std 1003.1 - ['_POSIX_C_SOURCE', '200809L'], #IEEE Std 1003.1 - ['_XOPEN_SOURCE', 700], # POSIX and XPG 7th edition - ['_XOPEN_SOURCE_EXTENDED', 1], # XPG things and X/Open Unix extensions - ['_BSD_SOURCE', 1], # ISO C, POSIX, and 4.3BSD things - ['_SVID_SOURCE', 1], # ISO C, POSIX, and SVID things ] endif -- cgit v1.2.3