From owner-svn-src-head@freebsd.org Tue Jul 14 20:23:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28FD036E091; Tue, 14 Jul 2020 20:23:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5sR45vjFz3yQB; Tue, 14 Jul 2020 20:23:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81260BF90; Tue, 14 Jul 2020 20:23:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06EKNSrv090506; Tue, 14 Jul 2020 20:23:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06EKNSLp090505; Tue, 14 Jul 2020 20:23:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007142023.06EKNSLp090505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 14 Jul 2020 20:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363193 - in head: include sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: include sys/sys X-SVN-Commit-Revision: 363193 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 20:23:29 -0000 Author: kib Date: Tue Jul 14 20:23:27 2020 New Revision: 363193 URL: https://svnweb.freebsd.org/changeset/base/363193 Log: 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 Modified: head/include/time.h head/sys/sys/time.h Modified: head/include/time.h ============================================================================== --- head/include/time.h Tue Jul 14 18:57:31 2020 (r363192) +++ head/include/time.h Tue Jul 14 20:23:27 2020 (r363193) @@ -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] */ Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Tue Jul 14 18:57:31 2020 (r363192) +++ head/sys/sys/time.h Tue Jul 14 20:23:27 2020 (r363193) @@ -463,8 +463,12 @@ struct clockinfo { /* These macros are also in time.h. */ #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 +#endif +#ifndef CLOCK_VIRTUAL #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 +#endif +#ifndef CLOCK_MONOTONIC #define CLOCK_MONOTONIC 4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */