This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: several compilation problems on VMS in perl@32039
authorCraig A. Berry <craigberry@mac.com>
Sat, 6 Oct 2007 13:47:03 +0000 (08:47 -0500)
committerNicholas Clark <nick@ccl4.org>
Sat, 6 Oct 2007 23:50:49 +0000 (23:50 +0000)
From: "Craig A. Berry" <craig.a.berry@gmail.com>
Message-ID: <c9ab31fc0710061147x3ee7f9bdg2b1bac3acd018bb2@mail.gmail.com>
Date: Sat, 6 Oct 2007 13:47:03 -0500

p4raw-id: //depot/perl@32058

regcomp.c
toke.c
utf8.c

index d12f18b..603fe5b 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1165,14 +1165,14 @@ is the recommended Unicode-aware way of saying
     STMT_START {                                                           \
        if (UTF) {                                                         \
            SV *zlopp = newSV(2);                                          \
-           char *flrbbbbb = SvPVX(zlopp);                                 \
-           const char *const kapow = uvuni_to_utf8(flrbbbbb, uvc & 0xFF); \
+           unsigned char *flrbbbbb = (unsigned char *) SvPVX(zlopp);      \
+           unsigned const char *const kapow = uvuni_to_utf8(flrbbbbb, uvc & 0xFF); \
            SvCUR_set(zlopp, kapow - flrbbbbb);                            \
            SvPOK_on(zlopp);                                               \
            SvUTF8_on(zlopp);                                              \
            av_push(revcharmap, zlopp);                                    \
        } else {                                                           \
-           unsigned char ooooff = uvc;                                    \
+           char ooooff = uvc;                                             \
            av_push(revcharmap, newSVpvn(&ooooff, 1));                     \
        }                                                                  \
         } STMT_END
@@ -6492,7 +6492,7 @@ S_reg_namedseq(pTHX_ RExC_state_t *pRExC_state, UV *valuep)
             | PERL_SCAN_DISALLOW_PREFIX
             | (SIZE_ONLY ? PERL_SCAN_SILENT_ILLDIGIT : 0);
         UV cp;
-       unsigned char string;
+       char string;
         len = (STRLEN)(endbrace - name - 2);
         cp = grok_hex(name + 2, &len, &fl, NULL);
         if ( len != (STRLEN)(endbrace - name - 2) ) {
@@ -6504,7 +6504,7 @@ S_reg_namedseq(pTHX_ RExC_state_t *pRExC_state, UV *valuep)
             *valuep = cp;
             return NULL;
         }
-       string = (unsigned char) cp;
+       string = cp;
         sv_str= newSVpvn(&string, 1);
     } else {
         /* fetch the charnames handler for this scope */
@@ -9685,7 +9685,7 @@ S_put_byte(pTHX_ SV *sv, int c)
     if (!isPRINT(c))
        Perl_sv_catpvf(aTHX_ sv, "\\%o", c);
     else {
-       const unsigned char string = (unsigned char) c;
+       const char string = c;
        if (c == '-' || c == ']' || c == '\\' || c == '^')
            sv_catpvs(sv, "\\");
        sv_catpvn(sv, &string, 1);
diff --git a/toke.c b/toke.c
index 9b61cee..6618fa6 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -12495,7 +12495,7 @@ Perl_yyerror(pTHX_ const char *s)
        if (yychar < 32)
            Perl_sv_catpvf(aTHX_ where_sv, "^%c", toCTRL(yychar));
        else if (isPRINT_LC(yychar)) {
-           const unsigned char string = (unsigned char) yychar;
+           const char string = yychar;
            sv_catpvn(where_sv, &string, 1);
        }
        else
diff --git a/utf8.c b/utf8.c
index e9e14fc..e21cb4f 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2168,13 +2168,13 @@ Perl_pv_uni_display(pTHX_ SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV f
                 default: break;
                 }
                 if (ok) {
-                    const unsigned char string = (unsigned char) ok;
+                    const char string = ok;
                     sv_catpvn(dsv, &string, 1);
                 }
             }
             /* isPRINT() is the locale-blind version. */
             if (!ok && (flags & UNI_DISPLAY_ISPRINT) && isPRINT(c)) {
-                const unsigned char string = (unsigned char) c;
+                const char string = c;
                 sv_catpvn(dsv, &string, 1);
                 ok = 1;
             }