[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-362-g1b9711497

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Nov 7 07:27:43 UTC 2021


The branch, gtk3 has been updated
       via  1b9711497fb9caf525bd513abbe64bc2eb34963c (commit)
       via  4967f15fd57f7e48ae5f3bd749ee6665ebdafb9d (commit)
       via  c2fa37c1923d553c81fbdceeb023a0bd8f4491f6 (commit)
       via  7e9e3dc1d266f12a317d7b2b7f3299f710457307 (commit)
       via  1af27911f461538f492be1d5b32aafac5ec5c361 (commit)
       via  f54996a2a98aa1ea9072f3678c7ecc35d80e7c79 (commit)
       via  1a59bfc48a858aba259bb14c6cc3c901650c761c (commit)
       via  2d5fca2a39f97a2e6b0865ea9480ae0baa7e7b23 (commit)
       via  f9c2a443074f2c54f6fba1c54af6b53a8dc410aa (commit)
       via  86fcec37b5085d309276978f527ed78314b06608 (commit)
       via  2abc7b175058e182cf3e4b3fde36329497c9ff0c (commit)
      from  7eb44fab06cca53ccd8af89b00e75ed2e8e41f8d (commit)

Summary of changes:
 configure.ac                                       | 63 +++++++++++-----------
 src/Makefile.am                                    |  3 ++
 src/addrcache.c                                    |  2 +
 src/addrclip.c                                     |  2 +
 src/addressbook.c                                  |  5 --
 src/addritem.c                                     |  2 +
 src/addrquery.c                                    |  2 +
 src/addrselect.c                                   |  2 +
 src/common/file-utils.h                            |  1 -
 src/common/mgutils.c                               |  2 +
 src/common/passcrypt.c                             |  6 +--
 src/common/pkcs5_pbkdf2.c                          |  2 +
 src/common/progressindicator.c                     |  2 +
 src/common/proxy.h                                 |  4 --
 src/common/quoted-printable.c                      |  2 +
 src/common/socket.c                                |  6 +--
 src/common/socket.h                                |  4 --
 src/common/stringtable.c                           |  2 +
 src/common/template.c                              |  1 +
 src/common/tests/codeconv_test.c                   |  2 +
 src/common/tests/md5_test.c                        |  2 +
 src/common/tests/pkcs5_pbkdf2_test.c               |  2 +
 src/common/tests/unmime_test.c                     |  2 +
 .../utils_get_serverportfp_from_filename_test.c    |  2 +
 src/common/tests/utils_get_uri_part_test.c         |  2 +
 src/common/tests/xml_test.c                        |  2 +
 src/common/utils.c                                 |  2 +
 src/common/utils.h                                 |  1 -
 src/common/uuencode.c                              |  2 +
 src/common/w32_reg.c                               |  2 +
 src/etpan/etpan-ssl.h                              |  1 -
 src/etpan/imap-thread.c                            |  4 --
 src/filtering.c                                    |  1 +
 src/foldersel.c                                    |  1 +
 src/folderutils.c                                  |  2 +
 src/folderview.c                                   |  1 +
 src/gtk/colorlabel.c                               |  1 +
 src/gtk/foldersort.c                               |  1 +
 src/gtk/gtksctree.c                                |  2 +
 src/gtk/gtkutils.c                                 | 61 ---------------------
 src/gtk/manage_window.c                            |  2 +
 src/ldif.c                                         |  2 +
 src/localfolder.c                                  |  2 +
 src/main.c                                         | 11 ++--
 src/mainwindow.c                                   |  1 +
 src/messageview.c                                  |  1 +
 src/mutt.c                                         |  2 +
 src/password.h                                     |  4 --
 src/password_gtk.h                                 |  4 --
 src/pine.c                                         |  2 +
 src/plugins/demo/demo.c                            |  2 +
 src/plugins/fancy/fancy_viewer.c                   |  2 +
 src/plugins/libravatar/libravatar_cache.c          |  2 +
 src/plugins/libravatar/libravatar_federation.c     |  2 +
 src/plugins/libravatar/libravatar_missing.c        |  2 +
 src/plugins/litehtml_viewer/lh_viewer.c            | 40 +-------------
 src/plugins/litehtml_viewer/lh_widget_text.cpp     |  2 +
 src/plugins/mailmbox/carray.c                      |  2 +
 src/plugins/mailmbox/chash.c                       |  2 +
 src/plugins/mailmbox/clist.c                       |  2 +
 src/plugins/mailmbox/mailimf_types.c               |  2 +
 src/plugins/mailmbox/mailimf_types_helper.c        |  2 +
 src/plugins/mailmbox/maillock.c                    |  2 +
 src/plugins/mailmbox/mailmbox_parse.c              |  2 +
 src/plugins/mailmbox/mailmbox_types.c              |  2 +
 src/plugins/mailmbox/mmapstring.c                  |  2 +
 src/plugins/managesieve/managesieve.c              |  2 +
 src/plugins/managesieve/sieve_plugin.c             |  2 +
 src/plugins/newmail/newmail.c                      |  2 +
 .../notification/gtkhotkey/gtk-hotkey-error.c      |  2 +
 .../notification/gtkhotkey/gtk-hotkey-info.c       |  2 +
 .../gtkhotkey/gtk-hotkey-key-file-registry.c       |  2 +
 .../notification/gtkhotkey/gtk-hotkey-listener.c   |  2 +
 .../notification/gtkhotkey/gtk-hotkey-marshal.c    |  2 +
 .../notification/gtkhotkey/gtk-hotkey-registry.c   |  2 +
 .../notification/gtkhotkey/gtk-hotkey-utils.c      |  2 +
 .../gtkhotkey/gtk-hotkey-x11-listener.c            |  2 +
 .../notification/gtkhotkey/x11/eggaccelerators.c   |  2 +
 .../notification/gtkhotkey/x11/tomboykeybinder.c   |  2 +
 src/plugins/notification/notification_banner.h     |  1 -
 src/plugins/notification/notification_command.h    |  1 -
 .../notification/notification_foldercheck.h        |  1 -
 src/plugins/notification/notification_hotkeys.h    |  1 -
 src/plugins/notification/notification_indicator.h  |  1 -
 src/plugins/notification/notification_lcdproc.h    |  1 -
 src/plugins/notification/notification_pixbuf.c     |  2 +
 src/plugins/notification/notification_plugin.h     |  1 -
 src/plugins/notification/notification_popup.h      |  1 -
 src/plugins/notification/notification_prefs.c      | 18 -------
 src/plugins/notification/notification_prefs.h      |  1 -
 src/plugins/notification/notification_trayicon.h   |  1 -
 src/plugins/pdf_viewer/poppler_viewer.h            |  4 --
 src/plugins/pgpcore/tests/pgp_utils_test.c         |  2 +
 src/plugins/pgpinline/pgpinline.c                  |  2 -
 src/plugins/python/accounttype.c                   | 10 ----
 src/plugins/python/clawsmailmodule.c               |  3 +-
 src/plugins/python/python-shell.c                  |  3 ++
 src/plugins/python/python_plugin.c                 | 38 -------------
 src/plugins/rssyl/libfeed/date.c                   |  3 --
 src/plugins/rssyl/libfeed/feed.c                   |  2 +-
 src/plugins/rssyl/libfeed/feeditem.c               |  2 +-
 src/plugins/rssyl/libfeed/feeditemenclosure.c      |  2 +-
 src/plugins/rssyl/libfeed/parser_atom10.c          |  3 +-
 src/plugins/rssyl/libfeed/parser_opml.c            |  2 +
 src/plugins/rssyl/libfeed/parser_rdf.c             |  3 +-
 src/plugins/rssyl/libfeed/parser_rss20.c           |  3 +-
 src/plugins/rssyl/libfeed/tests/date_test.c        |  2 +
 src/plugins/rssyl/libfeed/tests/feed_test.c        |  2 +
 src/plugins/rssyl/old_feeds.c                      |  2 +
 src/plugins/rssyl/tests/strutils_test.c            |  2 +
 src/plugins/spamassassin/utils.c                   |  2 +
 src/plugins/vcalendar/claws.def                    |  1 +
 src/prefs_common.h                                 |  1 -
 src/prefs_proxy.c                                  |  2 +
 src/prefs_template.c                               |  1 +
 src/privacy.c                                      |  2 +
 src/procmime.c                                     |  4 ++
 src/procmsg.c                                      |  1 +
 src/remotefolder.c                                 |  2 +
 src/sourcewindow.c                                 |  1 +
 src/summaryview.c                                  |  1 +
 src/summaryview.h                                  |  4 --
 src/tests/entity_test.c                            |  2 +
 123 files changed, 209 insertions(+), 271 deletions(-)


- Log -----------------------------------------------------------------
commit 1b9711497fb9caf525bd513abbe64bc2eb34963c
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Nov 6 22:23:36 2021 -0700

    Use a compile test for time_t format specifier

diff --git a/configure.ac b/configure.ac
index 207c6f38a..bb398254e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,14 +176,22 @@ AC_MSG_RESULT([$env_cygwin])
 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
 
 AC_MSG_CHECKING([for time_t format specifier])
-case "$host" in
-  x86_64-w64-mingw32)
-    time_t_fmt=lld
-    ;;
-  *)
-    time_t_fmt=ld
-    ;;
-esac
+_gcc_cflags_save=$CFLAGS
+CFLAGS="-Wall -Werror"
+AC_COMPILE_IFELSE([
+	AC_LANG_PROGRAM([[
+		#include <stdio.h>
+		#include <time.h>
+		]],[[printf("%lld", time(NULL));]])],
+	[time_t_long_long=yes],
+	[time_t_long_long=no])
+CFLAGS=$_gcc_cflags_save
+
+if test x"$time_t_long_long" = xyes; then
+	time_t_fmt=lld
+else
+	time_t_fmt=ld
+fi
 AC_MSG_RESULT([$time_t_fmt])
 AC_DEFINE_UNQUOTED([CM_TIME_FORMAT], ["$time_t_fmt"],
 	[Define printf format specifier for time_t])

