# HG changeset patch # User Ethan Blanton # Date 1307377521 0 # Node ID 4cc9c1ea0019d4576e14fdd9a77d4fac08e5e12a # Parent ce9ad581caa705caf81fa3141180494d279b8711 Fix gntwm.c compile on some platforms. Fixes #14250 diff -r ce9ad581caa7 -r 4cc9c1ea0019 finch/libgnt/gntwm.c --- a/finch/libgnt/gntwm.c Sun Jun 05 14:19:03 2011 +0000 +++ b/finch/libgnt/gntwm.c Mon Jun 06 16:25:21 2011 +0000 @@ -24,12 +24,17 @@ #ifdef USE_PYTHON #include -#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 #if GLIB_CHECK_VERSION(2,6,0)