[PATCH] Workaround for bug 3613

From: Kinkie <gkinkie_at_gmail.com>
Date: Thu, 16 Aug 2012 15:02:06 +0200

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

-- 
    /kinkie
Received on Thu Aug 16 2012 - 13:02:13 MDT

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