Change 30038 by [EMAIL PROTECTED] on 2007/01/27 18:13:24

        Integrate:
        [ 28670]
        Fixups for test failures caused by #28667 and #28668
        
        [ 28729]
        Additional changes to get C++ a little closer to a clean compile
        of Perl.
        
        [ 28730]
        Cast needed to compile bsd_glob.c with C++
        
        [ 28744]
        Subject: [PATCH] g++: fix Digest::MD5, Math::BigInt::FastCalc, 
ODBM_File, XS::APItest (and Time::HiRes 1.88 in CPAN)
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Tue, 22 Aug 2006 10:45:41 +0300 (EEST)
        Message-Id: <[EMAIL PROTECTED]>
        
               ...plus various version bumps and Digest::MD5 test file fixes.
        
        [ 28754]
        Subject: [PATCH ext/ODBM_File/ODBM_File.xs] change 28744 broke ODBM_File
        From: "Robin Barker" <[EMAIL PROTECTED]>
        Date: Thu, 24 Aug 2006 13:22:47 +0100
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28757]
        Following Jarkko's advice, it seems that ODBM_File cannot be
        compiled as C++ as-is.

Affected files ...

... //depot/maint-5.8/perl/bytecode.pl#20 integrate
... //depot/maint-5.8/perl/ext/B/B/Asmdata.pm#11 integrate
... //depot/maint-5.8/perl/ext/B/B/Assembler.pm#8 integrate
... //depot/maint-5.8/perl/ext/B/t/assembler.t#5 integrate
... //depot/maint-5.8/perl/ext/ByteLoader/bytecode.h#12 integrate
... //depot/maint-5.8/perl/ext/ByteLoader/byterun.c#14 integrate
... //depot/maint-5.8/perl/ext/DB_File/DB_File.pm#12 integrate
... //depot/maint-5.8/perl/ext/DB_File/DB_File.xs#10 integrate
... //depot/maint-5.8/perl/ext/Digest/MD5/MD5.pm#13 integrate
... //depot/maint-5.8/perl/ext/Digest/MD5/MD5.xs#11 integrate
... //depot/maint-5.8/perl/ext/Digest/MD5/t/files.t#16 integrate
... //depot/maint-5.8/perl/ext/File/Glob/bsd_glob.c#5 integrate
... //depot/maint-5.8/perl/ext/ODBM_File/ODBM_File.pm#6 integrate
... //depot/maint-5.8/perl/ext/ODBM_File/ODBM_File.xs#5 integrate
... //depot/maint-5.8/perl/ext/POSIX/POSIX.pm#12 integrate
... //depot/maint-5.8/perl/ext/POSIX/POSIX.xs#32 integrate
... //depot/maint-5.8/perl/ext/XS/APItest/APItest.pm#11 integrate
... //depot/maint-5.8/perl/ext/XS/APItest/APItest.xs#15 integrate

Differences ...

==== //depot/maint-5.8/perl/bytecode.pl#20 (text) ====
Index: perl/bytecode.pl
--- perl/bytecode.pl#19~29929~  2007-01-22 15:29:42.000000000 -0800
+++ perl/bytecode.pl    2007-01-27 10:13:24.000000000 -0800
@@ -363,7 +363,7 @@
 stpv           bstate->bs_pv.xpv_pv                    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                           U32             x
 newop          PL_op                                   U8              x
 newopx         PL_op                                   U16             x
@@ -371,7 +371,7 @@
 newpv          none                                    PV
 pv_cur         bstate->bs_pv.xpv_cur                   STRLEN
 pv_free                bstate->bs_pv                           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

==== //depot/maint-5.8/perl/ext/B/B/Asmdata.pm#11 (text+w) ====
Index: perl/ext/B/B/Asmdata.pm
--- perl/ext/B/B/Asmdata.pm#10~27040~   2006-02-01 10:08:07.000000000 -0800
+++ perl/ext/B/B/Asmdata.pm     2007-01-27 10:13:24.000000000 -0800
@@ -34,7 +34,7 @@
 $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_U32, "GET_U32"];
 $insn_data{newop} = [11, \&PUT_U8, "GET_U8"];
 $insn_data{newopx} = [12, \&PUT_U16, "GET_U16"];
