Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2c3f72f4
Commit
2c3f72f4
authored
Mar 13, 2013
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge from gnulib: putenv: port to Solaris 10.
parent
7fd8c501
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
ChangeLog
ChangeLog
+1
-0
lib/putenv.c
lib/putenv.c
+5
-5
m4/putenv.m4
m4/putenv.m4
+2
-2
No files found.
ChangeLog
View file @
2c3f72f4
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
Merge from gnulib, incorporating:
2013-03-13 putenv: port to Solaris 10
2013-03-12 mktime: fix configure typo
2013-03-12 mktime: fix configure typo
2013-03-11 regex: port to mingw's recent addition of undeclared alarm
2013-03-11 regex: port to mingw's recent addition of undeclared alarm
2013-03-11 putenv: avoid compilation warning on mingw
2013-03-11 putenv: avoid compilation warning on mingw
...
...
lib/putenv.c
View file @
2c3f72f4
...
@@ -62,7 +62,7 @@ static int
...
@@ -62,7 +62,7 @@ static int
_unsetenv
(
const
char
*
name
)
_unsetenv
(
const
char
*
name
)
{
{
size_t
len
;
size_t
len
;
#if !HAVE__PUTENV
#if !HAVE_
DECL_
_PUTENV
char
**
ep
;
char
**
ep
;
#endif
#endif
...
@@ -74,7 +74,7 @@ _unsetenv (const char *name)
...
@@ -74,7 +74,7 @@ _unsetenv (const char *name)
len
=
strlen
(
name
);
len
=
strlen
(
name
);
#if HAVE__PUTENV
#if HAVE_
DECL_
_PUTENV
{
{
int
putenv_result
,
putenv_errno
;
int
putenv_result
,
putenv_errno
;
char
*
name_
=
malloc
(
len
+
2
);
char
*
name_
=
malloc
(
len
+
2
);
...
@@ -127,9 +127,9 @@ putenv (char *string)
...
@@ -127,9 +127,9 @@ putenv (char *string)
return
_unsetenv
(
string
);
return
_unsetenv
(
string
);
}
}
#if HAVE__PUTENV
#if HAVE_
DECL_
_PUTENV
/* Rely on _putenv to allocate the new environment. If other
/* Rely on _putenv to allocate the new environment. If other
parts of the application use _putenv, the !HAVE__PUTENV code
parts of the application use _putenv, the !HAVE_
DECL_
_PUTENV code
would fight over who owns the environ vector, causing a crash. */
would fight over who owns the environ vector, causing a crash. */
if
(
name_end
[
1
])
if
(
name_end
[
1
])
return
_putenv
(
string
);
return
_putenv
(
string
);
...
@@ -188,7 +188,7 @@ putenv (char *string)
...
@@ -188,7 +188,7 @@ putenv (char *string)
last_environ
=
new_environ
;
last_environ
=
new_environ
;
environ
=
new_environ
;
environ
=
new_environ
;
}
}
#endif
return
0
;
return
0
;
#endif
}
}
m4/putenv.m4
View file @
2c3f72f4
# putenv.m4 serial
19
# putenv.m4 serial
20
dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl gives unlimited permission to copy and/or distribute it,
...
@@ -52,5 +52,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
...
@@ -52,5 +52,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
# Prerequisites of lib/putenv.c.
# Prerequisites of lib/putenv.c.
AC_DEFUN([gl_PREREQ_PUTENV],
AC_DEFUN([gl_PREREQ_PUTENV],
[
[
AC_CHECK_
FUNC
S([_putenv])
AC_CHECK_
DECL
S([_putenv])
])
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment