Alexandre Julliard : msvcrt: Export onexit functions for compatibility with Mingw.

Alexandre Julliard julliard at winehq.org
Fri Dec 14 11:57:13 CST 2018


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 14 17:31:14 2018 +0100

msvcrt: Export onexit functions for compatibility with Mingw.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/exit.c      | 7 -------
 dlls/msvcrt/file.c      | 2 --
 dlls/msvcrt/msvcrt.spec | 4 ++++
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c
index 51bc6f0..0a7e303 100644
--- a/dlls/msvcrt/exit.c
+++ b/dlls/msvcrt/exit.c
@@ -39,10 +39,7 @@ typedef struct MSVCRT__onexit_table_t
 } MSVCRT__onexit_table_t;
 
 static MSVCRT__onexit_table_t MSVCRT_atexit_table;
-
-#if _MSVCR_VER>=140
 static MSVCRT__onexit_table_t MSVCRT_quick_exit_table;
-#endif
 
 typedef void (__stdcall *_tls_callback_type)(void*,ULONG,void*);
 static _tls_callback_type tls_atexit_callback;
@@ -406,8 +403,6 @@ int CDECL MSVCRT_atexit(void (__cdecl *func)(void))
   return MSVCRT__onexit((MSVCRT__onexit_t)func) == (MSVCRT__onexit_t)func ? 0 : -1;
 }
 
-#if _MSVCR_VER>=140
-
 /*********************************************************************
  *             _crt_at_quick_exit (UCRTBASE.@)
  */
@@ -476,8 +471,6 @@ void CDECL _register_thread_local_exe_atexit_callback(_tls_callback_type callbac
     tls_atexit_callback = callback;
 }
 
-#endif /* _MSVCR_VER>=140 */
-
 #if _MSVCR_VER>=71
 /*********************************************************************
  *		_set_purecall_handler (MSVCR71.@)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 224e6ea..43d4b56 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -786,7 +786,6 @@ MSVCRT_FILE * CDECL MSVCRT___iob_func(void)
  return &MSVCRT__iob[0];
 }
 
-#if _MSVCR_VER >= 140
 /*********************************************************************
  *		__acrt_iob_func(UCRTBASE.@)
  */
@@ -794,7 +793,6 @@ MSVCRT_FILE * CDECL MSVCRT___acrt_iob_func(unsigned idx)
 {
  return &MSVCRT__iob[idx];
 }
-#endif
 
 /*********************************************************************
  *		_access (MSVCRT.@)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index d71d37a..cd6834b 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -197,6 +197,7 @@
 @ cdecl ___mb_cur_max_func() MSVCRT____mb_cur_max_func
 @ cdecl ___setlc_active_func() MSVCRT____setlc_active_func
 @ cdecl ___unguarded_readlc_active_add_func() MSVCRT____unguarded_readlc_active_add_func
+@ cdecl __acrt_iob_func(long) MSVCRT___acrt_iob_func  # for compatibility with Mingw
 @ extern __argc MSVCRT___argc
 @ extern __argv MSVCRT___argv
 @ extern __badioinfo MSVCRT___badioinfo
@@ -421,6 +422,7 @@
 @ varargs _execle(str str)
 @ varargs _execlp(str str)
 @ varargs _execlpe(str str)
+@ cdecl _execute_onexit_table(ptr) MSVCRT__execute_onexit_table  # for compatibility with Mingw
 @ cdecl _execv(str ptr)
 @ cdecl _execve(str ptr ptr) MSVCRT__execve
 @ cdecl _execvp(str ptr)
@@ -553,6 +555,7 @@
 @ cdecl _i64toa_s(int64 ptr long long) MSVCRT__i64toa_s
 @ cdecl _i64tow(int64 ptr long) ntdll._i64tow
 @ cdecl _i64tow_s(int64 ptr long long) MSVCRT__i64tow_s
+@ cdecl _initialize_onexit_table(ptr) MSVCRT__initialize_onexit_table  # for compatibility with Mingw
 @ cdecl _initterm(ptr ptr)
 @ cdecl _initterm_e(ptr ptr)
 @ stub -arch=i386 _inp(long)
@@ -866,6 +869,7 @@
 # extern _pwctype
 @ cdecl _read(long ptr long) MSVCRT__read
 # stub _realloc_dbg(ptr long long str long)
+@ cdecl _register_onexit_function(ptr ptr) MSVCRT__register_onexit_function  # for compatibility with Mingw
 @ cdecl _resetstkoflw() MSVCRT__resetstkoflw
 @ cdecl _rmdir(str) MSVCRT__rmdir
 @ cdecl _rmtmp() MSVCRT__rmtmp




More information about the wine-cvs mailing list