From: Dmitry Volyntsev Date: Tue, 3 Mar 2020 16:00:54 +0000 (+0300) Subject: Fixed integer constant is too large compilation error by gcc 4.4. X-Git-Tag: 0.4.0~32 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=6bf7947ddde5bf2901027ce123f0d5f261fb79d0;p=njs.git Fixed integer constant is too large compilation error by gcc 4.4. --- diff --git a/src/njs_number.c b/src/njs_number.c index 38b2d493..ee7b99fc 100644 --- a/src/njs_number.c +++ b/src/njs_number.c @@ -236,7 +236,7 @@ njs_uint64_to_string(njs_vm_t *vm, njs_value_t *value, uint64_t u64) u_char *dst, *p; u_char buf[128]; - if (njs_fast_path(u64 < 0x3fffffffffff)) { + if (njs_fast_path(u64 < 0x3fffffffffffULL)) { /* Fits to short_string. */ dst = njs_string_short_start(value); diff --git a/src/njs_number.h b/src/njs_number.h index 886c7ea1..cab751bb 100644 --- a/src/njs_number.h +++ b/src/njs_number.h @@ -8,7 +8,7 @@ #define _NJS_NUMBER_H_INCLUDED_ -#define NJS_MAX_LENGTH (0x1fffffffffffff) +#define NJS_MAX_LENGTH (0x1fffffffffffffULL) double njs_key_to_index(const njs_value_t *value);