Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
utils
pstdint.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
29
#ifndef MRPT_PSTDINT_H
30
#define MRPT_PSTDINT_H
31
32
#include <stddef.h>
33
#include <limits.h>
34
#include <signal.h>
35
36
/*
37
* For gcc with _STDINT_H, fill in the PRINTF_INT*_MODIFIER macros, and
38
* do nothing else. On the Mac OS X version of gcc this is _STDINT_H_.
39
*/
40
41
//#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) )) && !defined (_PSTDINT_H_INCLUDED)
42
#if (\
43
(defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L)\
44
|| (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250))\
45
|| defined(__GNUC__)\
46
) && !defined (_PSTDINT_H_INCLUDED)
47
48
#include <stdint.h>
49
#define _PSTDINT_H_INCLUDED
50
# ifndef PRINTF_INT64_MODIFIER
51
# define PRINTF_INT64_MODIFIER "ll"
52
# endif
53
# ifndef PRINTF_INT32_MODIFIER
54
# define PRINTF_INT32_MODIFIER "l"
55
# endif
56
# ifndef PRINTF_INT16_MODIFIER
57
# define PRINTF_INT16_MODIFIER "h"
58
# endif
59
# ifndef PRINTF_INTMAX_MODIFIER
60
# define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
61
# endif
62
# ifndef PRINTF_INT64_HEX_WIDTH
63
# define PRINTF_INT64_HEX_WIDTH "16"
64
# endif
65
# ifndef PRINTF_INT32_HEX_WIDTH
66
# define PRINTF_INT32_HEX_WIDTH "8"
67
# endif
68
# ifndef PRINTF_INT16_HEX_WIDTH
69
# define PRINTF_INT16_HEX_WIDTH "4"
70
# endif
71
# ifndef PRINTF_INT8_HEX_WIDTH
72
# define PRINTF_INT8_HEX_WIDTH "2"
73
# endif
74
# ifndef PRINTF_INT64_DEC_WIDTH
75
# define PRINTF_INT64_DEC_WIDTH "20"
76
# endif
77
# ifndef PRINTF_INT32_DEC_WIDTH
78
# define PRINTF_INT32_DEC_WIDTH "10"
79
# endif
80
# ifndef PRINTF_INT16_DEC_WIDTH
81
# define PRINTF_INT16_DEC_WIDTH "5"
82
# endif
83
# ifndef PRINTF_INT8_DEC_WIDTH
84
# define PRINTF_INT8_DEC_WIDTH "3"
85
# endif
86
# ifndef PRINTF_INTMAX_HEX_WIDTH
87
# define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
88
# endif
89
# ifndef PRINTF_INTMAX_DEC_WIDTH
90
# define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
91
# endif
92
93
/*
94
* Something really weird is going on with Open Watcom. Just pull some of
95
* these duplicated definitions from Open Watcom's stdint.h file for now.
96
*/
97
98
# if defined (__WATCOMC__) && __WATCOMC__ >= 1250
99
# if !defined (INT64_C)
100
# define INT64_C(x) (x + (INT64_MAX - INT64_MAX))
101
# endif
102
# if !defined (UINT64_C)
103
# define UINT64_C(x) (x + (UINT64_MAX - UINT64_MAX))
104
# endif
105
# if !defined (INT32_C)
106
# define INT32_C(x) (x + (INT32_MAX - INT32_MAX))
107
# endif
108
# if !defined (UINT32_C)
109
# define UINT32_C(x) (x + (UINT32_MAX - UINT32_MAX))
110
# endif
111
# if !defined (INT16_C)
112
# define INT16_C(x) (x)
113
# endif
114
# if !defined (UINT16_C)
115
# define UINT16_C(x) (x)
116
# endif
117
# if !defined (INT8_C)
118
# define INT8_C(x) (x)
119
# endif
120
# if !defined (UINT8_C)
121
# define UINT8_C(x) (x)
122
# endif
123
# if !defined (UINT64_MAX)
124
# define UINT64_MAX 18446744073709551615ULL
125
# endif
126
# if !defined (INT64_MAX)
127
# define INT64_MAX 9223372036854775807LL
128
# endif
129
# if !defined (UINT32_MAX)
130
# define UINT32_MAX 4294967295UL
131
# endif
132
# if !defined (INT32_MAX)
133
# define INT32_MAX 2147483647L
134
# endif
135
# if !defined (INTMAX_MAX)
136
# define INTMAX_MAX INT64_MAX
137
# endif
138
# if !defined (INTMAX_MIN)
139
# define INTMAX_MIN INT64_MIN
140
# endif
141
# endif
142
#endif
143
144
#ifndef _PSTDINT_H_INCLUDED
145
#define _PSTDINT_H_INCLUDED
146
147
#ifndef SIZE_MAX
148
# define SIZE_MAX (~(size_t)0)
149
#endif
150
151
/*
152
* Deduce the type assignments from limits.h under the assumption that
153
* integer sizes in bits are powers of 2, and follow the ANSI
154
* definitions.
155
*/
156
157
#ifndef UINT8_MAX
158
# define UINT8_MAX 0xff
159
#endif
160
#ifndef uint8_t
161
# if (UCHAR_MAX == UINT8_MAX) || defined (S_SPLINT_S)
162
typedef
unsigned
char
uint8_t;
163
# define UINT8_C(v) ((uint8_t) v)
164
# else
165
# error "Platform not supported"
166
# endif
167
#endif
168
169
#ifndef INT8_MAX
170
# define INT8_MAX 0x7f
171
#endif
172
#ifndef INT8_MIN
173
# define INT8_MIN INT8_C(0x80)
174
#endif
175
#ifndef int8_t
176
# if (SCHAR_MAX == INT8_MAX) || defined (S_SPLINT_S)
177
typedef
signed
char
int8_t;
178
# define INT8_C(v) ((int8_t) v)
179
# else
180
# error "Platform not supported"
181
# endif
182
#endif
183
184
#ifndef UINT16_MAX
185
# define UINT16_MAX 0xffff
186
#endif
187
#ifndef uint16_t
188
#if (UINT_MAX == UINT16_MAX) || defined (S_SPLINT_S)
189
typedef
unsigned
int
uint16_t;
190
# ifndef PRINTF_INT16_MODIFIER
191
# define PRINTF_INT16_MODIFIER ""
192
# endif
193
# define UINT16_C(v) ((uint16_t) (v))
194
#elif (USHRT_MAX == UINT16_MAX)
195
typedef
unsigned
short
uint16_t;
196
# define UINT16_C(v) ((uint16_t) (v))
197
# ifndef PRINTF_INT16_MODIFIER
198
# define PRINTF_INT16_MODIFIER "h"
199
# endif
200
#else
201
#error "Platform not supported"
202
#endif
203
#endif
204
205
#ifndef INT16_MAX
206
# define INT16_MAX 0x7fff
207
#endif
208
#ifndef INT16_MIN
209
# define INT16_MIN INT16_C(0x8000)
210
#endif
211
#ifndef int16_t
212
#if (INT_MAX == INT16_MAX) || defined (S_SPLINT_S)
213
typedef
signed
int
int16_t;
214
# define INT16_C(v) ((int16_t) (v))
215
# ifndef PRINTF_INT16_MODIFIER
216
# define PRINTF_INT16_MODIFIER ""
217
# endif
218
#elif (SHRT_MAX == INT16_MAX)
219
typedef
signed
short
int16_t;
220
# define INT16_C(v) ((int16_t) (v))
221
# ifndef PRINTF_INT16_MODIFIER
222
# define PRINTF_INT16_MODIFIER "h"
223
# endif
224
#else
225
#error "Platform not supported"
226
#endif
227
#endif
228
229
#ifndef UINT32_MAX
230
# define UINT32_MAX (0xffffffffUL)
231
#endif
232
#ifndef uint32_t
233
#if (ULONG_MAX == UINT32_MAX) || defined (S_SPLINT_S)
234
# ifndef OPENCV_FLANN_DIST_H_ // An ugly solution to a collision of cvflann for MSC
235
typedef
unsigned
long
uint32_t;
236
# endif
237
# define UINT32_C(v) v ## UL
238
# ifndef PRINTF_INT32_MODIFIER
239
# define PRINTF_INT32_MODIFIER "l"
240
# endif
241
#elif (UINT_MAX == UINT32_MAX)
242
typedef
unsigned
int
uint32_t;
243
# ifndef PRINTF_INT32_MODIFIER
244
# define PRINTF_INT32_MODIFIER ""
245
# endif
246
# define UINT32_C(v) v ## U
247
#elif (USHRT_MAX == UINT32_MAX)
248
typedef
unsigned
short
uint32_t;
249
# define UINT32_C(v) ((unsigned short) (v))
250
# ifndef PRINTF_INT32_MODIFIER
251
# define PRINTF_INT32_MODIFIER ""
252
# endif
253
#else
254
#error "Platform not supported"
255
#endif
256
#endif
257
258
#ifndef INT32_MAX
259
# define INT32_MAX (0x7fffffffL)
260
#endif
261
#ifndef INT32_MIN
262
# define INT32_MIN INT32_C(0x80000000)
263
#endif
264
#ifndef int32_t
265
#if (LONG_MAX == INT32_MAX) || defined (S_SPLINT_S)
266
typedef
signed
long
int32_t;
267
# define INT32_C(v) v ## L
268
# ifndef PRINTF_INT32_MODIFIER
269
# define PRINTF_INT32_MODIFIER "l"
270
# endif
271
#elif (INT_MAX == INT32_MAX)
272
typedef
signed
int
int32_t;
273
# define INT32_C(v) v
274
# ifndef PRINTF_INT32_MODIFIER
275
# define PRINTF_INT32_MODIFIER ""
276
# endif
277
#elif (SHRT_MAX == INT32_MAX)
278
typedef
signed
short
int32_t;
279
# define INT32_C(v) ((short) (v))
280
# ifndef PRINTF_INT32_MODIFIER
281
# define PRINTF_INT32_MODIFIER ""
282
# endif
283
#else
284
#error "Platform not supported"
285
#endif
286
#endif
287
288
/*
289
* The macro stdint_int64_defined is temporarily used to record
290
* whether or not 64 integer support is available. It must be
291
* defined for any 64 integer extensions for new platforms that are
292
* added.
293
*/
294
295
#undef stdint_int64_defined
296
#if (defined(__STDC__) && defined(__STDC_VERSION__)) || defined (S_SPLINT_S)
297
# if (__STDC__ && __STDC_VERSION >= 199901L) || defined (S_SPLINT_S)
298
# define stdint_int64_defined
299
typedef
long
long
int64_t;
300
typedef
unsigned
long
long
uint64_t;
301
# define UINT64_C(v) v ## ULL
302
# define INT64_C(v) v ## LL
303
# ifndef PRINTF_INT64_MODIFIER
304
# define PRINTF_INT64_MODIFIER "ll"
305
# endif
306
# endif
307
#endif
308
309
#if !defined (stdint_int64_defined)
310
# if defined(__GNUC__)
311
# define stdint_int64_defined
312
__extension__
typedef
long
long
int64_t;
313
__extension__
typedef
unsigned
long
long
uint64_t;
314
# define UINT64_C(v) v ## ULL
315
# define INT64_C(v) v ## LL
316
# ifndef PRINTF_INT64_MODIFIER
317
# define PRINTF_INT64_MODIFIER "ll"
318
# endif
319
# elif defined(__MWERKS__) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || defined (__APPLE_CC__) || defined (_LONG_LONG) || defined (_CRAYC) || defined (S_SPLINT_S)
320
# define stdint_int64_defined
321
typedef
long
long
int64_t;
322
typedef
unsigned
long
long
uint64_t;
323
# define UINT64_C(v) v ## ULL
324
# define INT64_C(v) v ## LL
325
# ifndef PRINTF_INT64_MODIFIER
326
# define PRINTF_INT64_MODIFIER "ll"
327
# endif
328
# elif (defined(__WATCOMC__) && defined(__WATCOM_INT64__)) || (defined(_MSC_VER) && _INTEGRAL_MAX_BITS >= 64) || (defined (__BORLANDC__) && __BORLANDC__ > 0x460) || defined (__alpha) || defined (__DECC)
329
# define stdint_int64_defined
330
typedef
__int64 int64_t;
331
typedef
unsigned
__int64 uint64_t;
332
# define UINT64_C(v) v ## UI64
333
# define INT64_C(v) v ## I64
334
# ifndef PRINTF_INT64_MODIFIER
335
# define PRINTF_INT64_MODIFIER "I64"
336
# endif
337
# endif
338
#endif
339
340
#if !defined (LONG_LONG_MAX) && defined (INT64_C)
341
# define LONG_LONG_MAX INT64_C (9223372036854775807)
342
#endif
343
#ifndef ULONG_LONG_MAX
344
# define ULONG_LONG_MAX UINT64_C (18446744073709551615)
345
#endif
346
347
#if !defined (INT64_MAX) && defined (INT64_C)
348
# define INT64_MAX INT64_C (9223372036854775807)
349
#endif
350
#if !defined (INT64_MIN) && defined (INT64_C)
351
# define INT64_MIN INT64_C (-9223372036854775808)
352
#endif
353
#if !defined (UINT64_MAX) && defined (INT64_C)
354
# define UINT64_MAX UINT64_C (18446744073709551615)
355
#endif
356
357
/*
358
* Width of hexadecimal for number field.
359
*/
360
361
#ifndef PRINTF_INT64_HEX_WIDTH
362
# define PRINTF_INT64_HEX_WIDTH "16"
363
#endif
364
#ifndef PRINTF_INT32_HEX_WIDTH
365
# define PRINTF_INT32_HEX_WIDTH "8"
366
#endif
367
#ifndef PRINTF_INT16_HEX_WIDTH
368
# define PRINTF_INT16_HEX_WIDTH "4"
369
#endif
370
#ifndef PRINTF_INT8_HEX_WIDTH
371
# define PRINTF_INT8_HEX_WIDTH "2"
372
#endif
373
374
#ifndef PRINTF_INT64_DEC_WIDTH
375
# define PRINTF_INT64_DEC_WIDTH "20"
376
#endif
377
#ifndef PRINTF_INT32_DEC_WIDTH
378
# define PRINTF_INT32_DEC_WIDTH "10"
379
#endif
380
#ifndef PRINTF_INT16_DEC_WIDTH
381
# define PRINTF_INT16_DEC_WIDTH "5"
382
#endif
383
#ifndef PRINTF_INT8_DEC_WIDTH
384
# define PRINTF_INT8_DEC_WIDTH "3"
385
#endif
386
387
/*
388
* Ok, lets not worry about 128 bit integers for now. Moore's law says
389
* we don't need to worry about that until about 2040 at which point
390
* we'll have bigger things to worry about.
391
*/
392
393
#ifdef stdint_int64_defined
394
typedef
int64_t
intmax_t
;
395
typedef
uint64_t
uintmax_t
;
396
# define INTMAX_MAX INT64_MAX
397
# define INTMAX_MIN INT64_MIN
398
# define UINTMAX_MAX UINT64_MAX
399
# define UINTMAX_C(v) UINT64_C(v)
400
# define INTMAX_C(v) INT64_C(v)
401
# ifndef PRINTF_INTMAX_MODIFIER
402
# define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
403
# endif
404
# ifndef PRINTF_INTMAX_HEX_WIDTH
405
# define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
406
# endif
407
# ifndef PRINTF_INTMAX_DEC_WIDTH
408
# define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
409
# endif
410
#else
411
typedef
int32_t
intmax_t
;
412
typedef
uint32_t
uintmax_t
;
413
# define INTMAX_MAX INT32_MAX
414
# define UINTMAX_MAX UINT32_MAX
415
# define UINTMAX_C(v) UINT32_C(v)
416
# define INTMAX_C(v) INT32_C(v)
417
# ifndef PRINTF_INTMAX_MODIFIER
418
# define PRINTF_INTMAX_MODIFIER PRINTF_INT32_MODIFIER
419
# endif
420
# ifndef PRINTF_INTMAX_HEX_WIDTH
421
# define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT32_HEX_WIDTH
422
# endif
423
# ifndef PRINTF_INTMAX_DEC_WIDTH
424
# define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT32_DEC_WIDTH
425
# endif
426
#endif
427
428
/*
429
* Because this file currently only supports platforms which have
430
* precise powers of 2 as bit sizes for the default integers, the
431
* least definitions are all trivial. Its possible that a future
432
* version of this file could have different definitions.
433
*/
434
435
#ifndef stdint_least_defined
436
typedef
int8_t
int_least8_t
;
437
typedef
uint8_t
uint_least8_t
;
438
typedef
int16_t
int_least16_t
;
439
typedef
uint16_t
uint_least16_t
;
440
typedef
int32_t
int_least32_t
;
441
typedef
uint32_t
uint_least32_t
;
442
# define PRINTF_LEAST32_MODIFIER PRINTF_INT32_MODIFIER
443
# define PRINTF_LEAST16_MODIFIER PRINTF_INT16_MODIFIER
444
# define UINT_LEAST8_MAX UINT8_MAX
445
# define INT_LEAST8_MAX INT8_MAX
446
# define UINT_LEAST16_MAX UINT16_MAX
447
# define INT_LEAST16_MAX INT16_MAX
448
# define UINT_LEAST32_MAX UINT32_MAX
449
# define INT_LEAST32_MAX INT32_MAX
450
# define INT_LEAST8_MIN INT8_MIN
451
# define INT_LEAST16_MIN INT16_MIN
452
# define INT_LEAST32_MIN INT32_MIN
453
# ifdef stdint_int64_defined
454
typedef
int64_t int_least64_t;
455
typedef
uint64_t uint_least64_t;
456
# define PRINTF_LEAST64_MODIFIER PRINTF_INT64_MODIFIER
457
# define UINT_LEAST64_MAX UINT64_MAX
458
# define INT_LEAST64_MAX INT64_MAX
459
# define INT_LEAST64_MIN INT64_MIN
460
# endif
461
#endif
462
#undef stdint_least_defined
463
464
/*
465
* The ANSI C committee pretending to know or specify anything about
466
* performance is the epitome of misguided arrogance. The mandate of
467
* this file is to *ONLY* ever support that absolute minimum
468
* definition of the fast integer types, for compatibility purposes.
469
* No extensions, and no attempt to suggest what may or may not be a
470
* faster integer type will ever be made in this file. Developers are
471
* warned to stay away from these types when using this or any other
472
* stdint.h.
473
*/
474
475
typedef
int_least8_t
int_fast8_t
;
476
typedef
uint_least8_t
uint_fast8_t
;
477
typedef
int_least16_t
int_fast16_t
;
478
typedef
uint_least16_t
uint_fast16_t
;
479
typedef
int_least32_t
int_fast32_t
;
480
typedef
uint_least32_t
uint_fast32_t
;
481
#define UINT_FAST8_MAX UINT_LEAST8_MAX
482
#define INT_FAST8_MAX INT_LEAST8_MAX
483
#define UINT_FAST16_MAX UINT_LEAST16_MAX
484
#define INT_FAST16_MAX INT_LEAST16_MAX
485
#define UINT_FAST32_MAX UINT_LEAST32_MAX
486
#define INT_FAST32_MAX INT_LEAST32_MAX
487
#define INT_FAST8_MIN INT_LEAST8_MIN
488
#define INT_FAST16_MIN INT_LEAST16_MIN
489
#define INT_FAST32_MIN INT_LEAST32_MIN
490
#ifdef stdint_int64_defined
491
typedef
int_least64_t int_fast64_t;
492
typedef
uint_least64_t uint_fast64_t;
493
# define UINT_FAST64_MAX UINT_LEAST64_MAX
494
# define INT_FAST64_MAX INT_LEAST64_MAX
495
# define INT_FAST64_MIN INT_LEAST64_MIN
496
#endif
497
498
#undef stdint_int64_defined
499
500
/*
501
* Whatever piecemeal, per compiler thing we can do about the wchar_t
502
* type limits.
503
*/
504
505
#if defined(__WATCOMC__) || defined(_MSC_VER) || defined (__GNUC__)
506
# include <wchar.h>
507
# ifndef WCHAR_MIN
508
# define WCHAR_MIN 0
509
# endif
510
# ifndef WCHAR_MAX
511
# define WCHAR_MAX ((wchar_t)-1)
512
# endif
513
#endif
514
515
/*
516
* Whatever piecemeal, per compiler/platform thing we can do about the
517
* (u)intptr_t types and limits.
518
*/
519
520
#if defined (_MSC_VER) && defined (_UINTPTR_T_DEFINED)
521
# define STDINT_H_UINTPTR_T_DEFINED
522
#endif
523
524
#ifndef STDINT_H_UINTPTR_T_DEFINED
525
# if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (_WIN64)
526
# define stdint_intptr_bits 64
527
# elif defined (__WATCOMC__) || defined (__TURBOC__)
528
# if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
529
# define stdint_intptr_bits 16
530
# else
531
# define stdint_intptr_bits 32
532
# endif
533
# elif defined (__i386__) || defined (_WIN32) || defined (WIN32)
534
# define stdint_intptr_bits 32
535
# elif defined (__INTEL_COMPILER)
536
/* TODO -- what will Intel do about x86-64? */
537
# endif
538
539
# ifdef stdint_intptr_bits
540
# define stdint_intptr_glue3_i(a,b,c) a##b##c
541
# define stdint_intptr_glue3(a,b,c) stdint_intptr_glue3_i(a,b,c)
542
# ifndef PRINTF_INTPTR_MODIFIER
543
# define PRINTF_INTPTR_MODIFIER stdint_intptr_glue3(PRINTF_INT,stdint_intptr_bits,_MODIFIER)
544
# endif
545
# ifndef PTRDIFF_MAX
546
# define PTRDIFF_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
547
# endif
548
# ifndef PTRDIFF_MIN
549
# define PTRDIFF_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
550
# endif
551
# ifndef UINTPTR_MAX
552
# define UINTPTR_MAX stdint_intptr_glue3(UINT,stdint_intptr_bits,_MAX)
553
# endif
554
# ifndef INTPTR_MAX
555
# define INTPTR_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
556
# endif
557
# ifndef INTPTR_MIN
558
# define INTPTR_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
559
# endif
560
# ifndef INTPTR_C
561
# define INTPTR_C(x) stdint_intptr_glue3(INT,stdint_intptr_bits,_C)(x)
562
# endif
563
# ifndef UINTPTR_C
564
# define UINTPTR_C(x) stdint_intptr_glue3(UINT,stdint_intptr_bits,_C)(x)
565
# endif
566
typedef
stdint_intptr_glue3
(uint,
stdint_intptr_bits
,_t)* uintptr_t;
567
typedef
stdint_intptr_glue3
(
int
,
stdint_intptr_bits
,_t)* intptr_t;
568
# else
569
/* TODO -- This following is likely wrong for some platforms, and does
570
nothing for the definition of uintptr_t. */
571
typedef
ptrdiff_t intptr_t;
572
# endif
573
# define STDINT_H_UINTPTR_T_DEFINED
574
#endif
575
576
/*
577
* Assumes sig_atomic_t is signed and we have a 2s complement machine.
578
*/
579
580
#ifndef SIG_ATOMIC_MAX
581
# define SIG_ATOMIC_MAX ((((sig_atomic_t) 1) << (sizeof (sig_atomic_t)*CHAR_BIT-1)) - 1)
582
#endif
583
584
#endif
585
586
#endif // guard
587
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013