@@ -42,7 +42,7 @@
 $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"];

==== //depot/maint-5.8/perl/ext/B/B/Assembler.pm#8 (text) ====
Index: perl/ext/B/B/Assembler.pm
--- perl/ext/B/B/Assembler.pm#7~23293~  2004-09-09 03:15:43.000000000 -0700
+++ perl/ext/B/B/Assembler.pm   2007-01-27 10:13:24.000000000 -0800
@@ -150,6 +150,10 @@
     $Config{longsize} == 8 ? &B::Asmdata::PUT_IV64 : &B::Asmdata::PUT_U32;
 }
 
+sub B::Asmdata::PUT_svtype {
+    $Config{longsize} == 8 ? &B::Asmdata::PUT_IV64 : &B::Asmdata::PUT_U32;
+}
+
 my %unesc = (n => "\n", r => "\r", t => "\t", a => "\a",
             b => "\b", f => "\f", v => "\013");
 

==== //depot/maint-5.8/perl/ext/B/t/assembler.t#5 (text) ====
Index: perl/ext/B/t/assembler.t
--- perl/ext/B/t/assembler.t#4~23293~   2004-09-09 03:15:43.000000000 -0700
+++ perl/ext/B/t/assembler.t    2007-01-27 10:13:24.000000000 -0800
@@ -254,6 +254,7 @@
 op_tr_array => [ join( ',', 256, 0..255 ) ],
 PADOFFSET   => undef,
 long        => undef,
+svtype      => undef,
              );
 
 # Erronous operand values
@@ -277,7 +278,8 @@
 strconst    => [  'no quote"',  '"with NUL '."\0".' char"' ], # no NUL
 op_tr_array => undef, # op_pv_tr is no longer exactly 256 shorts
 PADOFFSET   => undef,
-long        => undef,
+long       => undef,
+svtype     => undef,
              );
 
 

==== //depot/maint-5.8/perl/ext/ByteLoader/bytecode.h#12 (text) ====
Index: perl/ext/ByteLoader/bytecode.h
--- perl/ext/ByteLoader/bytecode.h#11~29929~    2007-01-22 15:29:42.000000000 
-0800
+++ perl/ext/ByteLoader/bytecode.h      2007-01-27 10:13:24.000000000 -0800
@@ -194,7 +194,7 @@
                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

==== //depot/maint-5.8/perl/ext/ByteLoader/byterun.c#14 (text+w) ====
Index: perl/ext/ByteLoader/byterun.c
--- perl/ext/ByteLoader/byterun.c#13~29929~     2007-01-22 15:29:42.000000000 
-0800
+++ perl/ext/ByteLoader/byterun.c       2007-01-27 10:13:24.000000000 -0800
@@ -134,8 +134,8 @@
            }
          case INSN_NEWSV:              /* 8 */
            {
-               U8 arg;
-               BGET_U8(arg);
+               svtype arg;
+               BGET_svtype(arg);
                BSET_newsv(bstate->bs_sv, arg);
                break;
            }
@@ -187,8 +187,8 @@
            }
          case INSN_SV_UPGRADE:         /* 17 */
            {
-               U8 arg;
-               BGET_U8(arg);
+               svtype arg;
+               BGET_svtype(arg);
                BSET_sv_upgrade(bstate->bs_sv, arg);
                break;
            }

==== //depot/maint-5.8/perl/ext/DB_File/DB_File.pm#12 (text) ====
Index: perl/ext/DB_File/DB_File.pm
--- perl/ext/DB_File/DB_File.pm#11~26616~       2006-01-03 09:56:09.000000000 
-0800
+++ perl/ext/DB_File/DB_File.pm 2007-01-27 10:13:24.000000000 -0800
@@ -165,7 +165,7 @@
 use Carp;
 
 
