From: Steve Peters Date: Wed, 16 Aug 2006 13:11:15 +0000 (+0000) Subject: Additional changes to get C++ a little closer to a clean compile X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87d46f97c572fcb76df491a3f99f2a7106164f04;p=p5sagit%2Fp5-mst-13.2.git Additional changes to get C++ a little closer to a clean compile of Perl. p4raw-id: //depot/perl@28729 --- diff --git a/bytecode.pl b/bytecode.pl index 6256a5f..cbbdefa 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -373,7 +373,7 @@ stop PL_op U32 s stpv bstate->bs_pv.pvx U32 x ldspecsv bstate->bs_sv U8 x ldspecsvx bstate->bs_sv U8 x -newsv bstate->bs_sv U8 x +newsv bstate->bs_sv svtype x newsvx bstate->bs_sv svtype x newop PL_op U8 x newopx PL_op U16 x @@ -381,7 +381,7 @@ newopn PL_op U8 x newpv none PV pv_cur bstate->bs_pv.xpv.xpv_cur STRLEN pv_free bstate->bs_pv.pvx none x -sv_upgrade bstate->bs_sv U8 x +sv_upgrade bstate->bs_sv svtype x sv_refcnt SvREFCNT(bstate->bs_sv) U32 sv_refcnt_add SvREFCNT(bstate->bs_sv) I32 x sv_flags SvFLAGS(bstate->bs_sv) U32 diff --git a/ext/B/B/Asmdata.pm b/ext/B/B/Asmdata.pm index ca21b5d..f9dd98c 100644 --- a/ext/B/B/Asmdata.pm +++ b/ext/B/B/Asmdata.pm @@ -34,7 +34,7 @@ $insn_data{stop} = [4, \&PUT_U32, "GET_U32"]; $insn_data{stpv} = [5, \&PUT_U32, "GET_U32"]; $insn_data{ldspecsv} = [6, \&PUT_U8, "GET_U8"]; $insn_data{ldspecsvx} = [7, \&PUT_U8, "GET_U8"]; -$insn_data{newsv} = [8, \&PUT_U8, "GET_U8"]; +$insn_data{newsv} = [8, \&PUT_svtype, "GET_svtype"]; $insn_data{newsvx} = [9, \&PUT_svtype, "GET_svtype"]; $insn_data{newop} = [11, \&PUT_U8, "GET_U8"]; $insn_data{newopx} = [12, \&PUT_U16, "GET_U16"]; @@ -42,7 +42,7 @@ $insn_data{newopn} = [13, \&PUT_U8, "GET_U8"]; $insn_data{newpv} = [14, \&PUT_PV, "GET_PV"]; $insn_data{pv_cur} = [15, \&PUT_PADOFFSET, "GET_PADOFFSET"]; $insn_data{pv_free} = [16, \&PUT_none, "GET_none"]; -$insn_data{sv_upgrade} = [17, \&PUT_U8, "GET_U8"]; +$insn_data{sv_upgrade} = [17, \&PUT_svtype, "GET_svtype"]; $insn_data{sv_refcnt} = [18, \&PUT_U32, "GET_U32"]; $insn_data{sv_refcnt_add} = [19, \&PUT_I32, "GET_I32"]; $insn_data{sv_flags} = [20, \&PUT_U32, "GET_U32"]; diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index fd2c4f6..160ae61 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -210,7 +210,7 @@ typedef char *pvindex; SvUPGRADE(sv, (arg)); \ } #define BSET_newsvx(sv, arg) STMT_START { \ - BSET_newsv(sv, arg & SVTYPEMASK); \ + BSET_newsv(sv, (svtype)(arg & SVTYPEMASK)); \ SvFLAGS(sv) = arg; \ BSET_OBJ_STOREX(sv); \ } STMT_END diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c index 9305723..0c491c0 100644 --- a/ext/ByteLoader/byterun.c +++ b/ext/ByteLoader/byterun.c @@ -136,8 +136,8 @@ byterun(pTHX_ register struct byteloader_state *bstate) } case INSN_NEWSV: /* 8 */ { - U8 arg; - BGET_U8(arg); + svtype arg; + BGET_svtype(arg); BSET_newsv(bstate->bs_sv, arg); break; } @@ -189,8 +189,8 @@ byterun(pTHX_ register struct byteloader_state *bstate) } case INSN_SV_UPGRADE: /* 17 */ { - U8 arg; - BGET_U8(arg); + svtype arg; + BGET_svtype(arg); BSET_sv_upgrade(bstate->bs_sv, arg); break; } diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index 3bdaded..8b5ba4e 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -165,7 +165,7 @@ our ($db_version, $use_XSLoader, $splice_end_array, $Error); use Carp; -$VERSION = "1.814" ; +$VERSION = "1.81401" ; { local $SIG{__WARN__} = sub {$splice_end_array = "@_";}; diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 8f4cb2f..7cbe5e8 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -410,12 +410,12 @@ typedef struct { typedef DB_File_type * DB_File ; typedef DBT DBTKEY ; -#define my_sv_setpvn(sv, d, s) sv_setpvn(sv, (s ? d : (void*)""), s) +#define my_sv_setpvn(sv, d, s) sv_setpvn(sv, (s ? d : (const char *)""), s) #define OutputValue(arg, name) \ { if (RETVAL == 0) { \ SvGETMAGIC(arg) ; \ - my_sv_setpvn(arg, name.data, name.size) ; \ + my_sv_setpvn(arg, (const char *)name.data, name.size) ; \ TAINT; \ SvTAINTED_on(arg); \ SvUTF8_off(arg); \ @@ -428,7 +428,7 @@ typedef DBT DBTKEY ; { \ SvGETMAGIC(arg) ; \ if (db->type != DB_RECNO) { \ - my_sv_setpvn(arg, name.data, name.size); \ + my_sv_setpvn(arg, (const char *)name.data, name.size); \ } \ else \ sv_setiv(arg, (I32)*(I32*)name.data - 1); \ @@ -597,8 +597,8 @@ const DBT * key2 ; PUSHMARK(SP) ; EXTEND(SP,2) ; - PUSHs(sv_2mortal(newSVpvn(data1,key1->size))); - PUSHs(sv_2mortal(newSVpvn(data2,key2->size))); + PUSHs(sv_2mortal(newSVpvn((const char*)data1,key1->size))); + PUSHs(sv_2mortal(newSVpvn((const char*)data2,key2->size))); PUTBACK ; count = perl_call_sv(CurrentDB->compare, G_SCALAR); diff --git a/ext/Hash/Util/FieldHash/FieldHash.xs b/ext/Hash/Util/FieldHash/FieldHash.xs index 8aa8c9c..6bc07cc 100644 --- a/ext/Hash/Util/FieldHash/FieldHash.xs +++ b/ext/Hash/Util/FieldHash/FieldHash.xs @@ -307,9 +307,9 @@ OUTPUT: RETVAL void -CLONE(char* class) +CLONE(char* classname) CODE: - if (0 == strcmp(class, "Hash::Util::FieldHash")) { + if (0 == strcmp(classname, "Hash::Util::FieldHash")) { HUF_global(HUF_CLONE); HUF_fix_objects(); } diff --git a/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm b/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm index 6575022..824873a 100644 --- a/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm +++ b/ext/Hash/Util/FieldHash/lib/Hash/Util/FieldHash.pm @@ -15,7 +15,7 @@ our %EXPORT_TAGS = ( ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); -our $VERSION = '0.01'; +our $VERSION = '0.01_01'; { require XSLoader; diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index 72597f7..a67f883 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -2,7 +2,7 @@ package POSIX; our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD, %SIGRT) = (); -our $VERSION = "1.10"; +our $VERSION = "1.11"; use AutoLoader; diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 1774703..3c7b0b8 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1363,7 +1363,7 @@ sigaction(sig, optaction, oldaction = 0) svp = hv_fetchs(action, "SAFE", FALSE); act.sa_handler = DPTR2FPTR( - void (*)(), + void (*)(int), (*svp && SvTRUE(*svp)) ? PL_csighandlerp : PL_sighandlerp );