Signed-off-by: Jacek Caban <[email protected]>
---
 mingw-w64-crt/Makefile.am                |  1 +
 mingw-w64-crt/misc/_configthreadlocale.c | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 mingw-w64-crt/misc/_configthreadlocale.c


diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 38fec3c..038dea5 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -164,6 +164,7 @@ src_libws2_32=libsrc/ws2_32.c \
   libsrc/wspiapi/WspiapiFreeAddrInfo.c
 
 src_msvcrt=\
+  misc/_configthreadlocale.c \
   misc/invalid_parameter_handler.c \
   misc/output_format.c \
   misc/purecall.c \
diff --git a/mingw-w64-crt/misc/_configthreadlocale.c b/mingw-w64-crt/misc/_configthreadlocale.c
new file mode 100644
index 0000000..cbc6013
--- /dev/null
+++ b/mingw-w64-crt/misc/_configthreadlocale.c
@@ -0,0 +1,16 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#include <locale.h>
+
+int __cdecl _configthreadlocale(int flag)
+{
+    /* _ENABLE_PER_THREAD_LOCALE can't work on msvcrt.dll. */
+    return flag == _ENABLE_PER_THREAD_LOCALE ? -1 : _DISABLE_PER_THREAD_LOCALE;
+}
+
+void *__MINGW_IMP_SYMBOL(_configthreadlocale) = _configthreadlocale;
+

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to