Re: [PATCH] Workaround for bug 3613

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 24 Aug 2012 22:31:45 +1200

On 17/08/2012 1:02 a.m., Kinkie wrote:
> Hi all,
> the following patch is a workaround for bug 3613 (clang -std=c++0x
> misdetects c99 stdlib functions).
>
>
> === modified file 'configure.ac'
> --- configure.ac 2012-08-14 22:51:53 +0000
> +++ configure.ac 2012-08-16 12:05:56 +0000
> @@ -67,7 +67,13 @@
> AX_CXX_COMPILE_STDCXX_0X
> if test "x$ax_cv_cxx_compile_cxx0x_cxx" = "xyes" -a \
> "x$squid_host_os" != "xmingw" ; then
> - CXXFLAGS="$CXXFLAGS -std=c++0x"
> + #BUG 3613: when clang -std=c++0x is used, it activates a "strict mode"
> + # in the system libraries, which makes some c99 methods unavailable
> + # (e.g. strtoll), yet configure detects them as avilable.
> + case "$CXX" in
> + *clang++*) ;; #do nothing
> + *) CXXFLAGS="$CXXFLAGS -std=c++0x" ;;
> + esac
> fi
>
> # test for programs
>
>
>

+1. Please commit.

NP: this gets a "--fixes squid:3613" but don't close the bug.

Amos
Received on Fri Aug 24 2012 - 10:31:56 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 24 2012 - 12:00:12 MDT