diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-02-13 17:49:37 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-02-13 17:49:37 +0000 |
commit | 4b1b39e75875bc89f1356556b5609a4b7e9887a7 (patch) | |
tree | 75c9c5ad6a97161d69b74f6fa3c6cbde7cd1239b | |
parent | 22e138ad6b0088c9d2631377a97a3926e169c917 (diff) | |
download | newlib-4b1b39e75875bc89f1356556b5609a4b7e9887a7.zip newlib-4b1b39e75875bc89f1356556b5609a4b7e9887a7.tar.gz newlib-4b1b39e75875bc89f1356556b5609a4b7e9887a7.tar.bz2 |
* environ.cc (_getenv_r): New function.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/environ.cc | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ce6c669..b9a89b4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2009-02-13 Corinna Vinschen <corinna@vinschen.de> + * environ.cc (_getenv_r): New function. + +2009-02-13 Corinna Vinschen <corinna@vinschen.de> + * posix.sgml: Move dirfd to SUSv4 section. 2009-02-13 Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index b88738a..fa4441d 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -284,6 +284,15 @@ getenv (const char *name) return findenv_func (name, &offset); } +/* This function is required so that newlib uses the same environment + as Cygwin. */ +extern "C" char * +_getenv_r (struct _reent *, const char *name) +{ + int offset; + return findenv_func (name, &offset); +} + static int __stdcall envsize (const char * const *in_envp) { |