
libtommath 1.2.0 c403b66082
("hcrypto: import libtommath v1.2.0") needs more from stdint.h
than what Heimdal previously declared. Add more integer type
declarations and integer MIN/MAX macros.
Also, on Windows declare 64-bit integers using __int64 as
"long long" is not supported as 64-bit type across all visual
studio compiler versions.
Change-Id: I944bedc67bcb26374ffb30eb3dfd7c6108a98fc3
44 lines
881 B
Plaintext
44 lines
881 B
Plaintext
#ifndef _STDINT_H
|
|
#define _STDINT_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef signed char int8_t;
|
|
typedef unsigned char uint8_t;
|
|
typedef short int int16_t;
|
|
typedef unsigned short int uint16_t;
|
|
typedef int int32_t;
|
|
typedef unsigned int uint32_t;
|
|
#ifdef _MSC_VER
|
|
typedef __int64 int64_t;
|
|
typedef unsigned __int64 uint64_t;
|
|
#else
|
|
typedef long long int64_t;
|
|
typedef unsigned long long uint64_t;
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
#include <intsafe.h>
|
|
#else
|
|
#define INT8_MAX 0x7F
|
|
#define INT8_MIN (-INT8_MAX - 1)
|
|
#define UINT8_MAX 0xFF
|
|
#define INT16_MAX 0x7FFF
|
|
#define INT16_MIN (-INT16_MAX - 1)
|
|
#define UINT16_MAX 0xFFFF
|
|
#define INT32_MAX 0x7FFFFFFF
|
|
#define INT32_MIN (-INT32_MIN - 1)
|
|
#define UINT32_MAX 0xFFFFFFFF
|
|
#define INT64_MAX 0x7FFFFFFFFFFFFFFFLL
|
|
#define INT64_MIN (-INT64_MAX - 1)
|
|
#define UINT64_MAX 0xFFFFFFFFFFFFFFFFLL
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _STDINT_H */
|