summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-06-17 23:31:21 +0000
committerDan Albert <danalbert@google.com>2014-06-17 17:37:06 -0700
commit9635046e53e14ff44348853a9cacdffd444b35ae (patch)
tree9f2a9c023d1e981cedc9811e25035f82783c092c /libc
parent1ef3ba2b4fd2408cdd78828ec2930ce31ce8cee7 (diff)
downloadbionic-9635046e53e14ff44348853a9cacdffd444b35ae.zip
bionic-9635046e53e14ff44348853a9cacdffd444b35ae.tar.gz
bionic-9635046e53e14ff44348853a9cacdffd444b35ae.tar.bz2
Hide declaration of gets(3) for C11 and later.
gets(3) was removed from C11. This reverts commit 1291680c2a0c23b2163198d27e00261ca206298b. Bug: 14500800 Change-Id: I5e5146bdbb80f2be818a17f287b112bab37d1f6d
Diffstat (limited to 'libc')
-rw-r--r--libc/include/stdio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 62acb3a..e532de4 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");