From 7f42498be6cd47e9d3d46ec82374d703e3275ddf Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 28 Jul 2022 22:00:40 +0200 Subject: 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 --- winsup/cygwin/pinfo.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/pinfo.cc') diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 832a3e6bc..2e336c1a3 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -769,7 +769,7 @@ commune_process (void *arg) { sigproc_printf ("processing PICOM_ENVIRON"); unsigned n = 0; - char **env = cur_environ (); + char **env = environ; if (env) for (char **e = env; *e; e++) n += strlen (*e) + 1; @@ -1210,7 +1210,7 @@ _pinfo::environ (size_t& n) return cr.s; } else - env = cur_environ (); + env = ::environ; if (env == NULL) return NULL; -- cgit v1.2.3