Imported Upstream version 2.9.0
[debian/cc1111] / device / include / pic16 / stdint.h
1 /*-------------------------------------------------------------------------
2   stdint.h - ISO C99 7.18 Integer types <stdint.h>
3
4              Written By -  Maarten Brock, sourceforge.brock@dse.nl (2005)
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 -------------------------------------------------------------------------*/
20
21 #ifndef _STDINT_H
22 #define _STDINT_H       1
23
24 /* Exact integral types.  */
25
26 /* Signed.  */
27
28 typedef signed char             int8_t;
29 typedef short int               int16_t;
30 typedef long int                int32_t;
31
32 /* Unsigned.  */
33 typedef unsigned char           uint8_t;
34 typedef unsigned short int      uint16_t;
35 typedef unsigned long int       uint32_t;
36
37
38 /* Small types.  */
39
40 /* Signed.  */
41 typedef signed char             int_least8_t;
42 typedef short int               int_least16_t;
43 typedef long int                int_least32_t;
44
45 /* Unsigned.  */
46 typedef unsigned char           uint_least8_t;
47 typedef unsigned short int      uint_least16_t;
48 typedef unsigned long int       uint_least32_t;
49
50
51 /* Fast types.  */
52
53 /* Signed.  */
54 typedef signed char             int_fast8_t;
55 typedef int                     int_fast16_t;
56 typedef long int                int_fast32_t;
57
58 /* Unsigned.  */
59 typedef unsigned char           uint_fast8_t;
60 typedef unsigned int            uint_fast16_t;
61 typedef unsigned long int       uint_fast32_t;
62
63
64 /* Types for `void *' pointers.  */
65 typedef long int                intptr_t;
66 typedef unsigned long int       uintptr_t;
67
68
69 /* Largest integral types.  */
70 typedef long int                intmax_t;
71 typedef unsigned long int       uintmax_t;
72
73
74 /* Limits of integral types.  */
75
76 /* Minimum of signed integral types.  */
77 # define INT8_MIN               (-128)
78 # define INT16_MIN              (-32767-1)
79 # define INT32_MIN              (-2147483647L-1)
80 /* Maximum of signed integral types.  */
81 # define INT8_MAX               (127)
82 # define INT16_MAX              (32767)
83 # define INT32_MAX              (2147483647L)
84
85 /* Maximum of unsigned integral types.  */
86 # define UINT8_MAX              (255)
87 # define UINT16_MAX             (65535)
88 # define UINT32_MAX             (4294967295UL)
89
90 /* Minimum of signed integral types having a minimum size.  */
91 # define INT_LEAST8_MIN         (-128)
92 # define INT_LEAST16_MIN        (-32767-1)
93 # define INT_LEAST32_MIN        (-2147483647L-1)
94 /* Maximum of signed integral types having a minimum size.  */
95 # define INT_LEAST8_MAX         (127)
96 # define INT_LEAST16_MAX        (32767)
97 # define INT_LEAST32_MAX        (2147483647L)
98
99 /* Maximum of unsigned integral types having a minimum size.  */
100 # define UINT_LEAST8_MAX        (255)
101 # define UINT_LEAST16_MAX       (65535)
102 # define UINT_LEAST32_MAX       (4294967295UL)
103
104 /* Minimum of fast signed integral types having a minimum size.  */
105 # define INT_FAST8_MIN          (-128)
106 # define INT_FAST16_MIN         (-32767-1)
107 # define INT_FAST32_MIN         (-2147483647L-1)
108
109 /* Maximum of fast signed integral types having a minimum size.  */
110 # define INT_FAST8_MAX          (127)
111 # define INT_FAST16_MAX         (32767)
112 # define INT_FAST32_MAX         (2147483647L)
113
114 /* Maximum of fast unsigned integral types having a minimum size.  */
115 # define UINT_FAST8_MAX         (255)
116 # define UINT_FAST16_MAX        (65535)
117 # define UINT_FAST32_MAX        (4294967295UL)
118
119 /* Values to test for integral types holding `void *' pointer.  */
120 # define INTPTR_MIN             (-2147483647L-1)
121 # define INTPTR_MAX             (2147483647L)
122 # define UINTPTR_MAX            (4294967295UL)
123
124 /* Minimum for largest signed integral type.  */
125 # define INTMAX_MIN             (-__INT32_C(-2147483647L)-1)
126 /* Maximum for largest signed integral type.  */
127 # define INTMAX_MAX             (__INT32_C(2147483647L))
128
129 /* Maximum for largest unsigned integral type.  */
130 # define UINTMAX_MAX            (__UINT32_C(4294967295UL))
131
132
133 /* Limits of other integer types.  */
134
135 /* Limits of `ptrdiff_t' type.  */
136 # define PTRDIFF_MIN           (-2147483647L-1)
137 # define PTRDIFF_MAX           (2147483647L)
138
139 /* Limit of `size_t' type.  */
140 # define SIZE_MAX               (65535)
141
142 /* Signed.  */
143 # define INT8_C(c)      c
144 # define INT16_C(c)     c
145 # define INT32_C(c)     c ## L
146
147 /* Unsigned.  */
148 # define UINT8_C(c)     c ## U
149 # define UINT16_C(c)    c ## U
150 # define UINT32_C(c)    c ## UL
151
152 /* Maximal type.  */
153 # define INTMAX_C(c)    c ## L
154 # define UINTMAX_C(c)   c ## UL
155
156
157 #endif /* stdint.h */