commit 4967f15fd57f7e48ae5f3bd749ee6665ebdafb9d
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Nov 6 19:27:14 2021 -0700

    Remove leftover defines
    
    Remove some leftover solaris bits that were first added in bf654ba1, and
    mostly removed in e2770d27

diff --git a/src/etpan/imap-thread.c b/src/etpan/imap-thread.c
index 252863ab3..0c4ad1dc2 100644
--- a/src/etpan/imap-thread.c
+++ b/src/etpan/imap-thread.c
@@ -3377,15 +3377,11 @@ int imap_threaded_store(Folder * folder, struct mailimap_set * set,
 }
 
 
-#define ENV_BUFFER_SIZE 512
 #ifndef G_OS_WIN32
 static void do_exec_command(int fd, const char * command,
 			    const char * servername, uint16_t port)
 {
 	int i, maxopen;
-#ifdef SOLARIS
-	char env_buffer[ENV_BUFFER_SIZE];
-#endif
 	
 	if (fork() > 0) {
 		/* Fork again to become a child of init rather than

commit c2fa37c1923d553c81fbdceeb023a0bd8f4491f6
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Thu Nov 4 22:50:15 2021 -0700

    Clean up feature test macro definitions

diff --git a/src/common/passcrypt.c b/src/common/passcrypt.c
index 484fc52d9..5b3a1dbe8 100644
--- a/src/common/passcrypt.c
+++ b/src/common/passcrypt.c
@@ -19,12 +19,6 @@
 
 #include "config.h"
 
-#if !defined (__FreeBSD__)
-#define _XOPEN_SOURCE 600
-#else
-#define _XOPEN_SOURCE
-#endif
-
 #include <sys/types.h>
 #include <stdio.h>
 #include <memory.h>
diff --git a/src/common/socket.c b/src/common/socket.c
index 5dadc18dd..33dd65cd6 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -21,10 +21,6 @@
 #include "claws-features.h"
 #endif
 
-#if (defined (_XOPEN_SOURCE) && !defined (_BSD_SOURCE))
-#define _BSD_SOURCE
-#endif
-
 /* This can probably be handled better, e.g. define it in config.h. */
 #define _WIN32_WINNT _WIN32_WINNT_WIN6
 #include <glib.h>
diff --git a/src/common/socket.h b/src/common/socket.h
index a1b17e539..da547d9bc 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -23,10 +23,6 @@
 #include "claws-features.h"
 #endif
 
-#if (defined (_XOPEN_SOURCE) && !defined (_BSD_SOURCE))
-#define _BSD_SOURCE
-#endif
-
 #include <glib.h>
 #if HAVE_NETDB_H
 #  include <netdb.h>
diff --git a/src/plugins/rssyl/libfeed/date.c b/src/plugins/rssyl/libfeed/date.c
index cb7c6d21b..2e62c04b9 100644
--- a/src/plugins/rssyl/libfeed/date.c
+++ b/src/plugins/rssyl/libfeed/date.c
@@ -32,9 +32,6 @@
 #  include <config.h>
 #endif
 
-/* this is needed for strptime() */
-#define _XOPEN_SOURCE /* glibc2 needs this */
-
 #include <time.h>
 #include <glib.h>
 //#include <locale.h>

commit 7e9e3dc1d266f12a317d7b2b7f3299f710457307
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Nov 5 02:26:46 2021 -0700

    Make config.h the first include

diff --git a/src/plugins/python/clawsmailmodule.c b/src/plugins/python/clawsmailmodule.c
index 6810158b0..b5e2c1b23 100644
--- a/src/plugins/python/clawsmailmodule.c
+++ b/src/plugins/python/clawsmailmodule.c
@@ -15,8 +15,6 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "clawsmailmodule.h"
-
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
 #include "claws-features.h"
@@ -25,6 +23,7 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 
+#include "clawsmailmodule.h"
 #include "nodetype.h"
 #include "composewindowtype.h"
 #include "folderpropertiestype.h"

commit 1af27911f461538f492be1d5b32aafac5ec5c361
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Nov 5 00:23:37 2021 -0700

    Only include config.h from .c files

diff --git a/src/common/file-utils.h b/src/common/file-utils.h
index d89b06971..14bd42360 100644
--- a/src/common/file-utils.h
+++ b/src/common/file-utils.h
@@ -20,7 +20,6 @@
 #define __CLAWS_IO_H__
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #include "claws-features.h"
 #endif
 
diff --git a/src/common/proxy.h b/src/common/proxy.h
index 8f527accb..7551a5e66 100644
--- a/src/common/proxy.h
+++ b/src/common/proxy.h
@@ -19,10 +19,6 @@
 #ifndef __PROXY_H__
 #define __PROXY_H__
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <glib.h>
 
 #include "socket.h"
diff --git a/src/common/utils.h b/src/common/utils.h
index 787e48f23..1010aa87c 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -25,7 +25,6 @@
 
 #ifdef HAVE_CONFIG_H
 #include "claws-features.h"
-#include "config.h"
 #endif
 
 #ifdef HAVE_BACKTRACE
diff --git a/src/etpan/etpan-ssl.h b/src/etpan/etpan-ssl.h
index adb8f9d92..81da3d559 100644
--- a/src/etpan/etpan-ssl.h
+++ b/src/etpan/etpan-ssl.h
@@ -22,7 +22,6 @@
 #define __ETPAN_SSL_H__
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #include "claws-features.h"
 #endif
 
diff --git a/src/password.h b/src/password.h
index 6755fc2da..68ab75db8 100644
--- a/src/password.h
+++ b/src/password.h
@@ -20,10 +20,6 @@
 #ifndef __PASSWORD_H
 #define __PASSWORD_H
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <glib.h>
 
 #ifndef PASSWORD_CRYPTO_OLD
diff --git a/src/password_gtk.h b/src/password_gtk.h
index cf33a1d76..bb40ffdb9 100644
--- a/src/password_gtk.h
+++ b/src/password_gtk.h
@@ -20,10 +20,6 @@
 #ifndef __PASSWORD_GTK_H
 #define __PASSWORD_GTK_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #ifndef PASSWORD_CRYPTO_OLD
 void primary_passphrase_change_dialog();
 #endif
diff --git a/src/plugins/notification/notification_banner.h b/src/plugins/notification/notification_banner.h
index 55ab7f622..659c6ebcd 100644
--- a/src/plugins/notification/notification_banner.h
+++ b/src/plugins/notification/notification_banner.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_BANNER_H NOTIFICATION_BANNER_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_command.h b/src/plugins/notification/notification_command.h
index 8b62566dd..fcf8065aa 100644
--- a/src/plugins/notification/notification_command.h
+++ b/src/plugins/notification/notification_command.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_COMMAND_H NOTIFICATION_COMMAND_H 
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_foldercheck.h b/src/plugins/notification/notification_foldercheck.h
index 361663e64..5d8391b69 100644
--- a/src/plugins/notification/notification_foldercheck.h
+++ b/src/plugins/notification/notification_foldercheck.h
@@ -21,7 +21,6 @@
 #include <gtk/gtk.h>
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_hotkeys.h b/src/plugins/notification/notification_hotkeys.h
index 5a75e5b92..e48a9be89 100644
--- a/src/plugins/notification/notification_hotkeys.h
+++ b/src/plugins/notification/notification_hotkeys.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_HOTKEYS_H NOTIFICATION_HOTKEYS_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_indicator.h b/src/plugins/notification/notification_indicator.h
index 95360c026..27e733427 100644
--- a/src/plugins/notification/notification_indicator.h
+++ b/src/plugins/notification/notification_indicator.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_INDICATOR_H NOTIFICATION_INDICATOR_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_lcdproc.h b/src/plugins/notification/notification_lcdproc.h
index 71f753ab6..7008f8601 100644
--- a/src/plugins/notification/notification_lcdproc.h
+++ b/src/plugins/notification/notification_lcdproc.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_LCDPROC_H NOTIFICATION_LCDPROC_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_plugin.h b/src/plugins/notification/notification_plugin.h
index 9b42e2c62..4e111d264 100644
--- a/src/plugins/notification/notification_plugin.h
+++ b/src/plugins/notification/notification_plugin.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_PLUGIN_H NOTIFICATION_PLUGIN_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_popup.h b/src/plugins/notification/notification_popup.h
index 449e98cb4..342ebc439 100644
--- a/src/plugins/notification/notification_popup.h
+++ b/src/plugins/notification/notification_popup.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_POPUP_H NOTIFICATION_POPUP_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_prefs.h b/src/plugins/notification/notification_prefs.h
index cd7cdb46b..a80e39b1b 100644
--- a/src/plugins/notification/notification_prefs.h
+++ b/src/plugins/notification/notification_prefs.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_PREFS_H NOTIFICATION_PREFS_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/notification/notification_trayicon.h b/src/plugins/notification/notification_trayicon.h
index 65c27310a..8e5bb6e59 100644
--- a/src/plugins/notification/notification_trayicon.h
+++ b/src/plugins/notification/notification_trayicon.h
@@ -19,7 +19,6 @@
 #define NOTIFICATION_TRAYICON_H NOTIFICATION_TRAYICON_H
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
 #  include "claws-features.h"
 #endif
 
diff --git a/src/plugins/pdf_viewer/poppler_viewer.h b/src/plugins/pdf_viewer/poppler_viewer.h
index 933e0a796..4a5ba3434 100644
--- a/src/plugins/pdf_viewer/poppler_viewer.h
+++ b/src/plugins/pdf_viewer/poppler_viewer.h
@@ -19,10 +19,6 @@
 #ifndef POPPLER_VIEWER_H
 #define POPPLER_VIEWER_H
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 //#include <unistd.h>
 #include <stdio.h>
 #include <gtk/gtk.h>
diff --git a/src/prefs_common.h b/src/prefs_common.h
index 42f5d38f1..bd42b9e22 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -20,7 +20,6 @@
 #define __PREFS_COMMON_H__
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
 #include "claws-features.h"
 #endif
 
diff --git a/src/summaryview.h b/src/summaryview.h
index 311e8148e..df28d4e81 100644
--- a/src/summaryview.h
+++ b/src/summaryview.h
@@ -26,10 +26,6 @@
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "viewtypes.h"
 typedef struct _SummaryColumnState	SummaryColumnState;
 

commit f54996a2a98aa1ea9072f3678c7ecc35d80e7c79
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Thu Nov 4 21:15:09 2021 -0700

    Add missing config.h includes

diff --git a/src/addrcache.c b/src/addrcache.c
index 2765b41bb..918e226b8 100644
--- a/src/addrcache.c
+++ b/src/addrcache.c
@@ -21,6 +21,8 @@
  * Functions to maintain address cache.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <sys/stat.h>
diff --git a/src/addrclip.c b/src/addrclip.c
index 58d594776..b41603942 100644
--- a/src/addrclip.c
+++ b/src/addrclip.c
@@ -45,6 +45,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <glib.h>
 #include <glib/gi18n.h>
diff --git a/src/addritem.c b/src/addritem.c
index f0c26176a..cfde57796 100644
--- a/src/addritem.c
+++ b/src/addritem.c
@@ -20,6 +20,8 @@
  * General primitive address item objects.
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/src/addrquery.c b/src/addrquery.c
index 67d1718b0..730e491dc 100644
--- a/src/addrquery.c
+++ b/src/addrquery.c
@@ -21,6 +21,8 @@
  * Functions to define an address query (a request).
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
diff --git a/src/addrselect.c b/src/addrselect.c
index 8d967cf61..d4d516f9c 100644
--- a/src/addrselect.c
+++ b/src/addrselect.c
@@ -21,6 +21,8 @@
  * Address list item selection objects.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <glib.h>
 
diff --git a/src/common/mgutils.c b/src/common/mgutils.c
index 9bdb2b12a..e6fdf4d2d 100644
--- a/src/common/mgutils.c
+++ b/src/common/mgutils.c
@@ -20,6 +20,8 @@
  * Definitions for generic functions.
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/src/common/passcrypt.c b/src/common/passcrypt.c
index 5fceb734d..484fc52d9 100644
--- a/src/common/passcrypt.c
+++ b/src/common/passcrypt.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #if !defined (__FreeBSD__)
 #define _XOPEN_SOURCE 600
 #else
diff --git a/src/common/pkcs5_pbkdf2.c b/src/common/pkcs5_pbkdf2.c
index 6f83fe50f..4a6fa714d 100644
--- a/src/common/pkcs5_pbkdf2.c
+++ b/src/common/pkcs5_pbkdf2.c
@@ -17,6 +17,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <sys/types.h>
 
diff --git a/src/common/progressindicator.c b/src/common/progressindicator.c
index e6898e1ec..1a848384e 100644
--- a/src/common/progressindicator.c
+++ b/src/common/progressindicator.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 
 #include "hooks.h"
diff --git a/src/common/quoted-printable.c b/src/common/quoted-printable.c
index dd0a6bb59..0d265a119 100644
--- a/src/common/quoted-printable.c
+++ b/src/common/quoted-printable.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <ctype.h>
 
diff --git a/src/common/stringtable.c b/src/common/stringtable.c
index 7d5767d62..19890e737 100644
--- a/src/common/stringtable.c
+++ b/src/common/stringtable.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <string.h>
 
diff --git a/src/common/template.c b/src/common/template.c
index 3b94b45ed..933649e59 100644
--- a/src/common/template.c
+++ b/src/common/template.c
@@ -18,6 +18,7 @@
  * 
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/common/tests/codeconv_test.c b/src/common/tests/codeconv_test.c
index 3cf74370c..2775f6977 100644
--- a/src/common/tests/codeconv_test.c
+++ b/src/common/tests/codeconv_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 
 #include "codeconv.h"
diff --git a/src/common/tests/md5_test.c b/src/common/tests/md5_test.c
index e78d118f4..679c14e2f 100644
--- a/src/common/tests/md5_test.c
+++ b/src/common/tests/md5_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 
 #include <common/md5.h>
diff --git a/src/common/tests/pkcs5_pbkdf2_test.c b/src/common/tests/pkcs5_pbkdf2_test.c
index 3f7a451c3..e4c1b2d06 100644
--- a/src/common/tests/pkcs5_pbkdf2_test.c
+++ b/src/common/tests/pkcs5_pbkdf2_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 
 #include <common/pkcs5_pbkdf2.h>
diff --git a/src/common/tests/unmime_test.c b/src/common/tests/unmime_test.c
index 1f4066035..05e628780 100644
--- a/src/common/tests/unmime_test.c
+++ b/src/common/tests/unmime_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <stdio.h>
 #include <glib.h>
 
diff --git a/src/common/tests/utils_get_serverportfp_from_filename_test.c b/src/common/tests/utils_get_serverportfp_from_filename_test.c
index 746aa9fe4..a23bc228b 100644
--- a/src/common/tests/utils_get_serverportfp_from_filename_test.c
+++ b/src/common/tests/utils_get_serverportfp_from_filename_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <stdio.h>
 #include <glib.h>
 
diff --git a/src/common/tests/utils_get_uri_part_test.c b/src/common/tests/utils_get_uri_part_test.c
index 18ab31c24..ddd9b0f39 100644
--- a/src/common/tests/utils_get_uri_part_test.c
+++ b/src/common/tests/utils_get_uri_part_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <stdio.h>
 #include <glib.h>
 
diff --git a/src/common/tests/xml_test.c b/src/common/tests/xml_test.c
index 015971202..288031fff 100644
--- a/src/common/tests/xml_test.c
+++ b/src/common/tests/xml_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 
 #include "xml.h"
diff --git a/src/common/uuencode.c b/src/common/uuencode.c
index 0e5c82cc0..99af96148 100644
--- a/src/common/uuencode.c
+++ b/src/common/uuencode.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <ctype.h>
 
 #define UUDECODE(c) (c=='`' ? 0 : c - ' ')
diff --git a/src/common/w32_reg.c b/src/common/w32_reg.c
index 05568ff7f..0cf3bbfc9 100644
--- a/src/common/w32_reg.c
+++ b/src/common/w32_reg.c
@@ -16,6 +16,8 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include "w32_reg.h"
 #include "utils.h"
 
diff --git a/src/filtering.c b/src/filtering.c
index 46cfd238b..8006915e6 100644
--- a/src/filtering.c
+++ b/src/filtering.c
@@ -16,6 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 #include <glib.h>
 #include <glib/gi18n.h>
diff --git a/src/foldersel.c b/src/foldersel.c
index 19e605451..5f87f8e63 100644
--- a/src/foldersel.c
+++ b/src/foldersel.c
@@ -16,6 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/folderutils.c b/src/folderutils.c
index 650e2a1c6..4ff6133be 100644
--- a/src/folderutils.c
+++ b/src/folderutils.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 
 #include "utils.h"
diff --git a/src/folderview.c b/src/folderview.c
index c9f94e297..53a301de0 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -16,6 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/gtk/colorlabel.c b/src/gtk/colorlabel.c
index c06b6910f..81515835d 100644
--- a/src/gtk/colorlabel.c
+++ b/src/gtk/colorlabel.c
@@ -21,6 +21,7 @@
  * file is just that it make it easier to allow "user changeable" label colors.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/gtk/foldersort.c b/src/gtk/foldersort.c
index 91fa1cc46..b60b91028 100644
--- a/src/gtk/foldersort.c
+++ b/src/gtk/foldersort.c
@@ -17,6 +17,7 @@
  * 
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/gtk/gtksctree.c b/src/gtk/gtksctree.c
index 8a05ec8e1..9744a21d4 100644
--- a/src/gtk/gtksctree.c
+++ b/src/gtk/gtksctree.c
@@ -26,6 +26,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 
 #include "gtksctree.h"
diff --git a/src/gtk/manage_window.c b/src/gtk/manage_window.c
index 47f786ae6..68aede5a2 100644
--- a/src/gtk/manage_window.c
+++ b/src/gtk/manage_window.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <gtk/gtk.h>
 
diff --git a/src/ldif.c b/src/ldif.c
index 6f686590f..d2147d95e 100644
--- a/src/ldif.c
+++ b/src/ldif.c
@@ -21,6 +21,8 @@
  * files).
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <string.h>
diff --git a/src/localfolder.c b/src/localfolder.c
index 0d2ffb769..7cce203bf 100644
--- a/src/localfolder.c
+++ b/src/localfolder.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 
 #include "folder.h"
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 082f0a27d..e7d459465 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -16,6 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #ifdef G_OS_WIN32
diff --git a/src/messageview.c b/src/messageview.c
index 409f5a526..65a8ae479 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -16,6 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/mutt.c b/src/mutt.c
index 0747cf512..73a0ff3ef 100644
--- a/src/mutt.c
+++ b/src/mutt.c
@@ -21,6 +21,8 @@
  * Functions necessary to access MUTT address book file.
  */
 
+#include "config.h"
+
 #include <sys/stat.h>
 #include <ctype.h>
 #include <string.h>
diff --git a/src/pine.c b/src/pine.c
index 1e5df3d6b..ae00b7ad1 100644
--- a/src/pine.c
+++ b/src/pine.c
@@ -21,6 +21,8 @@
  * Functions necessary to access Pine address book file.
  */
 
+#include "config.h"
+
 #include <sys/stat.h>
 #include <glib.h>
 #include <string.h>
diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c
index d08807732..817c46ef8 100644
--- a/src/plugins/demo/demo.c
+++ b/src/plugins/demo/demo.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 
diff --git a/src/plugins/libravatar/libravatar_cache.c b/src/plugins/libravatar/libravatar_cache.c
index 22fa9cd73..9160e5d83 100644
--- a/src/plugins/libravatar/libravatar_cache.c
+++ b/src/plugins/libravatar/libravatar_cache.c
@@ -16,6 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <sys/stat.h>
 
 #include "libravatar_cache.h"
diff --git a/src/plugins/libravatar/libravatar_federation.c b/src/plugins/libravatar/libravatar_federation.c
index 9f8266e10..01734605f 100644
--- a/src/plugins/libravatar/libravatar_federation.c
+++ b/src/plugins/libravatar/libravatar_federation.c
@@ -16,6 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 
 #include "libravatar_federation.h"
diff --git a/src/plugins/libravatar/libravatar_missing.c b/src/plugins/libravatar/libravatar_missing.c
index cc4ae30a6..cc024de9a 100644
--- a/src/plugins/libravatar/libravatar_missing.c
+++ b/src/plugins/libravatar/libravatar_missing.c
@@ -16,6 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 
 #include "libravatar_missing.h"
diff --git a/src/plugins/litehtml_viewer/lh_widget_text.cpp b/src/plugins/litehtml_viewer/lh_widget_text.cpp
index a832700fc..f6161a05e 100644
--- a/src/plugins/litehtml_viewer/lh_widget_text.cpp
+++ b/src/plugins/litehtml_viewer/lh_widget_text.cpp
@@ -17,6 +17,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
+#include "config.h"
+
 #include <glib.h>
 
 #include "litehtml/litehtml.h"
diff --git a/src/plugins/mailmbox/carray.c b/src/plugins/mailmbox/carray.c
index a8e78c981..eb6963f1e 100644
--- a/src/plugins/mailmbox/carray.c
+++ b/src/plugins/mailmbox/carray.c
@@ -37,6 +37,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include "carray.h"
diff --git a/src/plugins/mailmbox/chash.c b/src/plugins/mailmbox/chash.c
index 20552211b..89cff8906 100644
--- a/src/plugins/mailmbox/chash.c
+++ b/src/plugins/mailmbox/chash.c
@@ -37,6 +37,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/src/plugins/mailmbox/clist.c b/src/plugins/mailmbox/clist.c
index e5c680dfb..5c8151aba 100644
--- a/src/plugins/mailmbox/clist.c
+++ b/src/plugins/mailmbox/clist.c
@@ -37,6 +37,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include "clist.h"
 
diff --git a/src/plugins/mailmbox/mailimf_types.c b/src/plugins/mailmbox/mailimf_types.c
index fbef8f03c..31969c084 100644
--- a/src/plugins/mailmbox/mailimf_types.c
+++ b/src/plugins/mailmbox/mailimf_types.c
@@ -33,6 +33,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include "mailimf_types.h"
 #include "mmapstring.h"
 #include <stdlib.h>
diff --git a/src/plugins/mailmbox/mailimf_types_helper.c b/src/plugins/mailmbox/mailimf_types_helper.c
index eadb043bd..202dbe22a 100644
--- a/src/plugins/mailmbox/mailimf_types_helper.c
+++ b/src/plugins/mailmbox/mailimf_types_helper.c
@@ -29,6 +29,8 @@
  * SUCH DAMAGE.
  */
 
+#include "config.h"
+
 #include "mailimf_types_helper.h"
 
 #include <stdlib.h>
diff --git a/src/plugins/mailmbox/maillock.c b/src/plugins/mailmbox/maillock.c
index 5c6e704d1..300bebd76 100644
--- a/src/plugins/mailmbox/maillock.c
+++ b/src/plugins/mailmbox/maillock.c
@@ -33,6 +33,8 @@
  * $Id $
  */
 
+#include "config.h"
+
 #include "maillock.h"
 
 #include <sys/types.h>
diff --git a/src/plugins/mailmbox/mailmbox_parse.c b/src/plugins/mailmbox/mailmbox_parse.c
index ea1dd5862..afd964c7d 100644
--- a/src/plugins/mailmbox/mailmbox_parse.c
+++ b/src/plugins/mailmbox/mailmbox_parse.c
@@ -33,6 +33,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include "mailmbox_parse.h"
 
 #include "mailmbox.h"
diff --git a/src/plugins/mailmbox/mailmbox_types.c b/src/plugins/mailmbox/mailmbox_types.c
index 8495d8cae..8da968501 100644
--- a/src/plugins/mailmbox/mailmbox_types.c
+++ b/src/plugins/mailmbox/mailmbox_types.c
@@ -29,6 +29,8 @@
  * SUCH DAMAGE.
  */
 
+#include "config.h"
+
 #include "mailmbox_types.h"
 #include "utils.h"
 
diff --git a/src/plugins/mailmbox/mmapstring.c b/src/plugins/mailmbox/mmapstring.c
index 535e04bce..b4f04ad3c 100644
--- a/src/plugins/mailmbox/mmapstring.c
+++ b/src/plugins/mailmbox/mmapstring.c
@@ -33,6 +33,8 @@
  * $Id$
  */
 
+#include "config.h"
+
 #include "mmapstring.h"
 
 #include "chash.h"
diff --git a/src/plugins/managesieve/managesieve.c b/src/plugins/managesieve/managesieve.c
index a2fb33429..ab0685098 100644
--- a/src/plugins/managesieve/managesieve.c
+++ b/src/plugins/managesieve/managesieve.c
@@ -18,6 +18,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <ctype.h>
diff --git a/src/plugins/managesieve/sieve_plugin.c b/src/plugins/managesieve/sieve_plugin.c
index 945cd754a..5edc70b53 100644
--- a/src/plugins/managesieve/sieve_plugin.c
+++ b/src/plugins/managesieve/sieve_plugin.c
@@ -18,6 +18,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 
diff --git a/src/plugins/newmail/newmail.c b/src/plugins/newmail/newmail.c
index 87c118000..6616722d1 100644
--- a/src/plugins/newmail/newmail.c
+++ b/src/plugins/newmail/newmail.c
@@ -16,6 +16,8 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <errno.h>
 
 #include <glib.h>
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-error.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-error.c
index 5050c284f..0062667c3 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-error.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-error.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include "gtk-hotkey-error.h"
 
 GQuark
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-info.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-info.c
index 672da8b9d..f41a6b837 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-info.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-info.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include "gtk-hotkey-info.h"
 #include "gtk-hotkey-error.h"
 #include "gtk-hotkey-listener.h"
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c
index b9651b2f3..be1aa9fb3 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include "utils.h"
 
 #include "gtk-hotkey-key-file-registry.h"
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-listener.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-listener.c
index 2a0869282..d145ba318 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-listener.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-listener.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
  
+#include "config.h"
+
 #include "gtk-hotkey-listener.h"
 #include "gtk-hotkey-x11-listener.h"
 #include "gtk-hotkey-marshal.h"
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-marshal.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-marshal.c
index 11bca5c4c..132700897 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-marshal.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-marshal.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include	<glib-object.h>
 
 
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-registry.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-registry.c
index 150fcb978..badbfe813 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-registry.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-registry.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
  
+#include "config.h"
+
 #include "gtk-hotkey-registry.h"
 #include "gtk-hotkey-key-file-registry.h"
 
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-utils.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-utils.c
index a13854223..61e79b5c2 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-utils.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-utils.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
  
+#include "config.h"
+
 #include <gio/gio.h>
 
 GFileType
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-x11-listener.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-x11-listener.c
index 16f77d3da..67228a1e1 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-x11-listener.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-x11-listener.c
@@ -16,6 +16,8 @@
  *   along with GtkHotkey.  If not, see <http://www.gnu.org/licenses/>.
  */
  
+#include "config.h"
+
 #include "gtk-hotkey-error.h"
 #include "gtk-hotkey-x11-listener.h"
 #include "gtk-hotkey-listener.h"
diff --git a/src/plugins/notification/gtkhotkey/x11/eggaccelerators.c b/src/plugins/notification/gtkhotkey/x11/eggaccelerators.c
index 10e8e52e4..4c39353b9 100644
--- a/src/plugins/notification/gtkhotkey/x11/eggaccelerators.c
+++ b/src/plugins/notification/gtkhotkey/x11/eggaccelerators.c
@@ -18,6 +18,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
+
 #include "eggaccelerators.h"
 
 #include <string.h>
diff --git a/src/plugins/notification/gtkhotkey/x11/tomboykeybinder.c b/src/plugins/notification/gtkhotkey/x11/tomboykeybinder.c
index 92cc1f663..2bf6f0def 100644
--- a/src/plugins/notification/gtkhotkey/x11/tomboykeybinder.c
+++ b/src/plugins/notification/gtkhotkey/x11/tomboykeybinder.c
@@ -1,4 +1,6 @@
 
+#include "config.h"
+
 #include <string.h>
 #include <stdio.h>
 #include <unistd.h>
diff --git a/src/plugins/notification/notification_pixbuf.c b/src/plugins/notification/notification_pixbuf.c
index f50d3d159..153404817 100644
--- a/src/plugins/notification/notification_pixbuf.c
+++ b/src/plugins/notification/notification_pixbuf.c
@@ -15,6 +15,8 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include "notification_pixbuf.h"
 #include "common/utils.h"
 #include "stock_pixmap.h"
diff --git a/src/plugins/pgpcore/tests/pgp_utils_test.c b/src/plugins/pgpcore/tests/pgp_utils_test.c
index d4a407ae6..dbdd03b1a 100644
--- a/src/plugins/pgpcore/tests/pgp_utils_test.c
+++ b/src/plugins/pgpcore/tests/pgp_utils_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "pgp_utils.h"
 
 #define HEADER "HEADER"
diff --git a/src/plugins/python/python-shell.c b/src/plugins/python/python-shell.c
index 6c26e2122..626af1e62 100644
--- a/src/plugins/python/python-shell.c
+++ b/src/plugins/python/python-shell.c
@@ -20,6 +20,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
+#include "config.h"
+
 #include <gdk/gdkkeysyms.h>
 #include <string.h>
 
diff --git a/src/plugins/rssyl/libfeed/feed.c b/src/plugins/rssyl/libfeed/feed.c
index cac9af825..f467eb645 100644
--- a/src/plugins/rssyl/libfeed/feed.c
+++ b/src/plugins/rssyl/libfeed/feed.c
@@ -17,7 +17,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#define __USE_GNU
+#include "config.h"
 
 #include <stdlib.h>
 #include <glib.h>
diff --git a/src/plugins/rssyl/libfeed/feeditem.c b/src/plugins/rssyl/libfeed/feeditem.c
index d766cdcdc..8268b8398 100644
--- a/src/plugins/rssyl/libfeed/feeditem.c
+++ b/src/plugins/rssyl/libfeed/feeditem.c
@@ -17,7 +17,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#define __USE_GNU
+#include "config.h"
 
 #include <stdlib.h>
 #include <glib.h>
diff --git a/src/plugins/rssyl/libfeed/feeditemenclosure.c b/src/plugins/rssyl/libfeed/feeditemenclosure.c
index 0716003d6..6e01230af 100644
--- a/src/plugins/rssyl/libfeed/feeditemenclosure.c
+++ b/src/plugins/rssyl/libfeed/feeditemenclosure.c
@@ -17,7 +17,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#define __USE_GNU
+#include "config.h"
 
 #include <stdlib.h>
 #include <glib.h>
diff --git a/src/plugins/rssyl/libfeed/parser_atom10.c b/src/plugins/rssyl/libfeed/parser_atom10.c
index c463be673..71f2068b0 100644
--- a/src/plugins/rssyl/libfeed/parser_atom10.c
+++ b/src/plugins/rssyl/libfeed/parser_atom10.c
@@ -16,7 +16,8 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#define __USE_GNU
+
+#include "config.h"
 
 #include <glib.h>
 #include <expat.h>
diff --git a/src/plugins/rssyl/libfeed/parser_opml.c b/src/plugins/rssyl/libfeed/parser_opml.c
index 575ffc9d3..cbf5bbed4 100644
--- a/src/plugins/rssyl/libfeed/parser_opml.c
+++ b/src/plugins/rssyl/libfeed/parser_opml.c
@@ -17,6 +17,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <curl/curl.h>
 #include <expat.h>
diff --git a/src/plugins/rssyl/libfeed/parser_rdf.c b/src/plugins/rssyl/libfeed/parser_rdf.c
index 361c5a8ba..74017d7f3 100644
--- a/src/plugins/rssyl/libfeed/parser_rdf.c
+++ b/src/plugins/rssyl/libfeed/parser_rdf.c
@@ -16,7 +16,8 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#define __USE_GNU
+
+#include "config.h"
 
 #include <glib.h>
 #include <expat.h>
diff --git a/src/plugins/rssyl/libfeed/parser_rss20.c b/src/plugins/rssyl/libfeed/parser_rss20.c
index c40789430..872cf2f5e 100644
--- a/src/plugins/rssyl/libfeed/parser_rss20.c
+++ b/src/plugins/rssyl/libfeed/parser_rss20.c
@@ -16,7 +16,8 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#define __USE_GNU
+
+#include "config.h"
 
 #include <glib.h>
 #include <expat.h>
diff --git a/src/plugins/rssyl/libfeed/tests/date_test.c b/src/plugins/rssyl/libfeed/tests/date_test.c
index cb08224b5..c07a77eae 100644
--- a/src/plugins/rssyl/libfeed/tests/date_test.c
+++ b/src/plugins/rssyl/libfeed/tests/date_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 
 #include "date.h"
diff --git a/src/plugins/rssyl/libfeed/tests/feed_test.c b/src/plugins/rssyl/libfeed/tests/feed_test.c
index 514d19ae0..aa001d043 100644
--- a/src/plugins/rssyl/libfeed/tests/feed_test.c
+++ b/src/plugins/rssyl/libfeed/tests/feed_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 
 #include "feed.h"
diff --git a/src/plugins/rssyl/old_feeds.c b/src/plugins/rssyl/old_feeds.c
index 15e0bd983..d41db2b60 100644
--- a/src/plugins/rssyl/old_feeds.c
+++ b/src/plugins/rssyl/old_feeds.c
@@ -19,6 +19,8 @@
 
 /* Expat parser for old feeds.xml */
 
+#include "config.h"
+
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <expat.h>
diff --git a/src/plugins/rssyl/tests/strutils_test.c b/src/plugins/rssyl/tests/strutils_test.c
index b3c976b44..406fc5f9e 100644
--- a/src/plugins/rssyl/tests/strutils_test.c
+++ b/src/plugins/rssyl/tests/strutils_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "strutils.h"
 
 /* It's safe to mock this out here, we are interested in
diff --git a/src/plugins/spamassassin/utils.c b/src/plugins/spamassassin/utils.c
index 0e130fbc6..136524e53 100644
--- a/src/plugins/spamassassin/utils.c
+++ b/src/plugins/spamassassin/utils.c
@@ -16,6 +16,8 @@
  * </@LICENSE>
  */
 
+#include "config.h"
+
 #ifndef _WIN32
 #include <unistd.h>
 #include <sys/uio.h>
diff --git a/src/prefs_proxy.c b/src/prefs_proxy.c
index 311b2d6c5..16420bf68 100644
--- a/src/prefs_proxy.c
+++ b/src/prefs_proxy.c
@@ -17,6 +17,8 @@
  *
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
diff --git a/src/prefs_template.c b/src/prefs_template.c
index 3faac5646..51a3f067b 100644
--- a/src/prefs_template.c
+++ b/src/prefs_template.c
@@ -17,6 +17,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/privacy.c b/src/privacy.c
index 0a1d7881c..56da4ce17 100644
--- a/src/privacy.c
+++ b/src/privacy.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 
diff --git a/src/procmsg.c b/src/procmsg.c
index 063818a7d..1dc660190 100644
--- a/src/procmsg.c
+++ b/src/procmsg.c
@@ -16,6 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/remotefolder.c b/src/remotefolder.c
index 360859c3d..38ff749d2 100644
--- a/src/remotefolder.c
+++ b/src/remotefolder.c
@@ -17,6 +17,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <glib.h>
 
 #include "utils.h"
diff --git a/src/sourcewindow.c b/src/sourcewindow.c
index d9e2fe1ef..181ab0fba 100644
--- a/src/sourcewindow.c
+++ b/src/sourcewindow.c
@@ -17,6 +17,7 @@
  * 
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/summaryview.c b/src/summaryview.c
index 208d11809..bade609f7 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -16,6 +16,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
 #include "defs.h"
 
 #include <glib.h>
diff --git a/src/tests/entity_test.c b/src/tests/entity_test.c
index c52a4a134..8ff23f901 100644
--- a/src/tests/entity_test.c
+++ b/src/tests/entity_test.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <glib.h>
 #include <stdio.h>
 

commit 1a59bfc48a858aba259bb14c6cc3c901650c761c
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Tue Nov 2 23:44:46 2021 -0700

    Use AM_CFLAGS in configure.ac
    
    Use AM_CFLAGS in configure.ac so that CFLAGS given during configure
    or make take precedence

diff --git a/configure.ac b/configure.ac
index a7286de9c..207c6f38a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,7 @@ AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_HEADERS(claws-features.h)
 
 AM_MAINTAINER_MODE
+AC_GNU_SOURCE
 
 dnl Checks for programs.
 dnl AC_ARG_PROGRAM
@@ -187,6 +188,11 @@ AC_MSG_RESULT([$time_t_fmt])
 AC_DEFINE_UNQUOTED([CM_TIME_FORMAT], ["$time_t_fmt"],
 	[Define printf format specifier for time_t])
 
+AM_CFLAGS="-Wall"
+if test $USE_MAINTAINER_MODE = yes; then
+	AM_CFLAGS="$AM_CFLAGS -g"
+fi
+
 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
 _gcc_cflags_save=$CFLAGS
 CFLAGS="-Wno-pointer-sign"
@@ -194,34 +200,30 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
 AC_MSG_RESULT($_gcc_psign)
 CFLAGS=$_gcc_cflags_save;
 if test x"$_gcc_psign" = xyes ; then
-	CFLAGS="$CFLAGS -Wno-pointer-sign"
-fi
-
-CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
-
-if test $USE_MAINTAINER_MODE = yes; then
-	CFLAGS="$CFLAGS -g -Wno-pointer-sign -DUSE_MAINTAINER_MODE"
+	AM_CFLAGS="$AM_CFLAGS -Wno-pointer-sign"
 fi
 
 pthread_name=
 case "$target" in
 *-darwin*)
