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

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 7 06:57:59 PDT 2019


mclow.lists added a comment.

I'm wondering if this has become complicated enough that we should define a `_LIBCPP_C_HAS_NO_GETS` config macro.

Then the code in `cstdio` becomes:

  #if _LIBCPP_STD_VER <= 11 || defined(_LIBCPP_C_HAS_NO_GETS)
  using ::gets;
  #endif

which I think is much clearer, and captures the intent
We do not import `gets` into namespace std when:

- It does not exist in the underlying C library, or
- We are compiling for C++14 or later.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67316/new/

https://reviews.llvm.org/D67316





More information about the libcxx-commits mailing list