From d5dfcf7613862a2484facc2453004cf991bc10eb Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Wed, 25 Jan 2023 10:29:48 +0200 Subject: [PATCH] Add HAVE_POSIX_MONOTONIC --- .../autoconf/checks/HAVE_POSIX_MONOTONIC.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_MONOTONIC.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_MONOTONIC.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_MONOTONIC.h new file mode 100644 index 0000000..99d4479 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POSIX_MONOTONIC.h @@ -0,0 +1,20 @@ +// HAVE_POSIX_MONOTONIC + +#undef HAVE_POSIX_MONOTONIC + +#if defined(__GLIBC__) || \ + defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(BUILD2_AUTOCONF_MACOS) || \ + defined(__MINGW32__) +# include /* _POSIX_MONOTONIC_CLOCK */ + + /* A value of 0 means it's supported for compilation while a value greater + * than 0 means it's supported for compilation and at runtime (see + * https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html). + */ +# if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 +# define HAVE_POSIX_MONOTONIC 1 +# endif +#endif