cstdio (gets): Provide only in C++98 and C++11.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 26 Apr 2013 11:32:49 +0000 (11:32 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 26 Apr 2013 11:32:49 +0000 (11:32 +0000)
2013-04-26  Paolo Carlini  <paolo.carlini@oracle.com>

* include/c_global/cstdio (gets): Provide only in C++98 and C++11.
* include/c_std/cstdio (gets): Likewise.
* testsuite/27_io/headers/cstdio/functions_std.cc: Adjust.

From-SVN: r198335

libstdc++-v3/ChangeLog
libstdc++-v3/include/c_global/cstdio
libstdc++-v3/include/c_std/cstdio
libstdc++-v3/testsuite/27_io/headers/cstdio/functions_std.cc

index 58460196d92453775b46904c0fa85414cda7bb48..983ff967cb7c053cd8cc4380e1c9fd7536d6918e 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/c_global/cstdio (gets): Provide only in C++98 and C++11.
+       * include/c_std/cstdio (gets): Likewise.
+       * testsuite/27_io/headers/cstdio/functions_std.cc: Adjust.
+
 2013-04-25  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR libstdc++/57065
index fcbec0cf5b972c8508d2c1c06982931c6b5073db..249a77968be150604c7ceaf8f8d0158de464cf71 100644 (file)
@@ -69,7 +69,9 @@ extern "C" char* gets (char* __s) __attribute__((deprecated));
 #undef ftell
 #undef fwrite
 #undef getc
-#undef gets
+#if __cplusplus <= 201103L
+# undef gets
+#endif
 #undef perror
 #undef printf
 #undef putc
@@ -116,7 +118,9 @@ namespace std
   using ::fwrite;
   using ::getc;
   using ::getchar;
+#if __cplusplus <= 201103L
   using ::gets;
+#endif
   using ::perror;
   using ::printf;
   using ::putc;
index e85bd834af23f68132146e3bccf1035564765ea8..273383e699977b56eb9c9dd64e13a2cfa4e6ba5e 100644 (file)
@@ -70,7 +70,9 @@ extern "C" char* gets (char* __s) __attribute__((deprecated));
 #undef fwrite
 #undef getc
 #undef getchar
-#undef gets
+#if __cplusplus <= 201103L
+# undef gets
+#endif
 #undef perror
 #undef printf
 #undef putc
@@ -117,7 +119,9 @@ namespace std
   using ::fwrite;
   using ::getc;
   using ::getchar;
+#if __cplusplus <= 201103L
   using ::gets;
+#endif
   using ::perror;
   using ::printf;
   using ::putc;
index 19a80b73e30eaf77d6f292b6eecb946e5750ef99..c5d787fc88716cabbf257cfd3fff7d2d5f9b7f0d 100644 (file)
@@ -24,8 +24,10 @@ namespace gnu
   using std::clearerr; 
   using std::tmpfile; 
   using std::fgets; 
-  using std::fscanf; 
-  using std::gets; 
+  using std::fscanf;
+#if __cplusplus <= 201103L
+  using std::gets;
+#endif
   using std::rename;
   using std::fclose; 
   using std::fopen;