path: root/lib/libc
diff options
authorWarner Losh <imp@FreeBSD.org>2021-07-30 23:10:56 +0000
committerWarner Losh <imp@FreeBSD.org>2021-07-30 23:20:22 +0000
commit7b797ba27a714594dac910035d857e653d566b19 (patch)
tree25482c759d291e5b41f9df0a4478769c76edcfdb /lib/libc
parentcda1f88da5301a47e53e6aeead739e440233d052 (diff)
time.h: reduce CLOCK_ namespace pollution, move to _clock_id.h
Attempt to comply with the strict namespace pollution requirements of _POSIX_C_SOURCE. Add guards to limit visitbility of CLOCK_ and TIMER_ defines as appropriate. Only define the CLOCK_ variables relevant to the specific standards. Move all the sharing to sys/_clock_id.h and make time.h and sys/time.h both include that rather than copy due to the now large number of clocks and compat defines. Please note: The old time.h previously used these newer dates: CLOCK_REALTIME 199506 CLOCK_MONOTONIC 200112 CLOCK_THREAD_CPUTIME_ID 200112 CLOCK_PROCESS_CPUTIME_ID 200112 but glibc defines all of these for 199309. glibc uses this date for all these values, however, only CLOCK_REALTIME was in IEEE 1003.1b. Add a comment about this to document it. A large number of programs and libraries assume that these will be defined for _POSIX_C_SOURCE = 199309. In addition, leak CLOCK_UPTIME_FAST for the pocl package until it can be updated to use a simple CLOCK_MONOTONIC. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31056
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions