ICU-8554 Don't use visibility attribute on Cygwin GCC and fix Cygwin tzset error.

X-SVN-Rev: 30200
This commit is contained in:
Michael Ow 2011-06-09 21:32:19 +00:00
parent 233f71bedf
commit 8d587bf3bb
3 changed files with 40 additions and 25 deletions

View File

@ -75,7 +75,6 @@ Cleanly installed Solaris can use this #define.
#include <math.h>
#include <locale.h>
#include <float.h>
#include <time.h>
/* include system headers */
#ifdef U_WINDOWS
@ -117,6 +116,10 @@ Cleanly installed Solaris can use this #define.
# endif
#endif
/*
* Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement.
*/
#include <time.h>
#if defined(U_DARWIN)
#include <TargetConditionals.h>

View File

@ -5375,6 +5375,11 @@ U_USE_GCC_VISIBILITY_ATTRIBUTE=0
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
if test "$ac_cv_c_compiler_gnu" = yes; then
case "${host}" in
*-pc-cygwin*|*-pc-mingw*)
# Cygwin GCC does not have the visibility attribute
;;
*)
LIBCFLAGS="-fvisibility=hidden"
LIBCXXFLAGS="-fvisibility=hidden"
CFLAGS="${CFLAGS} ${LIBCFLAGS}"
@ -5404,6 +5409,7 @@ rm -f core conftest.err conftest.$ac_objext \
else
U_USE_GCC_VISIBILITY_ATTRIBUTE=1
fi
esac
else
case "${host}" in
*-*-solaris*)

View File

@ -317,6 +317,11 @@ U_USE_GCC_VISIBILITY_ATTRIBUTE=0
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
if test "$ac_cv_c_compiler_gnu" = yes; then
case "${host}" in
*-pc-cygwin*|*-pc-mingw*)
# Cygwin GCC does not have the visibility attribute
;;
*)
LIBCFLAGS="-fvisibility=hidden"
LIBCXXFLAGS="-fvisibility=hidden"
CFLAGS="${CFLAGS} ${LIBCFLAGS}"
@ -329,6 +334,7 @@ if test "$ac_cv_c_compiler_gnu" = yes; then
else
U_USE_GCC_VISIBILITY_ATTRIBUTE=1
fi
esac
else
case "${host}" in
*-*-solaris*)