Re: /bzr/squid3/trunk/ r13429: Copy compat from compat/strtoll.c to Tokenizer.cc

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Mon, 02 Jun 2014 10:48:05 -0600

On 06/01/2014 03:04 PM, Francesco Chemolli wrote:
> ------------------------------------------------------------
> revno: 13429
> committer: Francesco Chemolli <kinkie_at_squid-cache.org>
> branch nick: trunk
> timestamp: Sun 2014-06-01 23:04:31 +0200
> message:
> Copy compat from compat/strtoll.c to Tokenizer.cc

> === modified file 'src/parser/Tokenizer.cc'
> --- a/src/parser/Tokenizer.cc 2014-05-30 12:41:24 +0000
> +++ b/src/parser/Tokenizer.cc 2014-06-01 21:04:31 +0000
...
> +#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
> +

Hi Kinkie,

    The replacement definitions of INT64_MAX/MIN hardly belong to
Tokenizer.cc. If those definitions are needed in at least two places
(compat/strtoll.c and Tokenizer.cc), please move them into a compat/
file (new or old) instead of duplicating them.

Thank you,

Alex.
Received on Mon Jun 02 2014 - 16:48:06 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 02 2014 - 12:00:10 MDT