# HG changeset patch # User Matti Hamalainen # Date 1457006918 -7200 # Node ID 6e6c8c4fc210a20eb21a55dee900e01a1aab0cab # Parent eb79d11d8d404c2cd17d08f0601e886dff8f8054 Buildsystem improvements. diff -r eb79d11d8d40 -r 6e6c8c4fc210 Makefile --- a/Makefile Thu Mar 03 13:49:45 2016 +0200 +++ b/Makefile Thu Mar 03 14:08:38 2016 +0200 @@ -9,11 +9,12 @@ RANLIB ?= ranlib INSTALL ?= install -CFLAGS += -DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_CONFIG_H=1 +CFLAGS += -DHAVE_STRING_H -DHAVE_CONFIG_H LDFLAGS += -#CFLAGS += -DHAVE_STDINT_H +CFLAGS += -DHAVE_STDINT_H #CFLAGS += -DHAVE_SYS_TYPES_H +CFLAGS += -DHAVE_INTTYPES_H # Miscellaneous BINPATH=./ diff -r eb79d11d8d40 -r 6e6c8c4fc210 th_types.h --- 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 +#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