From: Matthias Clasen Date: Tue, 26 Nov 2002 00:35:11 +0000 (+0000) Subject: Fix the non-gcc-3.x definitions of G_LIKELY and G_UNLIKELY. (Reported by X-Git-Tag: GLIB_2_1_3~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b75a34b721862435b4a72cc920eae10d063d019c;p=platform%2Fupstream%2Fglib.git 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) --- 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__ */ + + + + + + + + + + + + + + + + + + +