From 99cc839c60ee82e64da36d53684135ddba685919 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Fri, 22 Jun 2012 19:57:50 +0000 Subject: [PATCH] ICU-9390 Fix some build issues with Solaris GCC and z X-SVN-Rev: 31983 --- icu4c/source/aclocal.m4 | 8 ++------ icu4c/source/common/uposixdefs.h | 4 ++-- icu4c/source/configure | 8 +------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/icu4c/source/aclocal.m4 b/icu4c/source/aclocal.m4 index 95c9292337d..c614985d124 100644 --- a/icu4c/source/aclocal.m4 +++ b/icu4c/source/aclocal.m4 @@ -1,5 +1,5 @@ # aclocal.m4 for ICU -# Copyright (c) 1999-2011, International Business Machines Corporation and +# Copyright (c) 1999-2012, International Business Machines Corporation and # others. All Rights Reserved. # Stephen F. Booth @@ -455,7 +455,7 @@ AC_DEFUN(AC_CHECK_STRICT_COMPILE, case "${host}" in *-*-solaris*) CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long" - CFLAGS="$CFLAGS -D__STDC__=0";; + CFLAGS="$CFLAGS -std=c99";; *-*-hpux*) echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see " CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";; @@ -474,10 +474,6 @@ AC_DEFUN(AC_CHECK_STRICT_COMPILE, if test "$GXX" = yes then CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" - case "${host}" in - *-*-solaris*) - CXXFLAGS="$CXXFLAGS -D__STDC__=0";; - esac else case "${host}" in *-*-cygwin) diff --git a/icu4c/source/common/uposixdefs.h b/icu4c/source/common/uposixdefs.h index c1ab8991ed6..736220772da 100644 --- a/icu4c/source/common/uposixdefs.h +++ b/icu4c/source/common/uposixdefs.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2011, International Business Machines +* Copyright (C) 2012, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * file name: uposixdefs.h @@ -52,7 +52,7 @@ * * z/OS needs this definition for timeval and to get usleep. */ -#if !defined(_XOPEN_SOURCE_EXTENDED) +#if !defined(_XOPEN_SOURCE_EXTENDED) && (defined(__IBMC__) || defined(__IBMCPP__)) # define _XOPEN_SOURCE_EXTENDED 1 #endif diff --git a/icu4c/source/configure b/icu4c/source/configure index 065a1c19c35..f87110631a1 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -4260,7 +4260,7 @@ $as_echo "$ac_use_strict_options" >&6; } case "${host}" in *-*-solaris*) CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long" - CFLAGS="$CFLAGS -D__STDC__=0";; + CFLAGS="$CFLAGS -std=c99";; *-*-hpux*) echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see " CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";; @@ -4279,10 +4279,6 @@ $as_echo "$ac_use_strict_options" >&6; } if test "$GXX" = yes then CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" - case "${host}" in - *-*-solaris*) - CXXFLAGS="$CXXFLAGS -D__STDC__=0";; - esac else case "${host}" in *-*-cygwin) @@ -6039,8 +6035,6 @@ fi esac fi - - # Check whether --enable-weak-threads was given. if test "${enable_weak_threads+set}" = set; then : enableval=$enable_weak_threads; case "${enableval}" in