Mercurial > hg > th-libs
changeset 308:0078dc5f6260
Define TH_PTRSIZE and UINTPTR_MAX if not defined already.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 22 Feb 2016 21:51:56 +0200 |
parents | fa6113e556c5 |
children | 2c87abec62db |
files | th_types.h |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/th_types.h Mon Feb 22 21:51:29 2016 +0200 +++ b/th_types.h Mon Feb 22 21:51:56 2016 +0200 @@ -62,6 +62,12 @@ # define TH_PRIu_SIZE_T "u" # define TH_PRId_SSIZE_T "d" # define TH_PRIx_SIZE_T "x" +# ifndef TH_PTRSIZE +# define TH_PTRSIZE 32 +# endif +# ifndef UINTPTR_MAX +# define UINTPTR_MAX 0xffffffff +# endif #elif TH_ARCH == 64 # define TH_ARCH_64BIT 1 # define TH_PRIu32 "u" @@ -73,6 +79,12 @@ # define TH_PRIu_SIZE_T "lu" # define TH_PRId_SSIZE_T "ld" # define TH_PRIx_SIZE_T "lx" +# ifndef TH_PTRSIZE +# define TH_PTRSIZE 64 +# endif +# ifndef UINTPTR_MAX +# define UINTPTR_MAX 0xffffffffffffffff +# endif #else # error Could not determine architecture (32/64bit), please define TH_ARCH=32 or 64 #endif