X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fputenv.c;h=d90401618c17a71e1d64a0def3999a572a3fb43b;hb=11f037c25793b02c701776d88087ae7d419cbe93;hp=0b1e6644e4f2b2d5d6afffb2a1c1891a68a47137;hpb=310c41f74d42756b22ed2fcbe42b69bbe75a9ecf;p=gnulib.git diff --git a/lib/putenv.c b/lib/putenv.c index 0b1e6644e..d90401618 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1997, 1998, 2000, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. @@ -15,44 +16,29 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if HAVE_CONFIG_H -# include -#endif +#include #include /* Include errno.h *after* sys/types.h to work around header problems on AIX 3.2.5. */ #include -#if !_LIBC -# if !defined errno -extern int errno; -# endif +#ifndef __set_errno # define __set_errno(ev) ((errno) = (ev)) #endif -/* Don't include stdlib.h because some (e.g., Solaris 2.7) declare putenv +/* Don't include stdlib.h because some (e.g., Solaris 7) declare putenv with a non-const argument. That would conflict with the declaration of rpl_putenv below (due to the #define putenv rpl_putenv from config.h). */ -char *malloc (); +void *malloc (); void free (); -#if defined (__GNU_LIBRARY__) || defined (HAVE_STRING_H) -# include -#endif -#if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H) -# include -#endif +#include -#if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR) -# define strchr index -#endif -#if !defined (__GNU_LIBRARY__) && !defined (HAVE_MEMCPY) -# define memcpy(d,s,n) bcopy ((s), (d), (n)) -#endif +#include #if HAVE_GNU_LD # define environ __environ @@ -71,10 +57,6 @@ __libc_lock_define_initialized (static, envlock) # define UNLOCK #endif -#ifndef NULL -# define NULL 0 -#endif - static int unsetenv (const char *name) {