Change 30033 by [EMAIL PROTECTED] on 2007/01/27 16:40:35

        Integrate:
        [ 28645]
        Subject: [PATCH] g++ heavy shoveling
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Wed, 02 Aug 2006 00:04:42 +0300
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28662]
        Subject: [PATCH] g++ large patch
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Fri, 04 Aug 2006 08:58:27 +0300
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 28666]
        Restore modification in warnings.h from change 28662 by backporting it
        to warnings.pl
        
        [ 28674]
        Subject: [PATCH] g++ stage 1 reached
        From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
        Date: Tue, 08 Aug 2006 00:02:35 +0300
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.8/perl/Configure#82 integrate
... //depot/maint-5.8/perl/NetWare/config.wc#12 integrate
... //depot/maint-5.8/perl/Porting/Glossary#25 integrate
... //depot/maint-5.8/perl/Porting/config.sh#19 integrate
... //depot/maint-5.8/perl/Porting/config_H#18 integrate
... //depot/maint-5.8/perl/cflags.SH#5 integrate
... //depot/maint-5.8/perl/config_h.SH#43 integrate
... //depot/maint-5.8/perl/configure.com#47 integrate
... //depot/maint-5.8/perl/deb.c#21 integrate
... //depot/maint-5.8/perl/dump.c#72 integrate
... //depot/maint-5.8/perl/embed.fnc#200 integrate
... //depot/maint-5.8/perl/embed.h#150 integrate
... //depot/maint-5.8/perl/epoc/config.sh#14 integrate
... //depot/maint-5.8/perl/gv.c#96 integrate
... //depot/maint-5.8/perl/hints/linux.sh#13 integrate
... //depot/maint-5.8/perl/hv.c#108 integrate
... //depot/maint-5.8/perl/mathoms.c#25 integrate
... //depot/maint-5.8/perl/mg.c#141 integrate
... //depot/maint-5.8/perl/op.c#187 integrate
... //depot/maint-5.8/perl/opcode.h#23 integrate
... //depot/maint-5.8/perl/perl.h#144 integrate
... //depot/maint-5.8/perl/plan9/config.plan9#19 integrate
... //depot/maint-5.8/perl/plan9/config_h.sample#11 integrate
... //depot/maint-5.8/perl/pp_ctl.c#164 integrate
... //depot/maint-5.8/perl/pp_hot.c#124 integrate
... //depot/maint-5.8/perl/pp_pack.c#53 integrate
... //depot/maint-5.8/perl/pp_sys.c#137 integrate
... //depot/maint-5.8/perl/proto.h#191 integrate
... //depot/maint-5.8/perl/regcomp.c#95 edit
... //depot/maint-5.8/perl/regexec.c#83 integrate
... //depot/maint-5.8/perl/scope.c#63 integrate
... //depot/maint-5.8/perl/sv.c#326 integrate
... //depot/maint-5.8/perl/toke.c#157 edit
... //depot/maint-5.8/perl/uconfig.h#13 integrate
... //depot/maint-5.8/perl/uconfig.sh#17 integrate
... //depot/maint-5.8/perl/utf8.c#74 integrate
... //depot/maint-5.8/perl/util.c#135 integrate
... //depot/maint-5.8/perl/warnings.h#8 integrate
... //depot/maint-5.8/perl/warnings.pl#19 integrate
... //depot/maint-5.8/perl/win32/config.bc#24 integrate
... //depot/maint-5.8/perl/win32/config.gc#25 integrate
... //depot/maint-5.8/perl/win32/config.vc#26 integrate
... //depot/maint-5.8/perl/win32/config.vc64#26 integrate
... //depot/maint-5.8/perl/win32/config_H.bc#34 integrate
... //depot/maint-5.8/perl/win32/config_H.gc#33 integrate
... //depot/maint-5.8/perl/win32/config_H.vc#33 integrate
... //depot/maint-5.8/perl/win32/config_H.vc64#34 integrate

Differences ...

==== //depot/maint-5.8/perl/Configure#82 (xtext) ====
Index: perl/Configure
--- perl/Configure#81~30027~    2007-01-27 04:18:00.000000000 -0800
+++ perl/Configure      2007-01-27 08:40:35.000000000 -0800
@@ -373,6 +373,7 @@
 d_cmsghdr_s=''
 d_const=''
 d_copysignl=''
+d_cplusplus=''
 cryptlib=''
 d_crypt=''
 crypt_r_proto=''
@@ -7136,6 +7137,32 @@
 set d_gnulibc
 eval $setvar
 
+echo " "
+echo "Checking for C++..." >&4
+cat >try.c <<'EOCP'
+#include <stdio.h>
+int main(void)
+{
+#ifdef __cplusplus
+    printf("define\n");
+#else
+    printf("undef\n");
+#endif
+    return 0;
+}
+EOCP
+set try
+if eval $compile_ok && $run ./try > cplusplus; then
+       val=`$cat cplusplus`
+       echo "You are using a C++ compiler."
+else
+       val="$undef"
+       echo "You are not using a C++ compiler."
+fi
+$rm -f try try.* cplusplus
+set d_cplusplus
+eval $setvar
+
 : see if nm is to be used to determine whether a symbol is defined or not
 case "$usenm" in
 '')
@@ -7585,10 +7612,20 @@
 
 : see if dlopen exists
 xxx_runnm="$runnm"
+xxx_ccflags="$ccflags"
 runnm=false
+: with g++ one needs -shared to get is-in-libc to work for dlopen
+case "$gccversion" in
+'')    ;;
+*)     case "$d_cplusplus" in
+       "$define") ccflags="$ccflags -shared" ;;
+       esac
+       ;;
+esac
 set dlopen d_dlopen
 eval $inlibc
 runnm="$xxx_runnm"
+ccflags="$xxx_ccflags"
 
 : see if this is a unistd.h system
 set unistd.h i_unistd
@@ -10845,7 +10882,7 @@
 int main()
 {
        const char *foo;
-       const spug y;
+       const spug y = { 0 };
 }
 EOCP
 if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
@@ -21328,6 +21365,7 @@
 d_cmsghdr_s='$d_cmsghdr_s'
 d_const='$d_const'
 d_copysignl='$d_copysignl'
+d_cplusplus='$d_cplusplus'
 d_crypt='$d_crypt'
 d_crypt_r='$d_crypt_r'
 d_csh='$d_csh'

==== //depot/maint-5.8/perl/NetWare/config.wc#12 (text) ====
Index: perl/NetWare/config.wc
--- perl/NetWare/config.wc#11~28443~    2006-06-27 15:39:26.000000000 -0700
+++ perl/NetWare/config.wc      2007-01-27 08:40:35.000000000 -0800
@@ -124,6 +124,7 @@
 d_cmsghdr_s='undef'
 d_const='define'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/Porting/Glossary#25 (text) ====
Index: perl/Porting/Glossary
--- perl/Porting/Glossary#24~28443~     2006-06-27 15:39:26.000000000 -0700
+++ perl/Porting/Glossary       2007-01-27 08:40:35.000000000 -0800
@@ -534,6 +534,11 @@
        indicates to the C program that this C compiler knows about the
        const type.
 
+d_cplusplus (d_cplusplus.U):
+       This variable conditionally defines the USE_CPLUSPLUS symbol, which
+       indicates that a C++ compiler was used to compiled Perl and will be
+       used to compile extensions.
+
 d_copysignl (d_copysignl.U):
        This variable conditionally defines the HAS_COPYSIGNL symbol, which
        indicates to the C program that the copysignl() routine is available.

==== //depot/maint-5.8/perl/Porting/config.sh#19 (text) ====
Index: perl/Porting/config.sh
--- perl/Porting/config.sh#18~28443~    2006-06-27 15:39:26.000000000 -0700
+++ perl/Porting/config.sh      2007-01-27 08:40:35.000000000 -0800
@@ -137,6 +137,7 @@
 d_cmsghdr_s='define'
 d_const='define'
 d_copysignl='define'
