[libpeas] Silence _POSIX_C_SOURCE redefined warnings



commit 6b2983ecabfbb53543e987d9fa161649e04afb96
Author: Garrett Regier <alias301 gmail com>
Date:   Sun Jun 27 11:34:37 2010 -0700

    Silence _POSIX_C_SOURCE redefined warnings

 loaders/python/peas-extension-python.h     |    4 ++++
 loaders/python/peas-plugin-loader-python.c |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/loaders/python/peas-extension-python.h b/loaders/python/peas-extension-python.h
index c6d06f4..a20f298 100644
--- a/loaders/python/peas-extension-python.h
+++ b/loaders/python/peas-extension-python.h
@@ -23,6 +23,10 @@
 #define __PEAS_EXTENSION_PYTHON_H__
 
 #include <libpeas/peas-extension.h>
+/* _POSIX_C_SOURCE is defined in Python.h and in limits.h included by
+ * <libpeas/peas-extension.h>, so we unset it here to avoid a warning.
+ * Yep, that's bad. */
+#undef _POSIX_C_SOURCE
 #include <Python.h>
 
 G_BEGIN_DECLS
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 0ba8ff7..4fb5b49 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -23,6 +23,9 @@
 #include "peas-extension-python.h"
 #include "peas-plugin-loader-python.h"
 
+/* _POSIX_C_SOURCE is defined in Python.h and in limits.h included by
+ * glib-object.h, so we unset it here to avoid a warning. Yep, that's bad. */
+#undef _POSIX_C_SOURCE
 #include <Python.h>
 #include <pygobject.h>
 #include <signal.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]