In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/56610b8f2b65d1b4ac923119d519ef5afae19e61?hp=d334ccbe5dc41b4f3085a341a760e04562dac34d>

- Log -----------------------------------------------------------------
commit 56610b8f2b65d1b4ac923119d519ef5afae19e61
Author: Craig A. Berry <[email protected]>
Date:   Mon Sep 1 21:45:10 2014 -0500

    isnormal macro in fp.h broken on VMS.
    
    It appears to have an extra closing parenthesis, which means any
    use of it fails to compile.  Ouch:
    
      $ type abby_normal.c
      #include <fp.h>
      int main() {
          double pi = 3.414;
          int normality = isnormal(pi);
      }
      $ cc/float=ieee abby_normal
    
          int normality = isnormal(pi);
      ....................^
      %CC-E-NOSEMI, Missing ";".
      at line number 4 in file DSA23:[TEST]abby_normal.c;1
    
    So don't use it but rather fall back to a solution based on
    fp_classify.
    
    Of course it's supposed to be in math.h, not fp.h, but I digress.
-----------------------------------------------------------------------

Summary of changes:
 perl.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/perl.h b/perl.h
index 4bd7c92..f251be3 100644
--- a/perl.h
+++ b/perl.h
@@ -2052,6 +2052,9 @@ EXTERN_C long double modfl(long double, long double *);
 #    ifdef __VMS
      /* FP_INFINITE and others are here rather than in math.h as C99 
stipulates */
 #        include <fp.h>
+     /* oh, and the isnormal macro has a typo in it! */
+#    undef isnormal
+#    define isnormal(x) Perl_fp_class_norm(x)
 #    endif
 #    if defined(FP_INFINITE) && defined(FP_NAN)
 #        define Perl_fp_class(x)       fp_classify(x)

--
Perl5 Master Repository

Reply via email to