This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make Sys::Hostname safe against C<$SIG{CHLD}='IGNORE'> (suggested
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index b025b24..7849152 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1147,12 +1147,21 @@ S_scan_const(pTHX_ char *start)
            case 't':
                *d++ = '\t';
                break;
+#ifdef EBCDIC
+           case 'e':
+               *d++ = '\047';  /* CP 1047 */
+               break;
+           case 'a':
+               *d++ = '\057';  /* CP 1047 */
+               break;
+#else
            case 'e':
                *d++ = '\033';
                break;
            case 'a':
                *d++ = '\007';
                break;
+#endif
            } /* end switch */
 
            s++;
@@ -1512,7 +1521,7 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen)
     /* Call function. The function is expected to      */
     /* call "FILTER_READ(idx+1, buf_sv)" first.                */
     /* Return: <0:error, =0:eof, >0:not eof            */
-    return (*funcp)(aTHX_ idx, buf_sv, maxlen);
+    return (*funcp)(aTHXo_ idx, buf_sv, maxlen);
 }
 
 STATIC char *
@@ -5944,7 +5953,7 @@ Perl_scan_num(pTHX_ char *start)
     register char *d;                  /* destination in temp buffer */
     register char *e;                  /* end of temp buffer */
     I32 tryiv;                         /* used to see if it can be an int */
-    double value;                      /* number read, as a double */
+    NV value;                          /* number read, as a double */
     SV *sv;                            /* place to put the converted number */
     I32 floatit;                       /* boolean: int or float? */
     char *lastub = 0;                  /* position of last underbar */
@@ -6160,7 +6169,7 @@ Perl_scan_num(pTHX_ char *start)
           conversion at all.
        */
        tryiv = I_V(value);
-       if (!floatit && (double)tryiv == value)
+       if (!floatit && (NV)tryiv == value)
            sv_setiv(sv, tryiv);
        else
            sv_setnv(sv, value);