diff options
author | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-01-19 22:32:24 +0000 |
---|---|---|
committer | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-01-19 22:32:24 +0000 |
commit | 68edf1604f7ead11f3e74dae23a755ab1ba2f734 (patch) | |
tree | ac253cde3d09620e6e344e0c7c580f2bd1e6e808 /lib/libc/stdio | |
parent | 79f1988a5f2ca2a52c134490b40198893bc33855 (diff) |
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)
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/gets.c | 4 | ||||
-rw-r--r-- | lib/libc/stdio/mktemp.c | 4 | ||||
-rw-r--r-- | lib/libc/stdio/tempnam.c | 4 | ||||
-rw-r--r-- | lib/libc/stdio/tmpnam.c | 4 |
4 files changed, 12 insertions, 4 deletions
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 <stdio.h> +#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 <sys/types.h> @@ -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 <sys/param.h> @@ -43,8 +43,10 @@ static char rcsid[] = "$OpenBSD: tempnam.c,v 1.5 1996/12/28 02:33:14 deraadt Exp #include <unistd.h> #include <paths.h> +#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 <sys/types.h> @@ -43,8 +43,10 @@ static char rcsid[] = "$OpenBSD: tmpnam.c,v 1.3 1996/12/28 02:33:15 deraadt Exp #include <stdio.h> #include <unistd.h> +#ifndef NO_WARN_REFERENCES __warn_references(tmpnam, "warning: tmpnam() possibly used unsafely; consider using mkstemp()"); +#endif extern char *_mktemp __P((char *)); |