-	CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
+	AM_CFLAGS="$AM_CFLAGS -no-cpp-precomp -fno-common"
 	;;
 *-*-mingw*)
-        # Note that we need to link to pthread in all cases. This
-        # is because some locking is used even when pthread support is
-        # disabled.
-        pthread_name=pthread
-	CFLAGS="$CFLAGS -mms-bitfields"
+	# Note that we need to link to pthread in all cases. This
+	# is because some locking is used even when pthread support is
+	# disabled.
+	pthread_name=pthread
+	AM_CFLAGS="$AM_CFLAGS -mms-bitfields"
 	LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
 	;;
 *-*-solaris*)
-	CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
-	CFLAGS="$CFLAGS -std=gnu99 -DSOLARIS"
+	AM_CFLAGS="$AM_CFLAGS -std=gnu99"
+	AC_DEFINE([SOLARIS], [], [Target is Solaris])
 	;;
 esac
 
+AC_SUBST(AM_CFLAGS)
+
 dnl Checks for iconv
 AM_ICONV
 
@@ -952,7 +954,7 @@ if test x"$enable_libetpan" = xyes; then
         # before 1.9.4, libetpan uses its own libetpan-config script
         AC_PATH_PROG(libetpanconfig, [libetpan-config])
         if test "x$libetpanconfig" != "x"; then
