mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-01 12:35:44 +08:00
* environ.cc (setenv): Use __cygwin_environ instead of
environ after reallocating environment space.
This commit is contained in:
parent
c609f9dcec
commit
b0d5cd02dc
@ -1,3 +1,8 @@
|
|||||||
|
Mon Jul 17 17:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* environ.cc (setenv): Use __cygwin_environ instead of
|
||||||
|
environ after reallocating environment space.
|
||||||
|
|
||||||
Sun Jul 16 20:23:21 2000 Christopher Faylor <cgf@cygnus.com>
|
Sun Jul 16 20:23:21 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
|
* _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
|
||||||
|
@ -228,9 +228,9 @@ setenv (const char *name, const char *value, int rewrite)
|
|||||||
;
|
;
|
||||||
__cygwin_environ = (char **) realloc ((char *) environ,
|
__cygwin_environ = (char **) realloc ((char *) environ,
|
||||||
(size_t) (sizeof (char *) * (cnt + 2)));
|
(size_t) (sizeof (char *) * (cnt + 2)));
|
||||||
if (!environ)
|
if (!__cygwin_environ)
|
||||||
return -1;
|
return -1;
|
||||||
environ[cnt + 1] = NULL;
|
__cygwin_environ[cnt + 1] = NULL;
|
||||||
update_envptrs ();
|
update_envptrs ();
|
||||||
offset = cnt;
|
offset = cnt;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user