X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fnmem.h;h=fb7910c7d51361e2e8967e01cd4a0105605c00a3;hb=f00d2bb50f84184c7682bd31a5361648a909f9f6;hp=936432384afe62ec3eb0abcc2d5bfd72010e6e23;hpb=8356ea58313ee1f350226172cf99bfb0b7c5583c;p=yaz-moved-to-github.git diff --git a/include/yaz/nmem.h b/include/yaz/nmem.h index 9364323..fb7910c 100644 --- a/include/yaz/nmem.h +++ b/include/yaz/nmem.h @@ -44,13 +44,22 @@ YAZ_BEGIN_CDECL typedef struct nmem_control *NMEM; /** \brief Set to 1 if YAZ BER integer is 64-bit ; 0 otherwise */ -#define NMEM_64 0 +#ifndef NMEM_64 +#define NMEM_64 1 +#endif #if NMEM_64 -/** \brief BER/utility integer (64-bit or more) */ + +#ifdef _MSC_VER +/* Visual Studio. 6.0 and later supports this */ +typedef __int64 nmem_int_t; +#define NMEM_INT_PRINTF "%I64d" +#else +/* C99 */ typedef long long int nmem_int_t; -/** \brief printf format for nmem_int_t type */ #define NMEM_INT_PRINTF "%lld" +#endif + #else /** \brief BER/utility integer (32-bit on most platforms) */ typedef int nmem_int_t;