comparison lib/setenv.c @ 16235:18a38c9615f0

In commentary, do not use ` to quote.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 05 Jan 2012 23:53:49 -0800
parents 8250f2777afc
children e542fd46ad6f
comparison
equal deleted inserted replaced
16234:f9b906545e2f 16235:18a38c9615f0
47 #if !_LIBC 47 #if !_LIBC
48 # define __environ environ 48 # define __environ environ
49 #endif 49 #endif
50 50
51 #if _LIBC 51 #if _LIBC
52 /* This lock protects against simultaneous modifications of `environ'. */ 52 /* This lock protects against simultaneous modifications of 'environ'. */
53 # include <bits/libc-lock.h> 53 # include <bits/libc-lock.h>
54 __libc_lock_define_initialized (static, envlock) 54 __libc_lock_define_initialized (static, envlock)
55 # define LOCK __libc_lock_lock (envlock) 55 # define LOCK __libc_lock_lock (envlock)
56 # define UNLOCK __libc_lock_unlock (envlock) 56 # define UNLOCK __libc_lock_unlock (envlock)
57 #else 57 #else
101 /* If this variable is not a null pointer we allocated the current 101 /* If this variable is not a null pointer we allocated the current
102 environment. */ 102 environment. */
103 static char **last_environ; 103 static char **last_environ;
104 104
105 105
106 /* This function is used by `setenv' and `putenv'. The difference between 106 /* This function is used by 'setenv' and 'putenv'. The difference between
107 the two functions is that for the former must create a new string which 107 the two functions is that for the former must create a new string which
108 is then placed in the environment, while the argument of `putenv' 108 is then placed in the environment, while the argument of 'putenv'
109 must be used directly. This is all complicated by the fact that we try 109 must be used directly. This is all complicated by the fact that we try
110 to reuse values once generated for a `setenv' call since we can never 110 to reuse values once generated for a 'setenv' call since we can never
111 free the strings. */ 111 free the strings. */
112 int 112 int
113 __add_to_environ (const char *name, const char *value, const char *combined, 113 __add_to_environ (const char *name, const char *value, const char *combined,
114 int replace) 114 int replace)
115 { 115 {
297 } 297 }
298 298
299 return __add_to_environ (name, value, NULL, replace); 299 return __add_to_environ (name, value, NULL, replace);
300 } 300 }
301 301
302 /* The `clearenv' was planned to be added to POSIX.1 but probably 302 /* The 'clearenv' was planned to be added to POSIX.1 but probably
303 never made it. Nevertheless the POSIX.9 standard (POSIX bindings 303 never made it. Nevertheless the POSIX.9 standard (POSIX bindings
304 for Fortran 77) requires this function. */ 304 for Fortran 77) requires this function. */
305 int 305 int
306 clearenv (void) 306 clearenv (void)
307 { 307 {