]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Copy compat from compat/strtoll.c to Tokenizer.cc
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 1 Jun 2014 21:04:31 +0000 (23:04 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 1 Jun 2014 21:04:31 +0000 (23:04 +0200)
src/parser/Tokenizer.cc

index b3bc3ce5a25d021cf61125612a9b190fde245e3d..6a664bafcfbe6ec5e5fde87379848d63b65ae506 100644 (file)
@@ -1,6 +1,35 @@
 #include "squid.h"
 #include "parser/Tokenizer.h"
 
+#if HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#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)
 {