csecp256k1

Haskell FFI bindings to bitcoin-core/secp256k1 (docs.ppad.tech/csecp256k1).
git clone git://git.ppad.tech/csecp256k1.git
Log | Files | Refs | README | LICENSE

int128_native.h (609B)


      1 #ifndef SECP256K1_INT128_NATIVE_H
      2 #define SECP256K1_INT128_NATIVE_H
      3 
      4 #include <stdint.h>
      5 #include "util.h"
      6 
      7 #if !defined(UINT128_MAX) && defined(__SIZEOF_INT128__)
      8 SECP256K1_GNUC_EXT typedef unsigned __int128 uint128_t;
      9 SECP256K1_GNUC_EXT typedef __int128 int128_t;
     10 # define UINT128_MAX ((uint128_t)(-1))
     11 # define INT128_MAX ((int128_t)(UINT128_MAX >> 1))
     12 # define INT128_MIN (-INT128_MAX - 1)
     13 /* No (U)INT128_C macros because compilers providing __int128 do not support 128-bit literals.  */
     14 #endif
     15 
     16 typedef uint128_t haskellsecp256k1_v0_1_0_uint128;
     17 typedef int128_t haskellsecp256k1_v0_1_0_int128;
     18 
     19 #endif