aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2013-03-13 00:15:17 -0700
committerPaul Eggert2013-03-13 00:15:17 -0700
commit2c3f72f4b5f7d00cf0131998957c24812c8f6a53 (patch)
tree88a4070dc895f0cb525f35ad7e1dc4614356ca9f /lib
parent7fd8c501a0de9e2f52a3ba6989646e3aa391649f (diff)
downloademacs-2c3f72f4b5f7d00cf0131998957c24812c8f6a53.tar.gz
emacs-2c3f72f4b5f7d00cf0131998957c24812c8f6a53.zip
Merge from gnulib: putenv: port to Solaris 10.
Diffstat (limited to 'lib')
-rw-r--r--lib/putenv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/putenv.c b/lib/putenv.c
index 3813a11ece7..5461273084e 100644
--- a/lib/putenv.c
+++ b/lib/putenv.c
@@ -62,7 +62,7 @@ static int
62_unsetenv (const char *name) 62_unsetenv (const char *name)
63{ 63{
64 size_t len; 64 size_t len;
65#if !HAVE__PUTENV 65#if !HAVE_DECL__PUTENV
66 char **ep; 66 char **ep;
67#endif 67#endif
68 68
@@ -74,7 +74,7 @@ _unsetenv (const char *name)
74 74
75 len = strlen (name); 75 len = strlen (name);
76 76
77#if HAVE__PUTENV 77#if HAVE_DECL__PUTENV
78 { 78 {
79 int putenv_result, putenv_errno; 79 int putenv_result, putenv_errno;
80 char *name_ = malloc (len + 2); 80 char *name_ = malloc (len + 2);
@@ -127,9 +127,9 @@ putenv (char *string)
127 return _unsetenv (string); 127 return _unsetenv (string);
128 } 128 }
129 129
130#if HAVE__PUTENV 130#if HAVE_DECL__PUTENV
131 /* Rely on _putenv to allocate the new environment. If other 131 /* Rely on _putenv to allocate the new environment. If other
132 parts of the application use _putenv, the !HAVE__PUTENV code 132 parts of the application use _putenv, the !HAVE_DECL__PUTENV code
133 would fight over who owns the environ vector, causing a crash. */ 133 would fight over who owns the environ vector, causing a crash. */
134 if (name_end[1]) 134 if (name_end[1])
135 return _putenv (string); 135 return _putenv (string);
@@ -188,7 +188,7 @@ putenv (char *string)
188 last_environ = new_environ; 188 last_environ = new_environ;
189 environ = new_environ; 189 environ = new_environ;
190 } 190 }
191#endif
192 191
193 return 0; 192 return 0;
193#endif
194} 194}