shithub: ft²

ref: 6bc1fe3db1c4fe15791d87e6bcc1aede1631bc7c
dir: /src/ft2_cpu.h/

View raw version
#ifndef _ft2_cpu_h_
#define _ft2_cpu_h_

#include <stdint.h>

#ifdef _WIN32

#ifdef _WIN64
#define CPU_64BIT 1
#else
#define CPU_64BIT 0
#endif

#else
#include <limits.h>

#if __WORDSIZE == 64
#define CPU_64BIT 1
#else
#define CPU_64BIT 0
#endif

#endif

#if CPU_64BIT
#define CPU_BITS 64
#define uintCPUWord_t uint64_t
#define intCPUWord_t int64_t
#else
#define CPU_BITS 32
#define uintCPUWord_t uint32_t
#define intCPUWord_t int32_t
#endif

#endif