From 8bc1f4321e16e4478c3c0936d06e453f0a9ec69f Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Wed, 8 Jan 2014 11:21:46 +0100 Subject: Better checks around the typedefs to avoid redefinitions. 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 -#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 -- cgit v0.10.1