Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-07-28 23:00:40 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-07-28 23:00:40 +0300
commit7f42498be6cd47e9d3d46ec82374d703e3275ddf (patch)
tree5a9645f5af3bd64039e84f76d9695e91c7741008 /winsup/cygwin/syscalls.cc
parentcea26c75705b3a56b3f211bb083b8e9afe319e1c (diff)
Cygwin: rename __cygwin_environ and drop env redirection via cur_environ()
Back in early Cygwin development a function based access to the environment was exported, the internal environ in Cygwin was called __cygwin_environ and cur_environ() was used to access the environment indirectly . The history of that necessity is not documented, but kept in i686 for backward compatibility. The x86_64 port eventually used __cygwin_environ directly and exported it as DATA under the usual name environ. We don't need the i686 workaround anymore, so just rename __cygwin_environ to environ, drop the cur_environ() macro and simply export environ under its own name. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index da8779743..6455f25ab 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -4372,7 +4372,7 @@ popen (const char *command, const char *in_type)
fcntl (stdchild, F_SETFD, stdchild_state | FD_CLOEXEC);
/* Start a shell process to run the given command without forking. */
- pid_t pid = ch_spawn.worker ("/bin/sh", argv, cur_environ (), _P_NOWAIT,
+ pid_t pid = ch_spawn.worker ("/bin/sh", argv, environ, _P_NOWAIT,
__std[0], __std[1]);
/* Reinstate the close-on-exec state */