Piotr Caban : msvcrt: Use _beginthread_start_routine_t from public header.

Alexandre Julliard julliard at winehq.org
Mon Nov 30 16:13:46 CST 2020


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Mon Nov 30 14:37:24 2020 +0100

msvcrt: Use _beginthread_start_routine_t from public header.

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

---

 dlls/msvcrt/console.c       | 4 ++--
 dlls/msvcrt/msvcrt.h        | 2 --
 dlls/msvcrt/thread.c        | 7 ++++---
 dlls/ucrtbase/ucrtbase.spec | 8 ++++----
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c
index cc390feb603..7074accbfa7 100644
--- a/dlls/msvcrt/console.c
+++ b/dlls/msvcrt/console.c
@@ -564,7 +564,7 @@ int WINAPIV _cwprintf(const wchar_t* format, ...)
 /*********************************************************************
  *		__conio_common_vcprintf (UCRTBASE.@)
  */
-int CDECL MSVCRT__conio_common_vcprintf(unsigned __int64 options, const char* format,
+int CDECL __conio_common_vcprintf(unsigned __int64 options, const char* format,
                                         _locale_t locale, __ms_va_list valist)
 {
     if (options & ~UCRTBASE_PRINTF_MASK)
@@ -576,7 +576,7 @@ int CDECL MSVCRT__conio_common_vcprintf(unsigned __int64 options, const char* fo
 /*********************************************************************
  *		__conio_common_vcwprintf (UCRTBASE.@)
  */
-int CDECL MSVCRT__conio_common_vcwprintf(unsigned __int64 options, const wchar_t* format,
+int CDECL __conio_common_vcwprintf(unsigned __int64 options, const wchar_t* format,
                                          _locale_t locale, __ms_va_list valist)
 {
     if (options & ~UCRTBASE_PRINTF_MASK)
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 907d9ba2c99..5f21950f4d4 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -35,8 +35,6 @@ typedef void (__cdecl *unexpected_function)(void);
 typedef void (__cdecl *_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
 void __cdecl terminate(void);
 
-typedef void (__cdecl *MSVCRT__beginthread_start_routine_t)(void *);
-typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *);
 typedef int (__cdecl *MSVCRT__onexit_t)(void);
 typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t);
 typedef void (__cdecl *MSVCRT_purecall_handler)(void);
diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c
index bbf1eb5177f..548f4a6ef66 100644
--- a/dlls/msvcrt/thread.c
+++ b/dlls/msvcrt/thread.c
@@ -17,6 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#include <process.h>
 #include "msvcrt.h"
 #include "wine/debug.h"
 
@@ -26,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
 
 typedef struct {
   HANDLE thread;
-  MSVCRT__beginthread_start_routine_t start_address;
+  _beginthread_start_routine_t start_address;
   void *arglist;
 } _beginthread_trampoline_t;
 
@@ -109,7 +110,7 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg)
  *		_beginthread (MSVCRT.@)
  */
 uintptr_t CDECL _beginthread(
-  MSVCRT__beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
+  _beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
   unsigned int stack_size, /* [in] Stack size for new thread or 0 */
   void *arglist)           /* [in] Argument list to be passed to new thread or NULL */
 {
@@ -151,7 +152,7 @@ uintptr_t CDECL _beginthread(
 uintptr_t CDECL _beginthreadex(
   void *security,          /* [in] Security descriptor for new thread; must be NULL for Windows 9x applications */
   unsigned int stack_size, /* [in] Stack size for new thread or 0 */
-  MSVCRT__beginthreadex_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
+  _beginthreadex_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
   void *arglist,           /* [in] Argument list to be passed to new thread or NULL */
   unsigned int initflag,   /* [in] Initial state of new thread (0 for running or CREATE_SUSPEND for suspended) */
   unsigned int *thrdaddr)  /* [out] Points to a 32-bit variable that receives the thread identifier */
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 10d16919769..9b183d91590 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -73,11 +73,11 @@
 @ cdecl ___mb_cur_max_func() MSVCRT____mb_cur_max_func
 @ cdecl ___mb_cur_max_l_func(ptr)
 @ cdecl __acrt_iob_func(long) MSVCRT___acrt_iob_func
-@ cdecl __conio_common_vcprintf(int64 str ptr ptr) MSVCRT__conio_common_vcprintf
+@ cdecl __conio_common_vcprintf(int64 str ptr ptr)
 @ stub __conio_common_vcprintf_p
 @ stub __conio_common_vcprintf_s
 @ stub __conio_common_vcscanf
-@ cdecl __conio_common_vcwprintf(int64 wstr ptr ptr) MSVCRT__conio_common_vcwprintf
+@ cdecl __conio_common_vcwprintf(int64 wstr ptr ptr) __conio_common_vcwprintf
 @ stub __conio_common_vcwprintf_p
 @ stub __conio_common_vcwprintf_s
 @ stub __conio_common_vcwscanf
@@ -759,11 +759,11 @@
 @ cdecl _o____lc_locale_name_func() ___lc_locale_name_func
 @ cdecl _o____mb_cur_max_func() MSVCRT____mb_cur_max_func
 @ cdecl _o___acrt_iob_func(long) MSVCRT___acrt_iob_func
-@ cdecl _o___conio_common_vcprintf(int64 str ptr ptr) MSVCRT__conio_common_vcprintf
+@ cdecl _o___conio_common_vcprintf(int64 str ptr ptr) __conio_common_vcprintf
 @ stub _o___conio_common_vcprintf_p
 @ stub _o___conio_common_vcprintf_s
 @ stub _o___conio_common_vcscanf
-@ cdecl _o___conio_common_vcwprintf(int64 wstr ptr ptr) MSVCRT__conio_common_vcwprintf
+@ cdecl _o___conio_common_vcwprintf(int64 wstr ptr ptr) __conio_common_vcwprintf
 @ stub _o___conio_common_vcwprintf_p
 @ stub _o___conio_common_vcwprintf_s
 @ stub _o___conio_common_vcwscanf




More information about the wine-cvs mailing list