diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-02-04 15:46:13 +0000 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-02-05 10:49:24 +0000 |
commit | f955cd4a58de7ef332ccbaca58561be68bee4f6a (patch) | |
tree | 95d8ffc1d11153ed7534da252b7a475e32bff188 /pp.c | |
parent | d20228ab36ecaa23d862ea6d226ec5769862ec91 (diff) | |
download | perl-f955cd4a58de7ef332ccbaca58561be68bee4f6a.tar.gz |
pp_i_modulo(): remove workaround for ancient glibc bug
Old glibc versions had a buggy modulo implementation for 64 bit
integers on 32-bit architectures. This was fixed in glibc 2.3,
released in 2002 (the version check in the code is overly cautious).
Removing the alternate PP function support is left for the next
commit, in case we need to resurrect it in future.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 25 |
1 files changed, 0 insertions, 25 deletions
@@ -2654,7 +2654,6 @@ PP(pp_i_divide) PP(pp_i_modulo) { - /* This is the vanilla old i_modulo. */ dSP; dATARGET; tryAMAGICbin_MG(modulo_amg, AMGf_assign); { @@ -2670,30 +2669,6 @@ PP(pp_i_modulo) } } -#if defined(__GLIBC__) && IVSIZE == 8 \ - && ( __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)) - -PP(pp_i_modulo_glibc_bugfix) -{ - /* This is the i_modulo with the workaround for the _moddi3 bug - * in (at least) glibc 2.2.5 (the PERL_ABS() the workaround). - * See below for pp_i_modulo. */ - dSP; dATARGET; - tryAMAGICbin_MG(modulo_amg, AMGf_assign); - { - dPOPTOPiirl_nomg; - if (!right) - DIE(aTHX_ "Illegal modulus zero"); - /* avoid FPE_INTOVF on some platforms when left is IV_MIN */ - if (right == -1) - SETi( 0 ); - else - SETi( left % PERL_ABS(right) ); - RETURN; - } -} -#endif - PP(pp_i_add) { dSP; dATARGET; |