]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Nov 2009 11:44:35 +0000 (00:44 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Nov 2009 11:44:35 +0000 (00:44 +1300)
Fix Profiler gcc-ism: asm syntax is gcc-specific

include/profiling.h

index 49389e49e12d04a9cd9dc6d504d978ba0289a15f..07da9f62cc6e4456005cd09ef048e0c2bb6ae1d5 100644 (file)
@@ -18,7 +18,7 @@ typedef int64_t  hrtime_t;
 #include <sys/time.h>
 #endif
 
-#if defined(__i386) || defined(__i386__)
+#if defined(__GNUC__) && ( defined(__i386) || defined(__i386__) )
 static inline hrtime_t
 get_tick(void)
 {
@@ -30,7 +30,7 @@ asm volatile ("rdtsc":"=A" (regs));
     /* Note that "rdtsc" is relatively slow OP and stalls the CPU pipes, so use it wisely */
 }
 
-#elif defined(__x86_64) || defined(__x86_64__)
+#elif defined(__GNUC__) && ( defined(__x86_64) || defined(__x86_64__) )
 static inline hrtime_t
 get_tick(void)
 {
@@ -41,7 +41,7 @@ asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
     return (hrtime_t)hi << 32 | lo;
 }
 
-#elif defined(__alpha)
+#elif defined(__GNUC__) && defined(__alpha)
 static inline hrtime_t
 get_tick(void)
 {