In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/8577413aa3816a1155f74416d866f5771e63d83f?hp=71e845c3420f2496b845cf717d584dcaa063f4bf>

- Log -----------------------------------------------------------------
commit 8577413aa3816a1155f74416d866f5771e63d83f
Author: David Mitchell <da...@iabyn.com>
Date:   Tue Apr 24 15:07:51 2018 +0100

    fix linkage of PL_inf/nan under C++
    
    RT #132955
    
    Commit 0879cd66ef3f00  fixed perl to still build under C++ after changes
    to PL_inf and PL_nan. Unfortunately this seems to have broken C++ builds
    under Windows.
    
    Handle the extern 'C'  stuff in a different way - as suggested by Leon T -
    that hopefully satisfies all platforms.

-----------------------------------------------------------------------

Summary of changes:
 perl.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/perl.h b/perl.h
index 8f60f9b8fa..f41d5c9bd6 100644
--- a/perl.h
+++ b/perl.h
@@ -5402,13 +5402,8 @@ EXTCONST bool PL_valid_types_NV_set[];
  * With the U8_NV version you will want to have inner braces,
  * while with the NV_U8 use just the NV. */
 
-#ifdef __cplusplus
-#define INFNAN_U8_NV_DECL EXTERN_C const union { U8 u8[NVSIZE]; NV nv; }
-#define INFNAN_NV_U8_DECL EXTERN_C const union { NV nv; U8 u8[NVSIZE]; }
-#else
 #define INFNAN_U8_NV_DECL EXTCONST union { U8 u8[NVSIZE]; NV nv; }
 #define INFNAN_NV_U8_DECL EXTCONST union { NV nv; U8 u8[NVSIZE]; }
-#endif
 
 /* if these never got defined, they need defaults */
 #ifndef PERL_SET_CONTEXT
@@ -6696,6 +6691,8 @@ extern void moncontrol(int);
 
 #ifdef DOUBLE_HAS_NAN
 
+START_EXTERN_C
+
 #ifdef DOINIT
 
 /* PL_inf and PL_nan initialization.
@@ -6800,6 +6797,8 @@ INFNAN_NV_U8_DECL PL_nan;
 
 #endif
 
+END_EXTERN_C
+
 /* If you have not defined NV_INF/NV_NAN (like for example win32/win32.h),
  * we will define NV_INF/NV_NAN as the nv part of the global const
  * PL_inf/PL_nan.  Note, however, that the preexisting NV_INF/NV_NAN

-- 
Perl5 Master Repository

Reply via email to