diff --git a/perl-5.29.0-perl.h-Add-parens-around-macro-arguments.patch b/perl-5.29.0-perl.h-Add-parens-around-macro-arguments.patch new file mode 100644 index 0000000..73c003f --- /dev/null +++ b/perl-5.29.0-perl.h-Add-parens-around-macro-arguments.patch @@ -0,0 +1,33 @@ +From ff58ca57f8442a7e2e74ab4a79a9e542f9a180e7 Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Mon, 11 Jun 2018 13:26:24 -0600 +Subject: [PATCH] perl.h: Add parens around macro arguments +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Arguments used within macros need to be parenthesized in case they are +called with an expression. This commit changes +_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG() to do that. + +Signed-off-by: Petr Písař +--- + perl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/perl.h b/perl.h +index 6f04c6facd..3e1f6cd571 100644 +--- a/perl.h ++++ b/perl.h +@@ -5632,7 +5632,7 @@ typedef struct am_table_short AMTS; + # define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) \ + STMT_START { /* Check if to warn before doing the conversion work */\ + if (! PL_in_utf8_CTYPE_locale && ckWARN(WARN_LOCALE)) { \ +- UV cp = utf8_to_uvchr_buf((U8 *) s, (U8 *) send, NULL); \ ++ UV cp = utf8_to_uvchr_buf((U8 *) (s), (U8 *) (send), NULL); \ + Perl_warner(aTHX_ packWARN(WARN_LOCALE), \ + "Wide character (U+%" UVXf ") in %s", \ + (cp == 0) \ +-- +2.14.4 + diff --git a/perl.spec b/perl.spec index 0814b83..711137a 100644 --- a/perl.spec +++ b/perl.spec @@ -161,6 +161,9 @@ Patch16: perl-5.29.0-Perl_my_setenv-handle-integer-wrap.patch # expression while ISO-8859-1 locale is in effect Patch17: perl-5.29.0-regexec.c-Call-macro-with-correct-args.patch +# Fix invoking a check for wide characters while ISO-8859-1 locale is in effect +Patch18: perl-5.29.0-perl.h-Add-parens-around-macro-arguments.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -2732,6 +2735,7 @@ Perl extension for Version Objects %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 %patch200 -p1 %patch201 -p1 @@ -2756,6 +2760,7 @@ perl -x patchlevel.h \ 'Fedora Patch15: Adjust tests to gdbm-1.15 (RT#133295)' \ 'Fedora Patch16: Fix an integer wrap when allocating memory for an environment variable (RT#133204)' \ 'Fedora Patch17: Fix printing a warning about a wide character when matching a regular expression while ISO-8859-1 locale is in effect' \ + 'Fedora Patch18: Fix invoking a check for wide characters while ISO-8859-1 locale is in effect' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -5050,6 +5055,7 @@ popd (RT#133204) - Fix printing a warning about a wide character when matching a regular expression while ISO-8859-1 locale is in effect +- Fix invoking a check for wide characters while ISO-8859-1 locale is in effect * Wed Jun 27 2018 Jitka Plesnikova - 4:5.28.0-416 - Stop providing old perl(MODULE_COMPAT_5.26.*)