From: Jim Meyering Date: Sun, 25 Feb 2007 00:47:36 +0000 (+0000) Subject: Avoid conflicting types for 'unsetenv' on FreeBSD. X-Git-Tag: cvs-readonly~984 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=17ec5562e3a7151207c4be08958b380bc8e601b3;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 38f95959a..20883883e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-25 Jim Meyering + + 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 * modules/isnanl-nolibm-tests: New file. diff --git a/lib/putenv.c b/lib/putenv.c index 5fa576a81..0602e44e3 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -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;