From b1ecb7cf858fa28a8fc24f606d4eec89b03d545b Mon Sep 17 00:00:00 2001 From: Brooks Moses Date: Thu, 12 Jun 2014 21:59:51 -0700 Subject: [PATCH] Forward-port cl/42676407 to disable link-time warning about mktemp, tempnam and tmpnam. --- misc/mktemp.c | 2 ++ stdio-common/tempnam.c | 2 ++ stdio-common/tmpnam.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/misc/mktemp.c b/misc/mktemp.c index 1417ab37f41..87a7f49baa2 100644 --- a/misc/mktemp.c +++ b/misc/mktemp.c @@ -32,5 +32,7 @@ __mktemp (char *template) } weak_alias (__mktemp, mktemp) +#if 0 /* Google-local: b/6115789 */ link_warning (mktemp, "the use of `mktemp' is dangerous, " "better use `mkstemp' or `mkdtemp'") +#endif diff --git a/stdio-common/tempnam.c b/stdio-common/tempnam.c index 5e64482b485..c3b4863ac9f 100644 --- a/stdio-common/tempnam.c +++ b/stdio-common/tempnam.c @@ -39,5 +39,7 @@ tempnam (const char *dir, const char *pfx) return __strdup (buf); } +#if 0 /* Google-local: b/6115789 */ link_warning (tempnam, "the use of `tempnam' is dangerous, better use `mkstemp'") +#endif diff --git a/stdio-common/tmpnam.c b/stdio-common/tmpnam.c index 9b0b6114a36..152575f14c9 100644 --- a/stdio-common/tmpnam.c +++ b/stdio-common/tmpnam.c @@ -47,5 +47,7 @@ tmpnam (char *s) return s; } +#if 0 /* Google-local: b/6115789 */ link_warning (tmpnam, "the use of `tmpnam' is dangerous, better use `mkstemp'") +#endif -- 2.47.2