[libcxx-commits] [PATCH] D67316: Remove ::gets for FreeBSD 13 and later

Dimitry Andric via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 7 05:13:12 PDT 2019


dim created this revision.
dim added reviewers: EricWF, mclow.lists, emaste.
Herald added subscribers: ldionne, christof, krytarowski.

In https://svnweb.freebsd.org/changeset/base/351659 @emaste removed gets() from
FreeBSD 13's libc, and our copies of libc++ and libstdc++.  In that change, the
declarations were simply deleted, but I would like to propose this conditional
test instead.


Repository:
  rCXX libc++

https://reviews.llvm.org/D67316

Files:
  include/cstdio


Index: include/cstdio
===================================================================
--- include/cstdio
+++ include/cstdio
@@ -152,7 +152,8 @@
 
 #ifndef _LIBCPP_HAS_NO_STDIN
 using ::getchar;
-#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_MSVCRT)
+#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_MSVCRT) && \
+    !(defined(__FreeBSD__) && __FreeBSD__ >= 13)
 using ::gets;
 #endif
 using ::scanf;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67316.219234.patch
Type: text/x-patch
Size: 402 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190907/a70f21bc/attachment.bin>


More information about the libcxx-commits mailing list