forked from cloudflarearchive/kyotocabinet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modp_stdint.h
42 lines (36 loc) · 954 Bytes
/
modp_stdint.h
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
#ifndef MODP_STDINT_H_
#define MODP_STDINT_H_
/**
* \file modp_stdint.h
* \brief An attempt to make stringencoders compile under windows
*
* This attempts to define various integral types that are normally
* defined in stdint.h and stdbool.h which oddly don't exit on
* windows.
*
* Please file bugs or patches if it doesn't work!
*/
#include <string.h>
#ifndef _WIN32
# include <stdint.h>
# include <stdbool.h>
#else
/* win64 is llp64 so these are the same for 32/64bit
so no check for _WIN64 is required.
*/
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
typedef unsigned __int64 uint64_t;
typedef signed __int64 int64_t;
/* windows doesn't do C99 and stdbool */
#ifndef __cplusplus
typedef unsigned char bool;
#define true 1
#define false 0
#endif
#endif /* _WIN32 */
#endif /* MODP_STDINT_H_ */