It would be used also in followup changes. --- mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/crt/crtdll_compat.c | 6 ------ mingw-w64-crt/stdio/mingw_dummy__lock.c | 12 ++++++++++++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 mingw-w64-crt/stdio/mingw_dummy__lock.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index bf9b4bc22316..5bb2c6477170 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -433,6 +433,7 @@ src_crtdll=\ misc/seterrno.c \ stdio/_scprintf.c \ stdio/_vscprintf.c \ + stdio/mingw_dummy__lock.c \ stdio/mingw_lock.c src_msvcr120_app=\ diff --git a/mingw-w64-crt/crt/crtdll_compat.c b/mingw-w64-crt/crt/crtdll_compat.c index 35686658c3ff..39cc30023ecc 100644 --- a/mingw-w64-crt/crt/crtdll_compat.c +++ b/mingw-w64-crt/crt/crtdll_compat.c @@ -11,12 +11,6 @@ #undef __setusermatherr void __setusermatherr(__UNUSED_PARAM(int (__cdecl *f)(struct _exception *))) { } -/* Define dummy _lock() and _unlock() functions as crtdll.dll does not provide them */ -void __cdecl _lock(int locknum); -void __cdecl _unlock(int locknum); -void __cdecl _lock(__UNUSED_PARAM(int locknum)) { } -void __cdecl _unlock(__UNUSED_PARAM(int locknum)) { } - /* Define __getmainargs() function via crtdll.dll __GetMainArgs() function */ extern void __GetMainArgs(int *argc, char ***argv, char ***envp, int expand_wildcards); int __cdecl __getmainargs(int *argc, char ***argv, char ***envp, int expand_wildcards, __UNUSED_PARAM(_startupinfo *startup_info)) diff --git a/mingw-w64-crt/stdio/mingw_dummy__lock.c b/mingw-w64-crt/stdio/mingw_dummy__lock.c new file mode 100644 index 000000000000..7afe665d0c98 --- /dev/null +++ b/mingw-w64-crt/stdio/mingw_dummy__lock.c @@ -0,0 +1,12 @@ +/** + * 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 <internal.h> + +void __cdecl _lock(int locknum); +void __cdecl _unlock(int locknum); +void __cdecl _lock(__UNUSED_PARAM(int locknum)) { } +void __cdecl _unlock(__UNUSED_PARAM(int locknum)) { } -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public