# $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
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
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
: 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
: 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
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
/* U64SIZE:
* This symbol contains the sizeof(U64).
*/
-/* NVSIZE:
- * This symbol contains the sizeof(NV).
- */
#define IVTYPE $ivtype /**/
#define UVTYPE $uvtype /**/
#define I8TYPE $i8type /**/
#define I64SIZE $i64size /**/
#define U64SIZE $u64size /**/
#endif
-#define NVSIZE $nvsize /**/
/* IVdf:
* This symbol defines the format string used for printing a Perl IV
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)
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"
;;
#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))
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;
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);
}
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");