Repository navigation
Expand file tree
/
Copy pathdefs.h
More file actions
85 lines (64 loc) · 1.6 KB
/
Copy pathdefs.h
File metadata and controls
85 lines (64 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#include <stdlib.h>
#ifdef _MSC_VER
typedef __int8 int8;
typedef __int16 int16;
typedef __int32 int32;
typedef unsigned __int8 byte;
typedef unsigned __int16 uint16;
typedef unsigned __int32 uint32;
typedef unsigned __int64 TC_LARGEST_COMPILER_UINT;
typedef __int64 int64;
typedef unsigned __int64 uint64;
#define LL(x) x##ui64
#pragma warning( disable : 4201 ) // disable: 4201 nonstandard extension used : nameless struct/union
#pragma warning( disable : 4324 ) // disable: 4324 structure was padded due to __declspec(align())
#else // !_MSC_VER
#include <inttypes.h>
#include <limits.h>
#include <memory.h>
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;
typedef int64_t int64;
typedef uint8_t byte;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;
#define LL(x) x##ULL
#if UCHAR_MAX != 0xffU
#error UCHAR_MAX != 0xff
#endif
#define __int8 char
#if USHRT_MAX != 0xffffU
#error USHRT_MAX != 0xffff
#endif
#define __int16 short
#if UINT_MAX != 0xffffffffU
#error UINT_MAX != 0xffffffff
#endif
#define __int32 int
typedef uint64 TC_LARGEST_COMPILER_UINT;
#define BOOL int
#ifndef FALSE
#define FALSE 0
#define TRUE 1
#endif
#endif // !_MSC_VER
// Integer types required by Cryptolib
typedef unsigned __int8 uint_8t;
typedef unsigned __int16 uint_16t;
typedef unsigned __int32 uint_32t;
typedef uint64 uint_64t;
typedef union
{
struct
{
unsigned __int32 LowPart;
unsigned __int32 HighPart;
};
uint64 Value;
} UINT64_STRUCT;
#ifndef __has_builtin // Optional of course
#define __has_builtin(x) 0 // Compatibility with non-clang compilers
#endif