2003-03-28
2003-03-28 15:47:56 by Martin Stjernholm <mast@lysator.liu.se>
-
ba65df3fdac86911147aa5fc131033c492b428e8
(22 lines)
(+21/-1)
[
Show
| Annotate
]
Branch: 7.9
Added SIZEOF_INT64 (um, well.. it looks like it currently is possible
that it's larger than 8 bytes), MAX_INT64 and MIN_INT64.
Rev: src/global.h:1.82
2:
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: global.h,v 1.81 2003/03/12 14:29:56 grubba Exp $
+ || $Id: global.h,v 1.82 2003/03/28 15:47:56 mast Exp $
*/
#ifndef GLOBAL_H
178: Inside #if SIZEOF_LONG >= 8
#if SIZEOF_LONG >= 8
#define INT64 long
+ #define SIZEOF_INT64 SIZEOF_LONG
+ #define MAX_INT64 LONG_MAX
+ #define MIN_INT64 LONG_MIN
#else
#if SIZEOF___INT64 - 0 >= 8
#define INT64 __int64
-
+ #define SIZEOF_INT64 SIZEOF___INT64
+ #define MAX_INT64 _I64_MAX
+ #define MIN_INT64 _I64_MIN
#else
#if SIZEOF_LONG_LONG - 0 >= 8
#define INT64 long long
-
+ #define SIZEOF_INT64 SIZEOF_LONG_LONG
+ #ifdef LLONG_MAX
+ #define MAX_INT64 LLONG_MAX
+ #define MIN_INT64 LLONG_MIN
+ #else
+ #define MAX_INT64 LONG_LONG_MAX
+ #define MIN_INT64 LONG_LONG_MIN
#endif
#endif
#endif
-
+ #endif
#if SIZEOF_SHORT >= 4
#define INT32 short
206:
#define MIN_INT_TYPE MIN_INT32
#else
#if SIZEOF_INT_TYPE == 8
+ #ifdef INT64
+ #define MAX_INT_TYPE MAX_INT64
+ #define MIN_INT_TYPE MIN_INT64
+ #else
#define MAX_INT_TYPE 9223372036854775807LL
#define MIN_INT_TYPE (-9223372036854775807LL-1)
-
+ #endif
#else
#error Unsupported INT_TYPE size
#endif