Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-PPPort CPAN distribution.

Report information
The Basics
Id: 92188
Status: resolved
Priority: 0/
Queue: Devel-PPPort

People
Owner: Nobody in particular
Requestors: TONYC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
On Wed Jan 15 22:14:42 2014, TONYC wrote: Show quoted text
> 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.
Awesome, thanks! Show quoted text
> 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.
There is! https://github.com/mhx/Devel-PPPort Thanks, Marcus
On Fri Jan 17 05:59:41 2014, MHX wrote: Show quoted text
> On Wed Jan 15 22:14:42 2014, TONYC wrote:
> > 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.
> > There is! https://github.com/mhx/Devel-PPPort
I've attached the patch and submitted a pull request: https://github.com/mhx/Devel-PPPort/pull/1 Tony
Subject: 0001-perl-120670-avoid-syntax-disallowed-by-C-11.patch
From 3e8a9e865ac0dfcb07c16898a9ee6bb40414b5f8 Mon Sep 17 00:00:00 2001 From: Tony Cook <tony@develop-help.com> Date: Mon, 20 Jan 2014 14:45:22 +1100 Subject: [PATCH] [perl #120670] avoid syntax disallowed by C++11 C++11 disallows literals immediately followed by an identifier, unless that identifier starts with an underscore. --- parts/inc/pv_tools | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/inc/pv_tools b/parts/inc/pv_tools index a8a477f..41a4907 100644 --- a/parts/inc/pv_tools +++ b/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
This went out with the 3.22 release. Thanks! -- Matthew Horsfall (alh)