summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ef3ba2)
raw | patch | inline | side by side (parent: 1ef3ba2)
author | Dan Albert <danalbert@google.com> | |
Tue, 17 Jun 2014 23:31:21 +0000 (23:31 +0000) | ||
committer | Dan Albert <danalbert@google.com> | |
Wed, 18 Jun 2014 00:37:06 +0000 (17:37 -0700) |
gets(3) was removed from C11.
This reverts commit 1291680c2a0c23b2163198d27e00261ca206298b.
Bug: 14500800
Change-Id: I5e5146bdbb80f2be818a17f287b112bab37d1f6d
This reverts commit 1291680c2a0c23b2163198d27e00261ca206298b.
Bug: 14500800
Change-Id: I5e5146bdbb80f2be818a17f287b112bab37d1f6d
libc/include/stdio.h | patch | blob | history | |
libstdc++/include/cstdio | patch | blob | history |
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 62acb3a3d356d5ee9c4516b0fb17a65d584c8029..e532de46f1e8d483caead263030460ab9efb0e2c 100644 (file)
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
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");
index 3c8b5c62ff653a93e1f318485fbfe5784fc97d38..2948d852aa61a95f7fd965f70fb88943ee6648e0 100644 (file)
--- a/libstdc++/include/cstdio
+++ b/libstdc++/include/cstdio
using ::fwrite;
using ::getc;
using ::getchar;
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
using ::gets;
+#endif
using ::perror;
using ::printf;
using ::putc;