-            LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
+            LIBETPAN_CFLAGS="`$libetpanconfig --cflags`"
             LIBETPAN_LIBS="`$libetpanconfig --libs`"
             # support libetpan version like x.x and x.x.x
             libetpan_versiontype=`$libetpanconfig --version | tr -dc . | wc -c`
@@ -965,7 +967,6 @@ if test x"$enable_libetpan" = xyes; then
         fi
     ])
     if test "x$libetpan_config" = "xyes"; then
-        CPPFLAGS="$CPPFLAGS $LIBETPAN_FLAGS"
         AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
         if test "x$libetpan_result" = "xyes"; then
             AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
@@ -982,7 +983,7 @@ if test x"$enable_libetpan" = xyes; then
                 AC_MSG_ERROR([libetpan 0.57 not found])
             fi
         fi
-        AC_SUBST(LIBETPAN_FLAGS)
+        AC_SUBST(LIBETPAN_CFLAGS)
         AC_SUBST(LIBETPAN_LIBS)
         AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
     else
diff --git a/src/Makefile.am b/src/Makefile.am
index 46010c382..3b100ec64 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -630,8 +630,8 @@ AM_CPPFLAGS = \
 	$(VALGRIND_CFLAGS) \
 	$(CONTACTS_CFLAGS)
 
