summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/cstdio6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/include/cstdio b/libcxx/include/cstdio
index 50fdd345742..801348837c4 100644
--- a/libcxx/include/cstdio
+++ b/libcxx/include/cstdio
@@ -98,6 +98,9 @@ void perror(const char* s);
#include <__config>
#include <stdio.h>
+#if defined(_LIBCPP_MSVCRT)
+#include <crtversion.h>
+#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -155,7 +158,8 @@ using ::tmpnam;
#ifndef _LIBCPP_HAS_NO_STDIN
using ::getchar;
-#if _LIBCPP_STD_VER <= 11
+#if _LIBCPP_STD_VER <= 11 && \
+ (!defined(_VC_CRT_MAJOR_VERSION) || _VC_CRT_MAJOR_VERSION < 14)
using ::gets;
#endif
using ::scanf;
OpenPOWER on IntegriCloud