[PATCH] Fix build with GCC 4.7 (and probably other C++11 compilers).

From: Dmitry Kurochkin <dmitry.kurochkin_at_measurement-factory.com>
Date: Wed, 20 Jun 2012 14:37:31 +0400

Hi all.

C++11 introduced user-defined literals, it breaks some code which
was valid before. In particular, whitespace is now needed after
a string literal and before something that could be a valid
user-defined literal. See "User-defined literals and whitespace"
section at [1] for more details.

There are many such cases in Squid, e.g.:

  outputBuffer.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize);

Which results in errors when building with GCC 4.7:

  error: unable to find string literal operator 'operator"" PRIu64'

The patch adds spaces between string literals and macros.

Regards,
  Dmitry

[1] http://gcc.gnu.org/gcc-4.7/porting_to.html

Received on Wed Jun 20 2012 - 10:40:29 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 21 2012 - 12:00:08 MDT