diff options
author | Karl Williamson <khw@cpan.org> | 2022-12-12 19:51:40 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2023-01-12 17:42:00 -0700 |
commit | 65be4a0ded9e67be17d2c559c1c0dc8d3d746ed6 (patch) | |
tree | 838d3a8923554b997c8b033d79c64170a11007f1 /inline.h | |
parent | 2dc676e9ce23feb0ae948ea62f7e4301931d2188 (diff) | |
download | perl-65be4a0ded9e67be17d2c559c1c0dc8d3d746ed6.tar.gz |
Fix PerlEnv_putenv threaded compilation on Windows
A second compilation of a workspace would fail. The first one would
succeed because miniperl was being used, which isn't threaded.
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -281,6 +281,25 @@ S_strip_spaces(pTHX_ const char * orig, STRLEN * const len) } #endif +/* ------------------------------- iperlsys.h ------------------------------- */ +#if ! defined(PERL_IMPLICIT_SYS) && defined(USE_ITHREADS) + +/* Otherwise this function is implemented as macros in iperlsys.h */ + +PERL_STATIC_INLINE bool +Perl_PerlEnv_putenv(pTHX_ char * str) +{ + PERL_ARGS_ASSERT_PERLENV_PUTENV; + + ENV_LOCK; + bool retval = putenv(str); + ENV_UNLOCK; + + return retval; +} + +#endif + /* ------------------------------- mg.h ------------------------------- */ #if defined(PERL_CORE) || defined(PERL_EXT) |