diff options
author | Hugo van der Sanden <hv@crypt.org> | 2015-02-23 16:48:15 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2015-03-09 22:15:46 +0000 |
commit | 22ff313068aa37b1a24855e760e71ee9a20a1a90 (patch) | |
tree | 09da195258e4a85e42a39dd24d7c60c849409ef1 /ext/DynaLoader | |
parent | 35cd12d12a5a5777098caf722f8748b39c3be45f (diff) | |
download | perl-22ff313068aa37b1a24855e760e71ee9a20a1a90.tar.gz |
[perl #123814] replace grok_atou with grok_atoUV
Some questions and loose ends:
XXX gv.c:S_gv_magicalize - why are we using SSize_t for paren?
XXX mg.c:Perl_magic_set - need appopriate error handling for $)
XXX regcomp.c:S_reg - need to check if we do the right thing if parno
was not grokked
Perl_get_debug_opts should probably return something unsigned; not sure
if that's something we can change.
Diffstat (limited to 'ext/DynaLoader')
-rw-r--r-- | ext/DynaLoader/dlutils.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c index 96ea8befa5..fca8e787eb 100644 --- a/ext/DynaLoader/dlutils.c +++ b/ext/DynaLoader/dlutils.c @@ -100,6 +100,7 @@ dl_generic_private_init(pTHX) /* called by dl_*.xs dl_private_init() */ { #if defined(PERL_IN_DL_HPUX_XS) || defined(PERL_IN_DL_DLOPEN_XS) char *perl_dl_nonlazy; + UV uv; #endif MY_CXT_INIT; @@ -115,9 +116,12 @@ dl_generic_private_init(pTHX) /* called by dl_*.xs dl_private_init() */ #endif #if defined(PERL_IN_DL_HPUX_XS) || defined(PERL_IN_DL_DLOPEN_XS) - if ( (perl_dl_nonlazy = getenv("PERL_DL_NONLAZY")) != NULL ) - dl_nonlazy = grok_atou(perl_dl_nonlazy, NULL); - else + if ( (perl_dl_nonlazy = getenv("PERL_DL_NONLAZY")) != NULL + && grok_atoUV(perl_dl_nonlazy, &uv, NULL) + && uv <= INT_MAX + ) { + dl_nonlazy = (int)uv; + } else dl_nonlazy = 0; if (dl_nonlazy) DLDEBUG(1,PerlIO_printf(Perl_debug_log, "DynaLoader bind mode is 'non-lazy'\n")); |