Re: [Mingw-w64-public] [PATCH] crt: More strictly flag functions in the unified msvcrt.def.in
On Mon, 2 Oct 2017, JonY via Mingw-w64-public wrote: On 10/02/2017 10:52 AM, Martin Storsjö wrote: On Mon, 2 Oct 2017, JonY via Mingw-w64-public wrote: On 10/02/2017 05:55 AM, Martin Storsjö wrote: On Fri, 29 Sep 2017, Martin Storsjö wrote: Now the output from the unified msvcrt.def.in should be almost identical to what it was before, except for some new *_dbg and __p_* functions. The functions that were included for 32 and 64 bit x86 in the unification were originally believed to be harmless, but some of them turned out to be function that we have compatibility fallbacks for, that were missed when libmsvcrt.a suddenly started. This broke compatibility with XP in some cases. Signed-off-by: Martin Storsjö --- mingw-w64-crt/lib-common/msvcrt.def.in | 229 - 1 file changed, 114 insertions(+), 115 deletions(-) If there's no objections, I'll be pushing this one soon, since it basically fixes regressions caused by my def file unification. I think the mailing list spam filtered the patch. That's strange - it's at least visible at https://sourceforge.net/p/mingw-w64/mailman/message/36057343/. // Martin 2nd reworked patch OK. The one linked above that is? // Martin -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt: Add schannel.def and security.def for lib32
On 10/02/2017 01:01 PM, Shinchiro Shinchiro wrote: > How about the status of this patch? Is there need some works before getting > merged? > Pushed to master, Makefile.in changes should not in the same commit next time. signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt: More strictly flag functions in the unified msvcrt.def.in
On 10/02/2017 10:52 AM, Martin Storsjö wrote: > On Mon, 2 Oct 2017, JonY via Mingw-w64-public wrote: > >> On 10/02/2017 05:55 AM, Martin Storsjö wrote: >>> On Fri, 29 Sep 2017, Martin Storsjö wrote: >>> Now the output from the unified msvcrt.def.in should be almost identical to what it was before, except for some new *_dbg and __p_* functions. The functions that were included for 32 and 64 bit x86 in the unification were originally believed to be harmless, but some of them turned out to be function that we have compatibility fallbacks for, that were missed when libmsvcrt.a suddenly started. This broke compatibility with XP in some cases. Signed-off-by: Martin Storsjö --- mingw-w64-crt/lib-common/msvcrt.def.in | 229 - 1 file changed, 114 insertions(+), 115 deletions(-) >>> >>> If there's no objections, I'll be pushing this one soon, since it >>> basically fixes regressions caused by my def file unification. >>> >> >> I think the mailing list spam filtered the patch. > > That's strange - it's at least visible at > https://sourceforge.net/p/mingw-w64/mailman/message/36057343/. > > // Martin 2nd reworked patch OK. signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt: Add schannel.def and security.def for lib32
How about the status of this patch? Is there need some works before getting merged? -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt: More strictly flag functions in the unified msvcrt.def.in
On Mon, 2 Oct 2017, JonY via Mingw-w64-public wrote: On 10/02/2017 05:55 AM, Martin Storsjö wrote: On Fri, 29 Sep 2017, Martin Storsjö wrote: Now the output from the unified msvcrt.def.in should be almost identical to what it was before, except for some new *_dbg and __p_* functions. The functions that were included for 32 and 64 bit x86 in the unification were originally believed to be harmless, but some of them turned out to be function that we have compatibility fallbacks for, that were missed when libmsvcrt.a suddenly started. This broke compatibility with XP in some cases. Signed-off-by: Martin Storsjö --- mingw-w64-crt/lib-common/msvcrt.def.in | 229 - 1 file changed, 114 insertions(+), 115 deletions(-) If there's no objections, I'll be pushing this one soon, since it basically fixes regressions caused by my def file unification. I think the mailing list spam filtered the patch. That's strange - it's at least visible at https://sourceforge.net/p/mingw-w64/mailman/message/36057343/. // Martin -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] crt: More strictly flag functions in the unified msvcrt.def.in
On 10/02/2017 05:55 AM, Martin Storsjö wrote: > On Fri, 29 Sep 2017, Martin Storsjö wrote: > >> Now the output from the unified msvcrt.def.in should be almost identical >> to what it was before, except for some new *_dbg and __p_* functions. >> >> The functions that were included for 32 and 64 bit x86 in the unification >> were originally believed to be harmless, but some of them turned out to >> be function that we have compatibility fallbacks for, that were missed >> when libmsvcrt.a suddenly started. This broke compatibility with XP >> in some cases. >> >> Signed-off-by: Martin Storsjö >> --- >> mingw-w64-crt/lib-common/msvcrt.def.in | 229 >> - >> 1 file changed, 114 insertions(+), 115 deletions(-) > > If there's no objections, I'll be pushing this one soon, since it > basically fixes regressions caused by my def file unification. > I think the mailing list spam filtered the patch. signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] crt: Add a compatibility wrapper for _get_current_locale
This function only exists since Windows 8, but is is currently used by libc++. This fixes linker errors with libc++ when linking against msvcrt.dll. This compatibility wrapper only returns NULL and doesn't attempt keeping track of what the last set locale actually was. (Doing that is a bit hard as well, since _get_current_locale is supposed to allocate and populate a _locale_t struct, while setlocale only gets a locale name string.) The parts of libc++ using this function probably won't work perfectly on versions prior to Windows 8 with this wrapper, but this allows building libc++ in general for a wider range of Windows versions, and having these parts working as intended on Windows 8 and newer. --- This part seemed to work by accident before, since the unified msvcrt.def.in accidentally exposed this function everywhere, and I had only tested libc++ builds on win10. --- mingw-w64-crt/Makefile.am| 1 + mingw-w64-crt/misc/_get_current_locale.c | 26 ++ mingw-w64-headers/crt/locale.h | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 mingw-w64-crt/misc/_get_current_locale.c diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index eaa0080..8ee5a22 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -155,6 +155,7 @@ src_libws2_32=libsrc/ws2_32.c \ src_msvcrt=\ misc/_configthreadlocale.c \ + misc/_get_current_locale.c \ misc/invalid_parameter_handler.c \ misc/output_format.c \ misc/purecall.c \ diff --git a/mingw-w64-crt/misc/_get_current_locale.c b/mingw-w64-crt/misc/_get_current_locale.c new file mode 100644 index 000..f5ccc4a --- /dev/null +++ b/mingw-w64-crt/misc/_get_current_locale.c @@ -0,0 +1,26 @@ +#include +#include +#include + +static _locale_t __cdecl init_func(void); +_locale_t (__cdecl *__MINGW_IMP_SYMBOL(_get_current_locale))(void) = init_func; + +static _locale_t __cdecl null_func(void) +{ + return NULL; +} + +static _locale_t __cdecl init_func(void) +{ +HMODULE msvcrt = __mingw_get_msvcrt_handle(); +_locale_t (__cdecl *func)(void) = NULL; + +if (msvcrt) { +func = (void*)GetProcAddress(msvcrt, "_get_current_locale"); +} + +if (!func) +func = null_func; + +return (__MINGW_IMP_SYMBOL(_get_current_locale) = func)(); +} diff --git a/mingw-w64-headers/crt/locale.h b/mingw-w64-headers/crt/locale.h index b6bae04..1f588e8 100644 --- a/mingw-w64-headers/crt/locale.h +++ b/mingw-w64-headers/crt/locale.h @@ -79,7 +79,7 @@ extern "C" { int __cdecl _configthreadlocale(int _Flag); char *__cdecl setlocale(int _Category,const char *_Locale); _CRTIMP struct lconv *__cdecl localeconv(void); - _locale_t __cdecl _get_current_locale(void); + _CRTIMP _locale_t __cdecl _get_current_locale(void); _locale_t __cdecl _create_locale(int _Category,const char *_Locale); void __cdecl _free_locale(_locale_t _Locale); _locale_t __cdecl __get_current_locale(void); -- 2.7.4 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public