Skip to content

Commit 761b9d9

Browse files
authored
[libc++] Remove _LIBCPP_C_HAS_NO_GETS (#77346)
Since we use _LIBCPP_USING_IF_EXISTS to handle missing C library functions now, _LIBCPP_C_HAS_NO_GETS shouldn't be necessary anymore. See the discussion thread in #77242 for more details.
1 parent cac6b1a commit 761b9d9

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

libcxx/include/__config

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,11 +1133,6 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
11331133
# define _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
11341134
# endif
11351135

1136-
// Some systems do not provide gets() in their C library, for security reasons.
1137-
# if defined(_LIBCPP_MSVCRT) || (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043) || defined(__OpenBSD__)
1138-
# define _LIBCPP_C_HAS_NO_GETS
1139-
# endif
1140-
11411136
# if defined(__BIONIC__) || defined(__NuttX__) || defined(__Fuchsia__) || defined(__wasi__) || \
11421137
defined(_LIBCPP_HAS_MUSL_LIBC) || defined(__OpenBSD__)
11431138
# define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE

libcxx/include/cstdio

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ using ::tmpfile _LIBCPP_USING_IF_EXISTS;
159159
using ::tmpnam _LIBCPP_USING_IF_EXISTS;
160160

161161
using ::getchar _LIBCPP_USING_IF_EXISTS;
162-
#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_C_HAS_NO_GETS)
162+
#if _LIBCPP_STD_VER <= 11
163163
using ::gets _LIBCPP_USING_IF_EXISTS;
164164
#endif
165165
using ::scanf _LIBCPP_USING_IF_EXISTS;

0 commit comments

Comments
 (0)