From 68edf1604f7ead11f3e74dae23a755ab1ba2f734 Mon Sep 17 00:00:00 2001 From: Thomas Graichen Date: Sun, 19 Jan 1997 22:32:24 +0000 Subject: put all the __warn_references behind a #ifndef NO_WARN_REFERENCES which is then set in the libc Makefile for the mips (the mips linker can't handle them) --- lib/libc/stdio/gets.c | 4 +++- lib/libc/stdio/mktemp.c | 4 +++- lib/libc/stdio/tempnam.c | 4 +++- lib/libc/stdio/tmpnam.c | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lib/libc/stdio') diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c index 1cc13d4d8f4..6fccb050ef2 100644 --- a/lib/libc/stdio/gets.c +++ b/lib/libc/stdio/gets.c @@ -35,13 +35,15 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: gets.c,v 1.3 1996/12/28 02:30:58 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: gets.c,v 1.4 1997/01/19 22:32:21 graichen Exp $"; #endif /* LIBC_SCCS and not lint */ #include +#ifndef NO_WARN_REFERENCES __warn_references(gets, "warning: gets() is very unsafe; consider using fgets()"); +#endif char * gets(buf) diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index bc69c6f265f..76dba5bff37 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mktemp.c,v 1.3 1996/12/28 02:33:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mktemp.c,v 1.4 1997/01/19 22:32:22 graichen Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -63,8 +63,10 @@ _mktemp(path) return(_gettemp(path, (int *)NULL) ? path : (char *)NULL); } +#ifndef NO_WARN_REFERENCES __warn_references(mktemp, "warning: mktemp() possibly used unsafely; consider using mkstemp()"); +#endif char * mktemp(path) diff --git a/lib/libc/stdio/tempnam.c b/lib/libc/stdio/tempnam.c index 1b49112933d..7aa195e3593 100644 --- a/lib/libc/stdio/tempnam.c +++ b/lib/libc/stdio/tempnam.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tempnam.c,v 1.5 1996/12/28 02:33:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tempnam.c,v 1.6 1997/01/19 22:32:22 graichen Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -43,8 +43,10 @@ static char rcsid[] = "$OpenBSD: tempnam.c,v 1.5 1996/12/28 02:33:14 deraadt Exp #include #include +#ifndef NO_WARN_REFERENCES __warn_references(tempnam, "warning: tempnam() possibly used unsafely; consider using mkstemp()"); +#endif extern char *_mktemp __P((char *)); diff --git a/lib/libc/stdio/tmpnam.c b/lib/libc/stdio/tmpnam.c index 15f68b02d9e..620cdf2fc6f 100644 --- a/lib/libc/stdio/tmpnam.c +++ b/lib/libc/stdio/tmpnam.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tmpnam.c,v 1.3 1996/12/28 02:33:15 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tmpnam.c,v 1.4 1997/01/19 22:32:23 graichen Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -43,8 +43,10 @@ static char rcsid[] = "$OpenBSD: tmpnam.c,v 1.3 1996/12/28 02:33:15 deraadt Exp #include #include +#ifndef NO_WARN_REFERENCES __warn_references(tmpnam, "warning: tmpnam() possibly used unsafely; consider using mkstemp()"); +#endif extern char *_mktemp __P((char *)); -- cgit v1.2.3