[PATCH 1/4] ucrtbase: Implement _(un)lock_locales.

Alex Henrie alexhenrie24 at gmail.com
Tue Jun 14 13:28:12 CDT 2016


Cc: Piotr Caban <piotr at codeweavers.com>

For https://bugs.winehq.org/show_bug.cgi?id=40796

The only thing that MSDN says about these functions is that they are
"used to implement the CRT and the C++ Standard Library".[1] The
function prototypes can be found in locale.h in the Windows 10 SDK.
Fortunately, they are pretty self-explanatory.

[1] https://msdn.microsoft.com/en-us/library/dn727675.aspx

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 .../api-ms-win-crt-locale-l1-1-0.spec                    |  4 ++--
 dlls/msvcrt/locale.c                                     | 16 ++++++++++++++++
 dlls/ucrtbase/ucrtbase.spec                              |  4 ++--
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/dlls/api-ms-win-crt-locale-l1-1-0/api-ms-win-crt-locale-l1-1-0.spec b/dlls/api-ms-win-crt-locale-l1-1-0/api-ms-win-crt-locale-l1-1-0.spec
index 9749808..c7e5aae 100644
--- a/dlls/api-ms-win-crt-locale-l1-1-0/api-ms-win-crt-locale-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-locale-l1-1-0/api-ms-win-crt-locale-l1-1-0.spec
@@ -11,9 +11,9 @@
 @ cdecl _free_locale(ptr) ucrtbase._free_locale
 @ cdecl _get_current_locale() ucrtbase._get_current_locale
 @ cdecl _getmbcp() ucrtbase._getmbcp
-@ stub _lock_locales
+@ cdecl _lock_locales() ucrtbase._lock_locales
 @ cdecl _setmbcp(long) ucrtbase._setmbcp
-@ stub _unlock_locales
+@ cdecl _unlock_locales() ucrtbase._unlock_locales
 @ stub _wcreate_locale
 @ cdecl _wsetlocale(long wstr) ucrtbase._wsetlocale
 @ cdecl localeconv() ucrtbase.localeconv
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index eed5a37..d8c0a97 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -1901,6 +1901,22 @@ int CDECL _configthreadlocale(int type)
     return -1;
 }
 
+/*********************************************************************
+ *      _lock_locales (UCRTBASE.@)
+ */
+void CDECL _lock_locales(void)
+{
+    LOCK_LOCALE
+}
+
+/*********************************************************************
+ *      _unlock_locales (UCRTBASE.@)
+ */
+void CDECL _unlock_locales(void)
+{
+    UNLOCK_LOCALE
+}
+
 BOOL msvcrt_init_locale(void)
 {
     int i;
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 14ffa63..690072b 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -563,7 +563,7 @@
 @ cdecl _localtime64(ptr) MSVCRT__localtime64
 @ cdecl _localtime64_s(ptr ptr)
 @ cdecl _lock_file(ptr) MSVCRT__lock_file
-@ stub _lock_locales
+@ cdecl _lock_locales()
 @ cdecl _locking(long long long) MSVCRT__locking
 @ cdecl _logb(double) MSVCRT__logb
 @ cdecl -arch=arm,x86_64 _logbf(float) MSVCRT__logbf
@@ -2000,7 +2000,7 @@
 @ cdecl _unlink(str) MSVCRT__unlink
 @ cdecl _unloaddll(long)
 @ cdecl _unlock_file(ptr) MSVCRT__unlock_file
-@ stub _unlock_locales
+@ cdecl _unlock_locales()
 @ cdecl _utime32(str ptr)
 @ cdecl _utime64(str ptr)
 @ cdecl _waccess(wstr long) MSVCRT__waccess
-- 
2.8.3




More information about the wine-patches mailing list