[libcxx-commits] [PATCH] D69174: Refine check for `_LIBCPP_C_HAS_NO_GETS` on FreeBSD
Dimitry Andric via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 18 12:49:51 PDT 2019
dim updated this revision to Diff 225680.
dim added a comment.
Rewrite the `__FreeBSD_version` condition to be more straightforward.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69174/new/
https://reviews.llvm.org/D69174
Files:
include/__config
Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -242,6 +242,7 @@
#ifdef __FreeBSD__
# include <sys/endian.h>
+# include <osreldate.h>
# if _BYTE_ORDER == _LITTLE_ENDIAN
# define _LIBCPP_LITTLE_ENDIAN
# else // _BYTE_ORDER == _LITTLE_ENDIAN
@@ -1164,7 +1165,8 @@
// Some systems do not provide gets() in their C library, for security reasons.
#ifndef _LIBCPP_C_HAS_NO_GETS
-# if defined(_LIBCPP_MSVCRT) || (defined(__FreeBSD__) && __FreeBSD__ >= 13)
+# if defined(_LIBCPP_MSVCRT) || \
+ (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043)
# define _LIBCPP_C_HAS_NO_GETS
# endif
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69174.225680.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191018/2c0c2543/attachment.bin>
More information about the libcxx-commits
mailing list