pineapple/externals/vcpkg/ports/libiconv/0002-Config-for-MSVC.patch

28 lines
881 B
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
diff --git "a/lib/loop_wchar.h" "b/lib/loop_wchar.h"
index 6dc011b..158ccdd 100644
--- "a/lib/loop_wchar.h"
+++ "b/lib/loop_wchar.h"
@@ -37,7 +37,7 @@
# include <wchar.h>
# define BUF_SIZE 64 /* assume MB_LEN_MAX <= 64 */
/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
- extern size_t mbrtowc ();
+// extern size_t mbrtowc ();
# ifdef mbstate_t
# define mbrtowc(pwc, s, n, ps) (mbrtowc)(pwc, s, n, 0)
# define mbsinit(ps) 1
diff --git a/srclib/fcntl.c b/srclib/fcntl.c
index f9753c4..02fc8be 100644
--- a/srclib/fcntl.c
+++ b/srclib/fcntl.c
@@ -37,6 +37,9 @@
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+#define HANDLE_FLAG_INHERIT 0
+#endif
/* Get _get_osfhandle. */
# if GNULIB_MSVC_NOTHROW