]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix build on Intel's compiler suite.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 28 May 2013 13:24:54 +0000 (15:24 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 28 May 2013 13:24:54 +0000 (15:24 +0200)
Forcing 64-bit file operations on 64-bit systems exposes
an issue in stdlibc++, which is covered by gcc but not by
icc in non-gcc mode. This patch prevents forcing 64-bit
file operations on systems where long int is 64-bit or more.
It also properly protects a couple of gcc-specific #pragma.

configure.ac
tools/purge/convert.cc
tools/purge/socket.cc

index 3108ea7062dc5ad570cd6d7ca81993b4f5a80c62..ff84540b1d271c65b28182c552e52b8e2eda6643 100644 (file)
@@ -1583,6 +1583,9 @@ case "$withval" in
 esac
 ])
 
+#hack. Let's early-detect sizeof(long)
+AC_CHECK_SIZEOF(long)
+
 if test "x$squid_opt_enable_large_files" = "xyes" -a "x$buildmodel" = "x"; then
   for model in POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG; do
     if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then
@@ -1595,7 +1598,8 @@ if test "x$squid_opt_enable_large_files" = "xyes" -a "x$buildmodel" = "x"; then
   fi
 fi
 if test "x$buildmodel" = "xdefault" -o "x$buildmodel" = "x"; then
-  if test "x$squid_opt_enable_large_files" = "xyes" ; then
+  # define _FILE_OFFSET_BITS if requested and needed
+  if test "x$squid_opt_enable_large_files" = "xyes" -a $ac_cv_sizeof_long -le 4 ; then
     AC_MSG_NOTICE([Enabling -D_FILE_OFFSET_BITS=64])
     CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS"
     CXXFLAGS="-D_FILE_OFFSET_BITS=64 $CXXFLAGS"
index 64e8ec1415ca3946e86fdead06447bcf30d1cb5c..4c636cae0589e0d7ec4be6c89572b87b13e59190 100644 (file)
@@ -40,7 +40,7 @@
 // Initial revision
 //
 //
-#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__)
+#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) && !defined(__INTEL_COMPILER)
 #pragma implementation
 #endif
 
index 2bd472cc145176e57bf7bb96d5f13578f2906c91..3ef4102b01858b75f7eb22a3491dfa412baefc99 100644 (file)
@@ -42,7 +42,7 @@
 // Initial revision
 //
 //
-#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__)
+#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) && !defined(__INTEL_COMPILER)
 #pragma implementation
 #endif