-matcher_parser_lex.$(OBJEXT) : CFLAGS += -Wno-unused-function
-quote_fmt_lex.$(OBJEXT) : CFLAGS += -Wno-unused-function
+matcher_parser_lex.$(OBJEXT) : AM_CFLAGS += -Wno-unused-function
+quote_fmt_lex.$(OBJEXT) : AM_CFLAGS += -Wno-unused-function
 
 #no-unused-function is there because of bison stuff
 #no-deprecated-declarations because of gpgme_data_rewind, which we have

commit 2d5fca2a39f97a2e6b0865ea9480ae0baa7e7b23
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Nov 5 01:29:22 2021 -0700

    Fix -Wunused-function warnings for Windows

diff --git a/src/common/socket.c b/src/common/socket.c
index a26b58340..5dadc18dd 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1428,6 +1428,7 @@ gint sock_write_all(SockInfo *sock, const gchar *buf, gint len)
 	return ret;
 }
 
+#ifndef G_OS_WIN32
 static gint fd_recv(gint fd, gchar *buf, gint len, gint flags)
 {
 	if (fd_check_io(fd, G_IO_IN) < 0)
@@ -1435,6 +1436,7 @@ static gint fd_recv(gint fd, gchar *buf, gint len, gint flags)
 
 	return recv(fd, buf, len, flags);
 }
