From 5e7edc86e3c87ffe3c843ce5daa05ef3309b4301 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Wed, 17 Jan 2024 16:02:36 +0200 Subject: [PATCH] Add HAVE_SYSV_SHM and HAVE_SYSV_SEM --- .../libbuild2/autoconf/checks/HAVE_SYSV_SEM.h | 25 +++++++++++++++++ .../libbuild2/autoconf/checks/HAVE_SYSV_SHM.h | 27 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SEM.h create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SHM.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SEM.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SEM.h new file mode 100644 index 0000000..7366d5a --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SEM.h @@ -0,0 +1,25 @@ +// HAVE_SYSV_SEM : BUILD2_AUTOCONF_LIBC_VERSION + +/* If HAVE_SYSV_SEM is defined then all of the SYSV semaphore system calls + * semget(), semctl(), and semop() are available. + */ + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_SYSV_SEM + +/* Since glibc 2.0, FreeBSD 2.1.0 (based on checking the online manpages by + * version), and OpenBSD 2.2 (based on checking the online manpages by + * version). + * + * Available on all versions of NetBSD and macOS. + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 0) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(2, 1) || \ + BUILD2_AUTOCONF_OPENBSD_PREREQ(199711) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_SYSV_SEM 1 +#endif diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SHM.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SHM.h new file mode 100644 index 0000000..78e9fa3 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_SYSV_SHM.h @@ -0,0 +1,27 @@ +// HAVE_SYSV_SHM : BUILD2_AUTOCONF_LIBC_VERSION + +/* + * If HAVE_SYSV_SHM is defined then all SYSV shared memory system calls + * shmget(), shmat(), shmdt(), and shmctl() are available. + */ + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_SYSV_SHM + +/* + * Since glibc 2.0, FreeBSD 2.1.0 (based on checking the online manpages by + * version), and OpenBSD 2.2 (based on checking the online manpages by + * version). + * + * Available on all versions of NetBSD and macOS. + */ +#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 0) || \ + BUILD2_AUTOCONF_FREEBSD_PREREQ(2, 1) || \ + BUILD2_AUTOCONF_OPENBSD_PREREQ(199711) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_SYSV_SHM 1 +#endif