summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorScott Henry <scotth@sgi.com>1998-10-19 15:38:06 -0700
committerJarkko Hietaniemi <jhi@iki.fi>1998-10-20 08:20:56 +0000
commit03145268c493df27841633bdf17d753920794b8c (patch)
treee055ff22302924d884ed064ea03290147429c837 /perl.h
parentaa5812c34a55ab0a168e55bab313864b328170d8 (diff)
downloadperl-03145268c493df27841633bdf17d753920794b8c.tar.gz
64-bitness, based on
To: perl-64bit@perl.org Message-ID: <yd8u30zyerl.fsf@hoshi.engr.sgi.com> Subject: Re: Configure problems/questions... p4raw-id: //depot/cfgperl@2025
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h90
1 files changed, 62 insertions, 28 deletions
diff --git a/perl.h b/perl.h
index b5fea5cfb4..7e9fd94ceb 100644
--- a/perl.h
+++ b/perl.h
@@ -863,37 +863,66 @@ Free_t Perl_free _((Malloc_t where));
# endif
#endif
-#ifdef HAS_INT64_T
-# define Quad_t int64_t
-# define PERL_QUAD_IS_INT64_T
-#else
-# if LONGSIZE == 8
-# define Quad_t long
+#ifndef Quad_t
+# if LONGSIZE == 8
+# define Quad_t long
# define PERL_QUAD_IS_LONG
-# else
-# ifdef USE_LONG_LONG /* See above note about LP32. --jhi */
-# if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
-# define Quad_t long long
-# define PERL_QUAD_IS_LONG_LONG
-# endif
-# endif
-# ifndef Quad_t
-# if INTSIZE == 8
-# define Quad_t int
-# define PERL_QUAD_IS_INT
-# endif
+# endif
+#endif
+
+#ifndef Quad_t
+# if INTSIZE == 8
+# define Quad_t 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 PERL_QUAD_IS_LONG_LONG
# endif
-# 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 you *must* have defined
+ * also Uquad_t yourself because 'unsigned type' is illegal. */
+# define Uquad_t unsigned Quad_t
+# endif
#endif
-/* See above note on LP32 about the PTRSIZE test. --jhi */
-#if defined(HAS_QUAD) && (PTRSIZE > 4 || defined(USE_LONG_LONG))
- typedef Quad_t IV;
- typedef unsigned Quad_t UV;
+#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)
# define IV_MAX INT64_MAX
# define IV_MIN INT64_MIN
@@ -906,8 +935,8 @@ Free_t Perl_free _((Malloc_t where));
# define UV_MIN PERL_UQUAD_MIN
# endif
#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
@@ -1165,10 +1194,14 @@ typedef union any ANY;
#include "handy.h"
+/* Some day when we have more 64-bit experience under our belts we may
+ * be able to merge some of the USE_64_BIT_{FILES,OFFSETS,STDIO,DBM}. At
+ * the moment (Oct 1998), though, keep them separate. --jhi
+ */
#ifdef USE_64_BITS
# ifdef USE_64_BIT_FILES
-# ifndef USE_64_BIT_IO
-# define USE_64_BIT_IO
+# ifndef USE_64_BIT_OFFSETS
+# define USE_64_BIT_OFFSETS
# endif
# ifndef USE_64_BIT_STDIO
# define USE_64_BIT_STDIO
@@ -1177,7 +1210,8 @@ typedef union any ANY;
# define USE_64_BIT_DBM
# endif
# endif
-# ifdef USE_64_BIT_IO
+/* Mention LSEEKSIZE here to get it included in %Config. */
+# ifdef USE_64_BIT_OFFSETS
# ifdef HAS_FSTAT64
# define fstat fstat64
# endif