Re: [Mingw-w64-public] DirectWrite additions
So what happened here? The winerror.h that got checked in still has the duplicate defines? Is there some reason I can't remove the dupes (attached)? dw On 8/24/2016 9:46 AM, Jacek Caban wrote: Hi Ruben, I'm sorry I didn't look at this earlier. I committed winerror.h (it seems that you included the same defines in two different places in those patches, so please retest with committed version) and wincodec.idl parts. However, dwrite_2.h needs some more work. We try to provide dwrite APIs for plain C, which makes things a bit more painful than that. You need to add THIS (for functions with no arguments) or THIS_ macros in the beginning of declaration of each functions. Also to preserve proper vtbl layout, declaration of parent interface needs to be copied inside __cplusplus guard. See other declarations for an example. Also we try to avoid using things like _In_, _Out_ macros in our headers. Thanks, Jacek On 24.08.2016 18:25, Ruben Van Boxem wrote: I would like to reiterate my request to include the following the changes in MinGW-w64. I have no commit rights, and Kai half-OKed them, so input from someone in the team that can commit them directly would be greatly appreciated! I'll attach both patches (which are required to build Skia with MinGW-w64) to this email for convenience. Note there were duplicate GUID's in the previous patch, those were removed here. Please OK and apply so I can stop keeing my custom builds of MinGW-w64 around, thanks :) Cheers! Ruben 2016-08-09 19:44 GMT+02:00 Ruben Van Boxem: Hi Kai (and Jacek), Thanks for taking a look. Note there are two patches: one I linked to in the body of my email, the other was attached. Both would need to be applied by someone (I don't have commit rights). Cheers, Ruben 2016-08-09 10:58 GMT+02:00 Kai Tietz : Hi Ruben, patch looks fine to me. As long as there are no objections (Jacek do you?), go ahead and apply. Thanks, Kai 2016-08-08 20:57 GMT+02:00 Ruben Van Boxem : Hi guys, it would be nice to keep up to date with new APIs that gain real world use, like this little patch: https://github.com/Alexpux/mingw-w64/pull/1/commits/6c0efe37 b32510f72020e38726c7a84690a926fd Which is now needed for Qt 5.7 (and skia). I would also like to point out attached patch that adds various GUIDs missing I ran into when compiling skia. Cheers, Ruben -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public diff --git a/mingw-w64-headers/include/winerror.h b/mingw-w64-headers/include/winerror.h index 55ebd50..aee0618 100644 --- a/mingw-w64-headers/include/winerror.h +++ b/mingw-w64-headers/include/winerror.h @@ -3467,20 +3467,6 @@ __CRT_INLINE HRESULT HRESULT_FROM_WIN32(__LONG32 x) { return x <= 0 ? (HRESULT)x #define DXGI_ERROR_NAME_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x887A002C) #define DXGI_ERROR_SDK_COMPONENT_MISSING_HRESULT_TYPEDEF_(0x887A002D) -#define DWRITE_E_FILEFORMAT _HRESULT_TYPEDEF_(0x88985000) -#define DWRITE_E_UNEXPECTED _HRESULT_TYPEDEF_(0x88985001) -#define DWRITE_E_NOFONT _HRESULT_TYPEDEF_(0x88985002) -#define DWRITE_E_FILENOTFOUND _HRESULT_TYPEDEF_(0x88985003) -#define DWRITE_E_FILEACCESS
[Mingw-w64-public] [PATCH] _SECIMP patches
There is an entire collection of routines in mingw-w64-crt\secapi. These functions replicate the functionality of a number of secure versions of functions (_vcprintf_s, _wstrtime_s, etc). The idea was to support these functions on platforms which didn't have the necessary DLLs. The purpose of the attached patches is to allow you to switch between using the internal versions, or the DLL versions. The patches select the DLL versions by default. In the (unlikely) event that you want the 'internal' versions, build your project with '-D_SECIMP='. And incidentally it cleans up a number of "redeclared without dllimport attribute: previous dllimport ignored" warnings. secimp1.patch - A number of the secapi\*.c files (actually all of them) duplicate the function prototypes of the functions they implement (and sometimes some of the functions they use as well) instead of simply including the appropriate header. This patch removes the duplicate definitions, and ensures that the correct headers are included. secimp2.patch - Per Kai, these data imports are *always* resolved from DLLs. Having them 'follow' _CRTIMP is incorrect. secimp3.patch - Replace all the _CRTIMP with _SECIMP on the secure functions to allow them to be controlled independently of the rest of the library functions. Note that while building mingw-w64 itself (aka defined(__LIBMSVCRT__)), _SECIMP must always be defined as blank to allow the internal versions to build without warnings. dw diff --git a/mingw-w64-crt/secapi/_access_s.c b/mingw-w64-crt/secapi/_access_s.c index e5fea3b..9be582e 100644 --- a/mingw-w64-crt/secapi/_access_s.c +++ b/mingw-w64-crt/secapi/_access_s.c @@ -2,9 +2,8 @@ #include #include #include +#include -int __cdecl _access (const char *, int); -errno_t __cdecl _access_s (const char *, int); static errno_t __cdecl _int_access_s (const char *, int); static errno_t __cdecl _stub (const char *, int); diff --git a/mingw-w64-crt/secapi/_cgets_s.c b/mingw-w64-crt/secapi/_cgets_s.c index a5023de..e70efe7 100644 --- a/mingw-w64-crt/secapi/_cgets_s.c +++ b/mingw-w64-crt/secapi/_cgets_s.c @@ -1,10 +1,10 @@ +#define MINGW_HAS_SECURE_API 1 #include #include #include #include +#include -char * __cdecl _cgets (char *); -errno_t __cdecl _cgets_s (char *, size_t, size_t *); static errno_t __cdecl _int_cgets_s (char *, size_t, size_t *); static errno_t __cdecl _stub (char *, size_t, size_t *); diff --git a/mingw-w64-crt/secapi/_cgetws_s.c b/mingw-w64-crt/secapi/_cgetws_s.c index 9380ec3..dff4187 100644 --- a/mingw-w64-crt/secapi/_cgetws_s.c +++ b/mingw-w64-crt/secapi/_cgetws_s.c @@ -1,10 +1,10 @@ +#define MINGW_HAS_SECURE_API 1 #include #include #include #include +#include -wchar_t * __cdecl _cgetws (wchar_t *); -errno_t __cdecl _cgetws_s (wchar_t *, size_t, size_t *); static errno_t __cdecl _int_cgetws_s (wchar_t *, size_t, size_t *); static errno_t __cdecl _stub (wchar_t *, size_t, size_t *); diff --git a/mingw-w64-crt/secapi/_chsize_s.c b/mingw-w64-crt/secapi/_chsize_s.c index 3993199..cd8d066 100644 --- a/mingw-w64-crt/secapi/_chsize_s.c +++ b/mingw-w64-crt/secapi/_chsize_s.c @@ -2,9 +2,8 @@ #include #include #include +#include -int __cdecl _chsize (int, long); -errno_t __cdecl _chsize_s (int, long long); static errno_t __cdecl _int_chsize_s (int, long long); static errno_t __cdecl _stub (int, long long); diff --git a/mingw-w64-crt/secapi/_cprintf_s.c b/mingw-w64-crt/secapi/_cprintf_s.c index 8101bc1..36ea582 100644 --- a/mingw-w64-crt/secapi/_cprintf_s.c +++ b/mingw-w64-crt/secapi/_cprintf_s.c @@ -1,10 +1,9 @@ +#define MINGW_HAS_SECURE_API 1 #include #include #include #include - -int __cdecl _cprintf_s (const char *,...); -int __cdecl _vcprintf_s (const char *,va_list); +#include int __cdecl (*__MINGW_IMP_SYMBOL(_cprintf_s))(const char *,...) = _cprintf_s; diff --git a/mingw-w64-crt/secapi/_cprintf_s_l.c b/mingw-w64-crt/secapi/_cprintf_s_l.c index 97fd4fb..316ca86 100644 --- a/mingw-w64-crt/secapi/_cprintf_s_l.c +++ b/mingw-w64-crt/secapi/_cprintf_s_l.c @@ -1,10 +1,9 @@ +#define MINGW_HAS_SECURE_API 1 #include #include #include #include - -int __cdecl _cprintf_s_l (const char *, _locale_t, ...); -int __cdecl _vcprintf_s_l(const char *,_locale_t,va_list); +#include int __cdecl (*__MINGW_IMP_SYMBOL(_cprintf_s_l))(const char *, _locale_t, ...) = _cprintf_s_l; diff --git a/mingw-w64-crt/secapi/_ctime32_s.c b/mingw-w64-crt/secapi/_ctime32_s.c index 9c54914..c59ccfc 100644 --- a/mingw-w64-crt/secapi/_ctime32_s.c +++ b/mingw-w64-crt/secapi/_ctime32_s.c @@ -4,9 +4,6 @@ #include #include -errno_t __cdecl _localtime32_s (struct tm *, const __time32_t *); -errno_t __cdecl asctime_s (char *, size_t, const struct tm *); -errno_t __cdecl _ctime32_s (char *, size_t, const __time32_t *); static errno_t __cdecl _int_ctime32_s (char *, size_t, const __time32_t *); static errno_t __cdecl _stub (char *, size_t, const __time32_t *);
[Mingw-w64-public] [PATCH] setupapi.h: add missing devpropdef.h include
Fix for bug #550 https://sourceforge.net/p/mingw-w64/bugs/550/ >From 6325df027a92d7f5041da022d0a9420c1af531c2 Mon Sep 17 00:00:00 2001 From: mati865Date: Thu, 25 Aug 2016 11:00:50 +0200 Subject: [PATCH] setupapi.h: add missing devpropdef.h include --- mingw-w64-headers/include/setupapi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mingw-w64-headers/include/setupapi.h b/mingw-w64-headers/include/setupapi.h index a0244a3..f029b80 100644 --- a/mingw-w64-headers/include/setupapi.h +++ b/mingw-w64-headers/include/setupapi.h @@ -7,6 +7,7 @@ #define _INC_SETUPAPI #include <_mingw_unicode.h> +#include #ifndef _SETUPAPI_ #define WINSETUPAPI DECLSPEC_IMPORT -- 2.9.1 -- ___ 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] wchar.h missing functions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 8/25/2016 17:12, David Wohlferd wrote: > In mingw-w64-headers/crt/time.h there is some code that does: > > #ifndef _WTIME_DEFINED #define _WTIME_DEFINED > > After that, it defines a number of functions. > > mingw-w64-headers/crt/wchar.h has this same #if block, using that > exact same define, but it defines fewer functions. So if you > include time.h first, you get all the functions. But if you > include wchar.h first, you never get the prototypes for the extra > functions, even if you later include time.h. > > This patch makes sure you get the same list of functions no matter > which file you include first. > > dw > Thanks for noticing this, patch OK. I wonder if moving them to a common file would be better. -BEGIN PGP SIGNATURE- iF4EAREIAAYFAle+z7gACgkQk721PNTrx0APRAD/elyiTGqwhgNv6u6UdjM3M3+I hXwUyaR7DYx12K72M4wA/jiQJ+S2lHwPzAqPo7XcOFiBaQBIpmJ8u0UqZAXYFPyG =s4ls -END PGP SIGNATURE- -- ___ 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] redeclared without dllimport warnings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 8/25/2016 16:44, David Wohlferd wrote: > The thing that started the _SECIMP work was a whole bunch of > "redeclared without dllimport attribute: previous dllimport > ignored" warnings. While the _SECIMP work (coming soon) will fix > most of them, there are a few others that still give this warning. > > This patch fixes the places that DON'T use _SECIMP. > > dw > Patch looks good. -BEGIN PGP SIGNATURE- iF4EAREIAAYFAle+z2sACgkQk721PNTrx0AxnQEAlD+hySUwN8XxEZJgXE1546hC 0j7ja0TMEkRgFZXW4K4A/jWuMCES/5uzQ3AeIFOxweTbqeomsUXofY+vm+fJmZNs =Ba8W -END PGP SIGNATURE- -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] wchar.h missing functions
In mingw-w64-headers/crt/time.h there is some code that does: #ifndef _WTIME_DEFINED #define _WTIME_DEFINED After that, it defines a number of functions. mingw-w64-headers/crt/wchar.h has this same #if block, using that exact same define, but it defines fewer functions. So if you include time.h first, you get all the functions. But if you include wchar.h first, you never get the prototypes for the extra functions, even if you later include time.h. This patch makes sure you get the same list of functions no matter which file you include first. dw diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h index 88cb24c..9265d0b 100644 --- a/mingw-w64-headers/crt/wchar.h +++ b/mingw-w64-headers/crt/wchar.h @@ -913,12 +913,17 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #define _WTIME_DEFINED _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm); + _CRTIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); wchar_t *__cdecl _wctime32(const __time32_t *_Time) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; + _CRTIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); size_t __cdecl wcsftime(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm); _CRTIMP size_t __cdecl _wcsftime_l(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm,_locale_t _Locale); _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; + _CRTIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords); _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; + _CRTIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords); _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; + _CRTIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) #define _INC_WTIME_INL @@ -931,6 +936,19 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #endif #endif /* __CRT__NO_INLINE */ #endif + +#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL) +#define _INC_WTIME_S_INL + errno_t __cdecl _wctime_s(wchar_t *, size_t, const time_t *); +#ifndef __CRT__NO_INLINE +#ifndef _USE_32BIT_TIME_T + __CRT_INLINE errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s (_Buffer,_SizeInWords,_Time); } +#else + __CRT_INLINE errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s (_Buffer,_SizeInWords,_Time); } +#endif /* _USE_32BIT_TIME_T */ +#endif /* __CRT__NO_INLINE */ +#endif /* !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL) */ + #endif typedef int mbstate_t; -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] redeclared without dllimport warnings
The thing that started the _SECIMP work was a whole bunch of "redeclared without dllimport attribute: previous dllimport ignored" warnings. While the _SECIMP work (coming soon) will fix most of them, there are a few others that still give this warning. This patch fixes the places that DON'T use _SECIMP. dw diff --git a/mingw-w64-crt/misc/invalid_parameter_handler.c b/mingw-w64-crt/misc/invalid_parameter_handler.c index edcdede..972b859 100644 --- a/mingw-w64-crt/misc/invalid_parameter_handler.c +++ b/mingw-w64-crt/misc/invalid_parameter_handler.c @@ -1,3 +1,4 @@ +#define _CRTIMP #include typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); diff --git a/mingw-w64-crt/misc/purecall.c b/mingw-w64-crt/misc/purecall.c index 39be174..8c29e67 100644 --- a/mingw-w64-crt/misc/purecall.c +++ b/mingw-w64-crt/misc/purecall.c @@ -4,6 +4,7 @@ * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ +#define _CRTIMP #include #include diff --git a/mingw-w64-crt/stdio/mingw_lock.c b/mingw-w64-crt/stdio/mingw_lock.c index e62fe03..fe31780 100644 --- a/mingw-w64-crt/stdio/mingw_lock.c +++ b/mingw-w64-crt/stdio/mingw_lock.c @@ -1,3 +1,4 @@ +#define _CRTIMP #include #include #include "internal.h" -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [Project News|New Builds]
Hi, The new builds of MinGW-W64 based on GCC-6.2.0 is uploaded. MinGW-w64 v5 is used. As earlier, you can try to use the new 'std::experimental::filesystem'(http://en.cppreference.com/w/cpp/experimental/fs) module. For this, add the '-lstdc++fs' options to the linker command line. 32-bit: posix-sjlj: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.2.0/threads-posix/sjlj/i686-6.2.0-release-posix-sjlj-rt_v5-rev0.7z posix-dwarf: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.2.0/threads-posix/dwarf/i686-6.2.0-release-posix-dwarf-rt_v5-rev0.7z win32-sjlj: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.2.0/threads-win32/sjlj/i686-6.2.0-release-win32-sjlj-rt_v5-rev0.7z win32-dwarf: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.2.0/threads-win32/dwarf/i686-6.2.0-release-win32-dwarf-rt_v5-rev0.7z 64-bit: posix-sjlj: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.2.0/threads-posix/sjlj/x86_64-6.2.0-release-posix-sjlj-rt_v5-rev0.7z posix-seh: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.2.0/threads-posix/seh/x86_64-6.2.0-release-posix-seh-rt_v5-rev0.7z win32-sjlj: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.2.0/threads-win32/sjlj/x86_64-6.2.0-release-win32-sjlj-rt_v5-rev0.7z win32-seh: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/6.2.0/threads-win32/seh/x86_64-6.2.0-release-win32-seh-rt_v5-rev0.7z The online installer is also available at: https://sf.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe -- Regards, niXman ___ Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows: http://sourceforge.net/projects/mingw-w64/ -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public