Piotr Caban : msvcrt: Use _configthreadlocale arguments definition from public header.

Alexandre Julliard julliard at winehq.org
Fri Dec 4 14:36:04 CST 2020


Module: wine
Branch: master
Commit: a7b9948f396a904b43851105f14e86455ebae703
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a7b9948f396a904b43851105f14e86455ebae703

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri Dec  4 15:50:25 2020 +0100

msvcrt: Use _configthreadlocale arguments definition from public header.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/locale.c    |  8 ++++----
 dlls/msvcrt/msvcrt.h    |  3 ---
 include/msvcrt/locale.h | 12 ++++++++++++
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 39ab6dadc84..ba98d31d719 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -2052,12 +2052,12 @@ int CDECL _configthreadlocale(int type)
     thread_data_t *data = msvcrt_get_thread_data();
     int ret;
 
-    ret = (data->locale_flags & LOCALE_THREAD ? MSVCRT__ENABLE_PER_THREAD_LOCALE :
-            MSVCRT__DISABLE_PER_THREAD_LOCALE);
+    ret = (data->locale_flags & LOCALE_THREAD ? _ENABLE_PER_THREAD_LOCALE :
+            _DISABLE_PER_THREAD_LOCALE);
 
-    if(type == MSVCRT__ENABLE_PER_THREAD_LOCALE)
+    if(type == _ENABLE_PER_THREAD_LOCALE)
         data->locale_flags |= LOCALE_THREAD;
-    else if(type == MSVCRT__DISABLE_PER_THREAD_LOCALE)
+    else if(type == _DISABLE_PER_THREAD_LOCALE)
         data->locale_flags &= ~LOCALE_THREAD;
     else if(type)
         ret = -1;
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 28feb7d90df..d86056f4c05 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -296,9 +296,6 @@ extern FILE MSVCRT__iob[];
 
 #define _MAX__TIME64_T    (((__time64_t)0x00000007 << 32) | 0x93406FFF)
 
-#define MSVCRT__ENABLE_PER_THREAD_LOCALE 1
-#define MSVCRT__DISABLE_PER_THREAD_LOCALE 2
-
 _locale_t CDECL get_current_locale_noalloc(_locale_t locale) DECLSPEC_HIDDEN;
 void CDECL free_locale_noalloc(_locale_t locale) DECLSPEC_HIDDEN;
 pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN;
diff --git a/include/msvcrt/locale.h b/include/msvcrt/locale.h
index ee0d99b8e7e..d2963813475 100644
--- a/include/msvcrt/locale.h
+++ b/include/msvcrt/locale.h
@@ -68,6 +68,18 @@ struct lconv
 
 struct tm;
 
+#ifndef _CONFIG_LOCALE_SWT
+#define _CONFIG_LOCALE_SWT
+
+#define _ENABLE_PER_THREAD_LOCALE 0x1
+#define _DISABLE_PER_THREAD_LOCALE 0x2
+#define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
+#define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
+#define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
+#define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
+
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif




More information about the wine-cvs mailing list