-$VERSION = "1.814" ;
+$VERSION = "1.81401" ;
 
 {
     local $SIG{__WARN__} = sub {$splice_end_array = "@_";};

==== //depot/maint-5.8/perl/ext/DB_File/DB_File.xs#10 (text) ====
Index: perl/ext/DB_File/DB_File.xs
--- perl/ext/DB_File/DB_File.xs#9~26616~        2006-01-03 09:56:09.000000000 
-0800
+++ perl/ext/DB_File/DB_File.xs 2007-01-27 10:13:24.000000000 -0800
@@ -410,12 +410,12 @@
 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 @@
          {                                                             \
                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 @@
 
     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); 

==== //depot/maint-5.8/perl/ext/Digest/MD5/MD5.pm#13 (text) ====
Index: perl/ext/Digest/MD5/MD5.pm
--- perl/ext/Digest/MD5/MD5.pm#12~26714~        2006-01-08 07:35:39.000000000 
-0800
+++ perl/ext/Digest/MD5/MD5.pm  2007-01-27 10:13:24.000000000 -0800
@@ -3,7 +3,7 @@
 use strict;
 use vars qw($VERSION @ISA @EXPORT_OK);
 
-$VERSION = '2.36';  # $Date: 2005/11/30 13:46:47 $
+$VERSION = '2.36_01';  # $Date: 2005/11/30 13:46:47 $
 
 require Exporter;
 *import = \&Exporter::import;

==== //depot/maint-5.8/perl/ext/Digest/MD5/MD5.xs#11 (text) ====
Index: perl/ext/Digest/MD5/MD5.xs
--- perl/ext/Digest/MD5/MD5.xs#10~26714~        2006-01-08 07:35:39.000000000 
-0800
+++ perl/ext/Digest/MD5/MD5.xs  2007-01-27 10:13:24.000000000 -0800
@@ -713,8 +713,8 @@
                }
            }
            if (msg) {
-               char *f = (ix == F_BIN) ? "md5" :
-                          (ix == F_HEX) ? "md5_hex" : "md5_base64";
+               const char *f = (ix == F_BIN) ? "md5" :
+                               (ix == F_HEX) ? "md5_hex" : "md5_base64";
                warn("&Digest::MD5::%s function %s", f, msg);
            }
        }

==== //depot/maint-5.8/perl/ext/Digest/MD5/t/files.t#16 (text) ====
Index: perl/ext/Digest/MD5/t/files.t
--- perl/ext/Digest/MD5/t/files.t#15~26714~     2006-01-08 07:35:39.000000000 
-0800
+++ perl/ext/Digest/MD5/t/files.t       2007-01-27 10:13:24.000000000 -0800
@@ -22,16 +22,16 @@
     $EXPECT = <<EOT;
 c7b68bb806b2d42f4a11511132e94ae8  Changes
 11e8028ee426273db6b6db270a8bb38c  README
-347d5b9f257eb62eaab60b3d952451f7  MD5.pm
-b61eb1bba8cc490040d02f6bf24874f7  MD5.xs
+c5e839f675f682215f913ea73788bc2c  MD5.pm
+9fedc2bc1f2346e42b1cfd54d697b91f  MD5.xs
 276da0aa4e9a08b7fe09430c9c5690aa  rfc1321.txt
 EOT
 } elsif ("\n" eq "\015") { # MacOS
     $EXPECT = <<EOT;
 628699b88b6a803225678802d2470067  Changes
 c95549c6c5e1e1c078b27042f1dc850f  README
-77503ff007841a671275fdf544dad68e  MD5.pm
-716c3278fd80338727c100e5d2a76795  MD5.xs
+e78ad7902025d17f140bef176dc4b154  MD5.pm
+2b1471867e79e05576f16daaaad53325  MD5.xs
 754b9db19f79dbc4992f7166eb0f37ce  rfc1321.txt
 EOT
 } else {
@@ -39,8 +39,8 @@
     $EXPECT = <<EOT;
 2fdc25c326960308f5334c967455d1f5  Changes
 c95549c6c5e1e1c078b27042f1dc850f  README
-77503ff007841a671275fdf544dad68e  MD5.pm
-716c3278fd80338727c100e5d2a76795  MD5.xs
+e78ad7902025d17f140bef176dc4b154  MD5.pm
+2b1471867e79e05576f16daaaad53325  MD5.xs
 754b9db19f79dbc4992f7166eb0f37ce  rfc1321.txt
 EOT
 }

