Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2019 19:17:57 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355568 - in head: include sys/sys
Message-ID:  <201912091917.xB9JHv0d020795@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon Dec  9 19:17:56 2019
New Revision: 355568
URL: https://svnweb.freebsd.org/changeset/base/355568

Log:
  Correctly check for C++17 and higher when declaring timespec_get()
  
  Summary:
  In rS338751, the check to declare `timespec_get()` for C++17 and higher
  was incorrectly done against a `cplusplus` define, while it should have
  been `__cplusplus`.
  
  Fix this by using `__cplusplus`, and also bump `__FreeBSD_version` so it
  becomes possible to correctly check for `timespec_get()` in upstream
  libc++ headers.
  
  Reviewed by:	brooks, emaste
  MFC after:	3 days
  Differential Revision: https://reviews.freebsd.org/D22735

Modified:
  head/include/time.h
  head/sys/sys/param.h

Modified: head/include/time.h
==============================================================================
--- head/include/time.h	Mon Dec  9 19:17:28 2019	(r355567)
+++ head/include/time.h	Mon Dec  9 19:17:56 2019	(r355568)
@@ -208,7 +208,7 @@ time_t posix2time(time_t t);
 #endif
 
 #if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \
-    (defined(cplusplus) && cplusplus >= 201703)
+    (defined(__cplusplus) && __cplusplus >= 201703)
 #include <sys/_timespec.h>
 /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */
 #define TIME_UTC	1	/* time elapsed since epoch */

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Mon Dec  9 19:17:28 2019	(r355567)
+++ head/sys/sys/param.h	Mon Dec  9 19:17:56 2019	(r355568)
@@ -60,7 +60,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300063	/* Master, propagated to newvers */
+#define __FreeBSD_version 1300064	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912091917.xB9JHv0d020795>