From 29ae0b72fea632d74d41e0c8b1262783bdadd583 Mon Sep 17 00:00:00 2001 From: Wei-keng Liao Date: Tue, 6 Jun 2017 18:20:26 -0500 Subject: [PATCH] X_INT64_MIN, X_INT64_MAX, and X_UINT64_MAX should be used internally --- include/nc4internal.h | 3 +++ include/netcdf.h | 3 --- libsrc/ncx.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/nc4internal.h b/include/nc4internal.h index 1aa606823f..aec7cb0bb4 100644 --- a/include/nc4internal.h +++ b/include/nc4internal.h @@ -66,6 +66,9 @@ typedef enum {VAR, DIM, ATT} NC_OBJ_T; #define X_LONG_MIN X_INT_MIN #define X_LONG_MAX X_INT_MAX #define X_UINT_MAX 4294967295U +#define X_INT64_MIN (-9223372036854775807LL-1LL) +#define X_INT64_MAX 9223372036854775807LL +#define X_UINT64_MAX 18446744073709551615ULL #ifdef WIN32 /* Windows, of course, has to be a *little* different. */ #define X_FLOAT_MAX 3.402823466e+38f #else diff --git a/include/netcdf.h b/include/netcdf.h index 176c7913e5..cbdd185601 100644 --- a/include/netcdf.h +++ b/include/netcdf.h @@ -101,9 +101,6 @@ extern "C" { #define NC_MAX_INT64 (9223372036854775807LL) #define NC_MIN_INT64 (-9223372036854775807LL-1) #define NC_MAX_UINT64 (18446744073709551615ULL) -#define X_INT64_MAX (9223372036854775807LL) -#define X_INT64_MIN (-X_INT64_MAX - 1) -#define X_UINT64_MAX (18446744073709551615ULL) /**@}*/ /** Name of fill value attribute. If you wish a variable to use a diff --git a/libsrc/ncx.h b/libsrc/ncx.h index 805d110a38..6b2313c176 100644 --- a/libsrc/ncx.h +++ b/libsrc/ncx.h @@ -92,9 +92,9 @@ #define X_INT_MIN (-2147483647-1) #define X_INT_MAX 2147483647 #define X_UINT_MAX 4294967295U -#define X_LONGLONG_MIN (-9223372036854775807LL-1LL) -#define X_LONGLONG_MAX 9223372036854775807LL -#define X_ULONGLONG_MAX 18446744073709551615ULL +#define X_INT64_MIN (-9223372036854775807LL-1LL) +#define X_INT64_MAX 9223372036854775807LL +#define X_UINT64_MAX 18446744073709551615ULL #define X_FLOAT_MAX 3.402823466e+38f #define X_FLOAT_MIN (-X_FLOAT_MAX) #define X_FLT_MAX X_FLOAT_MAX /* alias compatible with limits.h */