[Insight-developers] gdcm and stdint.h

Bill Hoffman bill.hoffman at kitware.com
Thu Feb 3 10:06:23 EST 2011


On 2/3/2011 4:54 AM, Mathieu Malaterre wrote:
> Hi bill,
>
>    There is no explicit question in your mail. But I am guessing you
> want to change:
>
Sorry, I was not clear, basically, I was pointing out there are issues. 
The issues we are having are in modular ITK, and figuring out the 
correct -I stuff to use a propagate to the rest of the system.  We also 
found out that the intel compiler on windows does not work.

Intel windows break:
http://www.cdash.org/CDash/viewBuildError.php?buildid=847604

> #include "stdint.h" (the one with quote ", not angle brackets)
>
> into
>
> #include "C99/stdint.h"
>
>    I am fine with this change. This should reduce the list of include paths.
>

So, I guess the C99/stdint.h is MSVC only.   So maybe it should be in a 
directory MSVC_C99/stdint.h.

Also, to make this work, we would want to put the MSVC_C99 directory as 
a sub-directory of an existing -I path for gdcm, maybe in 
Source/Common/MSVC_C00?

Are these the only types needed:

typedef  signed char         int8_t;
typedef  signed short        int16_t;
typedef  signed int          int32_t;
typedef  unsigned char       uint8_t;
typedef  unsigned short      uint16_t;
typedef  unsigned int        uint32_t;
typedef  unsigned __int64    uint64_t;

What is the purpose of the C99/stdint.h if the above will work?

Maybe it should go back to not using the C99/stdint.h at all...

What about this:


#ifdef GDCM_HAVE_STDINT_H
#include <stdint.h>
#else
#ifdef GDCM_HAVE_INTTYPES_H
// Old system only have this
#include <inttypes.h>   // For uint8_t uint16_t and uint32_t
#else
#ifdef _WIN32
typedef  signed char         int8_t;
typedef  signed short        int16_t;
typedef  signed int          int32_t;
typedef  unsigned char       uint8_t;
typedef  unsigned short      uint16_t;
typedef  unsigned int        uint32_t;
typedef  unsigned __int64    uint64_t;
#endif
#endif

-Bill




More information about the Insight-developers mailing list