GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmTypes.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMTYPES_H
15 #define GDCMTYPES_H
16
17 #include "gdcmConfigure.h"
18 #include "gdcmWin32.h"
19 #include "gdcmLegacyMacro.h"
20
21 //-----------------------------------------------------------------------------
22 #ifdef GDCM_HAVE_STDINT_H
23 #ifndef __STDC_LIMIT_MACROS
24 #define __STDC_LIMIT_MACROS
25 #endif // __STDC_LIMIT_MACROS
26 #include <stdint.h>
27 //#undef __STDC_LIMIT_MACROS
28 #else
29 #ifdef GDCM_HAVE_INTTYPES_H
30 // Old system only have this
31 #include <inttypes.h> // For uint8_t uint16_t and uint32_t
32 #else
33 // Broken plateforms do not respect C99 and do not provide those typedef
34 // Special case for recent Borland compiler, comes with stdint.h
35 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x0560) || defined(__MINGW32__)
36 typedef signed char int8_t;
37 typedef signed short int16_t;
38 typedef signed int int32_t;
39 typedef unsigned char uint8_t;
40 typedef unsigned short uint16_t;
41 typedef unsigned int uint32_t;
42 typedef unsigned __int64 uint64_t;
43 #elif defined(_MSC_VER)
44 #include "stdint.h"
45 #else
46 #error "Sorry, your platform is not supported"
47 #endif // defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560) || defined(__MINGW32__)
48 #endif // GDCM_HAVE_INTTYPES_H
49 #endif // GDCM_HAVE_STDINT_H
50
51 // Basically for VS6 and bcc 5.5.1:
52 #ifndef UINT32_MAX
53 #define UINT32_MAX (4294967295U)
54 #endif
55
56 //-----------------------------------------------------------------------------
57 #endif //GDCMTYPES_H