blob: 76550599b169b6d4df531972a3a16471a97a6783 [file] [log] [blame]
Dennis Huang6d037712014-04-22 19:20:59 -07001/*
2 * Copyright (c) 2008 Travis Geiselbrecht
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files
6 * (the "Software"), to deal in the Software without restriction,
7 * including without limitation the rights to use, copy, modify, merge,
8 * publish, distribute, sublicense, and/or sell copies of the Software,
9 * and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23#ifndef __STDINT_H
24#define __STDINT_H
25
26#include <sys/types.h> // for ULONG_MAX
27
28typedef unsigned char uint8_t;
29typedef unsigned short uint16_t;
30typedef unsigned int uint32_t;
31typedef unsigned long long uint64_t;
32typedef signed char int8_t;
33typedef short int16_t;
34typedef int int32_t;
35typedef long long int64_t;
36
37typedef int8_t int_least8_t;
38typedef int16_t int_least16_t;
39typedef int32_t int_least32_t;
40typedef int64_t int_least64_t;
41typedef uint8_t uint_least8_t;
42typedef uint16_t uint_least16_t;
43typedef uint32_t uint_least32_t;
44typedef uint64_t uint_least64_t;
45
46typedef int8_t int_fast8_t;
47typedef int16_t int_fast16_t;
48typedef int32_t int_fast32_t;
49typedef int64_t int_fast64_t;
50typedef uint8_t uint_fast8_t;
51typedef uint16_t uint_fast16_t;
52typedef uint32_t uint_fast32_t;
53typedef uint64_t uint_fast64_t;
54
55typedef long intptr_t;
56typedef unsigned long uintptr_t;
57
58typedef long long intmax_t;
59typedef unsigned long long uintmax_t;
60
61#define SIZE_MAX ULONG_MAX
62
63#endif
64