~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/putenv.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software
 
1
/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2012 Free Software
2
2
   Foundation, Inc.
3
3
 
4
4
   NOTE: The canonical source of this file is maintained with the GNU C
34
34
#include <string.h>
35
35
#include <unistd.h>
36
36
 
37
 
#if HAVE_GNU_LD
38
 
# define environ __environ
39
 
#else
 
37
#if _LIBC
 
38
# if HAVE_GNU_LD
 
39
#  define environ __environ
 
40
# else
40
41
extern char **environ;
 
42
# endif
41
43
#endif
42
44
 
43
45
#if _LIBC
44
 
/* This lock protects against simultaneous modifications of `environ'.  */
 
46
/* This lock protects against simultaneous modifications of 'environ'.  */
45
47
# include <bits/libc-lock.h>
46
48
__libc_lock_define_initialized (static, envlock)
47
49
# define LOCK   __libc_lock_lock (envlock)
89
91
 
90
92
 
91
93
/* Put STRING, which is of the form "NAME=VALUE", in the environment.
92
 
   If STRING contains no `=', then remove STRING from the environment.  */
 
94
   If STRING contains no '=', then remove STRING from the environment.  */
93
95
int
94
96
putenv (char *string)
95
97
{