aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--meson.build21
-rw-r--r--src/jalv_config.h15
3 files changed, 4 insertions, 35 deletions
diff --git a/NEWS b/NEWS
index ee5a3c2..cebc20c 100644
--- a/NEWS
+++ b/NEWS
@@ -12,9 +12,10 @@ jalv (1.6.9) unstable; urgency=medium
* Replace use of deprecated Gtk interfaces
* Switch to external zix dependency
* Use Gtk switches instead of checkboxes for toggle controls
+ * Use fewer platform-specific APIs
* Use portable zix filesystem API
- -- David Robillard <d@drobilla.net> Thu, 14 Nov 2024 18:16:02 +0000
+ -- David Robillard <d@drobilla.net> Thu, 14 Nov 2024 18:26:43 +0000
jalv (1.6.8) stable; urgency=medium
diff --git a/meson.build b/meson.build
index b8a4267..fce757e 100644
--- a/meson.build
+++ b/meson.build
@@ -334,18 +334,9 @@ no_posix = get_option('posix').disabled() or host_machine.system() == 'windows'
if no_posix
platform_defines += ['-DJALV_NO_POSIX']
elif host_machine.system() == 'darwin'
- platform_defines += [
- '-D_DARWIN_C_SOURCE',
- '-D_POSIX_C_SOURCE=200809L',
- '-D_XOPEN_SOURCE=600',
- ]
+ platform_defines += ['-D_POSIX_C_SOURCE=200809L']
else
- platform_defines += [
- '-D_BSD_SOURCE',
- '-D_DEFAULT_SOURCE',
- '-D_POSIX_C_SOURCE=200809L',
- '-D_XOPEN_SOURCE=600',
- ]
+ platform_defines += ['-D_POSIX_C_SOURCE=200809L']
endif
# Build platform-specific configuration arguments
@@ -359,7 +350,6 @@ elif get_option('checks').enabled()
if no_posix
platform_defines += ['-DHAVE_FILENO=0']
platform_defines += ['-DHAVE_ISATTY=0']
- platform_defines += ['-DHAVE_MLOCK=0']
platform_defines += ['-DHAVE_POSIX_MEMALIGN=0']
platform_defines += ['-DHAVE_SIGACTION=0']
else
@@ -369,9 +359,6 @@ int main(void) { return fileno(stdin); }'''
isatty_code = '''#include <unistd.h>
int main(void) { return isatty(0); }'''
- mlock_code = '''#include <sys/mman.h>
-int main(void) { return mlock(0, 0); }'''
-
posix_memalign_code = '''#include <stdlib.h>
int main(void) { void* mem; posix_memalign(&mem, 8, 8); }'''
@@ -386,10 +373,6 @@ int main(void) { return sigaction(SIGINT, 0, 0); }'''
cc.compiles(isatty_code, args: platform_defines, name: 'isatty').to_int(),
)
- platform_defines += '-DHAVE_MLOCK=@0@'.format(
- cc.compiles(mlock_code, args: platform_defines, name: 'mlock').to_int(),
- )
-
platform_defines += '-DHAVE_POSIX_MEMALIGN=@0@'.format(
cc.compiles(
posix_memalign_code,
diff --git a/src/jalv_config.h b/src/jalv_config.h
index 3d0133e..4bcda8c 100644
--- a/src/jalv_config.h
+++ b/src/jalv_config.h
@@ -60,15 +60,6 @@
# endif
# endif
-// POSIX.1-2001: mlock()
-# ifndef HAVE_MLOCK
-# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
-# define HAVE_MLOCK 1
-# else
-# define HAVE_MLOCK 0
-# endif
-# endif
-
// POSIX.1-2001: posix_memalign()
# ifndef HAVE_POSIX_MEMALIGN
# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
@@ -142,12 +133,6 @@
# define USE_ISATTY 0
#endif
-#if HAVE_MLOCK
-# define USE_MLOCK 1
-#else
-# define USE_MLOCK 0
-#endif
-
#if HAVE_POSIX_MEMALIGN
# define USE_POSIX_MEMALIGN 1
#else