Clean all ‘… warning: "_POSIX_C_SOURCE" redefined’
authorRicardo Mones <ricardo@mones.org>
Sat, 16 Nov 2013 19:32:12 +0000 (20:32 +0100)
committerRicardo Mones <ricardo@mones.org>
Sun, 17 Nov 2013 18:53:32 +0000 (19:53 +0100)
According documentation¹: “Since Python may define some pre-processor
definitions which affect the standard headers on some systems, you must
include Python.h before any standard headers are included.”

¹http://docs.python.org/2/c-api/intro.html#includes

14 files changed:
src/plugins/python/accounttype.h
src/plugins/python/composewindowtype.c
src/plugins/python/composewindowtype.h
src/plugins/python/folderpropertiestype.h
src/plugins/python/foldertype.c
src/plugins/python/foldertype.h
src/plugins/python/mailboxtype.c
src/plugins/python/mailboxtype.h
src/plugins/python/messageinfotype.c
src/plugins/python/messageinfotype.h
src/plugins/python/nodetype.c
src/plugins/python/nodetype.h
src/plugins/python/python-hooks.c
src/plugins/python/python_plugin.c

index 808faba0b8da3f5b556d8ba8a197df18eb75de0e..cf5da0af36e04ad19a1acb441ee4fd153d63ad53 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef ACCOUNTTYPE_H
 #define ACCOUNTTYPE_H
 
-#include <glib.h>
 #include <Python.h>
+#include <glib.h>
 
 #include "account.h"
 
index bf5b0a6c9aa7b2ca9d24c0f7031498540361fcba..65ba8643d042747cbe8f1a1df3f18b1d80d398e9 100644 (file)
@@ -20,9 +20,6 @@
 #  include "claws-features.h"
 #endif
 
-#include <glib.h>
-#include <glib/gi18n.h>
-
 #include "composewindowtype.h"
 #include "accounttype.h"
 
@@ -34,6 +31,9 @@
 #include "account.h"
 #include "summaryview.h"
 
+#include <glib.h>
+#include <glib/gi18n.h>
+
 #include <structmember.h>
 
 #include <string.h>
index 9de8546df9e249874b0356cea2555fb9a15054c3..14ddc26044a8c065f8821e2f78035dbc381607ef 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef COMPOSEWINDOWTYPE_H
 #define COMPOSEWINDOWTYPE_H
 
-#include <glib.h>
 #include <Python.h>
+#include <glib.h>
 
 #include "compose.h"
 
index 3330c3df269e7acfab2745e3942c726622899cf2..752f0827b6f112bc66c99dcffd28c8dfe608b2f6 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef FOLDERPROPERTIESTYPE_H
 #define FOLDERPROPERTIESTYPE_H
 
-#include <glib.h>
 #include <Python.h>
+#include <glib.h>
 
 #include "folder_item_prefs.h"
 
index b59b1a420fe2f9890f52564263a11c6851f313ac..c11c701b78ee347fe35aa55ed940b7f686f644c2 100644 (file)
 #include "claws-features.h"
 #endif
 
-#include <glib/gi18n.h>
-
 #include "foldertype.h"
 #include "folderpropertiestype.h"
 #include "messageinfotype.h"
 #include "mailboxtype.h"
 
+#include <glib/gi18n.h>
+
 #include <structmember.h>
 
 
index d85d483dee00e226a0e5499a4d4faead1b93b803..aa27a5a586fda84b150ab2a15c46a23dcf58b0d5 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef FOLDERTYPE_H
 #define FOLDERTYPE_H
 
-#include <glib.h>
 #include <Python.h>
+#include <glib.h>
 
 #include "folder.h"
 
index f0fa4f048f83de32bbc856cc5d30c1ff9847fa54..a7493cac246d27fdada64df0eff494cee5db7c57 100644 (file)
 #  include "claws-features.h"
 #endif
 
+#include "mailboxtype.h"
+
 #include <glib.h>
 #include <glib/gi18n.h>
 
-#include "mailboxtype.h"
-
 #include <structmember.h>
 
 typedef struct {
index 4640a605b924a6006b6bab199e4d836203a13fe7..58c49d6a3ccb2cf00e6640083ffadba252d9cf5d 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef MAILBOXTYPE_H
 #define MAILBOXTYPE_H
 
-#include <glib.h>
 #include <Python.h>
+#include <glib.h>
 
 #include "folder.h"
 
index 2cf6ed0cd77caac84ee53361b945cfcdb7f3c3c1..3393c8acae6c96f17c5b8032a4d6c22bb8b83383 100644 (file)
@@ -20,8 +20,6 @@
 #include "claws-features.h"
 #endif
 
-#include <glib/gi18n.h>
-
 #include "messageinfotype.h"
 
 #include "common/tags.h"
@@ -30,6 +28,8 @@
 #include "summaryview.h"
 #include "procheader.h"
 
+#include <glib/gi18n.h>
+
 #include <structmember.h>
 
 #include <string.h>
index df3c217b1bf775e0ee002e2f1de3490b7aa0b1a8..301275a07433e83153c70187181eb61218dffcfb 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef MESSAGEINFOTYPE_H
 #define MESSAGEINFOTYPE_H
 
-#include <glib.h>
 #include <Python.h>
+#include <glib.h>
 
 #include "procmsg.h"
 
index 60425f829786e0f440c629ba3a6d1051574dfdf0..70f4978a8a35e2fa4e427687e20fe11ebc4f925d 100644 (file)
 #include "claws-features.h"
 #endif
 
-#include <glib/gi18n.h>
-
 #include "nodetype.h"
 
+#include <glib/gi18n.h>
+
 #include <structmember.h>
 
 /* returns true on success, false if an exception was thrown */
index 03daa314f447dd887f52d3ecf5d9152162898b40..735ef5877c9c8446b71a0f3e7fdd581331d7da8a 100644 (file)
 #ifndef NODETYPE_H
 #define NODETYPE_H
 
-#include <glib.h>
-
 #include <Python.h>
-
+#include <glib.h>
 
 gboolean cmpy_add_node(PyObject *module);
 
index f0228908bbd4341885112140dea9d1f01eeb52e0..fd7ba600424671d412687ef160f6beccf414c8e0 100644 (file)
 #include "claws-features.h"
 #endif
 
-#include <glib.h>
-#include <glib/gi18n.h>
-
 #ifdef ENABLE_PYTHON
 #include <Python.h>
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
 #endif // ENABLE_PYTHON
 
+#include <glib.h>
+#include <glib/gi18n.h>
+
 #include <dlfcn.h>
 
 #include <signal.h>
index 6b49860fc10bddcaa88e9863969865af4af6f581..ada776a8bd12d75f6a56af1efd7bfe33e64dcc4e 100644 (file)
 #include "claws-features.h"
 #endif
 
+#include <Python.h>
+
 #include <glib.h>
 #include <glib/gi18n.h>
 
-#include <Python.h>
-
 #include <errno.h>
 
 #include "common/hooks.h"