Front page | perl.perl5.porters |
Postings from April 2010
[perl #74614] [PATCH] h2ph produces incorrect code in preamble
From:
Robin Barker
Date:
April 24, 2010 01:26
Subject:
[perl #74614] [PATCH] h2ph produces incorrect code in preamble
Message ID:
rt-3.6.HEAD-6227-1272037709-1007.74614-75-0@perl.org
# New Ticket Created by Robin Barker
# Please include the string: [perl #74614]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74614 >
This is a bug report for perl from rmbarker@cpan.org
generated with the help of perlbug 1.39 running under perl 5.13.0.
-----------------------------------------------------------------
[Please describe your issue here]
The h2ph utility produces non-compiling code in its preamble,
generated by build_preamble_if_necessary(). If one of the
build-in macros has arguments; e.g. __INT64_C(c) produces
unless (defined &__INT64_C(c)) { sub __INT64_C(c)() { &cLL } }
(note double prototype). The preamble also contains "&int"
because it thinks "int" is a macro not a type.
These issues produce warnings but this is hidden by the test
suite because there is an error in lib/h2ph.t.
The patch fixes h2ph.PL to produce compiling code and fixes
h2ph.t to properly trap warnings or failures to compile.
(Perhaps severity should be "low" because I guess no one is
using h2ph, otherwise this would have been spotted earlier.)
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=utilities
severity=medium
---
Site configuration information for perl 5.13.0:
Configured by robin at Thu Apr 22 12:22:28 BST 2010.
Summary of my perl5 (revision 5 version 13 subversion 0) configuration:
Commit id: 4fd8f0cd61ad36e90cd5082dffa22afb90dcc58f
Platform:
osname=linux, osvers=2.6.31-20-generic, archname=i686-linux-64int
uname='linux spade-ubuntu 2.6.31-20-generic #58-ubuntu smp fri mar 12 05:23:09 utc 2010 i686 gnulinux '
config_args='-des -Dcc=gcc -Duse64bitint -Doptimize=-O2 -g -Dusedevel -Dman3dir=none'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.5.0', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.10.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'
Locally applied patches:
---
@INC for perl 5.13.0:
lib
/usr/local/lib/perl5/site_perl/5.13.0/i686-linux-64int
/usr/local/lib/perl5/site_perl/5.13.0
/usr/local/lib/perl5/5.13.0/i686-linux-64int
/usr/local/lib/perl5/5.13.0
/usr/local/lib/perl5/site_perl
.
---
Environment for perl 5.13.0:
HOME=/home/robin
LANG=en_GB.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
LOGDIR (unset)
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PERL_BADLANG (unset)
SHELL=/bin/tcsh
-
[perl #74614] [PATCH] h2ph produces incorrect code in preamble
by Robin Barker