diff --git a/icu4c/source/config/mh-mingw b/icu4c/source/config/mh-mingw index c9999980c66..18937e0e48d 100644 --- a/icu4c/source/config/mh-mingw +++ b/icu4c/source/config/mh-mingw @@ -29,7 +29,8 @@ SHAREDLIBCXXFLAGS = SHAREDLIBCPPFLAGS = -DPIC ## Additional flags when building libraries and with threads -THREADSCPPFLAGS = -D_REENTRANT +THREADSCFLAGS = -mthreads +THREADSCXXFLAGS = -mthreads LIBCPPFLAGS = # Commands to link. Link with C++ in case static libraries are used. diff --git a/icu4c/source/configure b/icu4c/source/configure index 1e58c3bb3f8..058d53a64b1 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -4301,6 +4301,7 @@ echo "${ECHO_T}$ac_cv_func_pthread_mutex_lock" >&6 fi case "${host}" in *-pc-cygwin*|*-pc-mingw*) + ICU_USE_THREADS=1 if test "$ac_cv_c_compiler_gnu" = no; then ICU_USE_THREADS=1 if test $ENABLE_DEBUG = 1; then diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index 9636e98b142..9dd94e932ba 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -293,6 +293,8 @@ if test $threads = true; then dnl Check to see if we are using CygWin with MSVC case "${host}" in *-pc-cygwin*|*-pc-mingw*) + dnl For gcc, the thread options are set by mh-mingw/mh-cygwin + ICU_USE_THREADS=1 if test "$ac_cv_prog_gcc" = no; then dnl We're using normal windows compilers. Threading is available. ICU_USE_THREADS=1