summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure19
-rw-r--r--config_h.SH4
-rw-r--r--ext/IO/IO.xs3
-rw-r--r--hints/solaris_2.sh2
-rw-r--r--perl.h21
-rw-r--r--pp_sys.c12
6 files changed, 27 insertions, 34 deletions
diff --git a/Configure b/Configure
index 0a0523e294..26bc1f2a60 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 Sat Nov 13 15:36:41 EET 1999 [metaconfig 3.0 PL70]
+# Generated on Sat Nov 13 17:55:50 EET 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -8581,7 +8581,7 @@ else
val="$undef"
echo "No, it doesn't."
case "$lseeksize" in
- 8) echo "(This is okay because your off_t is 64 bits wide.)" >&4 ;;
+ 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
esac
fi
$rm -f try.* try
@@ -8603,7 +8603,7 @@ else
val="$undef"
echo "No, it doesn't."
case "$fpossize" in
- 8) echo "(This is okay because your fpos_t is 64 bits wide.)" >&4 ;;
+ 8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
esac
fi
$rm -f try.* try
@@ -8653,6 +8653,9 @@ esac
: see if fseeko exists
set fseeko d_fseeko
eval $inlibc
+case "$longsize" in
+8) echo "(Your long is 64 bits, so in a pinch you could use fseek.)" ;;
+esac
: see if fsetpos exists
set fsetpos d_fsetpos
@@ -8676,6 +8679,9 @@ eval $inlibc
: see if ftello exists
set ftello d_ftello
eval $inlibc
+case "$longsize" in
+8) echo "(Your long is 64 bits, so in a pinch you could use ftell.)" ;;
+esac
: see if getgrent exists
set getgrent d_getgrent
@@ -9601,7 +9607,12 @@ case "$quadtype" in
esac
d_quad="$undef"
;;
-*) echo "We could use '$quadtype' for 64-bit integers." >&4
+*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then
+ verb="will"
+ else
+ verb="could"
+ fi
+ echo "We $verb use '$quadtype' for 64-bit integers." >&4
d_quad="$define"
;;
esac
diff --git a/config_h.SH b/config_h.SH
index fb359323ed..8dca72a5c1 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -2473,9 +2473,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
/* U64SIZE:
* This symbol contains the sizeof(U64).
*/
-/* NVSIZE:
- * This symbol contains the sizeof(NV).
- */
#define IVTYPE $ivtype /**/
#define UVTYPE $uvtype /**/
#define I8TYPE $i8type /**/
@@ -2501,7 +2498,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define I64SIZE $i64size /**/
#define U64SIZE $u64size /**/
#endif
-#define NVSIZE $nvsize /**/
/* IVdf:
* This symbol defines the format string used for printing a Perl IV
diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs
index e614cffabb..e5ce83d948 100644
--- a/ext/IO/IO.xs
+++ b/ext/IO/IO.xs
@@ -357,8 +357,7 @@ setvbuf(handle, buf, type, size)
int type
int size
CODE:
-/* Should check HAS_SETVBUF once Configure tests for that */
-#if defined(PERLIO_IS_STDIO) && defined(_IOFBF)
+#if defined(PERLIO_IS_STDIO) && defined(_IOFBF) && defined(HAS_SETVBUF)
if (!handle) /* Try input stream. */
handle = IoIFP(sv_2io(ST(0)));
if (handle)
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index a5d033b946..7de55f7292 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -339,7 +339,7 @@ EOCBU
lflibs="`getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
case "$lfcflags$lfldflags$lflibs" in
'');;
-*) ccflags="$ccflags $lfcflags"
+*) ccflags="$ccflags -DUSE_LONG_LONG $lfcflags"
ldflags="$ldflags $ldldflags"
libswanted="$libswanted $lflibs"
;;
diff --git a/perl.h b/perl.h
index 8ef429c739..3bcc032537 100644
--- a/perl.h
+++ b/perl.h
@@ -1848,27 +1848,6 @@ struct svtbl {
#define NV_WITHIN_IV(nv) (I_V(nv) >= IV_MIN && I_V(nv) <= IV_MAX)
#define NV_WITHIN_UV(nv) ((nv)>=0.0 && U_V(nv) >= UV_MIN && U_V(nv) <= UV_MAX)
-/* The correct way: a Configure test where (UV)~0 is cast to NV and back. */
-/* Believe. */
-#define IV_FITS_IN_NV
-/* Doubt. */
-#if defined(USE_LONG_DOUBLE) && \
- defined(LDBL_MANT_DIG) && IV_DIG >= LDBL_MANT_DIG
-# undef IV_FITS_IN_NV
-#else
-# if defined(DBL_MANT_DIG) && IV_DIG >= DBL_MANT_DIG
-# undef IV_FITS_IN_NV
-# else
-# if IV_DIG >= NV_DIG
-# undef IV_FITS_IN_NV
-# else
-# if IVSIZE >= NVSIZE
-# undef IV_FITS_IN_NV
-# endif
-# endif
-# endif
-#endif
-
/* Used with UV/IV arguments: */
/* XXXX: need to speed it up */
#define CLUMP_2UV(iv) ((iv) < 0 ? 0 : (UV)(iv))
diff --git a/pp_sys.c b/pp_sys.c
index 2dc9ebf315..b7c2cd00f4 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1592,10 +1592,10 @@ PP(pp_send)
djSP; dMARK; dORIGMARK; dTARGET;
GV *gv;
IO *io;
- STRLEN offset;
+ Off_t offset;
SV *bufsv;
char *buffer;
- STRLEN length;
+ Off_t length;
STRLEN blen;
MAGIC *mg;
@@ -1618,7 +1618,11 @@ PP(pp_send)
goto say_undef;
bufsv = *++MARK;
buffer = SvPV(bufsv, blen);
+#if Off_t_SIZE > IVSIZE
+ length = SvNVx(*++MARK);
+#else
length = SvIVx(*++MARK);
+#endif
if (length < 0)
DIE(aTHX_ "Negative length");
SETERRNO(0,0);
@@ -1634,7 +1638,11 @@ PP(pp_send)
}
else if (PL_op->op_type == OP_SYSWRITE) {
if (MARK < SP) {
+#if Off_t_SIZE > IVSIZE
+ offset = SvNVx(*++MARK);
+#else
offset = SvIVx(*++MARK);
+#endif
if (offset < 0) {
if (-offset > blen)
DIE(aTHX_ "Offset outside string");