Avoid conflicting types for 'unsetenv' on FreeBSD.
authorJim Meyering <jim@meyering.net>
Sun, 25 Feb 2007 00:47:36 +0000 (00:47 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 25 Feb 2007 00:47:36 +0000 (00:47 +0000)
* lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
conflicting with FreeBSD's (5.0 and 6.1) function declaration
in stdlib.h.

ChangeLog
lib/putenv.c

index 38f9595..2088388 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-25  Jim Meyering  <jim@meyering.net>
+
+       Avoid conflicting types for 'unsetenv' on FreeBSD.
+       * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
+       conflicting with FreeBSD's (5.0 and 6.1) function declaration
+       in stdlib.h.
+
 2007-02-24  Bruno Haible  <bruno@clisp.org>
 
        * modules/isnanl-nolibm-tests: New file.
index 5fa576a..0602e44 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004, 2005, 2006
+/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
@@ -57,7 +57,7 @@ __libc_lock_define_initialized (static, envlock)
 #endif
 
 static int
-unsetenv (const char *name)
+_unsetenv (const char *name)
 {
   size_t len;
   char **ep;
@@ -105,7 +105,7 @@ rpl_putenv (const char *string)
   if (name_end == NULL)
     {
       /* Remove the variable from the environment.  */
-      return unsetenv (string);
+      return _unsetenv (string);
     }
 
   size = 0;