From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id EBC5F3857371; Wed, 3 Aug 2022 14:05:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBC5F3857371 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_DLL_MALLOC_ENV X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 02b273a6880b551a7ca29be244c7653b56cc2c10 X-Git-Newrev: efa66119823be2372b548d7807105c472514e891 Message-Id: <20220803140534.EBC5F3857371@sourceware.org> Date: Wed, 3 Aug 2022 14:05:34 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2022 14:05:35 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Defa66119823= be2372b548d7807105c472514e891 commit efa66119823be2372b548d7807105c472514e891 Author: Corinna Vinschen Date: Wed Aug 3 15:35:07 2022 +0200 Cygwin: drop macro and code for CYGWIN_VERSION_DLL_MALLOC_ENV =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/environ.cc | 13 +------------ winsup/cygwin/include/cygwin/version.h | 2 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 0ac1acc41..008854a07 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -291,10 +291,6 @@ env_path_to_win32 (const void *posix, void *win32, siz= e_t size) win32, size); } =20 -#define ENVMALLOC \ - (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_= minor) \ - <=3D CYGWIN_VERSION_DLL_MALLOC_ENV) - #define NL(x) x, (sizeof (x) - 1) /* List of names which are converted from dos to unix on the way in and back again on the way out. @@ -631,7 +627,7 @@ _addenv (const char *name, const char *value, int overw= rite) char *envhere; if (!issetenv) /* Not setenv. Just overwrite existing. */ - envhere =3D environ[offset] =3D (char *) (ENVMALLOC ? strdup (name) : = name); + envhere =3D environ[offset] =3D (char *) name; else { /* setenv */ /* Look for an '=3D' in the name and ignore anything after that if f= ound. */ @@ -817,13 +813,6 @@ environ_init (char **envp, int envc) /* Older applications relied on the fact that cygwin malloced elements = of the environment list. */ envp =3D newenv; - if (ENVMALLOC) - for (char **e =3D newenv; *e; e++) - { - char *p =3D *e; - *e =3D strdup (p); - cfree (p); - } envp_passed_in =3D 1; goto out; } diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include= /cygwin/version.h index d32da2856..ae1ab83d4 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -34,8 +34,6 @@ details. */ #define CYGWIN_VERSION_USER_API_VERSION_COMBINED \ CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (user_data) =20 -#define CYGWIN_VERSION_DLL_MALLOC_ENV 28 - /* Old APIs had getc/putc macros that conflict with new CR/LF handling in = the stdio buffers */ #define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \