------------------------------------------------------------ revno: 13468 revision-id: rousskov@measurement-factory.com-20140616224523-gegrv0l06by152a2 parent: chtsanti@users.sourceforge.net-20140616195850-wc51o2sy9md8hdsu committer: Alex Rousskov branch nick: trunk timestamp: Mon 2014-06-16 16:45:23 -0600 message: Fix build on some 32bit systems with strtoll() broken by r13429 that duplicated unportable portability code. GCC exits with errors: integer constant is too large for 'long' type nnnL constants are "long" and cannot hold 64bit integers on 32bit platforms. Use LL suffix for 64bit constants for now. It remains to be seen how portable that LL C++ extension is: https://gcc.gnu.org/onlinedocs/gcc/Long-Long.html Also fixed INT64_MIN #define (missing parenthesis). ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: rousskov@measurement-factory.com-20140616224523-\ # gegrv0l06by152a2 # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 9280cba7758df245a96d868fa5d53ff24343782d # timestamp: 2014-06-16 22:53:57 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: chtsanti@users.sourceforge.net-20140616195850-\ # wc51o2sy9md8hdsu # # Begin patch === modified file 'compat/strtoll.c' --- compat/strtoll.c 2012-08-28 13:00:30 +0000 +++ compat/strtoll.c 2014-06-16 22:45:23 +0000 @@ -49,7 +49,7 @@ #define INT64_MIN LONG_MIN #else /* 32 bit system */ -#define INT64_MIN -9223372036854775807L-1L +#define INT64_MIN (-9223372036854775807LL-1LL) #endif #endif @@ -59,7 +59,7 @@ #define INT64_MAX LONG_MAX #else /* 32 bit system */ -#define INT64_MAX 9223372036854775807L +#define INT64_MAX 9223372036854775807LL #endif #endif === modified file 'src/parser/Tokenizer.cc' --- src/parser/Tokenizer.cc 2014-06-02 17:52:31 +0000 +++ src/parser/Tokenizer.cc 2014-06-16 22:45:23 +0000 @@ -14,7 +14,7 @@ #define INT64_MIN LONG_MIN #else /* 32 bit system */ -#define INT64_MIN -9223372036854775807L-1L +#define INT64_MIN (-9223372036854775807LL-1LL) #endif #endif @@ -24,7 +24,7 @@ #define INT64_MAX LONG_MAX #else /* 32 bit system */ -#define INT64_MAX 9223372036854775807L +#define INT64_MAX 9223372036854775807LL #endif #endif