summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-08-02 16:09:13 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-08-02 16:09:13 +0000
commit278c13c7a02cfcf5092ee32363fbfa172ec7ccf9 (patch)
treef4c669b9f0142195b8ea1b99393207621e550cc2
parent5d58f1a92168968c093316c4719952933de10724 (diff)
parent6e58d65cdee942efacbebb436841cff48d4c4061 (diff)
downloadperl-278c13c7a02cfcf5092ee32363fbfa172ec7ccf9.tar.gz
integrate cfgperl contents into mainline
p4raw-id: //depot/perl@3892
-rw-r--r--Changes19
-rwxr-xr-xConfigure54
-rw-r--r--MANIFEST1
-rw-r--r--config_h.SH5
-rw-r--r--dump.c3
-rw-r--r--hints/aix.sh10
-rw-r--r--op.c6
-rw-r--r--pod/perlfunc.pod38
-rw-r--r--pp_hot.c3
-rw-r--r--pp_sys.c3
-rw-r--r--regcomp.c16
-rw-r--r--sv.c31
-rwxr-xr-xt/io/open.t4
-rw-r--r--t/op/64bit.t147
-rwxr-xr-xt/pragma/utf8.t16
-rw-r--r--t/pragma/warn/pp_hot12
-rw-r--r--util.c3
17 files changed, 318 insertions, 53 deletions
diff --git a/Changes b/Changes
index 771db28a5c..9631a6ec7d 100644
--- a/Changes
+++ b/Changes
@@ -79,6 +79,25 @@ Version 5.005_59 Development release working toward 5.006
----------------
____________________________________________________________________________
+[ 3879] By: gsar on 1999/08/02 08:18:58
+ Log: integrate cfgperl changes into mainline
+ Branch: perl
+ !> Configure config_h.SH sv.c
+____________________________________________________________________________
+[ 3878] By: gsar on 1999/08/02 08:13:16
+ Log: change#3692 had an unintentional patch leak through!
+ (this would explain the mysterious C<next LABEL> failures
+ people have seen)
+ Branch: perl
+ ! pp_ctl.c
+____________________________________________________________________________
+[ 3877] By: gsar on 1999/08/02 08:00:29
+ Log: up patchlevel to 59
+ Branch: perl
+ ! Changes patchlevel.h pod/perlhist.pod win32/Makefile
+ ! win32/config_H.bc win32/config_H.gc win32/config_H.vc
+ ! win32/makefile.mk
+____________________________________________________________________________
[ 3876] By: gsar on 1999/08/02 07:51:18
Log: fix coredump under usethreads+debug
Branch: perl
diff --git a/Configure b/Configure
index 6d937e1fc3..bd158a4232 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Aug 2 10:49:27 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Mon Aug 2 17:42:55 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -6709,8 +6709,7 @@ $rm -f try.c try
echo " "
-case "$d_longlong" in
-$define)
+if $test X"$intsize" = X8 -o X"$longsize" = X8 -o X"$d_int64t" = X"$define" -o X"$d_longlong" = X"$define"; then
echo "Checking how to print 64-bit integers..." >&4
@@ -6790,7 +6789,7 @@ if $test X"$sPRId64" = X -a X"$d_longlong" = X"$define" -a X"$longlongsize" = X8
#include <sys/types.h>
#include <stdio.h>
int main() {
- long long q = 12345678901;
+ long long q = 12345678901LL; /* AIX cc requires the LL prefix. */
printf("%lld\n", q);
}
EOCP
@@ -6855,8 +6854,9 @@ if $test X"$sPRId64" = X; then
echo "Cannot figure out how to print 64-bit integers." >&4
fi
-;;
-esac # case "$d_longlong"
+$rm -f try try.*
+
+fi # intsize -o longsize -o d_int64t -o d_longlong
case "$sPRId64" in
'') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
@@ -6867,8 +6867,6 @@ case "$sPRId64" in
;;
esac
-$rm -f try try.*
-
: check for length of double
echo " "
case "$doublesize" in
@@ -6944,8 +6942,7 @@ $rm -f try.c try
echo " "
-case "$d_longdbl" in
-$define)
+if $test X"$d_longdbl" = X"$define"; then
echo "Checking how to print long doubles..." >&4
@@ -6977,7 +6974,7 @@ if $test X"$sPRIfldbl" = X; then
#include <stdio.h>
int main() {
long double d = 123.456;
- printf("%.3Lf\n", d);
+ printf("%.3llf\n", d);
}
EOCP
set try
@@ -6985,21 +6982,25 @@ EOCP
yyy=`./try$exe_ext`
case "$yyy" in
123.456)
- sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
- sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"';
- echo "We will use %Lf."
+ sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
+ sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
+ echo "We will use %llf."
;;
esac
fi
fi
if $test X"$sPRIfldbl" = X; then
+ echo "Cannot figure out how to print long doubles." >&4
+fi
+
+if $test X"$sPRIfldbl" = X; then
$cat >try.c <<'EOCP'
#include <sys/types.h>
#include <stdio.h>
int main() {
long double d = 123.456;
- printf("%.3lf\n", d);
+ printf("%.3Lf\n", d);
}
EOCP
set try
@@ -7007,9 +7008,9 @@ EOCP
yyy=`./try$exe_ext`
case "$yyy" in
123.456)
- sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
- sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
- echo "We will use %lf."
+ sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
+ sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"';
+ echo "We will use %Lf."
;;
esac
fi
@@ -7021,7 +7022,7 @@ if $test X"$sPRIfldbl" = X; then
#include <stdio.h>
int main() {
long double d = 123.456;
- printf("%.3llf\n", d);
+ printf("%.3lf\n", d);
}
EOCP
set try
@@ -7029,20 +7030,17 @@ EOCP
yyy=`./try$exe_ext`
case "$yyy" in
123.456)
- sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
- sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
- echo "We will use %llf."
+ sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
+ sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
+ echo "We will use %lf."
;;
esac
fi
fi
-if $test X"$sPRIfldbl" = X; then
- echo "Cannot figure out how to print long doubles." >&4
-fi
+$rm -f try try.*
-;;
-esac # case "$d_longdbl"
+fi # d_longdbl
case "$sPRIfldbl" in
'') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
@@ -7053,8 +7051,6 @@ case "$sPRIfldbl" in
;;
esac
-$rm -f try try.*
-
: Initialize h_fcntl
h_fcntl=false
diff --git a/MANIFEST b/MANIFEST
index 6dacdd6480..d8fe430044 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1195,6 +1195,7 @@ t/lib/tie-stdhandle.t Test for Tie::StdHandle
t/lib/tie-stdpush.t Test for Tie::StdArray
t/lib/timelocal.t See if Time::Local works
t/lib/trig.t See if Math::Trig works
+t/op/64bit.t See if 64 bitness works
t/op/append.t See if . works
t/op/arith.t See if arithmetic works
t/op/array.t See if array operations work
diff --git a/config_h.SH b/config_h.SH
index b022aa631f..41b4ccc841 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -2490,12 +2490,17 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
* This symbol, if defined, contains the string used by stdio to
* format 64-bit unsigned decimal numbers (format 'u') for output.
*/
+/* PERL_PRIo64:
+ * This symbol, if defined, contains the string used by stdio to
+ * format 64-bit octal numbers (format 'o') for output.
+ */
/* PERL_PRIx64:
* This symbol, if defined, contains the string used by stdio to
* format 64-bit hexadecimal numbers (format 'x') for output.
*/
#$d_PRId64 PERL_PRId64 $sPRId64 /**/
#$d_PRIu64 PERL_PRIu64 $sPRIu64 /**/
+#$d_PRIo64 PERL_PRIo64 $sPRIo64 /**/
#$d_PRIx64 PERL_PRIx64 $sPRIx64 /**/
/* SELECT_MIN_BITS:
diff --git a/dump.c b/dump.c
index f49c8c2509..8735db3f0b 100644
--- a/dump.c
+++ b/dump.c
@@ -1188,8 +1188,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
I32 ix;
for (ix = 1; ix <= AvFILL(pad_name); ix++) {
- if (SvPOK(pname[ix]))
#ifdef IV_IS_QUAD
+ if (SvPOK(pname[ix]))
Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */
file,
"%5d. 0x%" PERL_PRIx64 " (%s\"%s\" %" PERL_PRId64 "-%" PERL_PRId64 ")\n",
@@ -1199,6 +1199,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
(IV)SvNVX(pname[ix]),
(IV)SvIVX(pname[ix]));
#else
+ if (SvPOK(pname[ix]))
Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */
file,
"%5d. 0x%lx (%s\"%s\" %ld-%ld)\n",
diff --git a/hints/aix.sh b/hints/aix.sh
index 9b155e7bdf..0f9553a5c7 100644
--- a/hints/aix.sh
+++ b/hints/aix.sh
@@ -183,10 +183,14 @@ EOM
exit 1
;;
esac
- ccflags="$ccflags `getconf XBS5_LPBIG_OFFBIG_CFLAGS`"
+ ccflags="$ccflags `getconf XBS5_LPBIG_OFFBIG_CFLAGS 2>/dev/null`"
ccflags="$ccflags -DUSE_LONG_LONG"
+ case "$cc" in
+ *c89) ccflags="$ccflags -qlonglong" ;;
+ # Plus AIX also requires LL prefixes for all long long constants.
+ esac
- ldflags="$ldflags `getconf XBS5_LPBIG_OFFBIG_LDFLAGS`"
+ ldflags="$ldflags `getconf XBS5_LPBIG_OFFBIG_LDFLAGS 2>/dev/null`"
# _Somehow_ in AIX 4.3.1.0 the above getconf call manages to
# insert(?) *something* to $ldflags so that later (in Configure) evaluating
# $ldflags causes a newline after the '-b64' (the result of the getconf).
@@ -197,7 +201,7 @@ EOM
# AIX managed to break. --jhi
ldflags="`echo $ldflags`"
- libswanted="$libswanted `getconf XBS5_LPBIG_OFFBIG_LIBS|sed -e 's@^-l@@' -e 's@ -l@ @g'`"
+ libswanted="$libswanted `getconf XBS5_LPBIG_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g'`"
# When a 64-bit cc becomes available $archname64
# may need setting so that $archname gets it attached.
;;
diff --git a/op.c b/op.c
index d847e3db3b..313cce7dc5 100644
--- a/op.c
+++ b/op.c
@@ -4798,12 +4798,13 @@ Perl_ck_fun(pTHX_ OP *o)
char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
OP *newop = newAVREF(newGVOP(OP_GV, 0,
gv_fetchpv(name, TRUE, SVt_PVAV) ));
- if (ckWARN(WARN_SYNTAX))
#ifdef IV_IS_QUAD
+ if (ckWARN(WARN_SYNTAX))
Perl_warner(aTHX_ WARN_SYNTAX,
"Array @%s missing the @ in argument %" PERL_PRId64 " of %s()",
name, (IV)numargs, PL_op_desc[type]);
#else
+ if (ckWARN(WARN_SYNTAX))
Perl_warner(aTHX_ WARN_SYNTAX,
"Array @%s missing the @ in argument %ld of %s()",
name, (long)numargs, PL_op_desc[type]);
@@ -4824,12 +4825,13 @@ Perl_ck_fun(pTHX_ OP *o)
char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
OP *newop = newHVREF(newGVOP(OP_GV, 0,
gv_fetchpv(name, TRUE, SVt_PVHV) ));
- if (ckWARN(WARN_SYNTAX))
#ifdef IV_IS_QUAD
+ if (ckWARN(WARN_SYNTAX))
Perl_warner(aTHX_ WARN_SYNTAX,
"Hash %%%s missing the %% in argument %" PERL_PRId64 " of %s()",
name, (IV)numargs, PL_op_desc[type]);
#else
+ if (ckWARN(WARN_SYNTAX))
Perl_warner(aTHX_ WARN_SYNTAX,
"Hash %%%s missing the %% in argument %ld of %s()",
name, (long)numargs, PL_op_desc[type]);
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 13ada36574..aa55e3e48b 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4114,6 +4114,44 @@ If C<use locale> is in effect, the character used for the decimal
point in formatted real numbers is affected by the LC_NUMERIC locale.
See L<perllocale>.
+If Perl understands "quads" (64-bit integers) (this requires
+either that the platform natively supports quads or that Perl
+has been specifically compiled to support quads), the flags
+
+ d u o x X b i D U O
+
+print quads, and they may optionally be preceded by
+
+ ll L q
+
+For example
+
+ %lld %16LX %qo
+
+You can find out whether your Perl supports quads via L<Config>:
+
+ use Config;
+ ($Config{use64bits} eq 'define' || $Config{longsize} == 8) &&
+ print "quads\n";
+
+If Perl understands "long doubles" (this requires that the platform
+supports long doubles), the flags
+
+ e f g E F G
+
+may optionally be preceded by
+
+ ll L
+
+For example
+
+ %llf %Lg
+
+You can find out whether your Perl supports long doubles via L<Config>:
+
+ use Config;
+ $Config{d_longdbl} eq 'define' && print "long doubles\n";
+
=item sqrt EXPR
=item sqrt
diff --git a/pp_hot.c b/pp_hot.c
index c5df5e0db6..38658d18f1 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -588,11 +588,12 @@ PP(pp_rv2hv)
dTARGET;
if (SvTYPE(hv) == SVt_PVAV)
hv = avhv_keys((AV*)hv);
- if (HvFILL(hv))
#ifdef IV_IS_QUAD
+ if (HvFILL(hv))
Perl_sv_setpvf(aTHX_ TARG, "%" PERL_PRId64 "/%" PERL_PRId64,
(Quad_t)HvFILL(hv), (Quad_t)HvMAX(hv) + 1);
#else
+ if (HvFILL(hv))
Perl_sv_setpvf(aTHX_ TARG, "%ld/%ld",
(long)HvFILL(hv), (long)HvMAX(hv) + 1);
#endif
diff --git a/pp_sys.c b/pp_sys.c
index c07b18dc44..e081d676fb 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -816,12 +816,13 @@ PP(pp_untie)
if (ckWARN(WARN_UNTIE)) {
MAGIC * mg ;
if (mg = SvTIED_mg(sv, how)) {
- if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)
#ifdef IV_IS_QUAD
+ if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)
Perl_warner(aTHX_ WARN_UNTIE,
"untie attempted while %" PERL_PRIu64 " inner references still exist",
(UV)SvREFCNT(SvRV(mg->mg_obj)) - 1 ) ;
#else
+ if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)
Perl_warner(aTHX_ WARN_UNTIE,
"untie attempted while %lu inner references still exist",
(unsigned long)SvREFCNT(SvRV(mg->mg_obj)) - 1 ) ;
diff --git a/regcomp.c b/regcomp.c
index fac31e6991..3fc298fc5a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -698,7 +698,11 @@ S_study_chunk(pTHX_ regnode **scanp, I32 *deltap, regnode *last, scan_data_t *da
FAIL("variable length lookbehind not implemented");
}
else if (minnext > U8_MAX) {
+#ifdef UV_IS_QUAD
+ FAIL2("lookbehind longer than %" PERL_PRIu64 " not implemented", (UV)U8_MAX);
+#else
FAIL2("lookbehind longer than %d not implemented", U8_MAX);
+#endif
}
scan->flags = minnext;
}
@@ -2830,8 +2834,13 @@ S_regclassutf8(pTHX)
if (range) {
if (lastvalue > value)
FAIL("invalid [] range in regexp");
+#ifdef UV_IS_QUAD
+ if (!SIZE_ONLY)
+ Perl_sv_catpvf(aTHX_ listsv, "%04" PERL_PRIx64 "\t%04" PERL_PRIx64 "\n", (UV)lastvalue, (UV)value);
+#else
if (!SIZE_ONLY)
- Perl_sv_catpvf(aTHX_ listsv, "%04x\t%04x\n", lastvalue, value);
+ Perl_sv_catpvf(aTHX_ listsv, "%04x\t%04x\n", lastvalue, value);
+#endif
lastvalue = value;
range = 0;
}
@@ -2843,8 +2852,13 @@ S_regclassutf8(pTHX)
range = 1;
continue; /* do it next time */
}
+#ifdef UV_IS_QUAD
+ if (!SIZE_ONLY)
+ Perl_sv_catpvf(aTHX_ listsv, "%04" PERL_PRIx64 "\n", (UV)value);
+#else
if (!SIZE_ONLY)
Perl_sv_catpvf(aTHX_ listsv, "%04x\n", value);
+#endif
}
}
diff --git a/sv.c b/sv.c
index a7e3839952..1b15240da4 100644
--- a/sv.c
+++ b/sv.c
@@ -4925,7 +4925,11 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
goto integer;
case 'D':
+#ifdef IV_IS_QUAD
+ /* nothing */
+#else
intsize = 'l';
+#endif
/* FALL THROUGH */
case 'd':
case 'i':
@@ -4973,7 +4977,11 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
goto integer;
case 'U':
+#ifdef IV_IS_QUAD
+ /* nothing */
+#else
intsize = 'l';
+#endif
/* FALL THROUGH */
case 'u':
base = 10;
@@ -4984,7 +4992,11 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
goto uns_integer;
case 'O':
+#ifdef IV_IS_QUAD
+ /* nothing */
+#else
intsize = 'l';
+#endif
/* FALL THROUGH */
case 'o':
base = 8;
@@ -5193,10 +5205,21 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
SV *msg = sv_newmortal();
Perl_sv_setpvf(aTHX_ msg, "Invalid conversion in %s: ",
(PL_op->op_type == OP_PRTF) ? "printf" : "sprintf");
- if (c)
- Perl_sv_catpvf(aTHX_ msg, isPRINT(c) ? "\"%%%c\"" : "\"%%\\%03o\"",
- c & 0xFF);
- else
+ if (c) {
+#ifdef UV_IS_QUAD
+ if (isPRINT(c))
+ Perl_sv_catpvf(aTHX_ msg,
+ "\"%%%c\"", c & 0xFF);
+ else
+ Perl_sv_catpvf(aTHX_ msg,
+ "\"%%\\%03" PERL_PRIo64 "\"",
+ (UV)c & 0xFF);
+#else
+ Perl_sv_catpvf(aTHX_ msg, isPRINT(c) ?
+ "\"%%%c\"" : "\"%%\\%03o\"",
+ c & 0xFF);
+#endif
+ } else
sv_catpv(msg, "end of string");
Perl_warner(aTHX_ WARN_PRINTF, "%_", msg); /* yes, this is reentrant */
}
diff --git a/t/io/open.t b/t/io/open.t
index 0154b8fc14..12d32f474c 100755
--- a/t/io/open.t
+++ b/t/io/open.t
@@ -80,7 +80,7 @@ unlink("afile");
}
{
print "# \$!='$!'\nnot " unless open(my $f, '-|', <<'EOC');
-perl -e "print qq(a row\n); print qq(another row\n)"
+./perl -e "print qq(a row\n); print qq(another row\n)"
EOC
print "ok 24\n";
@rows = <$f>;
@@ -91,7 +91,7 @@ print "ok 26\n";
}
{
print "# \$!='$!'\nnot " unless open(my $f, '|-', <<'EOC');
-perl -pe "s/^not //"
+./perl -pe "s/^not //"
EOC
print "ok 27\n";
@rows = <$f>;
diff --git a/t/op/64bit.t b/t/op/64bit.t
new file mode 100644
index 0000000000..f49b5e47f6
--- /dev/null
+++ b/t/op/64bit.t
@@ -0,0 +1,147 @@
+BEGIN {
+ eval { pack "q", 0 };
+ if ($@) {
+ print "1..0\n# no 64-bit types\n";
+ exit(0);
+ }
+}
+
+# This could use a lot of more tests.
+#
+# Nota bene: bit operations are not 64-bit clean. See the beginning
+# of pp.c and the explanation next to IBW/UBW.
+
+print "1..30\n";
+
+my $q = 12345678901;
+my $r = 23456789012;
+my $x;
+
+
+$x = unpack "q", pack "q", $q;
+print "not " unless $x == $q;
+print "ok 1\n";
+
+
+$x = sprintf("%d", 12345678901);
+print "not " unless $x eq "$q";
+print "ok 2\n";
+
+
+$x = sprintf("%d", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 3\n";
+
+$x = sprintf("%lld", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 4\n";
+
+$x = sprintf("%Ld", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 5\n";
+
+$x = sprintf("%qd", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 6\n";
+
+
+$x = sprintf("%x", $q);
+print "not " unless hex($x) == 0x2dfdc1c35;
+print "ok 7\n";
+
+$x = sprintf("%llx", $q);
+print "not " unless hex($x) == 0x2dfdc1c35;
+print "ok 8\n";
+
+$x = sprintf("%Lx", $q);
+print "not " unless hex($x) == 0x2dfdc1c35;
+print "ok 9\n";
+
+$x = sprintf("%qx", $q);
+print "not " unless hex($x) == 0x2dfdc1c35;
+print "ok 10\n";
+
+
+$x = sprintf("%o", $q);
+print "not " unless oct("0$x") == 0133767016065;
+print "ok 11\n";
+
+$x = sprintf("%llo", $q);
+print "not " unless oct("0$x") == 0133767016065;
+print "ok 12\n";
+
+$x = sprintf("%Lo", $q);
+print "not " unless oct("0$x") == 0133767016065;
+print "ok 13\n";
+
+$x = sprintf("%qo", $q);
+print "not " unless oct("0$x") == 0133767016065;
+print "ok 14\n";
+
+
+$x = sprintf("%b", $q);
+print "not " unless oct("0b$x") == 0b1011011111110111000001110000110101;
+print "ok 15\n";
+
+$x = sprintf("%llb", $q);
+print "not " unless oct("0b$x") == 0b1011011111110111000001110000110101;
+print "ok 16\n";
+
+$x = sprintf("%Lb", $q);
+print "not " unless oct("0b$x") == 0b1011011111110111000001110000110101;
+print "ok 17\n";
+
+$x = sprintf("%qb", $q);
+print "not " unless oct("0b$x") == 0b1011011111110111000001110000110101;
+print "ok 18\n";
+
+
+$x = sprintf("%u", 12345678901);
+print "not " unless $x eq "$q";
+print "ok 19\n";
+
+$x = sprintf("%u", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 20\n";
+
+$x = sprintf("%llu", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 21\n";
+
+$x = sprintf("%Lu", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 22\n";
+
+
+$x = sprintf("%D", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 23\n";
+
+$x = sprintf("%U", $q);
+print "not " unless $x == $q && $x eq $q;
+print "ok 24\n";
+
+$x = sprintf("%O", $q);
+print "not " unless oct($x) == $q;
+print "ok 25\n";
+
+
+$x = $q + $r;
+print "not " unless $x == 35802467913;
+print "ok 26\n";
+
+$x = $q - $r;
+print "not " unless $x == -11111110111;
+print "ok 27\n";
+
+$x = $q * $r;
+print "not " unless $x == 289589985190657035812;
+print "ok 28\n";
+
+$x /= $r;
+print "not " unless $x == $q;
+print "ok 29\n";
+
+$x = 98765432109 % 12345678901;
+print "not " unless $x == 901;
+print "ok 30\n";
diff --git a/t/pragma/utf8.t b/t/pragma/utf8.t
index 5e467ae053..01b0f0529c 100755
--- a/t/pragma/utf8.t
+++ b/t/pragma/utf8.t
@@ -6,7 +6,7 @@ BEGIN {
$ENV{PERL5LIB} = '../lib';
}
-print "1..9\n";
+print "1..12\n";
my $test = 1;
@@ -65,6 +65,18 @@ sub ok {
ok $1, 'NUMERIC';
$test++;
-}
+ $_ = "alpha123numeric456";
+ m/([\p{IsDigit}]+)/;
+ ok $1, '123';
+ $test++;
+ $_ = "alpha123numeric456";
+ m/([^\p{IsDigit}]+)/;
+ ok $1, 'alpha';
+ $test++;
+ $_ = ",123alpha,456numeric";
+ m/([\p{IsAlnum}]+)/;
+ ok $1, '123alpha';
+ $test++;
+}
diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot
index f586b2540c..208bf26b15 100644
--- a/t/pragma/warn/pp_hot
+++ b/t/pragma/warn/pp_hot
@@ -54,12 +54,12 @@ print getc(FOO);
read(FOO,$_,1);
no warning 'io' ;
print STDIN "anc";
-###############################################################
-# N O T E #
-# This test is known to fail on Linux systems with glibc. #
-# The glibc development team is aware of the problem, and has #
-# determined a fix for the next release of that library. #
-###############################################################
+####################################################################
+# N O T E #
+# This test is known to fail on Linux and *BSD systems with glibc. #
+# The glibc development team is aware of the problem, and has #
+# determined a fix for the next release of that library. #
+####################################################################
EXPECT
Filehandle main::STDIN opened only for input at - line 3.
Filehandle main::STDOUT opened only for output at - line 4.
diff --git a/util.c b/util.c
index 762be7bb33..132ec5e127 100644
--- a/util.c
+++ b/util.c
@@ -1405,11 +1405,12 @@ Perl_mess(pTHX_ const char *pat, va_list *args)
sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
if (!SvCUR(sv) || *(SvEND(sv) - 1) != '\n') {
dTHR;
- if (PL_curcop->cop_line)
#ifdef IV_IS_QUAD
+ if (PL_curcop->cop_line)
Perl_sv_catpvf(aTHX_ sv, " at %_ line %" PERL_PRId64,
GvSV(PL_curcop->cop_filegv), (IV)PL_curcop->cop_line);
#else
+ if (PL_curcop->cop_line)
Perl_sv_catpvf(aTHX_ sv, " at %_ line %ld",
GvSV(PL_curcop->cop_filegv), (long)PL_curcop->cop_line);
#endif