+#endif
 
 gint fd_gets(gint fd, gchar *buf, gint len)
 {
diff --git a/src/common/utils.c b/src/common/utils.c
index 4dc6339a3..5b6f1b98d 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -2695,6 +2695,7 @@ FILE *get_command_output_stream(const char* cmdline)
 	return fdopen(fd, "r");
 }
 
+#ifndef G_OS_WIN32
 static gint is_unchanged_uri_char(char c)
 {
 	switch (c) {
@@ -2730,6 +2731,7 @@ static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri)
 	}
 	encoded_uri[k] = 0;
 }
+#endif
 
 gint open_uri(const gchar *uri, const gchar *cmdline)
 {
diff --git a/src/main.c b/src/main.c
index f4a722b83..bfda67926 100644
--- a/src/main.c
+++ b/src/main.c
@@ -231,7 +231,9 @@ static void open_compose_new		(const gchar	*address,
 
 static void send_queue			(void);
 static void initial_processing		(FolderItem *item, gpointer data);
+#ifndef G_OS_WIN32
 static void quit_signal_handler         (int sig);
+#endif
 static void install_basic_sighandlers   (void);
 #if (defined linux && defined SIGIO)
 static void install_memory_sighandler   (void);
@@ -725,13 +727,6 @@ static void win32_print_stdout(const gchar *string)
 	}
 }
 
