X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Futils.h;h=eaa9a723ac0a6d5db1533954976f5958a19bbabc;hp=a4af3300e38d8c9d45370a30d908513a6759c6f2;hb=4a9f6c276daf54acbb2f5951f0435bfb6f014809;hpb=7d870583a6bf21a2ffb7b6f051b702064623892e diff --git a/ginac/utils.h b/ginac/utils.h index a4af3300..eaa9a723 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -24,10 +24,15 @@ #ifndef __GINAC_UTILS_H__ #define __GINAC_UTILS_H__ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include #include +#ifdef HAVE_STDINT_H +#include // for uintptr_t +#endif #include "assertion.h" @@ -65,12 +70,8 @@ inline int compare_pointers(const T * a, const T * b) return 0; } -#if SIZEOF_VOID_P == SIZEOF_INT -typedef unsigned int p_int; -#elif SIZEOF_VOID_P == SIZEOF_LONG -typedef unsigned long p_int; -#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG -typedef unsigned long long p_int; +#ifdef HAVE_STDINT_H +typedef uintptr_t p_int; #else typedef unsigned long p_int; #endif