--- source/common/putil.cpp (revision 40154) +++ source/common/putil.cpp (working copy) @@ -41,6 +41,20 @@ // Must be before any other #includes. #include "uposixdefs.h" +#if (U_PF_MINGW <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__) +/* tzset isn't defined in strict ANSI on Cygwin and MinGW. */ +#undef __STRICT_ANSI__ +#endif + +/* + * Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement. + */ +#include + +#if !U_PLATFORM_USES_ONLY_WIN32_API +#include +#endif + /* include ICU headers */ #include "unicode/utypes.h" #include "unicode/putil.h" @@ -102,21 +116,7 @@ # include #endif -#if (U_PF_MINGW <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN) && defined(__STRICT_ANSI__) -/* tzset isn't defined in strict ANSI on Cygwin and MinGW. */ -#undef __STRICT_ANSI__ -#endif - /* - * Cygwin with GCC requires inclusion of time.h after the above disabling strict asci mode statement. - */ -#include - -#if !U_PLATFORM_USES_ONLY_WIN32_API -#include -#endif - -/* * Only include langinfo.h if we have a way to get the codeset. If we later * depend on more feature, we can test on U_HAVE_NL_LANGINFO. *