public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_DLL_MALLOC_ENV Date: Wed, 3 Aug 2022 14:05:34 +0000 (GMT) [thread overview] Message-ID: <20220803140534.EBC5F3857371@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=efa66119823be2372b548d7807105c472514e891 commit efa66119823be2372b548d7807105c472514e891 Author: Corinna Vinschen <corinna@vinschen.de> Date: Wed Aug 3 15:35:07 2022 +0200 Cygwin: drop macro and code for CYGWIN_VERSION_DLL_MALLOC_ENV Signed-off-by: Corinna Vinschen <corinna@vinschen.de> 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, size_t size) win32, size); } -#define ENVMALLOC \ - (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) \ - <= 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 overwrite) char *envhere; if (!issetenv) /* Not setenv. Just overwrite existing. */ - envhere = environ[offset] = (char *) (ENVMALLOC ? strdup (name) : name); + envhere = environ[offset] = (char *) name; else { /* setenv */ /* Look for an '=' in the name and ignore anything after that if found. */ @@ -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 = newenv; - if (ENVMALLOC) - for (char **e = newenv; *e; e++) - { - char *p = *e; - *e = strdup (p); - cfree (p); - } envp_passed_in = 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) -#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 \
reply other threads:[~2022-08-03 14:05 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220803140534.EBC5F3857371@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).