In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0879cd66ef3f00918ae26d9bb7ac555d3911c548?hp=afabfeb3299724b02541bbc9ebf0aeba14e9be17>

- Log -----------------------------------------------------------------
commit 0879cd66ef3f00918ae26d9bb7ac555d3911c548
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Sep 30 17:18:16 2016 -0400

    PL_inf/PL_nan need different export with C++
    
    After the 9ee3aea9, the old way worked with C++ for building
    the core, but then failed building the POSIX extension.
    
    (This change is about building with C++ after the 9ee3aea9,
    even though that change was about ordering perl.h into a more
    logical order for vax-netbsd, or for any non-IEEE-754 platform.)
-----------------------------------------------------------------------

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

diff --git a/perl.h b/perl.h
index 628315f..8444bc0 100644
--- a/perl.h
+++ b/perl.h
@@ -5719,11 +5719,18 @@ EXTCONST bool PL_valid_types_NV_set[];
 
 /* In C99 we could use designated (named field) union initializers.
  * In C89 we need to initialize the member declared first.
+ * In C++ we need extern C initializers.
  *
  * 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

--
Perl5 Master Repository

Reply via email to