diff options
Diffstat (limited to 'src/pulsecore/macro.h')
-rw-r--r-- | src/pulsecore/macro.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h index fd33b7bb..f9ce949a 100644 --- a/src/pulsecore/macro.h +++ b/src/pulsecore/macro.h @@ -30,7 +30,6 @@ #include <stdio.h> #include <stdlib.h> -#include <pulsecore/log.h> #include <pulse/gccmacro.h> #ifndef PACKAGE @@ -40,7 +39,7 @@ #ifndef PA_LIKELY #ifdef __GNUC__ #define PA_LIKELY(x) (__builtin_expect(!!(x),1)) -#define PA_UNLIKELY(x) (__builtin_expect((x),0)) +#define PA_UNLIKELY(x) (__builtin_expect(!!(x),0)) #else #define PA_LIKELY(x) (x) #define PA_UNLIKELY(x) (x) @@ -208,7 +207,7 @@ typedef int pa_bool_t; #define PA_PATH_SEP_CHAR '/' #endif -#ifdef __GNUC__ +#if defined(__GNUC__) && defined(__ELF__) #define PA_WARN_REFERENCE(sym, msg) \ __asm__(".section .gnu.warning." #sym); \ @@ -221,4 +220,13 @@ typedef int pa_bool_t; #endif +#if defined(__i386__) || defined(__x86_64__) +#define PA_DEBUG_TRAP __asm__("int $3") +#else +#define PA_DEBUG_TRAP raise(SIGTRAP) +#endif + +/* We include this at the very last place */ +#include <pulsecore/log.h> + #endif |