add -DUSE_LONG_LONG to ccflags if not already there.
p4raw-id: //depot/cfgperl@4487
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Oct 29 00:58:35 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Fri Oct 29 17:37:33 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
sPRIo64=''
sPRIu64=''
sPRIx64=''
+quadcase=''
+quadtype=''
+uquadtype=''
drand01=''
randbits=''
randfunc=''
use64bits=''
uselargefiles=''
uselongdouble=''
+uselonglong=''
usemorebits=''
usemultiplicity=''
nm_opt=''
cat <<EOM
Perl can be built to take advantage of long doubles which
-(if available) may give more accuracy and range for floating point
-numbers. To do so, Configure must be run with -Duselongdouble.
+(if available) may give more accuracy and range for floating point numbers.
If this doesn't make any sense to you, just accept the default 'n'.
EOM
+
+case "$ccflags" in
+*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
+esac
+
case "$uselongdouble" in
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
eval $setvar
case "$uselongdouble" in
-"$define"|true|[yY]*)
+true|[yY]*) uselongdouble="$define" ;;
+esac
+
+case "$uselongdouble" in
+$define)
: Look for a hint-file generated 'call-back-unit'. If the
: user has specified that long doubles should be used,
: we may need to set or change some other defaults.
cat <<EOM
+Perl can be built to take advantage of long longs which
+(if available) may give more range for integer numbers.
+
+If this doesn't make any sense to you, just accept the default 'n'.
+EOM
+
+case "$ccflags" in
+*-DUSE_LONG_LONG*) uselonglong="$define" ;;
+esac
+
+case "$uselonglong" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
+rp='Try to use long longs if available?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set uselonglong
+eval $setvar
+
+case "$uselonglong" in
+true|[yY]*) uselonglong="$define" ;;
+esac
+
+case "$uselonglong" in
+$define)
+: Look for a hint-file generated 'call-back-unit'. If the
+: user has specified that long longs should be used,
+: we may need to set or change some other defaults.
+ if $test -f uselonglong.cbu; then
+ echo "Your platform has some specific hints for long longs, using them..."
+ . ./uselonglong.cbu
+ else
+ $cat <<EOM
+(Your platform doesn't have any specific hints for long longs.)
+EOM
+ fi
+ ;;
+esac
+
+cat <<EOM
+
Previous version of $package used the standard IO mechanisms as defined
in <stdio.h>. Versions 5.003_02 and later of perl allow alternate IO
mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still
esac
fi
-: see if inttypes.h is available
-: we want a real compile instead of Inhdr because some systems
-: have an inttypes.h which includes non-existent headers
-echo " "
-$cat >try.c <<EOCP
-#include <inttypes.h>
-int main() {
- static int32_t foo32 = 0x12345678;
-}
-EOCP
-set try
-if eval $compile; then
- echo "<inttypes.h> found." >&4
- val="$define"
-else
- echo "<inttypes.h> NOT found." >&4
- val="$undef"
-fi
-$rm -f try.c try
-set i_inttypes
-eval $setvar
-
-: check for int64_t
-case "$use64bits" in
-"$define" )
- echo " "
- $echo $n "Checking to see if your system supports int64_t...$c" >&4
- $cat >try.c <<EOCP
-#include <sys/types.h>
-#$i_inttypes I_INTTYPES
-#ifdef I_INTTYPES
-#include <inttypes.h>
-#endif
-int64_t foo() { int64_t x; x = 7; return x; }
-EOCP
- if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
- val="$define"
- echo " Yup, it does." >&4
- else
- val="$undef"
- echo " Nope, it doesn't." >&4
- fi
- $rm -f try.*
- ;;
-*) val="$undef"
- ;;
-esac
-set d_int64t
-eval $setvar
-
-
: check for lengths of integral types
echo " "
case "$intsize" in
: check for long long
echo " "
-$echo $n "Checking to see if your system supports long long...$c" >&4
-echo 'long long foo() { long long x; x = 7; return x; }' > try.c
-if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+$echo $n "Checking to see if your system supports long long..." $c >&4
+echo 'int main() { long long x = 7; }' > try.c
+set try
+if eval $compile; then
val="$define"
- echo " Yup, it does." >&4
+ echo " Yes, it does." >&4
else
val="$undef"
- echo " Nope, it doesn't." >&4
+ echo " No, it doesn't." >&4
fi
$rm try.*
set d_longlong
case "${d_longlong}${longlongsize}" in
$define)
echo " "
- $echo $n "Checking to see how big your long longs are...$c" >&4
+ $echo $n "Checking to see how big your long longs are..." $c >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
EOCP
set try
if eval $compile_ok; then
- longlongsize=`./try`
+ longlongsize=`./try$exe_ext`
$echo " $longlongsize bytes." >&4
else
dflt='8'
fi
;;
esac
+$rm -f try.* try
+
+: see if inttypes.h is available
+: we want a real compile instead of Inhdr because some systems
+: have an inttypes.h which includes non-existent headers
+echo " "
+$cat >try.c <<EOCP
+#include <inttypes.h>
+int main() {
+ static int32_t foo32 = 0x12345678;
+}
+EOCP
+set try
+if eval $compile; then
+ echo "<inttypes.h> found." >&4
+ val="$define"
+else
+ echo "<inttypes.h> NOT found." >&4
+ val="$undef"
+fi
$rm -f try.c try
+set i_inttypes
+eval $setvar
+
+: check for int64_t
+case "$use64bits" in
+"$define" )
+ echo " "
+ $echo $n "Checking to see if your system supports int64_t...$c" >&4
+ $cat >try.c <<EOCP
+#include <sys/types.h>
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+int main() { int64_t x = 7; }
+EOCP
+ set try
+ if eval $compile; then
+ val="$define"
+ echo " Yes, it does." >&4
+ else
+ val="$undef"
+ echo " No, it doesn't." >&4
+ fi
+ $rm -f try try.*
+ ;;
+*) val="$undef"
+ ;;
+esac
+set d_int64t
+eval $setvar
+
+
echo " "
+echo "Checking which 64-bit integer type to use..." >&4
+
+case "$intsize" in
+8) val=int
+ set quadtype
+ eval $setvar
+ val='"unsigned int"'
+ set uquadtype
+ eval $setvar
+ quadcase=1
+ ;;
+*) case "$longsize" in
+ 8) val=long
+ set quadtype
+ eval $setvar
+ val='"unsigned long"'
+ set uquadtype
+ eval $setvar
+ quadcase=2
+ ;;
+ *) case "$uselonglong:$d_longlong:$longlongsize" in
+ define:define:8)
+ val='"long long"'
+ set quadtype
+ eval $setvar
+ val='"unsigned long long"'
+ set uquadtype
+ eval $setvar
+ quadcase=3
+ ;;
+ *) case "$d_int64t" in
+ define)
+ val=int64_t
+ set quadtype
+ eval $setvar
+ val=uint64_t
+ set uquadtype
+ eval $setvar
+ quadcase=4
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
-if $test X"$intsize" = X8 -o X"$longsize" = X8 -o X"$d_int64t" = X"$define" -o X"$d_longlong" = X"$define"; then
+case "$quadtype" in
+'') echo "Alas, no 64-bit integer types in sight." >&4 ;;
+*) echo "Using '$quadtype' for 64-bit integers." >&4 ;;
+esac
+
+echo " "
+
+if $test X"$quadtype" != X; then
echo "Checking how to print 64-bit integers..." >&4
-if $test X"$sPRId64" = X -a X"$intsize" = X8; then
- quad=int
+if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
$cat >try.c <<'EOCP'
#include <sys/types.h>
#include <stdio.h>
fi
fi
-if $test X"$sPRId64" = X -a X"$longsize" = X8; then
- quad=long
+if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
$cat >try.c <<'EOCP'
#include <sys/types.h>
#include <stdio.h>
fi
fi
-if $test X"$sPRId64" = X -a X"$i_inttypes.h" = X"$define" -a X"$d_int64t" = X"$define"; then
- quad=int64_t
+if $test X"$sPRId64" = X -a X"$i_inttypes.h" = X"$define" -a X"$quadtype" = Xint64_t; then
$cat >try.c <<'EOCP'
#include <sys/types.h>
#include <inttypes.h>
fi
fi
-if $test X"$sPRId64" = X -a X"$d_longlong" = X"$define" -a X"$longlongsize" = X8; then
- quad="long long"
+if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
$cat >try.c <<'EOCP'
#include <sys/types.h>
#include <stdio.h>
fi
fi
-if $test X"$sPRId64" = X -a X"$quad" != X; then
+if $test X"$sPRId64" = X -a X"$quadtype" != X; then
$cat >try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
int main() {
- $quad q = 12345678901;
+ $quadtype q = 12345678901;
printf("%Ld\n", q);
}
EOCP
12345678901)
sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIX64='"LX"';
- echo "We will use %lld."
+ echo "We will use %Ld."
;;
esac
fi
fi
-if $test X"$sPRId64" = X -a X"$quad" != X; then
+if $test X"$sPRId64" = X -a X"$quadtype" != X; then
$cat >try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
int main() {
- $quad q = 12345678901;
+ $quadtype q = 12345678901;
printf("%qd\n", q);
}
EOCP
$rm -f try try.*
-fi # intsize -o longsize -o d_int64t -o d_longlong
+fi
case "$sPRId64" in
'') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
: check for long doubles
echo " "
-$echo $n "Checking to see if your system supports long double...$c" >&4
-echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
-if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+$echo $n "Checking to see if your system supports long double..." $c >&4
+echo 'int main() { long double x = 7.0; }' > try.c
+set try
+if eval $compile; then
val="$define"
- echo " Yup, it does." >&4
+ echo " Yes, it does." >&4
else
val="$undef"
- echo " Nope, it doesn't." >&4
+ echo " No, it doesn't." >&4
fi
$rm try.*
set d_longdbl
case "${d_longdbl}${longdblsize}" in
$define)
echo " "
- $echo $n "Checking to see how big your long doubles are...$c" >&4
+ $echo $n "Checking to see how big your long doubles are..." $c >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
}
EOCP
set try
+ set try
if eval $compile; then
- longdblsize=`./try`
+ longdblsize=`./try$exe_ext`
$echo " $longdblsize bytes." >&4
else
dflt='8'
fi
;;
esac
-$rm -f try.c try
+$rm -f try.* try
echo " "
echo " "
-echo "Checking to see if your system supports struct fs_data..." >&4
+$echo $n "Checking to see if your system supports struct fs_data..." $c >&4
set d_fs_data_s fs_data $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h
eval $hasstruct
case "$d_fs_data_s" in
echo " "
-echo "Checking to see if your system supports struct statfs..." >&4
+$echo $n "Checking to see if your system supports struct statfs..." $c >&4
set d_statfs_s statfs $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h
eval $hasstruct
case "$d_statfs_s" in
case "$d_statfs_s" in
define)
echo " "
- echo "Checking to see if your struct statfs has f_flags field..." >&4
+ $echo $n "Checking to see if your struct statfs has f_flags field..." $c >&4
set d_statfs_f_flags statfs f_flags $i_systypes sys/types.h $i_sysparam sys/param.h $i_sysmount sys/mount.h $i_sysvfs sys/vfs.h $i_sysstatfs sys/statfs.h
eval $hasfield
;;
privlibexp='$privlibexp'
prototype='$prototype'
ptrsize='$ptrsize'
+quadcase='$quadcase'
+quadtype='$quadtype'
randbits='$randbits'
randfunc='$randfunc'
randseedtype='$randseedtype'
uidtype='$uidtype'
uname='$uname'
uniq='$uniq'
+uquadtype='$uquadtype'
use64bits='$use64bits'
usedl='$usedl'
uselargefiles='$uselargefiles'
uselongdouble='$uselongdouble'
+uselonglong='$uselonglong'
usemorebits='$usemorebits'
usemultiplicity='$usemultiplicity'
usemymalloc='$usemymalloc'
* This symbol is defined if this system has a stat structure declaring
* st_blksize and st_blocks.
*/
+#ifndef USE_STAT_BLOCKS
#$d_statblks USE_STAT_BLOCKS /**/
+#endif
/* HAS_STRERROR:
* This symbol, if defined, indicates that the strerror routine is
* be used when available. If not defined, the native default interfaces
* will be used (be they 32 or 64 bits).
*/
+#ifndef USE_64_BITS
#$use64bits USE_64_BITS /**/
+#endif
/* USE_LARGE_FILES:
* This symbol, if defined, indicates that large file support
* should be used when available. The USE_64_BITS symbol will
* also be turned on if necessary.
*/
+#ifndef USE_LARGE_FILES
#$uselargefiles USE_LARGE_FILES /**/
+#endif
/* USE_LONG_DOUBLE:
* This symbol, if defined, indicates that long doubles should
* be used when available.
*/
+#ifndef USE_LONG_DOUBLE
#$uselongdouble USE_LONG_DOUBLE /**/
+#endif
+
+/* USE_LONG_LONG:
+ * This symbol, if defined, indicates that long longs should
+ * be used when available.
+ */
+#ifndef USE_LONG_LONG
+#$uselonglong USE_LONG_LONG /**/
+#endif
+
+#ifndef USE_MORE_BITS
+#$usemorebits USE_MORE_BITS /**/
+#endif
/* MULTIPLICITY:
* This symbol, if defined, indicates that Perl should
* be built to use multiplicity.
*/
+#ifndef MULTIPLICTY
#$usemultiplicity MULTIPLICITY /**/
+#endif
/* USE_PERLIO:
* This symbol, if defined, indicates that the PerlIO abstraction should
* be used throughout. If not defined, stdio should be
* used in a fully backward compatible manner.
*/
+#ifndef USE_PERLIO
#$useperlio USE_PERLIO /**/
+#endif
/* USE_SOCKS:
* This symbol, if defined, indicates that Perl should
* be built to use socks.
*/
+#ifndef USE_SOCKS
#$usesocks USE_SOCKS /**/
+#endif
/* PERL_XS_APIVERSION:
* This variable contains the version of the oldest perl binary
* This symbol, if defined, indicates that Perl should
* be built to use the old draft POSIX threads API.
*/
+#ifndef USE_TTHREADS
#$usethreads USE_THREADS /**/
+#endif
#$d_oldpthreads OLD_PTHREADS_API /**/
/* Time_t:
*/
#define Pid_t $pidtype /* PID type */
+/* Quad_t:
+ * This symbol holds the type used for 64-bit integers.
+ * It can be int, long, long long, int64_t etc...
+ */
+/* QUADCASE:
+ * This symbol, if defined, encodes the type of a quad:
+ * 1 = int, 2 = long, 3 = long long, 4 = int64_t.
+ */
+/* Uquad_t:
+ * This symbol holds the type used for unsigned 64-bit integers.
+ * It can be unsigned int, unsigned long, unsigned long long,
+ * uint64_t etc...
+ */
+#define Quad_t $quadtype
+#define Uquad_t $uquadtype
+#define QUADCASE $quadcase
+
/* Size_t:
* This symbol holds the type used to declare length parameters
* for string functions. It is usually size_t, but may be
((UV) s[offset + 1] << 16) +
( s[offset + 2] << 8);
}
-#ifdef HAS_QUAD
+#ifdef UV_IS_QUAD
else if (size == 64) {
dTHR;
if (ckWARN(WARN_PORTABLE))
((UV) s[offset + 1] << 16) +
( s[offset + 2] << 8) +
s[offset + 3];
-#ifdef HAS_QUAD
+#ifdef UV_IS_QUAD
else if (size == 64) {
dTHR;
if (ckWARN(WARN_PORTABLE))
s[offset+2] = (lval >> 8) & 0xff;
s[offset+3] = lval & 0xff;
}
-#ifdef HAS_QUAD
+#ifdef UV_IS_QUAD
else if (size == 64) {
dTHR;
if (ckWARN(WARN_PORTABLE))
exit 1
;;
esac
- ccflags="$ccflags -DUSE_LONG_LONG"
+ case "$ccflags" in
+ *-DUSE_LONG_LONG*) ;;
+ *) ccflags="$ccflags -DUSE_LONG_LONG" ;;
+ esac
ccflags="$ccflags `getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`"
ldflags="$ldflags `getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`"
esac
case "$ccflags" in
*-n32*)
- ccflags="$ccflags -DUSE_LONG_LONG"
+ case "$ccflags" in
+ *-DUSE_LONG_LONG) ;;
+ *) ccflags="$ccflags -DUSE_LONG_LONG" ;;
+ esac
archname64="-n32"
;;
esac
ccflags="$ccflags `getconf LFS_CFLAGS`"
ldflags="$ldflags `getconf LFS_LDFLAGS`"
libswanted="$libswanted `getconf LFS_LIBS`"
- ccflags="$ccflags -DUSE_LONG_LONG"
+ case "$ccflags" in
+ *-DUSE_LONG_LONG*) ;;
+ *) ccflags="$ccflags -DUSE_LONG_LONG" ;;
+ esac
# When a 64-bit cc becomes available $archname64
# may need setting so that $archname gets it attached.
;;
--Andy Dougherty August 1996
*/
-/* We should be able to get Quad_t in most systems:
- all of int64_t, long long, long, int, will work.
-
- Beware of LP32 systems (ILP32, ILP32LL64). Such systems have been
- used to sizeof(long) == sizeof(foo*). This is a bad assumption
- because then IV/UV have been 32 bits, too. Which, in turn means
- that even if the system has quads (e.g. long long), IV cannot be a
- quad. Introducing a 64-bit IV (because of long long existing)
- will introduce binary incompatibility.
-
- Summary: a long long system needs to add -DUSE_LONG_LONG to $ccflags
- to get quads -- and if its pointers are still 32 bits, this will break
- binary compatibility. Casting an IV (a long long) to a pointer will
- truncate half of the IV away. Most systems can just use
- Configure -Duse64bits to get the -DUSE_LONG_LONG added either by
- their hints files, or directly by Configure if they are using gcc.
-
- --jhi September 1999 */
-
-#if INTSIZE == 4 && LONGSIZE == 4 && PTRSIZE == 4
-# define PERL_ILP32
-# if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
-# define PERL_ILP32LL64
-# endif
-#endif
-
-#if LONGSIZE == 8 && PTRSIZE == 8
-# define PERL_LP64
-# if INTSIZE == 8
-# define PERL_ILP64
-# endif
-#endif
-
-#ifndef Quad_t
-# if LONGSIZE == 8
-# define Quad_t long
-# define Uquad_t unsigned long
-# define PERL_QUAD_IS_LONG
-# endif
-#endif
-
-#ifndef Quad_t
-# if INTSIZE == 8
-# define Quad_t int
-# define Uquad_t unsigned int
-# define PERL_QUAD_IS_INT
-# endif
-#endif
-
-#ifndef Quad_t
-# ifdef USE_LONG_LONG /* See above note about LP32. --jhi */
-# if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
-# define Quad_t long long
-# define Uquad_t unsigned long long
-# define PERL_QUAD_IS_LONG_LONG
-# endif
-# endif
-#endif
-
-#ifndef Quad_t
-# ifdef HAS_INT64_T
-# define Quad_t int64_t
-# define Uquad_t uint64_t
-# define PERL_QUAD_IS_INT64_T
-# endif
-#endif
-
-#ifdef Quad_t
-# define HAS_QUAD
-# ifndef Uquad_t
- /* Note that if your Quad_t is a typedef (not a #define) you *MUST*
- * have defined by now Uquad_t yourself because 'unsigned type'
- * is illegal. */
-# define Uquad_t unsigned Quad_t
-# endif
-#endif
-
-#if defined(USE_64_BITS) && defined(HAS_QUAD)
-# ifdef PERL_QUAD_IS_LONG /* LP64 */
- typedef long IV;
- typedef unsigned long UV;
-# else
-# ifdef PERL_QUAD_IS_INT /* ILP64 */
- typedef int IV;
- typedef unsigned int UV;
-# else
-# ifdef PERL_QUAD_IS_LONG_LONG /* LL64 */
- typedef long long IV;
- typedef unsigned long long UV;
-# else
-# ifdef PERL_QUAD_IS_INT64_T /* C9X */
- typedef int64_t IV;
- typedef uint64_t UV;
-# endif
-# endif
-# endif
-# endif
-# if defined(PERL_QUAD_IS_INT64_T) && defined(INT64_MAX)
+#if defined(USE_64_BITS) && defined(Quad_t)
+ typedef Quad_t IV;
+ typedef Uquad_t UV;
+# if QUADCASE == 4 && defined(INT64_MAX) /* quad is int64_t */
# define IV_MAX INT64_MAX
# define IV_MIN INT64_MIN
# define UV_MAX UINT64_MAX
# define IV_IS_QUAD
# define UV_IS_QUAD
#else
- typedef long IV;
- typedef unsigned long UV;
+ typedef long IV;
+ typedef unsigned long UV;
# if defined(INT32_MAX) && LONGSIZE == 4
# define IV_MAX INT32_MAX
# define IV_MIN INT32_MIN
# define UVSIZE LONGSIZE
# define IVSIZE LONGSIZE
#endif
+
#define IV_DIG (BIT_DIGITS(IVSIZE * 8))
#define UV_DIG (BIT_DIGITS(UVSIZE * 8))
# endif
#endif
-#ifdef HAS_QUAD
+#ifdef UV_IS_QUAD
# ifdef UQUAD_MAX
# define PERL_UQUAD_MAX ((UV)UQUAD_MAX)
I16 ashort;
int aint;
I32 along;
-#ifdef HAS_QUAD
+#ifdef Quad_t
Quad_t aquad;
#endif
U16 aushort;
unsigned int auint;
U32 aulong;
-#ifdef HAS_QUAD
+#ifdef Quad_t
Uquad_t auquad;
#endif
char *aptr;
sv_setpvn(sv, aptr, len);
PUSHs(sv_2mortal(sv));
break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'q':
along = (strend - s) / sizeof(Quad_t);
if (len > along)
unsigned int auint;
I32 along;
U32 aulong;
-#ifdef HAS_QUAD
+#ifdef Quad_t
Quad_t aquad;
Uquad_t auquad;
#endif
}
}
break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'Q':
while (len-- > 0) {
fromstr = NEXTFROM;
sv_catpvn(cat, (char*)&aquad, sizeof(Quad_t));
}
break;
-#endif /* HAS_QUAD */
+#endif /* Quad_t */
case 'P':
len = 1; /* assume SV is correct length */
/* FALL THROUGH */
#define POPu ((UV)SvUVx(POPs))
#define POPl ((long)SvIVx(POPs))
#define POPul ((unsigned long)SvIVx(POPs))
-#ifdef HAS_QUAD
+#ifdef Quad_t
#define POPq ((Quad_t)SvIVx(POPs))
#define POPuq ((Uquad_t)SvUVx(POPs))
#endif
#define TOPu ((UV)SvUV(TOPs))
#define TOPl ((long)SvIV(TOPs))
#define TOPul ((unsigned long)SvUV(TOPs))
-#ifdef HAS_QUAD
+#ifdef Quad_t
#define TOPq ((Quad_t)SvIV(TOPs))
#define TOPuq ((Uquad_t)SvUV(TOPs))
#endif
#define dPOPiv IV value = POPi
#define dTOPuv UV value = TOPu
#define dPOPuv UV value = POPu
-#ifdef HAS_QUAD
+#ifdef Quad_t
#define dTOPqv Quad_t value = TOPu
#define dPOPqv Quad_t value = POPu
#define dTOPuqv Uquad_t value = TOPuq
n = ARG(scan);
PL_op = (OP_4tree*)PL_regdata->data[n];
- DEBUG_r( PerlIO_printf(Perl_debug_log, " re_eval 0x%"UVxf"\n", (UV)PL_op) );
+ DEBUG_r( PerlIO_printf(Perl_debug_log, " re_eval 0x%"UVxf"\n", PTR2UV(PL_op)) );
PL_curpad = AvARRAY((AV*)PL_regdata->data[n + 2]);
PL_regendp[0] = PL_reg_magic->mg_len = locinput - PL_bostr;
break;
default:
PerlIO_printf(Perl_error_log, "%"UVxf" %d\n",
- (UV)scan, OP(scan));
+ PTR2UV(scan), OP(scan));
Perl_croak(aTHX_ "regexp memory corruption");
}
scan = next;
/* SIZE */
switch (*q) {
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'L': /* Ld */
case 'q': /* qd */
intsize = 'q';
break;
#endif
case 'l':
-#ifdef HAS_QUAD
+#ifdef Quad_t
if (*(q + 1) == 'l') { /* lld */
intsize = 'q';
q += 2;
default: iv = va_arg(*args, int); break;
case 'l': iv = va_arg(*args, long); break;
case 'V': iv = va_arg(*args, IV); break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'q': iv = va_arg(*args, Quad_t); break;
#endif
}
default: iv = (int)iv; break;
case 'l': iv = (long)iv; break;
case 'V': break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'q': iv = (Quad_t)iv; break;
#endif
}
default: uv = va_arg(*args, unsigned); break;
case 'l': uv = va_arg(*args, unsigned long); break;
case 'V': uv = va_arg(*args, UV); break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'q': uv = va_arg(*args, Quad_t); break;
#endif
}
default: uv = (unsigned)uv; break;
case 'l': uv = (unsigned long)uv; break;
case 'V': break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'q': uv = (Quad_t)uv; break;
#endif
}
default: *(va_arg(*args, int*)) = i; break;
case 'l': *(va_arg(*args, long*)) = i; break;
case 'V': *(va_arg(*args, IV*)) = i; break;
-#ifdef HAS_QUAD
+#ifdef Quad_t
case 'q': *(va_arg(*args, Quad_t*)) = i; break;
#endif
}