==== //depot/maint-5.8/perl/ext/File/Glob/bsd_glob.c#5 (text) ====
Index: perl/ext/File/Glob/bsd_glob.c
--- perl/ext/File/Glob/bsd_glob.c#4~30007~      2007-01-26 05:50:55.000000000 
-0800
+++ perl/ext/File/Glob/bsd_glob.c       2007-01-27 10:13:24.000000000 -0800
@@ -935,7 +935,7 @@
        if (pglob->gl_flags & GLOB_ALTDIRFUNC)
                readdirfunc = (Direntry_t *(*)(DIR *))pglob->gl_readdir;
        else
-               readdirfunc = my_readdir;
+               readdirfunc = (Direntry_t *(*)(DIR *))my_readdir;
        while ((dp = (*readdirfunc)(dirp))) {
                register U8 *sc;
                register Char *dc;

==== //depot/maint-5.8/perl/ext/ODBM_File/ODBM_File.pm#6 (text) ====
Index: perl/ext/ODBM_File/ODBM_File.pm
--- perl/ext/ODBM_File/ODBM_File.pm#5~26806~    2006-01-12 11:23:34.000000000 
-0800
+++ perl/ext/ODBM_File/ODBM_File.pm     2007-01-27 10:13:24.000000000 -0800
@@ -7,7 +7,7 @@
 use XSLoader ();
 
 our @ISA = qw(Tie::Hash);
-our $VERSION = "1.06";
+our $VERSION = "1.07";
 
 XSLoader::load 'ODBM_File', $VERSION;
 

==== //depot/maint-5.8/perl/ext/ODBM_File/ODBM_File.xs#5 (text) ====
Index: perl/ext/ODBM_File/ODBM_File.xs
--- perl/ext/ODBM_File/ODBM_File.xs#4~25572~    2005-09-22 09:46:28.000000000 
-0700
+++ perl/ext/ODBM_File/ODBM_File.xs     2007-01-27 10:13:24.000000000 -0800
@@ -15,7 +15,7 @@
 int    dbmclose(void);
 datum  fetch(datum key);
 int    store(datum key, datum dat);
-int    delete(datum key);
+int    delete(datum key); 
 datum  firstkey(void);
 datum  nextkey(datum key);
 #endif

==== //depot/maint-5.8/perl/ext/POSIX/POSIX.xs#32 (text) ====
Index: perl/ext/POSIX/POSIX.xs
--- perl/ext/POSIX/POSIX.xs#31~29807~   2007-01-14 05:09:22.000000000 -0800
+++ perl/ext/POSIX/POSIX.xs     2007-01-27 10:13:24.000000000 -0800
@@ -1361,7 +1361,7 @@
                svp = hv_fetchs(action, "SAFE", FALSE);
                act.sa_handler =
                        DPTR2FPTR(
-                           void (*)(),
+                           void (*)(int),
                            (*svp && SvTRUE(*svp))
                                ? PL_csighandlerp : PL_sighandlerp
                        );

==== //depot/maint-5.8/perl/ext/XS/APItest/APItest.xs#15 (text) ====
Index: perl/ext/XS/APItest/APItest.xs
--- perl/ext/XS/APItest/APItest.xs#14~29943~    2007-01-24 04:06:54.000000000 
-0800
+++ perl/ext/XS/APItest/APItest.xs      2007-01-27 10:13:24.000000000 -0800
@@ -33,7 +33,7 @@
        test expect to be able to call del_HE on the HE  */
     if (!PL_body_roots[HE_SVSLOT])
        croak("PL_he_root is 0");
-    victim = PL_body_roots[HE_SVSLOT];
+    victim = (HE*) PL_body_roots[HE_SVSLOT];
     PL_body_roots[HE_SVSLOT] = HeNEXT(victim);
 #endif
 
End of Patch.

Reply via email to