From: Francesco Chemolli Date: Sun, 1 Jun 2014 21:04:31 +0000 (+0200) Subject: Copy compat from compat/strtoll.c to Tokenizer.cc X-Git-Tag: SQUID_3_5_0_1~216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12d28df03502faa0fb38e16318883dad3ba4f653;p=thirdparty%2Fsquid.git Copy compat from compat/strtoll.c to Tokenizer.cc --- diff --git a/src/parser/Tokenizer.cc b/src/parser/Tokenizer.cc index b3bc3ce5a2..6a664bafcf 100644 --- a/src/parser/Tokenizer.cc +++ b/src/parser/Tokenizer.cc @@ -1,6 +1,35 @@ #include "squid.h" #include "parser/Tokenizer.h" +#if HAVE_CTYPE_H +#include +#endif +#if HAVE_ERRNO_H +#include +#endif +#if HAVE_STDINT_H +#include +#endif +#ifndef INT64_MIN +/* Native 64 bit system without strtoll() */ +#if defined(LONG_MIN) && (SIZEOF_LONG == 8) +#define INT64_MIN LONG_MIN +#else +/* 32 bit system */ +#define INT64_MIN -9223372036854775807L-1L +#endif +#endif + +#ifndef INT64_MAX +/* Native 64 bit system without strtoll() */ +#if defined(LONG_MAX) && (SIZEOF_LONG == 8) +#define INT64_MAX LONG_MAX +#else +/* 32 bit system */ +#define INT64_MAX 9223372036854775807L +#endif +#endif + bool Parser::Tokenizer::token(SBuf &returnedToken, const CharacterSet &delimiters) {