Add HAVE_SLEEP, HAVE_USLEEP, HAVE_NANOSLEEP (GH PR #26)

This commit is contained in:
Fred Helmesjö 2022-09-01 09:26:57 +02:00 committed by Boris Kolpackov
parent 0745c11a0b
commit 98ca18573e
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// HAVE_NANOSLEEP : BUILD2_AUTOCONF_LIBC_VERSION
#ifndef BUILD2_AUTOCONF_LIBC_VERSION
# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included
#endif
#undef HAVE_NANOSLEEP
/* Since OpenBSD 2.1, FreeBSD 3.0, NetBSD 1.3, Mac OS X < 10.0,
* glibc 2.1 (?)
*/
#if defined(__linux__) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(199706) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 0) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 3) || \
BUILD2_AUTOCONF_MACOS_PREREQ(10, 0) || \
BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1)
# define HAVE_NANOSLEEP 1
#endif

View File

@ -0,0 +1,19 @@
// HAVE_SLEEP : BUILD2_AUTOCONF_LIBC_VERSION
#ifndef BUILD2_AUTOCONF_LIBC_VERSION
# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included
#endif
#undef HAVE_SLEEP
/* Since Version 4/7 AT&T UNIX.
* glibc 2.1 (?)
*/
#if defined(__linux__) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(199706) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(3, 0) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(1, 3) || \
BUILD2_AUTOCONF_MACOS_PREREQ(10, 0) || \
BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1)
# define HAVE_SLEEP 1
#endif

View File

@ -0,0 +1,18 @@
// HAVE_USLEEP : BUILD2_AUTOCONF_LIBC_VERSION
#ifndef BUILD2_AUTOCONF_LIBC_VERSION
# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included
#endif
#undef HAVE_USLEEP
/* Since 4.3BSD (OpenBSD, FreeBSD, NetBSD, Mac OS X),
* glibc 2.1 (?)
*/
#if defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(BUILD2_AUTOCONF_MACOS) || \
BUILD2_AUTOCONF_GLIBC_PREREQ(2, 1)
# define HAVE_USLEEP 1
#endif