This dll doesn't provide this function, but making it an empty no-op function should be fine.
This somewhat allows running exes linked against this dll; the previous incorrect declaration of this function in the def files allowed compiling projects (where configure checks otherwise would fail since the mingw crt startup files has undefined references against this function) that in the end produced dlls linking against it. This CRT dll (which is intended only for use with Windows Store apps) doesn't actually operate properly when used for standalone exe's though (it crashes on exit and e.g. printf function calls doesn't output anything), but this still is a small step towards making things less incorrect. Signed-off-by: Martin Storsjö <mar...@martin.st> --- mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/lib32/msvcr120_app.def.in | 1 - mingw-w64-crt/lib64/msvcr120_app.def.in | 1 - mingw-w64-crt/misc/__set_app_type.c | 12 ++++++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 mingw-w64-crt/misc/__set_app_type.c diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 83e3979fa..f7abb16d2 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -341,6 +341,7 @@ src_msvcr80_64=\ src_msvcr120_app=\ $(src_msvcrt_common) \ + misc/__set_app_type.c \ misc/_getpid.c # These mingwex sources are target independent: diff --git a/mingw-w64-crt/lib32/msvcr120_app.def.in b/mingw-w64-crt/lib32/msvcr120_app.def.in index a189270c6..cdad35edc 100644 --- a/mingw-w64-crt/lib32/msvcr120_app.def.in +++ b/mingw-w64-crt/lib32/msvcr120_app.def.in @@ -879,7 +879,6 @@ _seh_longjmp_unwind4@4 _seh_longjmp_unwind@4 _set_SSE2_enable _set_abort_behavior -__set_app_type ; Dummy implementation _set_controlfp _set_doserrno _set_errno diff --git a/mingw-w64-crt/lib64/msvcr120_app.def.in b/mingw-w64-crt/lib64/msvcr120_app.def.in index 9470e4466..c9b0be351 100644 --- a/mingw-w64-crt/lib64/msvcr120_app.def.in +++ b/mingw-w64-crt/lib64/msvcr120_app.def.in @@ -823,7 +823,6 @@ _scwprintf_p _scwprintf_p_l _set_FMA3_enable _set_abort_behavior -__set_app_type ; Dummy implementation _set_controlfp _set_doserrno _set_errno diff --git a/mingw-w64-crt/misc/__set_app_type.c b/mingw-w64-crt/misc/__set_app_type.c new file mode 100644 index 000000000..83e37d6a2 --- /dev/null +++ b/mingw-w64-crt/misc/__set_app_type.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 __set_app_type (int type) { +} + +void (__cdecl *__MINGW_IMP_SYMBOL(__set_app_type))(int) = __set_app_type; -- 2.17.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public