From 3c3f29b5f1ec348030930013e563031991180b3e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 1 Nov 2011 12:04:24 +0000 Subject: [PATCH] Define _LINUX_SOURCE_COMPAT for AIX build. This takes care of the conflict between GTK+ headers and #define of func_data in AIX sys/timer.h. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 8 ++++++-- configure.in | 19 +++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/configure b/configure index dfac8729a6..39ba6aaf36 100755 --- a/configure +++ b/configure @@ -19583,8 +19583,12 @@ case "${host}" in esac -if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then - CXXFLAGS="-qunique $CXXFLAGS" +if test "x$USE_AIX" = "x1"; then + if test "x$XLCXX" = "xyes"; then + CXXFLAGS="-qunique $CXXFLAGS" + fi + + CPPFLAGS="-D_LINUX_SOURCE_COMPAT $CPPFLAGS" fi case "${host}" in diff --git a/configure.in b/configure.in index 1125d1820a..11a430978d 100644 --- a/configure.in +++ b/configure.in @@ -1384,10 +1384,21 @@ dnl ------------------------------------------------------------------------ dnl Platform specific tests dnl ------------------------------------------------------------------------ -dnl xlC needs -qunique under AIX so that one source file can be -dnl compiled to multiple object files and safely linked together. -if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then - CXXFLAGS="-qunique $CXXFLAGS" +if test "x$USE_AIX" = "x1"; then + dnl xlC needs -qunique under AIX so that one source file can be + dnl compiled to multiple object files and safely linked together. + if test "x$XLCXX" = "xyes"; then + CXXFLAGS="-qunique $CXXFLAGS" + fi + + dnl AIX sys/timer.h header #defines func_data as t_union.data breaking the + dnl compilation of GTK+ headers that use func_data as parameter name in + dnl several places. We could work around this by inserting "#undef + dnl func_data" in the code but IBM provides a possibility to disable this + dnl #define by pre-defining the symbol below and this seems to be simpler. + dnl And if we have any problems because of it we can always remove it and + dnl use the #undef approach. + CPPFLAGS="-D_LINUX_SOURCE_COMPAT $CPPFLAGS" fi dnl This case is for PowerPC OS X vs. everything else -- 2.47.2