-static void win32_print_stderr(const gchar *string)
-{
-	if (win32_debug_log) {
-		win32_log_WriteFile(string);
-	}
-}
-
 GLogWriterOutput win32_log_writer(GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data)
 {
 	gchar *formatted;
@@ -2932,12 +2927,14 @@ static void send_queue(void)
 	}
 }
 
+#ifndef G_OS_WIN32
 static void quit_signal_handler(int sig)
 {
 	debug_print("Quitting on signal %d\n", sig);
 
 	g_timeout_add(0, clean_quit, NULL);
 }
+#endif
 
 static void install_basic_sighandlers()
 {
diff --git a/src/procmime.c b/src/procmime.c
index dfb78b59c..6657caa76 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -59,7 +59,9 @@
 #define REG_MIME_TYPE_VALUE "Content Type"
 #endif
 
+#ifndef G_OS_WIN32
 static GHashTable *procmime_get_mime_type_table	(void);
+#endif
 static MimeInfo *procmime_scan_file_short(const gchar *filename);
 static MimeInfo *procmime_scan_queue_file_short(const gchar *filename);
 static MimeInfo *procmime_scan_queue_file_full(const gchar *filename, gboolean short_scan);
@@ -1152,6 +1154,7 @@ gchar *procmime_get_mime_type(const gchar *filename)
 #endif
 }
 
+#ifndef G_OS_WIN32
 static guint procmime_str_hash(gconstpointer gptr)
 {
 	guint hash_result = 0;
@@ -1208,6 +1211,7 @@ static GHashTable *procmime_get_mime_type_table(void)
 
 	return table;
 }
