summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/include/stdio.h2
-rw-r--r--libstdc++/include/cstdio2
2 files changed, 4 insertions, 0 deletions
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 62acb3a..6110932 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -254,7 +254,9 @@ int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0);
#ifndef __AUDIT__
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L
char* gets(char*) __warnattr("gets is very unsafe; consider using fgets");
+#endif
int sprintf(char* __restrict, const char* __restrict, ...)
__printflike(2, 3) __warnattr("sprintf is often misused; please use snprintf");
char* tmpnam(char*) __warnattr("tmpnam possibly used unsafely; consider using mkstemp");
diff --git a/libstdc++/include/cstdio b/libstdc++/include/cstdio
index 3c8b5c6..25838ad 100644
--- a/libstdc++/include/cstdio
+++ b/libstdc++/include/cstdio
@@ -63,7 +63,9 @@ using ::ftell;
using ::fwrite;
using ::getc;
using ::getchar;
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L
using ::gets;
+#endif
using ::perror;
using ::printf;
using ::putc;