diff --git a/src/corelib/global/qglobal_p.h b/src/corelib/global/qglobal_p.h index df4410ebde..e22c5b11ee 100644 --- a/src/corelib/global/qglobal_p.h +++ b/src/corelib/global/qglobal_p.h @@ -60,14 +60,6 @@ #include #endif -#if defined(__cplusplus) -#ifdef Q_CC_MINGW -# include // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r() -#endif -#include - -QT_BEGIN_NAMESPACE - #if defined(Q_CC_MSVC) # define QT_SUPPORTS_INIT_PRIORITY 1 // warning C4075: initializers put in unrecognized initialization area @@ -87,6 +79,14 @@ QT_BEGIN_NAMESPACE # define QT_SUPPORTS_INIT_PRIORITY 0 #endif +#if defined(__cplusplus) +#ifdef Q_CC_MINGW +# include // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r() +#endif +#include + +QT_BEGIN_NAMESPACE + // These behave as if they consult the environment, so need to share its locking: Q_CORE_EXPORT void qTzSet(); Q_CORE_EXPORT time_t qMkTime(struct tm *when);