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
This commit is contained in:
Vadim Zeitlin
2011-11-01 12:04:24 +00:00
parent f81ccc1148
commit 3c3f29b5f1
2 changed files with 21 additions and 6 deletions

6
configure vendored
View File

@@ -19583,10 +19583,14 @@ case "${host}" in
esac esac
if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then if test "x$USE_AIX" = "x1"; then
if test "x$XLCXX" = "xyes"; then
CXXFLAGS="-qunique $CXXFLAGS" CXXFLAGS="-qunique $CXXFLAGS"
fi fi
CPPFLAGS="-D_LINUX_SOURCE_COMPAT $CPPFLAGS"
fi
case "${host}" in case "${host}" in
powerpc-*-darwin* ) powerpc-*-darwin* )
{ echo "$as_me:$LINENO: checking if __POWERPC__ is already defined" >&5 { echo "$as_me:$LINENO: checking if __POWERPC__ is already defined" >&5

View File

@@ -1384,12 +1384,23 @@ dnl ------------------------------------------------------------------------
dnl Platform specific tests dnl Platform specific tests
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$USE_AIX" = "x1"; then
dnl xlC needs -qunique under AIX so that one source file can be dnl xlC needs -qunique under AIX so that one source file can be
dnl compiled to multiple object files and safely linked together. dnl compiled to multiple object files and safely linked together.
if test "x$XLCXX" = "xyes" -a "x$USE_AIX" = "x1"; then if test "x$XLCXX" = "xyes"; then
CXXFLAGS="-qunique $CXXFLAGS" CXXFLAGS="-qunique $CXXFLAGS"
fi 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 dnl This case is for PowerPC OS X vs. everything else
case "${host}" in case "${host}" in
powerpc-*-darwin* ) powerpc-*-darwin* )