Hi, Cygwin errno.h does not define non-Posix errno_t, neither does Cygwin stdlib.h knows about _invalid_parameter_handler.
In theory, any Cygwin code should not be using libmsvcrt.a at all, but this is currently a stopgap measure while I investigate how old the libmsvcrt.a inclusion goes. The attached patch OK to commit?
Index: mingw-w64-headers/crt/stdlib.h
===================================================================
--- mingw-w64-headers/crt/stdlib.h (revision 5961)
+++ mingw-w64-headers/crt/stdlib.h (working copy)
@@ -133,7 +133,10 @@
_CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler
_Handler);
_CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
+#ifndef _INVALID_PARAMETER_HANDLER_DEFINED
+#define _INVALID_PARAMETER_HANDLER_DEFINED
typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const
wchar_t *,const wchar_t *,unsigned int,uintptr_t);
+#endif
_CRTIMP _invalid_parameter_handler __cdecl
_set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
_CRTIMP _invalid_parameter_handler __cdecl
_get_invalid_parameter_handler(void);
Index: mingw-w64-headers/crt/_cygwin.h
===================================================================
--- mingw-w64-headers/crt/_cygwin.h (revision 5961)
+++ mingw-w64-headers/crt/_cygwin.h (working copy)
@@ -23,7 +23,6 @@
#define _PTRDIFF_T_DEFINED
#define _WCHAR_T_DEFINED
#define _WCTYPE_T_DEFINED
-#define _ERRCODE_DEFINED /* FIXME? errno_t is no POSIX type. */
#define _TIME_T_DEFINED
/* _WIN64 is defined by the compiler specs when targeting Windows.
Index: mingw-w64-crt/configure.ac
===================================================================
--- mingw-w64-crt/configure.ac (revision 5961)
+++ mingw-w64-crt/configure.ac (working copy)
@@ -118,24 +118,26 @@
AS_IF([AS_VAR_TEST_SET([LIB32]) || AS_VAR_TEST_SET([LIB64])],
[AC_MSG_WARN([Building the runtime to use libce with lib32 or lib64 is
unsupported.])])])
-AS_CASE([$enable_w32api],
- [yes],[
- AC_SUBST([LIB64SUFFIXDIR],[lib64/w32api])
- AC_SUBST([LIB32SUFFIXDIR],[lib/w32api])
- ],
- [AS_CASE([$host_cpu],
- [x86_64],[
- AC_SUBST([LIB64SUFFIXDIR],[lib])
- AC_SUBST([LIB32SUFFIXDIR],[lib32])],
- [i*86],[
- AC_SUBST([LIB64SUFFIXDIR],[lib64])
- AC_SUBST([LIB32SUFFIXDIR],[lib])],
- [
- AC_SUBST([LIB64SUFFIXDIR],[lib64])
- AC_SUBST([LIB32SUFFIXDIR],[lib32])]
- )]
+AS_CASE([$host_cpu],
+ [x86_64],[
+ lib64suffx=lib
+ lib32suffx=lib32],
+ [i*86],[
+ lib64suffx=lib64
+ lib32suffx=lib],
+ [
+ lib64suffx=lib64
+ lib32suffx=lib32]
)
+AS_VAR_IF([enable_w32api],[yes],[
+ lib64suffx=$lib64suffx/w32api
+ lib32suffx=$lib32suffx/w32api
+])
+
+AC_SUBST([LIB64SUFFIXDIR],[$lib64suffx])
+AC_SUBST([LIB32SUFFIXDIR],[$lib32suffx])
+
# Checks for features.
AC_MSG_CHECKING([whether to enable globbing])
Index: mingw-w64-crt/misc/invalid_parameter_handler.c
===================================================================
--- mingw-w64-crt/misc/invalid_parameter_handler.c (revision 5961)
+++ mingw-w64-crt/misc/invalid_parameter_handler.c (working copy)
@@ -1,6 +1,11 @@
#include <windows.h>
#include <stdlib.h>
+#ifndef _INVALID_PARAMETER_HANDLER_DEFINED
+#define _INVALID_PARAMETER_HANDLER_DEFINED
+ typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const
wchar_t *,const wchar_t *,unsigned int,uintptr_t);
+#endif
+
static _invalid_parameter_handler handler;
static _invalid_parameter_handler __cdecl
mingw_set_invalid_parameter_handler(_invalid_parameter_handler new_handler)
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
