pike.git / src / pike_int_types.h

version» Context lines:

pike.git/src/pike_int_types.h:13:   /* First INT64    *    * Select variants in portability order:    * long C89/LP64    * long long C99 & gcc2    * __int64 lc & icc    */   #ifndef INT64   # if SIZEOF_LONG >= 8   # define INT64 long + # define UINT64 unsigned long   # elif SIZEOF_LONG_LONG - 0 >= 8   # define INT64 long long -  + # define UINT64 unsigned long long   # elif SIZEOF___INT64 - 0 >= 8   # define INT64 __int64 -  + # define UINT64 unsigned __int64   # endif   #endif /* !INT64 */      /* NB: Use same order as in definition of INT64! */   #ifdef INT64   # ifndef SIZEOF_INT64   # if SIZEOF_LONG >= 8   # define SIZEOF_INT64 SIZEOF_LONG   # elif SIZEOF_LONG_LONG - 0 >= 8   # define SIZEOF_INT64 SIZEOF_LONG_LONG
pike.git/src/pike_int_types.h:66:   # define MIN_INT64 _I64_MIN   # else    /* We probably ought to warn here, but... */   # define MAX_UINT64 0xffffffffffffffffULL   # define MAX_INT64 0x7fffffffffffffffLL   # define MIN_INT64 (-0x7fffffffffffffffLL - 1LL)   # endif   # endif   #endif    + /* Check for __int128 here (and its unsigned companion) +  * There is no way to express 128 bit integer constants, so we have to +  * put them together +  */ + #ifndef INT128 + # if SIZEOF___INT128 - 0 >= 16 + # define INT128 __int128 + # elif SIZEOF___INT128_T - 0 >= 16 + # define INT128 __int128_t + # endif + # ifdef INT128 + # define MAX_INT128 (((INT128)MAX_INT64 << 64) | (INT128)MAX_UINT64) + # define MIN_INT128 (-MAX_INT128 - (INT128)1) + # endif + #endif + #ifndef UINT128 + # if SIZEOF_UNSIGNED___INT128 - 0 >= 16 + # define UINT128 unsigned __int128 + # elif SIZEOF_UNSIGNED___INT128_T - 0 >= 16 + # define UINT128 unsigned __int128_t + # elif SIZEOF___UINT128_T - 0 >= 16 + # define UINT128 __uint128_t + # endif + # ifdef UINT128 + # define MAX_UINT128 (((UINT128)MAX_UINT64 << 64) | (UINT128)MAX_UINT64) + # endif + #endif +  +    /* Then INT32 */   #ifndef INT32   # if SIZEOF_SHORT >= 4   # define INT32 short   # elif SIZEOF_INT >= 4   # define INT32 int   # else   # define INT32 long   # endif   #endif