Subject: | C++11 compatibility |
Perl's header files are intended to be C++ compatible, so XS modules can be created
using a C++ compiler.
Recently, ticket 120670 was reported against perl where several headers are not C++11
compatible.
https://rt.perl.org/Ticket/Display.html?id=120670
C++11 doesn't allow identifiers immediately after a literal unless that identifier
starts with an underscore. I've applied a patch to the core headers to fix this,
but ppport.h also has a couple of instances.
I've attached a patch for blead which needs to go into Devel-PPPort.
Since Devel-PPPort is cpan upstream I haven't applied it to blead.
If you have a public (eg. github) repository for Devel-PPPort let me know and I'll send you a pull request or patch directly for that.
Thanks,
Tony
Subject: | 0001-perl-120670-avoid-syntax-disallowed-by-C-11.patch |
From 674716a29982392ee3ae7e3e007d87269797a342 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Thu, 16 Jan 2014 13:52:07 +1100
Subject: [PATCH] [perl #120670] avoid syntax disallowed by C++11
---
cpan/Devel-PPPort/parts/inc/pv_tools | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpan/Devel-PPPort/parts/inc/pv_tools b/cpan/Devel-PPPort/parts/inc/pv_tools
index a8a477f..41a4907 100644
--- a/cpan/Devel-PPPort/parts/inc/pv_tools
+++ b/cpan/Devel-PPPort/parts/inc/pv_tools
@@ -80,10 +80,10 @@ pv_escape(pTHX_ SV *dsv, char const * const str,
if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
chsize = my_snprintf(octbuf, sizeof octbuf,
- "%"UVxf, u);
+ "%" UVxf, u);
else
chsize = my_snprintf(octbuf, sizeof octbuf,
- "%cx{%"UVxf"}", esc, u);
+ "%cx{%" UVxf "}", esc, u);
} else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
chsize = 1;
} else {
--
1.7.10.4