From: Amos Jeffries Date: Sun, 6 Dec 2009 01:36:24 +0000 (+1300) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_0_STABLE21~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a4edbae9173c5b92e6def726dc0448949be0e0c;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Fix Profiler gcc-ism: asm syntax is gcc-specific --- diff --git a/include/profiling.h b/include/profiling.h index f47074edc8..e5cc5bd875 100644 --- a/include/profiling.h +++ b/include/profiling.h @@ -18,7 +18,7 @@ typedef int64_t hrtime_t; #include #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 @@ get_tick(void) return (hrtime_t)hi << 32 | lo; } -#elif defined(__alpha) +#elif defined(__GNUC__) && defined(__alpha) static inline hrtime_t get_tick(void) {