On 02/25/2013 07:48 AM, John Goodyear wrote:
Running Perl's make, the first item I ran up against was
ERROR CCN3343 ./perl.h:4494 Redeclaration of PL_fold_latin1 differs
from previous declaration on line 537 of "./utfebcdic.h".
I noticed that Mariusz Stakowski posted this issue last year, and on
June 3 (2012) Nicholas posted a test patch. I applied the patch, which
made the compiler happy.
After that, gv.c, miniperlmain.c, opmini.c, pad.c, perlmini.c,
perly.c, and toke.o compiled OK.
The current issue is regcomp.c.
`sh cflags "optimize=''" regcomp.o` -c -Wc,XPLINK,dll,EXPORTALL
regcomp.c
CCCMD = c89 -DPERL_CORE -c -2 -Wc,XPLINK -DMAXSIG=39
-DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE
-DYYDYNAMIC -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll -W 0,float(ieee)
WARNING CCN3196 ./regcomp.c:12877 Initialization between types
"unsigned long*" and "struct sv*" is not allowed.
WARNING CCN3280 ./regcomp.c:12878 Function argument assignment
between types "struct sv* const" and "unsigned long*" is not allowed.
ERROR CCN3215 ./regcomp.c:12892 Too many arguments specified for
macro _invlist_intersection.
WARNING CCN3280 ./regcomp.c:12892 Function argument assignment
between types "struct sv* const" and "unsigned long*" is not allowed.
WARNING CCN3280 ./regcomp.c:12892 Function argument assignment
between types "struct sv**" and "unsigned long**" is not allowed.
ERROR CCN3215 ./regcomp.c:12893 Too many arguments specified for
macro _invlist_intersection.
WARNING CCN3280 ./regcomp.c:12893 Function argument assignment
between types "struct sv* const" and "unsigned long*" is not allowed.
ERROR CCN3045 ./regcomp.c:12893 Undeclared identifier PL_Alpha.
WARNING CCN3280 ./regcomp.c:12893 Function argument assignment
between types "struct sv**" and "unsigned long**" is not allowed.
WARNING CCN3280 ./regcomp.c:12895 Function argument assignment
between types "struct sv* const" and "unsigned long*" is not allowed
To address the errors,
1) changed UV* to SV* (seems
2) removed the trailing comma in the invocations of
_invlist_intersection()
3) Changed PL_Alpha to PL_Latin1
Not knowing the history of this code, I want to be careful. Fix 1
seems like the right thing to do. However for fix 3, I assumed that
PL_Alpha was changed to PL_Latin, but missed since the EBCDIC path
probably hasn't been compiled in a while.
Your fixes 1 and 2 are correct; thank you. However, fix 3 should be
PL_Posix_ptrs[_CC_ALPHA]. And, it looks like the ASCII intersection
line can just be deleted. (What's going on here is that if someone on
EBCDIC says, [a-j], there are characters in the range that aren't
alphabetics due to the gaps in the code point layout. The intersection
removes them.)
Also, it is easier on us if you make your patches separate attachment(s)
And, I expect to have my EBCDIC branch in a usable state later today. I
expect that there are a lot of undefined symbols in what you have now.
/u/jgood/perlsrc/perl-f4b5e62 >diff -u regcomp.c regcomp.c.new
--- regcomp.c Mon Feb 25 09:19:14 2013
+++ regcomp.c.new Mon Feb 25 09:17:44 2013
@@ -12874,7 +12874,7 @@
#ifndef EBCDIC
cp_list = _add_range_to_invlist(cp_list, prevvalue, value);
#else
- UV* this_range = _new_invlist(1);
+ SV* this_range = _new_invlist(1);
_append_range_to_invlist(this_range, prevvalue, value);
/* In EBCDIC, the ranges 'A-Z' and 'a-z' are each not
contiguous.
@@ -12889,8 +12889,8 @@
&& (prevvalue >= 'a' && value <= 'z')
|| (prevvalue >= 'A' && value <= 'Z'))
{
- _invlist_intersection(this_range, PL_ASCII, &this_range, );
- _invlist_intersection(this_range, PL_Alpha, &this_range, );
+ _invlist_intersection(this_range, PL_ASCII, &this_range );
+ _invlist_intersection(this_range, PL_Latin1, &this_range );
}
_invlist_union(cp_list, this_range, &cp_list);
literal_endpoint = 0;
John Goodyear