2007-03-03 [colin] 2.8.0cvs10
authorColin Leroy <colin@colino.net>
Sat, 3 Mar 2007 10:51:26 +0000 (10:51 +0000)
committerColin Leroy <colin@colino.net>
Sat, 3 Mar 2007 10:51:26 +0000 (10:51 +0000)
* configure.ac
* src/main.c
* src/common/plugin.c
Fix bug 1134, 'Valgrind macros unhandled
by Irix's cc'

ChangeLog
PATCHSETS
configure.ac
src/common/plugin.c
src/main.c

index 7e433ccb7f1f215222e4047b9f230e11c65567a9..88ced332db21664b8e6ceee8ac36eab3a999ef89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-03-03 [colin]     2.8.0cvs10
+
+       * configure.ac
+       * src/main.c
+       * src/common/plugin.c
+               Fix bug 1134, 'Valgrind macros unhandled 
+               by Irix's cc'
+
 2007-03-02 [colin]     2.8.0cvs9
 
        * src/mbox.c
 2007-03-02 [colin]     2.8.0cvs9
 
        * src/mbox.c
index 610f65215893184a515d28ee41026ebbe05fde7f..0d81b41064e98bc0c815d4e410336b5710768039 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.174 -r 1.274.2.175 src/mainwindow.c;  cvs diff -u -r 1.25.2.24 -r 1.25.2.25 src/matcher_parser_parse.y;  cvs diff -u -r 1.204.2.121 -r 1.204.2.122 src/prefs_common.c;  cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/prefs_msg_colors.c;  cvs diff -u -r 1.60.2.42 -r 1.60.2.43 src/procmsg.h;  cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/gtk/colorlabel.h;  ) > 2.8.0cvs7.patchset
 ( cvs diff -u -r 1.274.2.175 -r 1.274.2.176 src/mainwindow.c;  cvs diff -u -r 1.2.2.17 -r 1.2.2.18 src/gtk/colorlabel.c;  ) > 2.8.0cvs8.patchset
 ( cvs diff -u -r 1.28.2.33 -r 1.28.2.34 src/mbox.c;  ) > 2.8.0cvs9.patchset
 ( cvs diff -u -r 1.274.2.174 -r 1.274.2.175 src/mainwindow.c;  cvs diff -u -r 1.25.2.24 -r 1.25.2.25 src/matcher_parser_parse.y;  cvs diff -u -r 1.204.2.121 -r 1.204.2.122 src/prefs_common.c;  cvs diff -u -r 1.1.2.32 -r 1.1.2.33 src/prefs_msg_colors.c;  cvs diff -u -r 1.60.2.42 -r 1.60.2.43 src/procmsg.h;  cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/gtk/colorlabel.h;  ) > 2.8.0cvs7.patchset
 ( cvs diff -u -r 1.274.2.175 -r 1.274.2.176 src/mainwindow.c;  cvs diff -u -r 1.2.2.17 -r 1.2.2.18 src/gtk/colorlabel.c;  ) > 2.8.0cvs8.patchset
 ( cvs diff -u -r 1.28.2.33 -r 1.28.2.34 src/mbox.c;  ) > 2.8.0cvs9.patchset
+( cvs diff -u -r 1.654.2.2458 -r 1.654.2.2459 configure.ac;  cvs diff -u -r 1.115.2.140 -r 1.115.2.141 src/main.c;  cvs diff -u -r 1.13.2.26 -r 1.13.2.27 src/common/plugin.c;  ) > 2.8.0cvs10.patchset
index d72cc2df9d5910eadd583f0388830df5e0108053..dfc1cbd3a96bb28e4d6af86fdd76a37c432461e0 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -829,6 +829,24 @@ else
 fi
 AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
 
 fi
 AM_CONDITIONAL(CLAWS_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
 
+AC_MSG_CHECKING([whether to use valgrind])
+AC_ARG_ENABLE(valgrind,
+       [  --disable-valgrind           Do not use valgrind for debugging],
+       [ac_cv_enable_valgrind=$enableval], [ac_cv_enable_valgrind=yes])
+if test x$ac_cv_enable_valgrind = xyes; then
+       AC_MSG_RESULT(yes)
+       PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
+                         ac_cv_enable_valgrind=yes, ac_cv_enable_valgrind=no)
+       if test x"$ac_cv_enable_valgrind" = xyes; then
+               AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
+       else
+               AC_MSG_RESULT(not found)
+       fi
+else
+       AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(CLAWS_VALGRIND, test x"$ac_cv_enable_valgrind" = x"yes")
+
 dnl ****************************
 dnl ** Final configure output **
 dnl ****************************
 dnl ****************************
 dnl ** Final configure output **
 dnl ****************************
index 4c89a6c7e83c5e81f60a3ea36b1596be32bb1909..9b5925e59c1cf24ada595beb541335db12bfe863 100644 (file)
@@ -33,8 +33,9 @@
 #include "plugin.h"
 #include "prefs.h"
 #include "claws.h"
 #include "plugin.h"
 #include "prefs.h"
 #include "claws.h"
+#ifdef HAVE_VALGRIND
 #include "valgrind.h"
 #include "valgrind.h"
-
+#endif
 struct _Plugin
 {
        gchar   *filename;
 struct _Plugin
 {
        gchar   *filename;
@@ -382,9 +383,13 @@ void plugin_unload(Plugin *plugin)
                plugin_done();
        }
 
                plugin_done();
        }
 
+#ifdef HAVE_VALGRIND
        if (!RUNNING_ON_VALGRIND) {
                g_module_close(plugin->module);
        }
        if (!RUNNING_ON_VALGRIND) {
                g_module_close(plugin->module);
        }
+#else
+       g_module_close(plugin->module);
+#endif
        plugins = g_slist_remove(plugins, plugin);
        g_free(plugin->filename);
        g_free(plugin);
        plugins = g_slist_remove(plugins, plugin);
        g_free(plugin->filename);
        g_free(plugin);
index 52505ba60a13240a20af0b3e125e4aa76c6c2809..4036651ce3fbac1b7d1cb39556c5ccf80af40611 100644 (file)
 #include "imap-thread.h"
 #endif
 #include "stock_pixmap.h"
 #include "imap-thread.h"
 #endif
 #include "stock_pixmap.h"
+#ifdef HAVE_VALGRIND
 #include "valgrind.h"
 #include "valgrind.h"
-
+#endif
 #if USE_OPENSSL
 #  include "ssl.h"
 #endif
 #if USE_OPENSSL
 #  include "ssl.h"
 #endif
@@ -1339,9 +1340,11 @@ void app_will_exit(GtkWidget *widget, gpointer data)
        }
 
        sock_cleanup();
        }
 
        sock_cleanup();
+#ifdef HAVE_VALGRIND
        if (RUNNING_ON_VALGRIND) {
                summary_clear_list(mainwin->summaryview);
        }
        if (RUNNING_ON_VALGRIND) {
                summary_clear_list(mainwin->summaryview);
        }
+#endif
        if (folderview_get_selected_item(mainwin->folderview))
                folder_item_close(folderview_get_selected_item(mainwin->folderview));
        gtk_main_quit();
        if (folderview_get_selected_item(mainwin->folderview))
                folder_item_close(folderview_get_selected_item(mainwin->folderview));
        gtk_main_quit();