From de3bfc0a74e6e574b6887065fe48f9de83443b83 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 14 Feb 2002 07:06:56 +0000 Subject: [PATCH] Use the #if branch with G_BREAKPOINT() also on Win32. Remove the separate 2002-02-14 Tor Lillqvist * glib/gmessages.c (g_logv): Use the #if branch with G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for MSVC, G_BREAKPOINT() does exactly that. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gmessages.c | 16 ++++++---------- 9 files changed, 54 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3a1d227b4..3e3901f1c 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-02-14 Tor Lillqvist + + * glib/gmessages.c (g_logv): Use the #if branch with + G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for + MSVC, G_BREAKPOINT() does exactly that. + 2002-02-14 James Henstridge * m4macros/glib-gettext.m4: add third argument to the AC_DEFINE diff --git a/glib/gmessages.c b/glib/gmessages.c index c8707edc5..3dbd90151 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -537,21 +537,17 @@ g_logv (const gchar *log_domain, if (test_level & G_LOG_FLAG_FATAL) { -#if defined (G_ENABLE_DEBUG) && defined (SIGTRAP) +#ifdef G_OS_WIN32 + MessageBox (NULL, fatal_msg_buf, NULL, MB_OK); +#endif +#if defined (G_ENABLE_DEBUG) && (defined (SIGTRAP) || defined (G_OS_WIN32)) if (!(test_level & G_LOG_FLAG_RECURSION)) G_BREAKPOINT (); else abort (); -#else /* !G_ENABLE_DEBUG || !SIGTRAP */ -#ifdef G_OS_WIN32 - MessageBox (NULL, fatal_msg_buf, NULL, MB_OK); -#endif -# if defined (_MSC_VER) && defined (_DEBUG) - /* let's see the call stack ... */ - __asm int 3 -# endif +#else /* !G_ENABLE_DEBUG || !(SIGTRAP || G_OS_WIN32) */ abort (); -#endif /* !G_ENABLE_DEBUG || !SIGTRAP */ +#endif /* !G_ENABLE_DEBUG || !(SIGTRAP || G_OS_WIN32) */ } depth--;