From b75a34b721862435b4a72cc920eae10d063d019c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 26 Nov 2002 00:35:11 +0000 Subject: [PATCH] Fix the non-gcc-3.x definitions of G_LIKELY and G_UNLIKELY. (Reported by * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY and G_UNLIKELY. (Reported by Dan Mills) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gmacros.h | 23 +++++++++++++++++++++-- 8 files changed, 56 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51dcd23..0139650 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 51dcd23..0139650 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 51dcd23..0139650 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 51dcd23..0139650 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 51dcd23..0139650 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 51dcd23..0139650 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 51dcd23..0139650 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2002-11-26 Matthias Clasen + + * glib/gmacros.h: Fix the non-gcc-3.x definitions of G_LIKELY + and G_UNLIKELY. (Reported by Dan Mills) + 2002-11-25 Matthias Clasen * glib/gfileutils.c (g_build_path): diff --git a/glib/gmacros.h b/glib/gmacros.h index a07214f..20555e3 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -225,10 +225,29 @@ #define G_LIKELY(expr) __builtin_expect (_G_BOOLEAN_EXPR(expr), 1) #define G_UNLIKELY(expr) __builtin_expect (_G_BOOLEAN_EXPR(expr), 0) #else -#define G_LIKELY(expr) expr -#define G_UNLIKELY(expr) expr +#define G_LIKELY(expr) (expr) +#define G_UNLIKELY(expr) (expr) #endif #endif /* __G_MACROS_H__ */ + + + + + + + + + + + + + + + + + + + -- 2.7.4