+#endif
 
 GList *procmime_get_mime_type_list(void)
 {

commit f9c2a443074f2c54f6fba1c54af6b53a8dc410aa
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Wed Sep 15 03:26:30 2021 -0700

    Fix -Wunused-function warnings

diff --git a/src/addressbook.c b/src/addressbook.c
index 60727bc68..d96109c8b 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -393,11 +393,6 @@ static GtkTargetEntry addressbook_drag_types[] =
 
 static GtkTargetList *addressbook_target_list = NULL;
 
-static void about_show_cb(GtkAction *action, gpointer data)
-{
-	about_show();
-}
-
 static GtkActionEntry addressbook_entries[] =
 {
 	{"Menu",				NULL, "Menu", NULL, NULL, NULL },
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 02f140581..85f532d8e 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1143,67 +1143,6 @@ GtkWidget *face_get_from_header(const gchar *o_face)
 	return image;
 }
 
-static GdkCursor *hand_cursor = NULL;
-
-static void link_btn_enter(GtkButton *button, gpointer data)
-{
-	GdkWindow *gdkwin;
-	GtkWidget *window = (GtkWidget *)data;
-
-	gdkwin = gtk_widget_get_window(window);
-
-	if (!hand_cursor)
-		hand_cursor = gdk_cursor_new_for_display(
-				gdk_window_get_display(gdkwin), GDK_HAND2);
-	if (window && gdkwin)
-		gdk_window_set_cursor(gdkwin, hand_cursor);
-
-	gtk_button_set_relief(button, GTK_RELIEF_NONE);
-	gtk_widget_set_state_flags(GTK_WIDGET(button), GTK_STATE_FLAG_NORMAL, TRUE);
-}
-
-static void link_btn_leave(GtkButton *button, gpointer data)
-{
-	GdkWindow *gdkwin;
-	GtkWidget *window = (GtkWidget *)data;
-
-	gdkwin = gtk_widget_get_window(window);
-
-	if (window && gdkwin)
-		gdk_window_set_cursor(gdkwin, NULL);
-
-	gtk_button_set_relief(button, GTK_RELIEF_NONE);
-	gtk_widget_set_state_flags(GTK_WIDGET(button), GTK_STATE_FLAG_NORMAL, TRUE);
-}
-
-static void link_btn_pressed(GtkButton *button, gpointer data)
-{
-	gtk_button_set_relief(button, GTK_RELIEF_NONE);
-	gtk_widget_set_state_flags(GTK_WIDGET(button), GTK_STATE_FLAG_NORMAL, TRUE);
-}
-
-static void link_btn_released(GtkButton *button, gpointer data)
-{
-	gtk_button_set_relief(button, GTK_RELIEF_NONE);
-	gtk_widget_set_state_flags(GTK_WIDGET(button), GTK_STATE_FLAG_NORMAL, TRUE);
-}
-
-static void link_btn_clicked(GtkButton *button, gpointer data)
-{
-	gchar *url = (gchar *)data;
-	gtk_button_set_relief(button, GTK_RELIEF_NONE);
-	gtk_widget_set_state_flags(GTK_WIDGET(button), GTK_STATE_FLAG_NORMAL, TRUE);
-	open_uri(url, prefs_common_get_uri_cmd());
-}
-
-static void link_btn_unrealize(GtkButton *button, gpointer data)
-{
-	gchar *url = (gchar *)data;
-	g_signal_handlers_disconnect_by_func(G_OBJECT(button), 
-			 G_CALLBACK(link_btn_clicked), url);
-	g_free(url);
-}
-
 static gboolean _combobox_separator_func(GtkTreeModel *model,
 		GtkTreeIter *iter, gpointer data)
 {
diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index 03cbe0cce..30e5090ed 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -48,9 +48,11 @@ load_progress_cb(WebKitWebView *view, GParamSpec *param, FancyViewer *viewer);
 
 static MimeViewerFactory fancy_viewer_factory;
 
+/*
 static gboolean
 fancy_text_search(MimeViewer *_viewer, gboolean backward, const gchar *str,
 		  gboolean case_sens);
+*/
 
 static void
 viewer_menu_handler(GtkWidget *menuitem, FancyViewer *viewer);
diff --git a/src/plugins/litehtml_viewer/lh_viewer.c b/src/plugins/litehtml_viewer/lh_viewer.c
index 20d11619c..13b85a364 100644
--- a/src/plugins/litehtml_viewer/lh_viewer.c
+++ b/src/plugins/litehtml_viewer/lh_viewer.c
@@ -43,44 +43,6 @@ static GtkWidget *lh_get_widget(MimeViewer *_viewer)
 	return viewer->vbox;
 }
 
-static gchar *get_utf8_string(const gchar *string) {
-        gchar *utf8 = NULL;
-        gsize length;
-        GError *error = NULL;
-        gchar *locale = NULL;
-
-	if (!g_utf8_validate(string, -1, NULL)) {
-		const gchar *cur_locale = conv_get_current_locale();
-		gchar* split = g_strstr_len(cur_locale, -1, ".");
-		if (split) {
-		    locale = ++split;
-		} else {
-		    locale = (gchar *) cur_locale;
-		}
-		debug_print("Try converting to UTF-8 from %s\n", locale);
-		if (g_ascii_strcasecmp("utf-8", locale) != 0) {
-		    utf8 = g_convert(string, -1, "utf-8", locale, NULL, &length, &error);
-		    if (error) {
-			    debug_print("Failed convertion to current locale: %s\n", error->message);
-			    g_clear_error(&error);
-			}
-	    }
-	    if (!utf8) {
-	        debug_print("Use iso-8859-1 as last resort\n");
-			utf8 = g_convert(string, -1, "utf-8", "iso-8859-1", NULL, &length, &error);
-			if (error) {
-				debug_print("Charset detection failed. Use text as is\n");
-				utf8 = g_strdup(string);
-				g_clear_error(&error);
-			}
-		}
-	} else {
-		utf8 = g_strdup(string);
-	}
-
-	return utf8;
-}
-
 static void lh_show_mimepart(MimeViewer *_viewer, const gchar *infile,
 		MimeInfo *partinfo)
 {
@@ -132,6 +94,7 @@ static void lh_destroy_viewer(MimeViewer *_viewer)
 	g_free(viewer);
 }
 
+/*
 static void lh_print_viewer (MimeViewer *_viewer)
 {
     debug_print("LH: print_viewer\n");
@@ -139,6 +102,7 @@ static void lh_print_viewer (MimeViewer *_viewer)
     LHViewer* viewer = (LHViewer *) _viewer;
     lh_widget_print(viewer->widget);    
 }
+*/
 
 
 static gboolean lh_scroll_page(MimeViewer *_viewer, gboolean up)
diff --git a/src/plugins/notification/notification_prefs.c b/src/plugins/notification/notification_prefs.c
index 1c71a1bbc..7a9afc85c 100644
--- a/src/plugins/notification/notification_prefs.c
+++ b/src/plugins/notification/notification_prefs.c
@@ -394,8 +394,6 @@ static void notify_hotkeys_enable_set_sensitivity(GtkToggleButton*, gpointer);
 #endif /* NOTIFICATION_HOTKEYS */
 
 
-static gint conv_color_to_int(GdkColor*);
-
 void notify_gtk_init(void)
 {
 	static gchar *path[3];
@@ -1919,19 +1917,3 @@ static void notify_hotkeys_enable_set_sensitivity(GtkToggleButton *button,
     gtk_widget_set_sensitive(hotkeys_page.hotkeys_cont_enable, active);
 }
 #endif /* hotkeys */
-
-
-/* This feels so wrong... */
-static gint conv_color_to_int(GdkColor *color)
-{
-	gint result;
-	guint red, green, blue;
-
-	red = (guint) ((gdouble)(color->red) /65535.*255.);
-	green = (guint) ((gdouble)(color->green) /65535.*255.);
-	blue = (guint) ((gdouble)(color->blue) /65535.*255.);
-
-	result = (gint) (blue | (green<<8)| (red<<16));
-
-	return result;
-}
diff --git a/src/plugins/pgpinline/pgpinline.c b/src/plugins/pgpinline/pgpinline.c
index 5bd38775f..4dbd2befb 100644
--- a/src/plugins/pgpinline/pgpinline.c
+++ b/src/plugins/pgpinline/pgpinline.c
@@ -62,8 +62,6 @@ typedef struct _PGPInlineTaskData
 
 static PrivacySystem pgpinline_system;
 
-static gint pgpinline_check_signature(MimeInfo *mimeinfo);
-
 static PrivacyDataPGP *pgpinline_new_privacydata()
 {
 	PrivacyDataPGP *data;
diff --git a/src/plugins/python/accounttype.c b/src/plugins/python/accounttype.c
index 0fb30f23f..123d23840 100644
--- a/src/plugins/python/accounttype.c
+++ b/src/plugins/python/accounttype.c
@@ -41,16 +41,6 @@ static void Account_dealloc(clawsmail_AccountObject* self)
   Py_TYPE(self)->tp_free((PyObject*)self);
 }
 
-static int Account_compare(clawsmail_AccountObject *obj1, clawsmail_AccountObject *obj2)
-{
-  if(obj1->account->account_id < obj2->account->account_id)
-    return -1;
-  else if(obj1->account->account_id > obj2->account->account_id)
-    return 1;
-  else
-    return 0;
-}
-
 static PyObject* Account_str(clawsmail_AccountObject *self)
 {
   if(self->account && self->account->account_name)
diff --git a/src/plugins/python/python_plugin.c b/src/plugins/python/python_plugin.c
index 99a0b2fb2..ef84a75fc 100644
--- a/src/plugins/python/python_plugin.c
+++ b/src/plugins/python/python_plugin.c
@@ -621,44 +621,6 @@ done:
   return inst_StringIO;
 }
 
-static char* get_exception_information(PyObject *inst_StringIO)
-{
-  char *retval = NULL;
-  PyObject *meth_getvalue = NULL;
-  PyObject *result_getvalue = NULL;
-
-  if(!inst_StringIO)
-    goto done;
-
-  if(PySys_SetObject("stderr", inst_StringIO) != 0) {
-    debug_print("Error getting traceback: Could not set sys.stderr to a StringIO instance\n");
-    goto done;
-  }
-
-  meth_getvalue = PyObject_GetAttrString(inst_StringIO, "getvalue");
-  if(!meth_getvalue) {
-    debug_print("Error getting traceback: Could not get the getvalue method of the StringIO instance\n");
-    goto done;
-  }
-
-  PyErr_Print();
-
-  result_getvalue = PyObject_CallObject(meth_getvalue, NULL);
-  if(!result_getvalue) {
-    debug_print("Error getting traceback: Could not call the getvalue method of the StringIO instance\n");
-    goto done;
-  }
-
-  retval = g_strdup(PyBytes_AsString(result_getvalue));
-
-done:
-
-  Py_XDECREF(meth_getvalue);
-  Py_XDECREF(result_getvalue);
-
-  return retval ? retval : g_strdup("Unspecified error occurred");
-}
-
 static void log_func(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 {
 }

commit 86fcec37b5085d309276978f527ed78314b06608
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Tue Nov 2 20:42:00 2021 -0700

    Restrict -Wno-unused-function to flex generated files

diff --git a/configure.ac b/configure.ac
index 3628ade8e..a7286de9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,12 +187,6 @@ AC_MSG_RESULT([$time_t_fmt])
 AC_DEFINE_UNQUOTED([CM_TIME_FORMAT], ["$time_t_fmt"],
 	[Define printf format specifier for time_t])
 
-if test "$GCC" = "yes"
-then
-	CFLAGS="$CFLAGS -Wno-unused-function"
-	#CFLAGS="-g -Wall -Wno-unused-function"
-fi
-
 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
 _gcc_cflags_save=$CFLAGS
 CFLAGS="-Wno-pointer-sign"
diff --git a/src/Makefile.am b/src/Makefile.am
index c479bf122..46010c382 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -630,6 +630,9 @@ AM_CPPFLAGS = \
 	$(VALGRIND_CFLAGS) \
 	$(CONTACTS_CFLAGS)
 
+matcher_parser_lex.$(OBJEXT) : CFLAGS += -Wno-unused-function
+quote_fmt_lex.$(OBJEXT) : CFLAGS += -Wno-unused-function
+
 #no-unused-function is there because of bison stuff
 #no-deprecated-declarations because of gpgme_data_rewind, which we have
 #to call inside gpgme due to our lack of LARGEFILE support

commit 2abc7b175058e182cf3e4b3fde36329497c9ff0c
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sat Nov 6 22:40:52 2021 -0700

    Fix windows build

diff --git a/src/plugins/vcalendar/claws.def b/src/plugins/vcalendar/claws.def
index 237729b80..e8791eb7f 100644
--- a/src/plugins/vcalendar/claws.def
+++ b/src/plugins/vcalendar/claws.def
@@ -152,6 +152,7 @@ remove_dir_recursive
 slist_free_strings
 slist_free_strings_full
 statusbar_progress_all
+strcrlftrunc
 strretchomp
 str_write_to_file
 subst_for_filename

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list