+d_cplusplus='undef'
 d_crypt='define'
 d_crypt_r='undef'
 d_csh='define'

==== //depot/maint-5.8/perl/Porting/config_H#18 (text) ====
Index: perl/Porting/config_H
--- perl/Porting/config_H#17~24262~     2005-04-20 09:30:39.000000000 -0700
+++ perl/Porting/config_H       2007-01-27 08:40:35.000000000 -0800
@@ -3393,7 +3393,234 @@
 /*#define      USE_SOCKS               / **/
 #endif
 
-/* HAS_DRAND48_PROTO:
+/* USE_ITHREADS:
+ *     This symbol, if defined, indicates that Perl should be built to
+ *     use the interpreter-based threading implementation.
+ */
+/* USE_5005THREADS:
+ *     This symbol, if defined, indicates that Perl should be built to
+ *     use the 5.005-based threading implementation.
+ */
+/* OLD_PTHREADS_API:
+ *     This symbol, if defined, indicates that Perl should
+ *     be built to use the old draft POSIX threads API.
+ */
+/* USE_REENTRANT_API:
+ *     This symbol, if defined, indicates that Perl should
+ *     try to use the various _r versions of library functions.
+ *     This is extremely experimental.
+ */
+/*#define      USE_5005THREADS         / **/
+/*#define      USE_ITHREADS            / **/
+#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
+#define                USE_THREADS             /* until src is revised*/
+#endif
+/*#define      OLD_PTHREADS_API                / **/
+/*#define      USE_REENTRANT_API       / **/
+
+/* PERL_VENDORARCH:
+ *     If defined, this symbol contains the name of a private library.
+ *     The library is private in the sense that it needn't be in anyone's
+ *     execution path, but it should be accessible by the world.
+ *     It may have a ~ on the front.
+ *     The standard distribution will put nothing in this directory.
+ *     Vendors who distribute perl may wish to place their own
+ *     architecture-dependent modules and extensions in this directory with
+ *             MakeMaker Makefile.PL INSTALLDIRS=vendor
+ *     or equivalent.  See INSTALL for details.
+ */
+/* PERL_VENDORARCH_EXP:
+ *     This symbol contains the ~name expanded version of PERL_VENDORARCH, to 
be used
+ *     in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+/*#define PERL_VENDORARCH ""           / **/
+/*#define PERL_VENDORARCH_EXP ""               / **/
+
+/* PERL_VENDORLIB_EXP:
+ *     This symbol contains the ~name expanded version of VENDORLIB, to be used
+ *     in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+/* PERL_VENDORLIB_STEM:
+ *     This define is PERL_VENDORLIB_EXP with any trailing version-specific 
component
+ *     removed.  The elements in inc_version_list (inc_version_list.U) can
+ *     be tacked onto this variable to generate a list of directories to 
search.
+ */
+/*#define PERL_VENDORLIB_EXP ""                / **/
+/*#define PERL_VENDORLIB_STEM ""               / **/
+
+/* VOIDFLAGS:
+ *     This symbol indicates how much support of the void type is given by this
+ *     compiler.  What various bits mean:
+ *
+ *         1 = supports declaration of void
+ *         2 = supports arrays of pointers to functions returning void
+ *         4 = supports comparisons between pointers to void functions and
+ *                 addresses of void functions
+ *         8 = suports declaration of generic void pointers
+ *
+ *     The package designer should define VOIDUSED to indicate the requirements
+ *     of the package.  This can be done either by #defining VOIDUSED before
+ *     including config.h, or by defining defvoidused in Myinit.U.  If the
+ *     latter approach is taken, only those flags will be tested.  If the
+ *     level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int               /* is void to be avoided? */
+#define M_VOID                 /* Xenix strikes again */
+#endif
+
+/* HASATTRIBUTE_FORMAT:
+ *     Can we handle GCC attribute for checking printf-style formats
+ */
+/* HASATTRIBUTE_MALLOC:
+ *     Can we handle GCC attribute for malloc-style functions.
+ */
+/* HASATTRIBUTE_NONNULL:
+ *     Can we handle GCC attribute for nonnull function parms.
+ */
+/* HASATTRIBUTE_NORETURN:
+ *     Can we handle GCC attribute for functions that do not return
+ */
+/* HASATTRIBUTE_PURE:
+ *     Can we handle GCC attribute for pure functions
+ */
+/* HASATTRIBUTE_UNUSED:
+ *     Can we handle GCC attribute for unused variables and arguments
+ */
+/* HASATTRIBUTE_WARN_UNUSED_RESULT:
+ *     Can we handle GCC attribute for warning on unused results
+ */
+#define HASATTRIBUTE_FORMAT    /**/
+#define HASATTRIBUTE_NORETURN  /**/
+#define HASATTRIBUTE_MALLOC    /**/
+#define HASATTRIBUTE_NONNULL   /**/
+#define HASATTRIBUTE_PURE      /**/
+#define HASATTRIBUTE_UNUSED    /**/
+#define HASATTRIBUTE_WARN_UNUSED_RESULT        /**/
+
+/* HAS_CRYPT:
+ *     This symbol, if defined, indicates that the crypt routine is available
+ *     to encrypt passwords and the like.
+ */
+#define HAS_CRYPT              /**/
+
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ *     This symbol, if defined, indicates that the bug that prevents
+ *     setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ *     This symbol, if defined, indicates that the C program should
+ *     check the script that it is executing for setuid/setgid bits, and
+ *     attempt to emulate setuid/setgid on systems that have disabled
+ *     setuid #! scripts because the kernel can't do it securely.
+ *     It is up to the package designer to make sure that this emulation
+ *     is done securely.  Among other things, it should do an fstat on
+ *     the script it just opened to make sure it really is a setuid/setgid
+ *     script, it should make sure the arguments passed correspond exactly
+ *     to the argument on the #! line, and it should not trust any
+ *     subprocesses to which it must pass the filename rather than the
+ *     file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW        / **/
+/*#define DOSUID               / **/
+
+/* Shmat_t:
+ *     This symbol holds the return type of the shmat() system call.
+ *     Usually set to 'void *' or 'char *'.
+ */
+/* HAS_SHMAT_PROTOTYPE:
+ *     This symbol, if defined, indicates that the sys/shm.h includes
+ *     a prototype for shmat().  Otherwise, it is up to the program to
+ *     guess one.  Shmat_t shmat(int, Shmat_t, int) is a good guess,
+ *     but not always right so it should be emitted by the program only
+ *     when HAS_SHMAT_PROTOTYPE is not defined to avoid conflicting defs.
+ */
+#define Shmat_t void * /**/
+#define HAS_SHMAT_PROTOTYPE    /**/
+
+/* I_NDBM:
+ *     This symbol, if defined, indicates that <ndbm.h> exists and should
+ *     be included.
+ */
+/*#define I_NDBM       / **/
+
+/* I_STDARG:
+ *     This symbol, if defined, indicates that <stdarg.h> exists and should
+ *     be included.
+ */
+/* I_VARARGS:
+ *     This symbol, if defined, indicates to the C program that it should
+ *     include <varargs.h>.
+ */
+#define I_STDARG               /**/
+/*#define I_VARARGS    / **/
+
+/* CAN_PROTOTYPE:
+ *     If defined, this macro indicates that the C compiler can handle
+ *     function prototypes.
+ */
+/* _:
+ *     This macro is used to declare function parameters for folks who want
+ *     to make declarations with prototypes using a different style than
+ *     the above macros.  Use double parentheses.  For example:
+ *
+ *             int main _((int argc, char *argv[]));
+ */
+#define        CAN_PROTOTYPE   /**/
+#ifdef CAN_PROTOTYPE
+#define        _(args) args
+#else
+#define        _(args) ()
+#endif
+
+/* SH_PATH:
+ *     This symbol contains the full pathname to the shell used on this
+ *     on this system to execute Bourne shell scripts.  Usually, this will be
+ *     /bin/sh, though it's possible that some systems will have /bin/ksh,
+ *     /bin/pdksh, /bin/ash, /bin/bash, or even something such as
+ *     D:/bin/sh.exe.
+ */
+#define SH_PATH "/bin/sh"  /**/
+
+/* HAS_AINTL:
+ *     This symbol, if defined, indicates that the aintl routine is
+ *     available.  If copysignl is also present we can emulate modfl.
+ */
+/*#define HAS_AINTL            / **/
+
+/* HAS_BUILTIN_CHOOSE_EXPR:
+ *     Can we handle GCC builtin for compile-time ternary-like expressions
+ */
+/* HAS_BUILTIN_EXPECT:
+ *     Can we handle GCC builtin for telling that certain values are more
+ *     likely
+ */
+/*#define HAS_BUILTIN_EXPECT   / **/
+#define HAS_BUILTIN_CHOOSE_EXPR        /**/
+
+/* HAS_CLEARENV:
+ *     This symbol, if defined, indicates that the clearenv () routine is
+ *     available for use.
+ */
+#define HAS_CLEARENV           /**/
+
+/* HAS_COPYSIGNL:
+ *     This symbol, if defined, indicates that the copysignl routine is
+ *     available.  If aintl is also present we can emulate modfl.
+ */
+#define HAS_COPYSIGNL          /**/
+
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
+/* HAS_DBMINIT_PROTO:
  *     This symbol, if defined, indicates that the system provides
  *     a prototype for the drand48() function.  Otherwise, it is up
  *     to the program to supply one.  A good guess is

==== //depot/maint-5.8/perl/cflags.SH#5 (xtext) ====
Index: perl/cflags.SH
--- perl/cflags.SH#4~30031~     2007-01-27 07:26:35.000000000 -0800
+++ perl/cflags.SH      2007-01-27 08:40:35.000000000 -0800
@@ -88,9 +88,19 @@
     ;;
 esac
 
+# If we have g++, we cannot have the -Wdeclaration-after-statement.
+# Some g++s accept it but then whine about it with every file.
+case "$cc" in
+*g++*) warn="`echo $warn|sed 's/-Wdeclaration-after-statement/ /'`" ;;
+esac
 
+# stdflags currently unused.
 stdflags=''
 
+extra=''
+
+# Code to set any extra flags here.
+
 echo "Extracting cflags (with variable substitutions)"
 : This section of the file will have variable substitutions done on it.
 : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
@@ -104,6 +114,8 @@
 warn="$warn"
 # Extra standardness.
 stdflags="$stdflags"
+# Extra extra.
+extra="$extra"
 
 !GROK!THIS!
 
@@ -212,9 +224,13 @@
     *) ;;
     esac
 
+case "$cc" in
+*g++*) ccflags="`echo $ccflags|sed 's/-Wdeclaration-after-statement/ /'`" ;;
+esac
+
     : Can we perhaps use $ansi2knr here
-    echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn"
-    eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn"'
+    echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
+    eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn 
$extra"'
 
     . $TOP/config.sh
 

==== //depot/maint-5.8/perl/config_h.SH#43 (text) ====
Index: perl/config_h.SH
--- perl/config_h.SH#42~28443~  2006-06-27 15:39:26.000000000 -0700
+++ perl/config_h.SH    2007-01-27 08:40:35.000000000 -0800
@@ -1266,6 +1266,12 @@
  */
 #$d_copysignl HAS_COPYSIGNL            /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+#$d_cplusplus USE_CPLUSPLUS            /**/
