1 | /* |
---|
2 | This file is part of MutekP. |
---|
3 | |
---|
4 | MutekP is free software; you can redistribute it and/or modify it |
---|
5 | under the terms of the GNU General Public License as published by |
---|
6 | the Free Software Foundation; either version 2 of the License, or |
---|
7 | (at your option) any later version. |
---|
8 | |
---|
9 | MutekP is distributed in the hope that it will be useful, but |
---|
10 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
12 | General Public License for more details. |
---|
13 | |
---|
14 | You should have received a copy of the GNU General Public License |
---|
15 | along with MutekP; if not, write to the Free Software Foundation, |
---|
16 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
17 | |
---|
18 | UPMC / LIP6 / SOC (c) 2009 |
---|
19 | Copyright Ghassan Almaless <ghassan.almaless@gmail.com> |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef _STDINT_H_ |
---|
23 | #define _STDINT_H_ |
---|
24 | |
---|
25 | /* Exact-width integer types */ |
---|
26 | typedef signed char int8_t; |
---|
27 | typedef unsigned char uint8_t; |
---|
28 | |
---|
29 | typedef signed short int int16_t; |
---|
30 | typedef unsigned short int uint16_t; |
---|
31 | |
---|
32 | typedef signed int int32_t; |
---|
33 | typedef unsigned int uint32_t; |
---|
34 | |
---|
35 | typedef signed long long int int64_t; |
---|
36 | typedef unsigned long long int uint64_t; |
---|
37 | |
---|
38 | /* Integer type capable of holding object pointers */ |
---|
39 | typedef uint32_t uintptr_t; |
---|
40 | typedef int32_t intptr_t; |
---|
41 | |
---|
42 | /* Fastest integer types for 32-bits architecture*/ |
---|
43 | typedef int32_t int_fast8_t; |
---|
44 | typedef uint32_t uint_fast8_t; |
---|
45 | |
---|
46 | typedef int32_t int_fast16_t; |
---|
47 | typedef uint32_t uint_fast16_t; |
---|
48 | |
---|
49 | typedef int32_t int_fast32_t; |
---|
50 | typedef uint32_t uint_fast32_t; |
---|
51 | |
---|
52 | typedef int64_t int_fast64_t; |
---|
53 | typedef uint64_t uint_fast64_t ; |
---|
54 | |
---|
55 | /* Integer type capable of holding object sizes */ |
---|
56 | typedef uint32_t size_t; |
---|
57 | typedef int32_t ssize_t; |
---|
58 | |
---|
59 | /* Minimum of signed integer types */ |
---|
60 | #define INT8_MIN (-128) |
---|
61 | #define INT16_MIN (-32767-1) |
---|
62 | #define INT32_MIN (-2147483647-1) |
---|
63 | |
---|
64 | /* Maximum of signed integral types. */ |
---|
65 | #define INT8_MAX (127) |
---|
66 | #define INT16_MAX (32767) |
---|
67 | #define INT32_MAX (2147483647) |
---|
68 | |
---|
69 | /* Maximum of unsigned integral types. */ |
---|
70 | #define UINT8_MAX (255) |
---|
71 | #define UINT16_MAX (65535) |
---|
72 | #define UINT32_MAX (4294967295U) |
---|
73 | |
---|
74 | #endif |
---|