diff options
author | Tomasz Konojacki <me@xenu.pl> | 2022-04-19 16:41:23 +0200 |
---|---|---|
committer | xenu <me@xenu.pl> | 2022-05-29 00:54:10 +0200 |
commit | 30ceec5d3541f1a6bfb65df6b99339bee9976d79 (patch) | |
tree | b696086d7015a82a761d9c08467b7f3c78e41b09 | |
parent | ae6b6b71cdbfb3fb6e1192178fa1e530a2f07ece (diff) | |
download | perl-30ceec5d3541f1a6bfb65df6b99339bee9976d79.tar.gz |
don't use environ on Windows
environ is managed by the C runtime, while we are using the system APIs
directly.
-rw-r--r-- | dosish.h | 4 | ||||
-rw-r--r-- | perl.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -105,6 +105,10 @@ /* Don't go reading from /dev/urandom */ #define PERL_NO_DEV_RANDOM +#ifdef WIN32 +# define NO_ENVIRON_ARRAY +#endif + /* * ex: set ts=8 sts=4 sw=4 et: */ @@ -4589,7 +4589,7 @@ S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env) hv = GvHVn(PL_envgv); hv_magic(hv, NULL, PERL_MAGIC_env); #ifndef PERL_MICRO -#ifdef USE_ENVIRON_ARRAY +#if defined(USE_ENVIRON_ARRAY) || defined(WIN32) /* Note that if the supplied env parameter is actually a copy of the global environ then it may now point to free'd memory if the environment has been modified since. To avoid this |