From: Steve Peters <steve@fisharerojo.org>
Date: Wed, 9 Aug 2006 21:54:08 +0000 (+0000)
Subject: A couple const's and a cast to get Sun CC to compile these files.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3fcec1f5f130b835b047ac0302818509dc560b9;p=p5sagit%2Fp5-mst-13.2.git

A couple const's and a cast to get Sun CC to compile these files.
Perl, however, still will not build with the Sun CC.

p4raw-id: //depot/perl@28686
---

diff --git a/op.c b/op.c
index 300ac85..c9f6171 100644
--- a/op.c
+++ b/op.c
@@ -7303,7 +7303,7 @@ Perl_ck_subr(pTHX_ OP *o)
     int optional = 0;
     I32 arg = 0;
     I32 contextclass = 0;
-    char *e = NULL;
+    const char *e = NULL;
     bool delete_op = 0;
 
     o->op_private |= OPpENTERSUB_HASTARG;
diff --git a/pp_sort.c b/pp_sort.c
index 0c5f5c1..dfcdac4 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1695,9 +1695,9 @@ PP(pp_sort)
 			    : ( overloading ? S_amagic_ncmp : S_sv_ncmp ) )
 			: ( IN_LOCALE_RUNTIME
 			    ? ( overloading
-				? S_amagic_cmp_locale
-				: sv_cmp_locale_static)
-			    : ( overloading ? S_amagic_cmp : sv_cmp_static)),
+				? (SVCOMPARE_t)S_amagic_cmp_locale
+				: (SVCOMPARE_t)sv_cmp_locale_static)
+			    : ( overloading ? (SVCOMPARE_t)S_amagic_cmp : (SVCOMPARE_t)sv_cmp_static)),
 		    sort_flags);
 	}
 	if ((priv & OPpSORT_REVERSE) != 0) {
diff --git a/toke.c b/toke.c
index 03bc682..a1bd2c4 100644
--- a/toke.c
+++ b/toke.c
@@ -11414,7 +11414,7 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
 {
     dVAR;
     SV *sv;				/* scalar value: string */
-    char *tmps;				/* temp string, used for delimiter matching */
+    const char *tmps;			/* temp string, used for delimiter matching */
     register char *s = start;		/* current position in the buffer */
     register char term;			/* terminating character */
     register char *to;			/* current position in the sv's data */