]> Creatis software - gdcm.git/blob - src/gdcmSystem.h
Fix mistypings
[gdcm.git] / src / gdcmSystem.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmSystem.h,v $
5   Language:  C++
6   Date:      $Date: 2008/02/13 18:53:34 $
7   Version:   $Revision: 1.6 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef _GDCMSYSTEM_H_
20 #define _GDCMSYSTEM_H_
21
22 #include "gdcmConfigure.h"
23
24 //-----------------------------------------------------------------------------
25 //This is needed when compiling in debug mode
26 #ifdef _MSC_VER
27 // 'identifier' : class 'type' needs to have dll-interface to be used by
28 // clients of class 'type2'
29 #pragma warning ( disable : 4251 )
30 // non dll-interface class 'type' used as base for dll-interface class 'type2'
31 #pragma warning ( disable : 4275 )
32 // 'identifier' : identifier was truncated to 'number' characters in the
33 // debug information
34 #pragma warning ( disable : 4786 )
35 //'identifier' : decorated name length exceeded, name was truncated
36 #pragma warning ( disable : 4503 )
37 // C++ exception specification ignored except to indicate a 
38 // function is not __declspec(nothrow)
39 #pragma warning ( disable : 4290 )
40 // signed/unsigned mismatch
41 #pragma warning ( disable : 4018 )
42 // return type for 'identifier' is '' (ie; not a UDT or reference to UDT. Will
43 // produce errors if applied using infix notation
44 #pragma warning ( disable : 4284 )
45 // 'type' : forcing value to bool 'true' or 'false' (performance warning)
46 // //#pragma warning ( disable : 4800 )
47 #endif //_MSC_VER
48
49 //-----------------------------------------------------------------------------
50 #ifdef CMAKE_HAVE_STDINT_H
51    #include <stdint.h>
52 #else
53 #ifdef CMAKE_HAVE_INTTYPES_H
54    // Old system only have this
55    #include <inttypes.h>   // For uint8_t uint16_t and uint32_t
56 #else
57 // Broken plateforms do not respect C99 and do not provide those typedef
58 // Special case for recent Borland compiler, comes with stdint.h
59 #if defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560)  \
60                       || defined(__MINGW32__)
61 typedef  signed char         int8_t;
62 typedef  signed short        int16_t;
63 typedef  signed int          int32_t;
64 /// \fixme : what about 64 bits ?
65 typedef  unsigned char       uint8_t;
66 typedef  unsigned short      uint16_t;
67 typedef  unsigned int        uint32_t;
68 #else
69 #error "Sorry your plateform is not supported"
70 #endif // defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560)  || defined(__MINGW32__)
71 #endif // CMAKE_HAVE_INTTYPES_H
72 #endif // CMAKE_HAVE_STDINT_H
73
74 // Basically for VS6 and bcc 5.5.1:
75 #ifndef UINT32_MAX
76 #define UINT32_MAX    (4294967295U)
77 #endif
78
79 //-----------------------------------------------------------------------------
80 #endif