diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2020-07-14 20:23:27 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2020-07-14 20:23:27 +0000 |
commit | aeafed21c4e2b2fbd54de67ba3152efc906d4891 (patch) | |
tree | e171b510003fc63a55af6cfb659c9a0b7a8deee6 /include/time.h | |
parent | 4a022f0e0697bcfe84f02eaf9d5cf193e01feec0 (diff) | |
download | src-test-aeafed21c4e2b2fbd54de67ba3152efc906d4891.tar.gz src-test-aeafed21c4e2b2fbd54de67ba3152efc906d4891.zip |
Make CLOCK_REALTIME and TIMER_ABSTIME available for XOPEN_SOURCE >= 500.
Reported by: jbeich
PR: 247701
Reviewed by: jilles
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25554
Notes
Notes:
svn path=/head/; revision=363193
Diffstat (limited to 'include/time.h')
-rw-r--r-- | include/time.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/time.h b/include/time.h index 2dba82b87baaa..2a9bcb6a11079 100644 --- a/include/time.h +++ b/include/time.h @@ -98,12 +98,14 @@ typedef __pid_t pid_t; #endif /* These macros are also in sys/time.h. */ -#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 +#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 199506 #define CLOCK_REALTIME 0 -#ifdef __BSD_VISIBLE +#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 199506 */ +#if !defined(CLOCK_VIRTUAL) && __BSD_VISIBLE #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 -#endif +#endif /* !defined(CLOCK_VIRTUAL) && __BSD_VISIBLE */ +#if !defined(CLOCK_MONOTONIC) && __POSIX_VISIBLE >= 200112 #define CLOCK_MONOTONIC 4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ @@ -115,14 +117,14 @@ typedef __pid_t pid_t; #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 #define CLOCK_PROCESS_CPUTIME_ID 15 -#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ +#endif /* !defined(CLOCK_MONOTONIC) && __POSIX_VISIBLE >= 200112 */ -#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE #define TIMER_RELTIME 0x0 /* relative timer */ #endif +#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 199506 #define TIMER_ABSTIME 0x1 /* absolute timer */ -#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ +#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 199506 */ struct tm { int tm_sec; /* seconds after the minute [0-60] */ |