Mercurial > hg > th-libs
diff th_types.h @ 391:6e6c8c4fc210
Buildsystem improvements.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Mar 2016 14:08:38 +0200 |
parents | 0078dc5f6260 |
children | 851468fda833 |
line wrap: on
line diff
--- a/th_types.h Thu Mar 03 13:49:45 2016 +0200 +++ b/th_types.h Thu Mar 03 14:08:38 2016 +0200 @@ -17,12 +17,6 @@ # ifndef HAVE_INT_TYPES # define HAVE_INT_TYPES 1 # endif -// Check for arch bitness -# if UINTPTR_MAX == 0xffffffff -# define TH_ARCH 32 -# elif UINTPTR_MAX == 0xffffffffffffffff -# define TH_ARCH 64 -# endif #endif #ifdef HAVE_SYS_TYPES_H @@ -32,6 +26,19 @@ # endif #endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif + + +// Check for arch bitness +#if UINTPTR_MAX == 0xffffffff +# define TH_ARCH 32 +#elif UINTPTR_MAX == 0xffffffffffffffff +# define TH_ARCH 64 +#endif + + #if !defined(TH_ARCH) # if defined(__LP64__) || defined(_LP64) # define TH_ARCH 64