pidgin: 1081e17d: Fix gntwm.c compile on some platforms.

elb at pidgin.im elb at pidgin.im
Mon Jun 6 12:33:55 EDT 2011


----------------------------------------------------------------------
Revision: 1081e17d573ff4d16ff4b96e4bfdebbcdccf9a76
Parent:   bad463c4babe6e8e29a2bd65b192467c293f1816
Author:   elb at pidgin.im
Date:     06/06/11 12:25:21
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1081e17d573ff4d16ff4b96e4bfdebbcdccf9a76

Changelog: 

Fix gntwm.c compile on some platforms.

Fixes #14250

Changes against parent bad463c4babe6e8e29a2bd65b192467c293f1816

  patched  finch/libgnt/gntwm.c

-------------- next part --------------
============================================================
--- finch/libgnt/gntwm.c	d08041c99b3a07a2d8fa4d5b91167967e866b1bc
+++ finch/libgnt/gntwm.c	5e12b73be213ecfa364da50260bd8b6df02b8863
@@ -24,12 +24,17 @@
 
 #ifdef USE_PYTHON
 #include <Python.h>
-#else
+#endif
+
+/* Python.h may define _GNU_SOURCE and _XOPEN_SOURCE_EXTENDED, so protect
+ * these checks with #ifndef/!defined() */
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
-#if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+#endif
+
+#if !defined _XOPEN_SOURCE_EXTENDED && (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
 #define _XOPEN_SOURCE_EXTENDED
 #endif
-#endif
 
 #include <glib.h>
 #if GLIB_CHECK_VERSION(2,6,0)


More information about the Commits mailing list