Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdlib Warn if the old unsetenv() is referenced.



details:   https://anonhg.NetBSD.org/src/rev/18faf817950c
branches:  trunk
changeset: 545657:18faf817950c
user:      kleink <kleink%NetBSD.org@localhost>
date:      Sun Apr 13 17:39:13 2003 +0000

description:
Warn if the old unsetenv() is referenced.

diffstat:

 lib/libc/stdlib/__unsetenv13.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r a1d3aad93793 -r 18faf817950c lib/libc/stdlib/__unsetenv13.c
--- a/lib/libc/stdlib/__unsetenv13.c    Sun Apr 13 16:35:02 2003 +0000
+++ b/lib/libc/stdlib/__unsetenv13.c    Sun Apr 13 17:39:13 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: __unsetenv13.c,v 1.1 2003/04/07 13:41:14 kleink Exp $  */
+/*     $NetBSD: __unsetenv13.c,v 1.2 2003/04/13 17:39:13 kleink Exp $  */
 
 /*
  * Copyright (c) 1987, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "from: @(#)setenv.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: __unsetenv13.c,v 1.1 2003/04/07 13:41:14 kleink Exp $");
+__RCSID("$NetBSD: __unsetenv13.c,v 1.2 2003/04/13 17:39:13 kleink Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -61,6 +61,12 @@
 extern rwlock_t __environ_lock;
 #endif
 
+#ifdef __LIBC12_SOURCE__
+__warn_references(unsetenv,
+    "warning: reference to compatibility unsetenv();"
+    " include <stdlib.h> for correct reference")
+#endif
+
 extern char **environ;
 
 /*



Home | Main Index | Thread Index | Old Index