diff options
author | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-01-08 10:21:46 (GMT) |
---|---|---|
committer | Magnus Lundborg <lundborg.magnus@gmail.com> | 2014-01-08 10:21:46 (GMT) |
commit | 8bc1f4321e16e4478c3c0936d06e453f0a9ec69f (patch) | |
tree | 192ca0ea11e2a35af46274c5ca592ab97afda015 /include | |
parent | c3617738c8183748a2128126e612e74ea660bf87 (diff) |
Better checks around the typedefs to avoid redefinitions.
Diffstat (limited to 'include')
-rw-r--r-- | include/tng_io.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/tng_io.h b/include/tng_io.h index 3a5aa37..f2c77a4 100644 --- a/include/tng_io.h +++ b/include/tng_io.h @@ -282,6 +282,7 @@ #else /* Visual Studio does not contain inttypes.h and stdint.h. Some defines and * typedefs are used from the GNU C Library */ +#ifndef _STDINT_H #ifdef _MSC_VER typedef __int32 int32_t; @@ -291,8 +292,10 @@ typedef unsigned __int64 uint64_t; #else #include <stdint.h> -#endif +#endif /* _MSC_VER */ +#endif /* _STDINT_H */ +#ifndef _INTTYPES_H /* This is from inttypes.h (GNU C Library) */ /* The ISO C99 standard specifies that these macros must only be defined if explicitly requested. */ @@ -315,7 +318,9 @@ typedef unsigned __int64 uint64_t; # define PRId64 __PRI64_PREFIX "d" #endif -#endif +#endif /* _INTTYPES_H */ + +#endif /* USE_STD_INTTYPES_H */ #ifndef USE_WINDOWS |