+
 /* HAS_CRYPT:
  *     This symbol, if defined, indicates that the crypt routine is available
  *     to encrypt passwords and the like.

==== //depot/maint-5.8/perl/configure.com#47 (text) ====
Index: perl/configure.com
--- perl/configure.com#46~28443~        2006-06-27 15:39:26.000000000 -0700
+++ perl/configure.com  2007-01-27 08:40:35.000000000 -0800
@@ -5665,6 +5665,7 @@
 $ WC "d_cmsghdr_s='undef'"
 $ WC "d_const='define'"
 $ WC "d_copysignl='define'"
+$ WC "d_cplusplus='undef'"
 $ WC "d_crypt='define'"
 $ WC "d_csh='undef'"
 $ WC "d_cuserid='define'"

==== //depot/maint-5.8/perl/embed.h#150 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#149~30021~     2007-01-26 11:23:54.000000000 -0800
+++ perl/embed.h        2007-01-27 08:40:35.000000000 -0800
@@ -1317,7 +1317,6 @@
 #define to_utf8_substr         S_to_utf8_substr
 #define to_byte_substr         S_to_byte_substr
 #endif
-#define debug_start_match      S_debug_start_match
 #endif
 #if defined(PERL_IN_DUMP_C) || defined(PERL_DECL_PROT)
 #ifdef PERL_CORE

==== //depot/maint-5.8/perl/epoc/config.sh#14 (text) ====
Index: perl/epoc/config.sh
--- perl/epoc/config.sh#13~28443~       2006-06-27 15:39:26.000000000 -0700
+++ perl/epoc/config.sh 2007-01-27 08:40:35.000000000 -0800
@@ -129,6 +129,7 @@
 d_cmsghdr_s='undef'
 d_const='define'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/gv.c#96 (text) ====
Index: perl/gv.c
--- perl/gv.c#95~30026~ 2007-01-27 03:02:43.000000000 -0800
+++ perl/gv.c   2007-01-27 08:40:35.000000000 -0800
@@ -79,7 +79,8 @@
          * if it walks like a dirhandle, then let's assume that
          * this is a dirhandle.
          */
-        const char *fh = PL_op->op_type == OP_READDIR ||
+       const char * const fh =
+                        PL_op->op_type ==  OP_READDIR ||
                          PL_op->op_type ==  OP_TELLDIR ||
                          PL_op->op_type ==  OP_SEEKDIR ||
                          PL_op->op_type ==  OP_REWINDDIR ||
@@ -303,6 +304,7 @@
     GV** gvp;
     CV* cv;
     const char *hvname;
