]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4002: clang 3.4 unable to compile
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 12 Jan 2014 02:12:13 +0000 (19:12 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Jan 2014 02:12:13 +0000 (19:12 -0700)
part 2: fix new/delete operator overloading by not defining on clang

include/SquidNew.h

index a308097524cdf8a1bdfc3a07f27acd4403023478..0321a8819a313e69d471da3b1bc4317bb4bb762a 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef SQUID_NEW_H
 #define SQUID_NEW_H
 
-#ifndef __SUNPRO_CC
+#if !defined(__SUNPRO_CC) && !defined(__clang__)
 /* Any code using libstdc++ must have externally resolvable overloads
  * for void * operator new - which means in the .o for the binary,
  * or in a shared library. static libs don't propogate the symbol
@@ -57,6 +57,6 @@ _SQUID_EXTERNNEW_ void operator delete[] (void *address) throw()
     xfree(address);
 }
 
-#endif /* __SUNPRO_CC */
+#endif /* !__SUNPRO_CC && !__clang__*/
 
 #endif /* SQUID_NEW_H */