In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fc4b5f72837b3df426905782485aee7b794cb692?hp=2653c1e3b10f71430de1ab8ab0417ca5b048ab19>

- Log -----------------------------------------------------------------
commit fc4b5f72837b3df426905782485aee7b794cb692
Author: Nicholas Clark <[email protected]>
Date:   Wed Apr 11 16:47:27 2012 +0200

    Tweak the FEATURE_IS_ENABLED() macro to avoid a bug in the HP-UX compiler.
-----------------------------------------------------------------------

Summary of changes:
 feature.h        |    4 +++-
 regen/feature.pl |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/feature.h b/feature.h
index b595cab..dc9696e 100644
--- a/feature.h
+++ b/feature.h
@@ -20,10 +20,12 @@
 #define CURRENT_FEATURE_BUNDLE \
     ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT)
 
+/* Avoid using ... && Perl_feature_is_enabled(...) as that triggers a bug in
+   the HP-UX cc on PA-RISC */
 #define FEATURE_IS_ENABLED(name)                                       \
        ((CURRENT_HINTS                                                  \
           & HINT_LOCALIZE_HH)                                            \
-           && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
+           ? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE)
 /* The longest string we pass in.  */
 #define MAX_FEATURE_LEN (sizeof("evalbytes")-1)
 
diff --git a/regen/feature.pl b/regen/feature.pl
index 2a8d369..222215a 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -231,10 +231,12 @@ print $h <<'EOH';
 #define CURRENT_FEATURE_BUNDLE \
     ((CURRENT_HINTS & HINT_FEATURE_MASK) >> HINT_FEATURE_SHIFT)
 
+/* Avoid using ... && Perl_feature_is_enabled(...) as that triggers a bug in
+   the HP-UX cc on PA-RISC */
 #define FEATURE_IS_ENABLED(name)                                       \
        ((CURRENT_HINTS                                                  \
           & HINT_LOCALIZE_HH)                                            \
-           && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
+           ? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE)
 /* The longest string we pass in.  */
 EOH
 

--
Perl5 Master Repository

Reply via email to