+    HV* lastchance = NULL;
 
     /* UNIVERSAL methods should be callable without a stash */
     if (!stash) {
@@ -390,7 +392,7 @@
     /* if at top level, try UNIVERSAL */
 
     if (level == 0 || level == -1) {
-       HV* const lastchance = gv_stashpvs("UNIVERSAL", FALSE);
+       lastchance = gv_stashpvs("UNIVERSAL", FALSE);
 
        if (lastchance) {
            if ((gv = gv_fetchmeth(lastchance, name, len,

==== //depot/maint-5.8/perl/hints/linux.sh#13 (text) ====
Index: perl/hints/linux.sh
--- perl/hints/linux.sh#12~29847~       2007-01-17 04:30:43.000000000 -0800
+++ perl/hints/linux.sh 2007-01-27 08:40:35.000000000 -0800
@@ -112,6 +112,7 @@
 /* Test for whether ELF binaries are produced */
 #include <fcntl.h>
 #include <stdlib.h>
+#include <unistd.h>
 main() {
        char buffer[4];
        int i=open("a.out",O_RDONLY);
@@ -332,3 +333,14 @@
     libswanted="$*"
     ;;
 esac
+
+# If we are using g++ we must use nm and force ourselves to use
+# the /usr/lib/libc.a (resetting the libc below to an empty string
+# makes Configure to look for the right one) because the symbol
+# scanning tricks of Configure will crash and burn horribly.
+case "$cc" in
+*g++*) usenm=true
+       libc=''
+       ;;
+esac
+

==== //depot/maint-5.8/perl/hv.c#108 (text) ====
Index: perl/hv.c
--- perl/hv.c#107~29993~        2007-01-26 01:15:17.000000000 -0800
+++ perl/hv.c   2007-01-27 08:40:35.000000000 -0800
@@ -66,7 +66,7 @@
     LOCK_SV_MUTEX;
     if (!*root)
        S_more_he(aTHX);
-    he = *root;
+    he = (HE*) *root;
     assert(he);
     *root = HeNEXT(he);
     UNLOCK_SV_MUTEX;

==== //depot/maint-5.8/perl/mg.c#141 (text) ====
Index: perl/mg.c
--- perl/mg.c#140~30026~        2007-01-27 03:02:43.000000000 -0800
+++ perl/mg.c   2007-01-27 08:40:35.000000000 -0800
@@ -2814,7 +2814,7 @@
 #endif
                   EXTEND(SP, 2);
                   PUSHs((SV*)rv);
-                  PUSHs(newSVpv((void*)sip, sizeof(*sip)));
+                  PUSHs(newSVpv((char *)sip, sizeof(*sip)));
              }
 
               va_end(args);
@@ -2883,10 +2883,10 @@
            /* downgrade public flags to private,
               and discard any other private flags */
 
-           const U32 public = SvFLAGS(sv) & (SVf_IOK|SVf_NOK|SVf_POK);
-           if (public) {
-               SvFLAGS(sv) &= ~( public | (SVp_IOK|SVp_NOK|SVp_POK) );
-               SvFLAGS(sv) |= ( public << PRIVSHIFT );
+           const U32 pubflags = SvFLAGS(sv) & (SVf_IOK|SVf_NOK|SVf_POK);
+           if (pubflags) {
+               SvFLAGS(sv) &= ~( pubflags | (SVp_IOK|SVp_NOK|SVp_POK) );
+               SvFLAGS(sv) |= ( pubflags << PRIVSHIFT );
            }
        }
     }

==== //depot/maint-5.8/perl/op.c#187 (text) ====
Index: perl/op.c
--- perl/op.c#186~30023~        2007-01-26 13:52:35.000000000 -0800
+++ perl/op.c   2007-01-27 08:40:35.000000000 -0800
@@ -1823,7 +1823,7 @@
     {
       const char * const desc
          = PL_op_desc[(rtype == OP_SUBST || rtype == OP_TRANS)
-            ? rtype : OP_MATCH];
+                      ? (int)rtype : OP_MATCH];
       const char * const sample = ((ltype == OP_RV2AV || ltype == OP_PADAV)
             ? "@array" : "%hash");
       Perl_warner(aTHX_ packWARN(WARN_MISC),

==== //depot/maint-5.8/perl/perl.h#144 (text) ====
Index: perl/perl.h
--- perl/perl.h#143~30023~      2007-01-26 13:52:35.000000000 -0800
+++ perl/perl.h 2007-01-27 08:40:35.000000000 -0800
@@ -294,7 +294,10 @@
 #  endif
 #endif
 
-#if defined(PERL_GCC_PEDANTIC)
+/* gcc (-ansi) -pedantic doesn't allow gcc brace groups,
+ * g++ allows them but seems to have problems with them
+ * (insane errors ensue). */
+#if defined(PERL_GCC_PEDANTIC) || (defined(__GNUC__) && defined(__cplusplus))
 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #  endif
@@ -5550,7 +5553,38 @@
 #include "patchlevel.h"
 #undef PERL_PATCHLEVEL_H_IMPLICIT
 
-/* Mention
+/* These are used by Perl_pv_escape() and Perl_pv_pretty() 
+ * are here so that they are available throughout the core 
+ * NOTE that even though some are for _escape and some for _pretty
+ * there must not be any clashes as the flags from _pretty are
+ * passed straight through to _escape.
+ */
+
+#define PERL_PV_ESCAPE_QUOTE        0x0001
+#define PERL_PV_PRETTY_QUOTE        PERL_PV_ESCAPE_QUOTE
+
+
+#define PERL_PV_PRETTY_ELIPSES      0x0002
+#define PERL_PV_PRETTY_LTGT         0x0004
+
+#define PERL_PV_ESCAPE_FIRSTCHAR    0x0008
+
+#define PERL_PV_ESCAPE_UNI          0x0100     
+#define PERL_PV_ESCAPE_UNI_DETECT   0x0200
+
+#define PERL_PV_ESCAPE_ALL         0x1000
+#define PERL_PV_ESCAPE_NOBACKSLASH  0x2000
+#define PERL_PV_ESCAPE_NOCLEAR      0x4000
+
+/* used by pv_display in dump.c*/
+#define PERL_PV_PRETTY_DUMP  PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_QUOTE
+#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_LTGT
+
+/*
+
+   (KEEP THIS LAST IN perl.h!)
+
+   Mention
 
    NV_PRESERVES_UV
 
@@ -5590,34 +5624,11 @@
 
    HAS_DIRFD
 
-   so that Configure picks them up. */
-
-/* These are used by Perl_pv_escape() and Perl_pv_pretty() 
- * are here so that they are available throughout the core 
- * NOTE that even though some are for _escape and some for _pretty
- * there must not be any clashes as the flags from _pretty are
- * passed straight through to _escape.
- */
-
-#define PERL_PV_ESCAPE_QUOTE        0x0001
-#define PERL_PV_PRETTY_QUOTE        PERL_PV_ESCAPE_QUOTE
-
-
-#define PERL_PV_PRETTY_ELIPSES      0x0002
-#define PERL_PV_PRETTY_LTGT         0x0004
-
-#define PERL_PV_ESCAPE_FIRSTCHAR    0x0008
-
-#define PERL_PV_ESCAPE_UNI          0x0100     
-#define PERL_PV_ESCAPE_UNI_DETECT   0x0200
+   so that Configure picks them up.
 
-#define PERL_PV_ESCAPE_ALL         0x1000
-#define PERL_PV_ESCAPE_NOBACKSLASH  0x2000
-#define PERL_PV_ESCAPE_NOCLEAR      0x4000
+   (KEEP THIS LAST IN perl.h!)
 
-/* used by pv_display in dump.c*/
-#define PERL_PV_PRETTY_DUMP  PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_QUOTE
-#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELIPSES|PERL_PV_PRETTY_LTGT
+*/
 
 /* Source code compatibility cruft:
    PERL_XS_APIVERSION is not used, and has been superseded by inc_version_list

==== //depot/maint-5.8/perl/plan9/config.plan9#19 (text) ====
Index: perl/plan9/config.plan9
--- perl/plan9/config.plan9#18~26909~   2006-01-18 12:14:06.000000000 -0800
+++ perl/plan9/config.plan9     2007-01-27 08:40:35.000000000 -0800
@@ -3831,6 +3831,12 @@
  */
 /*#define HAS_COPYSIGNL                /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
 /* HAS_DBMINIT_PROTO:
  *     This symbol, if defined, indicates that the system provides
  *     a prototype for the dbminit() function.  Otherwise, it is up

==== //depot/maint-5.8/perl/plan9/config_h.sample#11 (text) ====
Index: perl/plan9/config_h.sample
--- perl/plan9/config_h.sample#10~23578~        2004-11-30 08:56:12.000000000 
-0800
+++ perl/plan9/config_h.sample  2007-01-27 08:40:35.000000000 -0800
@@ -3776,6 +3776,12 @@
  */
 /*#define HAS_COPYSIGNL                /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
 /* HAS_DBMINIT_PROTO:
  *     This symbol, if defined, indicates that the system provides
  *     a prototype for the dbminit() function.  Otherwise, it is up

==== //depot/maint-5.8/perl/pp_ctl.c#164 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#163~30007~    2007-01-26 05:50:55.000000000 -0800
+++ perl/pp_ctl.c       2007-01-27 08:40:35.000000000 -0800
@@ -738,17 +738,23 @@
        case FF_0DECIMAL:
            arg = *fpc++;
 #if defined(USE_LONG_DOUBLE)
-           fmt = (arg & 256) ? "%#0*.*" PERL_PRIfldbl : "%0*.*" PERL_PRIfldbl;
+           fmt = (const char *)
+               ((arg & 256) ?
+                "%#0*.*" PERL_PRIfldbl : "%0*.*" PERL_PRIfldbl);
 #else
-           fmt = (arg & 256) ? "%#0*.*f"              : "%0*.*f";
+           fmt = (const char *)
+               ((arg & 256) ?
+                "%#0*.*f"              : "%0*.*f");
 #endif
            goto ff_dec;
        case FF_DECIMAL:
            arg = *fpc++;
 #if defined(USE_LONG_DOUBLE)
-           fmt = (arg & 256) ? "%#*.*" PERL_PRIfldbl : "%*.*" PERL_PRIfldbl;
+           fmt = (const char *)
+               ((arg & 256) ? "%#*.*" PERL_PRIfldbl : "%*.*" PERL_PRIfldbl);
 #else
-            fmt = (arg & 256) ? "%#*.*f"              : "%*.*f";
+            fmt = (const char *)
+               ((arg & 256) ? "%#*.*f"              : "%*.*f");
 #endif
        ff_dec:
            /* If the field is marked with ^ and the value is undefined,
@@ -1375,7 +1381,7 @@
            if (CxTYPE(cx) != CXt_EVAL) {
                if (!message)
                    message = (char *)SvPVx_const(ERRSV, msglen);
-               PerlIO_write(Perl_error_log, "panic: die ", 11);
+               PerlIO_write(Perl_error_log, (const char *)"panic: die ", 11);
                PerlIO_write(Perl_error_log, message, msglen);
                my_exit(1);
            }
@@ -1585,7 +1591,7 @@
 PP(pp_reset)
 {
     dSP;
-    const char * const tmps = (MAXARG < 1) ? "" : POPpconstx;
+    const char * const tmps = (MAXARG < 1) ? (const char *)"" : POPpconstx;
     sv_reset((char *)tmps, CopSTASH(PL_curcop));
     PUSHs(&PL_sv_yes);
     RETURN;
@@ -3947,7 +3953,8 @@
                    take = umaxlen;
                }
            } else {
-               const char *const first_nl = memchr(cache_p, '\n', cache_len);
+               const char *const first_nl =
+                   (const char *)memchr(cache_p, '\n', cache_len);
                if (first_nl) {
                    take = first_nl + 1 - cache_p;
                }
@@ -4019,7 +4026,8 @@
                prune_from = got_p + umaxlen;
            }
        } else {
-           const char *const first_nl = memchr(got_p, '\n', got_len);
+           const char *const first_nl =
+               (const char *)memchr(got_p, '\n', got_len);
            if (first_nl && first_nl + 1 < got_p + got_len) {
                /* There's a second line here... */
                prune_from = first_nl + 1;

==== //depot/maint-5.8/perl/pp_hot.c#124 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#123~30023~    2007-01-26 13:52:35.000000000 -0800
+++ perl/pp_hot.c       2007-01-27 08:40:35.000000000 -0800
@@ -1923,7 +1923,9 @@
            /* string increment */
            register SV* cur = cx->blk_loop.iterlval;
            STRLEN maxlen = 0;
-           const char *max = SvOK((SV*)av) ? SvPV_const((SV*)av, maxlen) : "";
+           const char *max =
+             SvOK((SV*)av) ?
+             SvPV_const((SV*)av, maxlen) : (const char *)"";
            if (!SvNIOK(cur) && SvCUR(cur) <= maxlen) {
 #ifndef USE_5005THREADS                          /* don't risk potential race 
*/
                if (SvREFCNT(*itersvp) == 1 && !SvMAGICAL(*itersvp)) {

==== //depot/maint-5.8/perl/pp_pack.c#53 (text) ====
Index: perl/pp_pack.c
--- perl/pp_pack.c#52~29993~    2007-01-26 01:15:17.000000000 -0800
+++ perl/pp_pack.c      2007-01-27 08:40:35.000000000 -0800
@@ -62,7 +62,7 @@
        (symptr)->grpend   = NULL;      \
        (symptr)->code     = 0;         \
        (symptr)->length   = 0;         \
-       (symptr)->howlen   = 0;         \
+       (symptr)->howlen   = e_no_len;  \
        (symptr)->level    = 0;         \
        (symptr)->flags    = (f);       \
        (symptr)->strbeg   = 0;         \
@@ -790,7 +790,7 @@
 
 static const char *_action( const tempsym_t* symptr )
 {
-    return ( symptr->flags & FLAG_PACK ) ? "pack" : "unpack";
+    return (const char *)(( symptr->flags & FLAG_PACK ) ? "pack" : "unpack");
 }
 
 /* Returns the sizeof() struct described by pat */
@@ -2178,7 +2178,7 @@
              * algorithm, the code will be character-set independent
              * (and just as fast as doing character arithmetic)
              */
-            if (PL_uudmap['M'] == 0) {
+            if (PL_uudmap[(U8)'M'] == 0) {
                size_t i;
 
                for (i = 0; i < sizeof(PL_uuemap); ++i)
@@ -2187,7 +2187,7 @@
                  * Because ' ' and '`' map to the same value,
                  * we need to decode them both the same.
                  */
-                PL_uudmap[' '] = 0;
+                PL_uudmap[(U8)' '] = 0;
             }
            {
                 const STRLEN l = (STRLEN) (strend - s) * 3 / 4;

==== //depot/maint-5.8/perl/pp_sys.c#137 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#136~30026~    2007-01-27 03:02:43.000000000 -0800
+++ perl/pp_sys.c       2007-01-27 08:40:35.000000000 -0800
@@ -1257,6 +1257,7 @@
     register IO *io;
     GV *fgv;
     CV *cv;
+    SV * tmpsv = NULL;
 
     if (MAXARG == 0)
        gv = PL_defoutgv;
@@ -1280,8 +1281,8 @@
 
     cv = GvFORM(fgv);
     if (!cv) {
-       SV * const tmpsv = sv_newmortal();
        const char *name;
+       tmpsv = sv_newmortal();
        gv_efullname4(tmpsv, fgv, NULL, FALSE);
        name = SvPV_nolen_const(tmpsv);
        if (name && *name)
@@ -1608,7 +1609,7 @@
        buffer = SvGROW(bufsv, (STRLEN)(length+1));
        /* 'offset' means 'flags' here */
        count = PerlSock_recvfrom(PerlIO_fileno(IoIFP(io)), buffer, length, 
offset,
-                         (struct sockaddr *)namebuf, &bufsize);
+                                 (struct sockaddr *)namebuf, &bufsize);
        if (count < 0)
            RETPUSHUNDEF;
 #ifdef EPOC
@@ -2769,7 +2770,7 @@
 PP(pp_stat)
 {
     dSP;
-    GV *gv;
+    GV *gv = NULL;
     I32 gimme;
     I32 max = 13;
 
@@ -4571,7 +4572,7 @@
        STRLEN addrlen;
        Netdb_host_t addr = (Netdb_host_t) SvPVbyte(addrsv, addrlen);
 
-       hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
+       hent = PerlSock_gethostbyaddr((const void*)addr, (Netdb_hlen_t) 
addrlen, addrtype);
 #else
        DIE(aTHX_ PL_no_sock_func, "gethostbyaddr");
 #endif

==== //depot/maint-5.8/perl/regcomp.c#95 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#94~30023~    2007-01-26 13:52:35.000000000 -0800
+++ perl/regcomp.c      2007-01-27 08:40:35.000000000 -0800
@@ -508,7 +508,7 @@
            return 1;
     if (!(cl->flags & ANYOF_UNICODE_ALL))
        return 0;
-    if (!ANYOF_BITMAP_TESTALLSET(cl))
+    if (!ANYOF_BITMAP_TESTALLSET((const void*)cl))
        return 0;
     return 1;
 }
@@ -2611,10 +2611,10 @@
     register char *next;
     I32 flags;
     const char * const origparse = RExC_parse;
-    char *maxpos;
     I32 min;
     I32 max = REG_INFTY;
     char *parse_start;
+    const char *maxpos = NULL;
 
     ret = regatom(pRExC_state, &flags);
     if (ret == NULL) {
@@ -4613,9 +4613,10 @@
                      (IV)r->float_min_offset, (UV)r->float_max_offset);
     if (r->check_substr || r->check_utf8)
        PerlIO_printf(Perl_debug_log,
-                     r->check_substr == r->float_substr
-                     && r->check_utf8 == r->float_utf8
-                     ? "(checking floating" : "(checking anchored");
+                     (const char *)
+                     (r->check_substr == r->float_substr
+                      && r->check_utf8 == r->float_utf8
+                      ? "(checking floating" : "(checking anchored"));
     if (r->reganch & ROPT_NOSCAN)
        PerlIO_printf(Perl_debug_log, " noscan");
     if (r->reganch & ROPT_CHECK_ALL)

==== //depot/maint-5.8/perl/regexec.c#83 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#82~30023~    2007-01-26 13:52:35.000000000 -0800
+++ perl/regexec.c      2007-01-27 08:40:35.000000000 -0800
@@ -2057,6 +2057,8 @@
 #endif
     U32 uniflags = ckWARN(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY;
 
+    I32 parenfloor = 0;
+
 #ifdef DEBUGGING
     PL_regindent++;
 #endif
@@ -2869,8 +2871,8 @@
                CURCUR cc;
                CHECKPOINT cp = PL_savestack_ix;
                /* No need to save/restore up to this paren */
-               I32 parenfloor = scan->flags;
-
+               parenfloor = scan->flags;
+               
                /* Dave says:
                   
                   CURLYX and WHILEM are always paired: they're the moral

==== //depot/maint-5.8/perl/sv.c#326 (text) ====
Index: perl/sv.c
--- perl/sv.c#325~30026~        2007-01-27 03:02:43.000000000 -0800
+++ perl/sv.c   2007-01-27 08:40:35.000000000 -0800
@@ -1419,7 +1419,7 @@
                return s;
            } else
 #endif
-           s = saferealloc(s, newlen);
+           s = (char*)saferealloc(s, newlen);
        }
        else {
            /* sv_force_normal_flags() must not try to unshare the new
@@ -1428,7 +1428,7 @@
                SvFAKE_off(sv);
                SvREADONLY_off(sv);
            }
-           s = safemalloc(newlen);
+           s = (char*)safemalloc(newlen);
            if (SvPVX_const(sv) && SvCUR(sv)) {
                Move(SvPVX_const(sv), s, (newlen < SvCUR(sv)) ? newlen : 
SvCUR(sv), char);
            }
@@ -2604,7 +2604,7 @@
                s = SvGROW_mutable(sv, len + 1);
                SvCUR_set(sv, len);
                SvPOKp_on(sv);
-               return memcpy(s, tbuf, len + 1);
+               return (char*)memcpy(s, tbuf, len + 1);
            }
        }
         if (SvROK(sv)) {
@@ -3208,9 +3208,10 @@
                                         || sv_cmp(cv_const_sv(cv),
                                                   cv_const_sv((CV*)sref))))) {
                            Perl_warner(aTHX_ packWARN(WARN_REDEFINE),
-                                       CvCONST(cv)
-                                       ? "Constant subroutine %s::%s redefined"
-                                       : "Subroutine %s::%s redefined",
+                                       (const char *)
+                                       (CvCONST(cv)
+                                        ? "Constant subroutine %s::%s 
redefined"
+                                        : "Subroutine %s::%s redefined"),
                                        HvNAME_get(GvSTASH((GV*)dstr)),
                                        GvENAME((GV*)dstr));
                        }
@@ -3659,7 +3660,7 @@
        /* It's long enough - do nothing.
           Specfically Perl_newCONSTSUB is relying on this.  */
     } else {
-       ptr = saferealloc (ptr, allocate);
+       ptr = (char*) saferealloc (ptr, allocate);
     }
     SvPV_set(sv, ptr);
     SvCUR_set(sv, len);

==== //depot/maint-5.8/perl/toke.c#157 (text) ====
Index: perl/toke.c
--- perl/toke.c#156~30023~      2007-01-26 13:52:35.000000000 -0800
+++ perl/toke.c 2007-01-27 08:40:35.000000000 -0800
@@ -1441,9 +1441,10 @@
 #endif
 
     const char * const leaveit = /* set of acceptably-backslashed characters */
-       PL_lex_inpat
-           ? "[EMAIL PROTECTED]|()-nrtfeaxcz0123456789[{]} \t\n\r\f\v#"
-           : "";
+       (const char *)
+       (PL_lex_inpat
+        ? "[EMAIL PROTECTED]|()-nrtfeaxcz0123456789[{]} \t\n\r\f\v#"
+        : "");
 
     if (PL_lex_inwhat == OP_TRANS && PL_sublex_info.sub_op) {
        /* If we are doing a trans and we know we want UTF8 set expectation */
@@ -2002,13 +2003,15 @@
     /* return the substring (via yylval) only if we parsed anything */
     if (s > PL_bufptr) {
        if ( PL_hints & ( PL_lex_inpat ? HINT_NEW_RE : HINT_NEW_STRING ) )
-           sv = new_constant(start, s - start, (PL_lex_inpat ? "qr" : "q"),
+           sv = new_constant(start, s - start,
+                             (const char *)(PL_lex_inpat ? "qr" : "q"),
                              sv, NULL,
-                             ( PL_lex_inwhat == OP_TRANS
-                               ? "tr"
-                               : ( (PL_lex_inwhat == OP_SUBST && !PL_lex_inpat)
-                                   ? "s"
-                                   : "qq")));
+                             (const char *)
+                             (( PL_lex_inwhat == OP_TRANS
+                                ? "tr"
+                                : ( (PL_lex_inwhat == OP_SUBST && 
!PL_lex_inpat)
+                                    ? "s"
+                                    : "qq"))));
        yylval.opval = (OP*)newSVOP(OP_CONST, 0, sv);
     } else
        SvREFCNT_dec(sv);
@@ -2122,7 +2125,7 @@
                if (s[1]) {
                    if (strchr("wds]",s[1]))
                        weight += 100;
-                   else if (seen['\''] || seen['"'])
+                   else if (seen[(U8)'\''] || seen[(U8)'"'])
                        weight += 1;
                    else if (strchr("rnftbxcav",s[1]))
                        weight += 40;
@@ -2548,6 +2551,13 @@
     STRLEN len;
     bool bof = FALSE;
 
+    /* orig_keyword, gvp, and gv are initialized here because
+     * jump to the label just_a_word_zero can bypass their
+     * initialization later. */
+    I32 orig_keyword = 0;
+    GV *gv = NULL;
+    GV **gvp = NULL;
+
     DEBUG_T( {
        SV* tmp = newSVpvs("");
        PerlIO_printf(Perl_debug_log, "### %"IVdf":LEX_%s/X%s %s\n",
@@ -2776,9 +2786,9 @@
            PL_last_uni = 0;
            PL_last_lop = 0;
            if (PL_lex_brackets) {
-               yyerror(PL_lex_formbrack
-                   ? "Format not terminated"
-                   : "Missing right curly or square bracket");
+               yyerror((PL_lex_formbrack
+                        ? "Format not terminated"
+                        : "Missing right curly or square bracket"));
            }
             DEBUG_T( { PerlIO_printf(Perl_debug_log,
                         "### Tokener got EOF\n");
@@ -2865,8 +2875,10 @@
                    PL_doextract = FALSE;
                }
                if (!PL_in_eval && (PL_minus_n || PL_minus_p)) {
-                   sv_setpv(PL_linestr,PL_minus_p
-                            ? ";}continue{print;}" : ";}");
+                   sv_setpv(PL_linestr,
+                            (const char *)
+                            (PL_minus_p
+                             ? ";}continue{print;}" : ";}"));
                    PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = 
SvPVX(PL_linestr);
                    PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
                    PL_last_lop = PL_last_uni = NULL;
@@ -3453,10 +3465,10 @@
                       context messages from yyerror().
                    */
                    PL_bufptr = s;
-                   yyerror( *s
-                            ? Perl_form(aTHX_ "Invalid separator character "
-                                        "%c%c%c in attribute list", q, *s, q)
-                            : "Unterminated attribute list" );
+                   yyerror( (*s
+                             ? Perl_form(aTHX_ "Invalid separator character "
+                                         "%c%c%c in attribute list", q, *s, q)
+                             : "Unterminated attribute list" ) );
                    if (attrs)
                        op_free(attrs);
                    OPERATOR(':');
@@ -4190,9 +4202,10 @@
 
       keylookup: {
        I32 tmp;
-       I32 orig_keyword = 0;
-       GV *gv = NULL;
-       GV **gvp = NULL;
+
+       orig_keyword = 0;
+       gv = NULL;
+       gvp = NULL;
 
        PL_bufptr = s;
        s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len);
@@ -4516,8 +4529,10 @@
                        while (*proto == ';')
                            proto++;
                        if (*proto == '&' && *s == '{') {
-                           sv_setpv(PL_subname, PL_curstash ?
-                                       "__ANON__" : "__ANON__::__ANON__");
+                           sv_setpv(PL_subname,
+                                    (const char *)
+                                    (PL_curstash ?
+                                     "__ANON__" : "__ANON__::__ANON__"));
                            PREBLOCK(LSTOPSUB);
                        }
                    }
@@ -5555,7 +5570,8 @@
                }
                if (!have_name) {
                    sv_setpv(PL_subname,
-                       PL_curstash ? "__ANON__" : "__ANON__::__ANON__");
+                            (const char *)
+                            (PL_curstash ? "__ANON__" : "__ANON__::__ANON__"));
                    TOKEN(ANONSUB);
                }
                (void) force_word(PL_oldbufptr + tboffset, WORD,
@@ -9200,9 +9216,10 @@
     if (!table || !(PL_hints & HINT_LOCALIZE_HH)) {
        SV *msg;
        
-       why2 = strEQ(key,"charnames")
-              ? "(possibly a missing \"use charnames ...\")"
-              : "";
+       why2 = (const char *)
+           (strEQ(key,"charnames")
+            ? "(possibly a missing \"use charnames ...\")"
+            : "");
        msg = Perl_newSVpvf(aTHX_ "Constant(%s) unknown: %s",
                            (type ? type: "undef"), why2);
 
@@ -9428,7 +9445,9 @@
                s++;
            if ((*s == '[' || (*s == '{' && strNE(dest, "sub")))) {
                if (ckWARN(WARN_AMBIGUOUS) && keyword(dest, d - dest)) {
-                   const char * const brack = (*s == '[') ? "[...]" : "{...}";
+                   const char * const brack =
+                       (const char *)
+                       ((*s == '[') ? "[...]" : "{...}");
                    Perl_warner(aTHX_ packWARN(WARN_AMBIGUOUS),
                        "Ambiguous use of %c{%s%s} resolved to %c%s%s",
                        funny, dest, brack, funny, dest, brack);
@@ -9504,13 +9523,16 @@
 {
     PMOP *pm;
     char *s = scan_str(start,FALSE,FALSE);
-    const char * const valid_flags = (type == OP_QR) ? "iomsx" : "iogcmsx";
+    const char * const valid_flags =
+       (const char *)((type == OP_QR) ? "iomsx" : "iogcmsx");
 
     if (!s) {
        const char * const delimiter = skipspace(start);
-       Perl_croak(aTHX_ *delimiter == '?'
-                  ? "Search pattern not terminated or ternary operator parsed 
as search pattern"
-                  : "Search pattern not terminated" );
+       Perl_croak(aTHX_
+                  (const char *)
+                  (*delimiter == '?'
+                   ? "Search pattern not terminated or ternary operator parsed 
as search pattern"
+                   : "Search pattern not terminated" ));
     }
 
     pm = (PMOP*)newPMOP(type, 0);
@@ -9585,7 +9607,7 @@
        PL_multi_end = 0;
        pm->op_pmflags |= PMf_EVAL;
        while (es-- > 0)
-           sv_catpv(repl, es ? "eval " : "do ");
+           sv_catpv(repl, (const char *)(es ? "eval " : "do "));
        sv_catpvs(repl, "{");
        sv_catsv(repl, PL_lex_repl);
        if (strchr(SvPVX(PL_lex_repl), '#'))
@@ -9730,7 +9752,7 @@
        s = olds;
     }
 #endif
-    if ( outer || !(found_newline = memchr(s, '\n', PL_bufend - s)) ) {
+    if ( outer || !(found_newline = (char*)memchr((void*)s, '\n', PL_bufend - 
s)) ) {
         herewas = newSVpvn(s,PL_bufend-s);
     }
     else {
@@ -10723,7 +10745,9 @@
 
        if ( floatit ? (PL_hints & HINT_NEW_FLOAT) :
                       (PL_hints & HINT_NEW_INTEGER) )
-           sv = new_constant(PL_tokenbuf, d - PL_tokenbuf,
+           sv = new_constant(PL_tokenbuf,
+                             d - PL_tokenbuf,
+                             (const char *)
                              (floatit ? "float" : "integer"),
                              sv, NULL, NULL);
        break;

==== //depot/maint-5.8/perl/uconfig.h#13 (text) ====
Index: perl/uconfig.h
--- perl/uconfig.h#12~29974~    2007-01-25 09:04:16.000000000 -0800
+++ perl/uconfig.h      2007-01-27 08:40:35.000000000 -0800
@@ -349,13 +349,6 @@
  */
 /*#define HAS_PIPE             / **/
 
-/* HAS_POLL:
- *     This symbol, if defined, indicates that the poll routine is
- *     available to poll active file descriptors. You may safely
- *     include <poll.h> when this symbol is defined.
- */
-/*#define HAS_POLL             / **/
-
 /* HAS_READDIR:
  *     This symbol, if defined, indicates that the readdir routine is
  *     available to read directory entries. You may have to include
@@ -1174,6 +1167,11 @@
 /*#define HAS_BUILTIN_EXPECT   / **/
 /*#define HAS_BUILTIN_CHOOSE_EXPR      / **/
 
+/* HAS_C99_VARIADIC_MACROS:
+ *     If defined, the compiler supports C99 variadic macros.
+ */
+/*#define      HAS_C99_VARIADIC_MACROS / **/
+
 /* CASTI32:
  *     This symbol is defined if the C compiler can cast negative
  *     or large floating point numbers to 32-bit ints.
@@ -1237,6 +1235,12 @@
  */
 /*#define HAS_COPYSIGNL                / **/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                / **/
+
 /* HAS_CRYPT:
  *     This symbol, if defined, indicates that the crypt routine is available
  *     to encrypt passwords and the like.
@@ -3475,7 +3479,7 @@
 
 /* I_POLL:
  *     This symbol, if defined, indicates that <poll.h> exists and
- *     should be included.
+ *     should be included. (see also HAS_POLL)
  */
 /*#define      I_POLL          / **/
 
@@ -4396,4 +4400,11 @@
 #define M_VOID                 /* Xenix strikes again */
 #endif
 
+/* HAS_POLL:
+ *     This symbol, if defined, indicates that the poll routine is
+ *     available to poll active file descriptors. You may safely
+ *     include <poll.h> when both this symbol *and* I_POLL are defined.
+ */
+/*#define HAS_POLL             / **/
+
 #endif

==== //depot/maint-5.8/perl/uconfig.sh#17 (xtext) ====
Index: perl/uconfig.sh
--- perl/uconfig.sh#16~29974~   2007-01-25 09:04:16.000000000 -0800
+++ perl/uconfig.sh     2007-01-27 08:40:35.000000000 -0800
@@ -67,6 +67,7 @@
 d_cmsghdr_s='undef'
 d_const='undef'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/utf8.c#74 (text) ====
Index: perl/utf8.c
--- perl/utf8.c#73~30023~       2007-01-26 13:52:35.000000000 -0800
+++ perl/utf8.c 2007-01-27 08:40:35.000000000 -0800
@@ -523,7 +523,7 @@
 
     if (flags & UTF8_CHECK_ONLY) {
        if (retlen)
-           *retlen = -1;
+           *retlen = ((STRLEN) -1);
        return 0;
     }
 
@@ -651,6 +651,7 @@
 Perl_utf8_length(pTHX_ U8 *s, U8 *e)
 {
     STRLEN len = 0;
+    U8 t = 0;
 
     /* Note: cannot use UTF8_IS_...() too eagerly here since e.g.
      * the bitops (especially ~) can create illegal UTF-8.
@@ -659,7 +660,7 @@
     if (e < s)
        goto warn_and_return;
     while (s < e) {
-       const U8 t = UTF8SKIP(s);
+       t = UTF8SKIP(s);
        if (e - s < t) {
            warn_and_return:
            if (ckWARN_d(WARN_UTF8)) {
@@ -756,7 +757,7 @@
         if (!UTF8_IS_INVARIANT(c) &&
             (!UTF8_IS_DOWNGRADEABLE_START(c) || (s >= send)
             || !(c = *s++) || !UTF8_IS_CONTINUATION(c))) {
-            *len = -1;
+            *len = ((STRLEN) -1);
             return 0;
         }
     }

==== //depot/maint-5.8/perl/util.c#135 (text) ====
Index: perl/util.c
--- perl/util.c#134~30007~      2007-01-26 05:50:55.000000000 -0800
+++ perl/util.c 2007-01-27 08:40:35.000000000 -0800
@@ -876,8 +876,8 @@
     else {
        char *newaddr;
        const STRLEN pvlen = strlen(pv)+1;
-       Newx(newaddr,pvlen,char);
-       return memcpy(newaddr,pv,pvlen);
+       Newx(newaddr, pvlen, char);
+       return (char*)memcpy(newaddr, pv, pvlen);
     }
 }
 
@@ -933,7 +933,7 @@
     if (!newaddr) {
        return write_no_mem();
     }
-    return memcpy(newaddr,pv,pvlen);
+    return (char*)memcpy(newaddr, pv, pvlen);
 }
 
 /*
@@ -3685,7 +3685,8 @@
 
     if (op == OP_phoney_OUTPUT_ONLY || op == OP_phoney_INPUT_ONLY) {
        if (ckWARN(WARN_IO)) {
-           const char * const direction = (op == OP_phoney_INPUT_ONLY) ? "in" 
: "out";
+           const char * const direction =
+               (const char *)((op == OP_phoney_INPUT_ONLY) ? "in" : "out");
            if (name && *name)
                Perl_warner(aTHX_ packWARN(WARN_IO),
                            "Filehandle %s opened only for %sput",
@@ -3709,15 +3710,19 @@
        }
 
        if (ckWARN(warn_type)) {
-           const char * const pars = OP_IS_FILETEST(op) ? "" : "()";
+           const char * const pars =
+               (const char *)(OP_IS_FILETEST(op) ? "" : "()");
            const char * const func =
-               op == OP_READLINE   ? "readline"  :     /* "<HANDLE>" not nice 
*/
-               op == OP_LEAVEWRITE ? "write" :         /* "write exit" not 
nice */
-               op < 0              ? "" :              /* handle phoney cases 
*/
-               PL_op_desc[op];
-           const char * const type = OP_IS_SOCKET(op)
-                   || (gv && io && IoTYPE(io) == IoTYPE_SOCKET)
-                       ?  "socket" : "filehandle";
+               (const char *)
+               (op == OP_READLINE   ? "readline"  :    /* "<HANDLE>" not nice 
*/
+                op == OP_LEAVEWRITE ? "write" :                /* "write exit" 
not nice */
+                op < 0              ? "" :              /* handle phoney cases 
*/
+                PL_op_desc[op]);
+           const char * const type =
+               (const char *)
+               (OP_IS_SOCKET(op) ||
+                (gv && io && IoTYPE(io) == IoTYPE_SOCKET) ?
+                "socket" : "filehandle");
            if (name && *name) {
                Perl_warner(aTHX_ packWARN(warn_type),
                            "%s%s on %s %s %s", func, pars, vile, type, name);

==== //depot/maint-5.8/perl/win32/config.bc#24 (text) ====
Index: perl/win32/config.bc
--- perl/win32/config.bc#23~28443~      2006-06-27 15:39:26.000000000 -0700
+++ perl/win32/config.bc        2007-01-27 08:40:35.000000000 -0800
@@ -126,6 +126,7 @@
 d_cmsghdr_s='undef'
 d_const='define'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/win32/config.gc#25 (text) ====
Index: perl/win32/config.gc
--- perl/win32/config.gc#24~28443~      2006-06-27 15:39:26.000000000 -0700
+++ perl/win32/config.gc        2007-01-27 08:40:35.000000000 -0800
@@ -126,6 +126,7 @@
 d_cmsghdr_s='undef'
 d_const='define'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/win32/config.vc#26 (text) ====
Index: perl/win32/config.vc
--- perl/win32/config.vc#25~28443~      2006-06-27 15:39:26.000000000 -0700
+++ perl/win32/config.vc        2007-01-27 08:40:35.000000000 -0800
@@ -126,6 +126,7 @@
 d_cmsghdr_s='undef'
 d_const='define'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/win32/config.vc64#26 (text) ====
Index: perl/win32/config.vc64
--- perl/win32/config.vc64#25~28443~    2006-06-27 15:39:26.000000000 -0700
+++ perl/win32/config.vc64      2007-01-27 08:40:35.000000000 -0800
@@ -126,6 +126,7 @@
 d_cmsghdr_s='undef'
 d_const='define'
 d_copysignl='undef'
+d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'

==== //depot/maint-5.8/perl/win32/config_H.bc#34 (text+w) ====
Index: perl/win32/config_H.bc
--- perl/win32/config_H.bc#33~28442~    2006-06-27 15:20:20.000000000 -0700
+++ perl/win32/config_H.bc      2007-01-27 08:40:35.000000000 -0800
@@ -3852,6 +3852,12 @@
  */
 /*#define HAS_CLEARENV         /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
 /* HAS_COPYSIGNL:
  *     This symbol, if defined, indicates that the copysignl routine is
  *     available.  If aintl is also present we can emulate modfl.

==== //depot/maint-5.8/perl/win32/config_H.gc#33 (text+w) ====
Index: perl/win32/config_H.gc
--- perl/win32/config_H.gc#32~28442~    2006-06-27 15:20:20.000000000 -0700
+++ perl/win32/config_H.gc      2007-01-27 08:40:35.000000000 -0800
@@ -3862,6 +3862,12 @@
  */
 /*#define HAS_COPYSIGNL                /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
 /* HAS_DBMINIT_PROTO:
  *     This symbol, if defined, indicates that the system provides
  *     a prototype for the dbminit() function.  Otherwise, it is up

==== //depot/maint-5.8/perl/win32/config_H.vc#33 (text+w) ====
Index: perl/win32/config_H.vc
--- perl/win32/config_H.vc#32~28442~    2006-06-27 15:20:20.000000000 -0700
+++ perl/win32/config_H.vc      2007-01-27 08:40:35.000000000 -0800
@@ -3858,6 +3858,12 @@
  */
 /*#define HAS_COPYSIGNL                /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
 /* HAS_DBMINIT_PROTO:
  *     This symbol, if defined, indicates that the system provides
  *     a prototype for the dbminit() function.  Otherwise, it is up

==== //depot/maint-5.8/perl/win32/config_H.vc64#34 (text) ====
Index: perl/win32/config_H.vc64
--- perl/win32/config_H.vc64#33~28442~  2006-06-27 15:20:20.000000000 -0700
+++ perl/win32/config_H.vc64    2007-01-27 08:40:35.000000000 -0800
@@ -3858,6 +3858,12 @@
  */
 /*#define HAS_COPYSIGNL                /**/
 
+/* USE_CPLUSPLUS:
+ *     This symbol, if defined, indicates that a C++ compiler was
+ *     used to compiled Perl and will be used to compile extensions.
+ */
+/*#define USE_CPLUSPLUS                /**/
+
 /* HAS_DBMINIT_PROTO:
  *     This symbol, if defined, indicates that the system provides
  *     a prototype for the dbminit() function.  Otherwise, it is up
End of Patch.

Reply via email to