Re: [Mingw-w64-public] Slow pseudo-relocations
No, sorry, I don't have the setup to build mingw. Not likely that I will have time to do it any time soon either. I meant this as a bug report. I hope the problem has been investigated sufficiently for mingw devs to act on it. Vadim On Mon, Aug 18, 2014 at 9:34 PM, dw wrote: > Did you ever get this sorted out? > > dw > > > On 8/15/2014 10:53 PM, dw wrote: > > So, it looks like what has happened is that newer OSs (ie >= Vista) set > the page protect to PAGE_EXECUTE_WRITECOPY when doing a LoadLibrary. This > is a (relatively) new flag and apparently Mingw still assumes the old > values are always in use. > > There are 3 places in pseudo-reloc.c that do comparisons of b.Protect to > PAGE_EXECUTE_READWRITE. I believe all three should also check for > PAGE_EXECUTE_WRITECOPY. > > It also looks like a minor perf improvement in __write_memory is possible > by adding an #else for that VirtualQuery / VirtualProtect stuff: > > static void > __write_memory (void *addr, const void *src, size_t len) > { > if (!len) > return; > > #ifdef __MINGW64_VERSION_MAJOR > > /* Mark the section writable once, and unset it in >* restore_modified_sections. */ > mark_section_writable ((LPVOID) addr); > > #else /* __MINGW64_VERSION_MAJOR */ > > MEMORY_BASIC_INFORMATION b; > DWORD oldprot = 0; > int call_unprotect = 0; > > if (!VirtualQuery (addr, &b, sizeof(b))) > { > __report_error (" VirtualQuery failed for %d bytes at address %p", > (int) sizeof(b), addr); > } > > /* Temporarily allow write access to read-only protected memory. */ > if (b.Protect != PAGE_EXECUTE_READWRITE && b.Protect != PAGE_READWRITE > && b.Protect != PAGE_EXECUTE_WRITECOPY) > { > call_unprotect = 1; > VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, > &oldprot); > } > > #endif /* __MINGW64_VERSION_MAJOR */ > > /* write the data. */ > memcpy (addr, src, len); > > #ifndef __MINGW64_VERSION_MAJOR > > /* Restore original protection. */ > if (call_unprotect && b.Protect != PAGE_EXECUTE_READWRITE && b.Protect > != PAGE_READWRITE && b.Protect != PAGE_EXECUTE_WRITECOPY) > VirtualProtect (b.BaseAddress, b.RegionSize, oldprot, &oldprot); > > #endif /* __MINGW64_VERSION_MAJOR */ > } > > If setting the protection in mark_section_writable was unsuccessful > (unlikely as that is), trying to set it again here is not likely to help. > > NB: I haven't tried this, but you have the setup to test it anyway. Also, > this code snippet only fixes 2 of the 3 places that use > PAGE_EXECUTE_WRITECOPY. Remember to change the comparison in > mark_section_writable() as well. > > FWIW, > dw > > On 8/15/2014 8:17 PM, Vadim Chugunov wrote: > > Okay, I was wrong about __MINGW64_VERSION_MAJOR: it *was* defined. > > What apparently happens is that the VirtualQuery() call that follows > mark_section_writable(), returns page protection status of 0x80 > (PAGE_EXECUTE_WRITECOPY), which is unexpected by the relocator code, so it > falls back to calling VirtualProtect() per relocation entry. > > I am not entirely sure how this situation comes about, but here you go... > > On Fri, Aug 15, 2014 at 1:01 AM, Vadim Chugunov wrote: > >> Hi, >> I am trying to figure out the cause of a slow application startup, and >> the evidence I have so far, points to mingw's _pei386_runtime_relocator() >> routine as the culprit. When I start my app under debugger, I see this >> function calling VirtualProtect() about a zillion times in a row. >> >> Looking at the source, I see that __pei386_runtime_relocator() is >> supposed to change memory protection just once per executable section, but >> only if __MINGW64_VERSION_MAJOR is defined at compilation time. >> Otherwise, it reverts to changing protection once per relocation entry, >> for compatibility (?). >> Unfortunately, I don't see any headers included by pseudo-reloc.c that >> would define this symbol. And, indeed, the behavior I am seeing at runtime >> indicates that if was not defined... >> >> Am I reading this right? >> >> Thanks! >> Vadim >> > > -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Windows Phone
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 17.08.2014 um 16:10 schrieb Ruben De Smet: > Hi mingw-w64 list and especially André Hentschel, (CC: a teammember of mine) > > I decided to mail this directly to mr Hentschel too, as I was told you were > the one working on these kind of problems. > > We're developing a library that's compiling fine for Windows x86 and x86_64, > Linux and Android, all using GCC cross compilers on Linux hosts. The library > is written in C++11, which I didn't think of it could be a problem, until I > saw the bad MSVC support for C++11. The library can't be ported to Windows > Phone this way. > > Plans are to develop the UI on a per-device base using swig; Android will be > Java/JNI based, desktop will be Python or Java, web interface will be Ruby > and Rails, iOS objective C, and Windows Phone will be C#. > > I wanted to ask if there is an option of already using the recent > developments of mr Hentschel to compile this library for Windows Phone. > > I'm not using any special win32 routines, the most complicated I can think of > is winsock on Windows and bsd sockets on Unices. > > So, my main question is: what is the state of the ARM/Windows RT/Windows > Phone port at this moment and what is still to be done? > > Ruben De Smet > For the MinGW-w64 part I'd say we are somewhat over 50% since April, after that there's still some work in GCC... -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQGcBAEBAgAGBQJT84WWAAoJEGm5GZTakYssGP4L/RKvFg6zykHohfhNg8bDtVA5 t/komIHaxXrVjqqcaU0H3cu+AJ6mBKVJpS4hpxlsdD8zchOrcUcX/M1qqH+ADApx oKGfpiGtoI1HX58wk+MvVLWcB+kTen6sOXFWce6ZCfRnlR2uVxG25R7OpPKfqxKy FJQLjqI9WeCYWDWhzWCqi1kk2dW+JLj45J96BVSxA4DUedOOPhmnIMHODIrYFuV8 Y/0vFNW9X263VdQZuQwEsei74vNku+du33dRcO42epyO1s59OjGsCiKHhx0X02op fTE7vlz2ejp1Mzt5X6Dch14zXPEGTMPmfdY8PUflRwb4lI0nPrTDnFonLlJlYQ4/ 4f6/weE4Q4j9PRuEq+lkeTFJRb/lmaQ7Fz/29FHARnKLHFXu1CWx1fpOrjnwZl54 9616QTgTeKtAOUSCPMIf/9isibul7o2zUAfSh8oHiQtOAznjgyocA3u8w71k+l0J 5f+uEkRk/iS4UYKfYFaiDrTBEVURhDEhOoZE+N0BMw== =CQ1T -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 1/6] string_s.h/wchar_s.h: Added wcsnlen_s implementation.
OK, I pushed it with "extern inline" declaration. Thanks for reviews, Jacek On 08/19/14 15:38, Kai Tietz wrote: > Hmm, this patch looks to me not 100% ok. > > Making functions static inline seems to be not the proper thing to do > here AFAICS. This will lead to warning for cases those functions > aren't used. So I would think that attribute unused is missing here. > Additionally the 'inline' looks to me bogus. Either it should be > "extern inline", or static with attribute unused. > > Kai > > 2014-08-19 14:02 GMT+02:00 Jacek Caban : >> --- >> mingw-w64-headers/crt/sec_api/string_s.h | 3 +++ >> mingw-w64-headers/crt/sec_api/wchar_s.h | 3 +++ >> 2 files changed, 6 insertions(+) >> >> >> >> -- >> >> ___ >> 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
Re: [Mingw-w64-public] [PATCH 2/6] dwrite.h: Don't duplicate parent interface methods for C++ because it breaks templated QueryInterface implementation and fixed IDWriteFontFileEnumerator declaration.
Yes, wasn't at that file ... patch is ok. Please apply. Thanks, Kai 2014-08-19 14:04 GMT+02:00 Jacek Caban : > It came out that we need to not duplicate QueryInterface in child > interface declarations, because they shadow its templated inline variant. > > --- > mingw-w64-headers/include/dwrite.h | 59 > -- > 1 file changed, 57 insertions(+), 2 deletions(-) > > > > -- > > ___ > 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
Re: [Mingw-w64-public] [PATCH] tsattrs.h: Added new header file.
Thanks, please apply. Kai 2014-08-19 14:31 GMT+02:00 Jacek Caban : > --- > mingw-w64-headers/include/tsattrs.h | 100 > > 1 file changed, 100 insertions(+) > create mode 100644 mingw-w64-headers/include/tsattrs.h > > > > -- > > ___ > 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
Re: [Mingw-w64-public] [PATCH 6/6] dwrite_1.h: Added new header file.
Patch is ok. Please apply. Thanks, Kai 2014-08-19 14:05 GMT+02:00 Jacek Caban : > --- > mingw-w64-headers/include/dwrite_1.h | 148 > +++ > 1 file changed, 148 insertions(+) > create mode 100644 mingw-w64-headers/include/dwrite_1.h > > > > -- > > ___ > 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
Re: [Mingw-w64-public] [PATCH 5/6] wlanapi.h: Added some missing defines.
Thanks, please apply. Kai 2014-08-19 14:04 GMT+02:00 Jacek Caban : > --- > mingw-w64-headers/include/wlanapi.h | 11 +++ > 1 file changed, 11 insertions(+) > > > > -- > > ___ > 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
Re: [Mingw-w64-public] [PATCH 4/6] l2cmn.h: Added new header file.
Patch is ok. Thanks, Kai 2014-08-19 14:04 GMT+02:00 Jacek Caban : > --- > mingw-w64-headers/include/l2cmn.h | 20 > 1 file changed, 20 insertions(+) > create mode 100644 mingw-w64-headers/include/l2cmn.h > > > > -- > > ___ > 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
Re: [Mingw-w64-public] [PATCH 1/6] string_s.h/wchar_s.h: Added wcsnlen_s implementation.
Hmm, this patch looks to me not 100% ok. Making functions static inline seems to be not the proper thing to do here AFAICS. This will lead to warning for cases those functions aren't used. So I would think that attribute unused is missing here. Additionally the 'inline' looks to me bogus. Either it should be "extern inline", or static with attribute unused. Kai 2014-08-19 14:02 GMT+02:00 Jacek Caban : > --- > mingw-w64-headers/crt/sec_api/string_s.h | 3 +++ > mingw-w64-headers/crt/sec_api/wchar_s.h | 3 +++ > 2 files changed, 6 insertions(+) > > > > -- > > ___ > 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
Re: [Mingw-w64-public] [PATCH 3/6] sddl.h: Added some missing defines.
Patch is ok. Thanks, Kai 2014-08-19 14:04 GMT+02:00 Jacek Caban : > --- > mingw-w64-headers/include/sddl.h | 8 > 1 file changed, 8 insertions(+) > > > > -- > > ___ > 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] [PATCH] tsattrs.h: Added new header file.
--- mingw-w64-headers/include/tsattrs.h | 100 1 file changed, 100 insertions(+) create mode 100644 mingw-w64-headers/include/tsattrs.h diff --git a/mingw-w64-headers/include/tsattrs.h b/mingw-w64-headers/include/tsattrs.h new file mode 100644 index 000..c119cbd --- /dev/null +++ b/mingw-w64-headers/include/tsattrs.h @@ -0,0 +1,100 @@ +/** + * 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. + */ + +#ifndef _TSATTRS_H_ +#define _TSATTRS_H_ + +DEFINE_GUID(TSATTRID_OTHERS, 0xb3c32af9,0x57d0,0x46a9,0xbc,0xa8,0xda,0xc2,0x38,0xa1,0x30,0x57); + +DEFINE_GUID(TSATTRID_Font, 0x573ea825,0x749b,0x4f8a,0x9c,0xfd,0x21,0xc3,0x60,0x5c,0xa8,0x28); +DEFINE_GUID(TSATTRID_Font_FaceName, 0xb536aeb6,0x053b,0x4eb8,0xb6,0x5a,0x50,0xda,0x1e,0x81,0xe7,0x2e); +DEFINE_GUID(TSATTRID_Font_SizePts, 0xc8493302,0xa5e9,0x456d,0xaf,0x04,0x80,0x05,0xe4,0x13,0x0f,0x03); +DEFINE_GUID(TSATTRID_Font_Style, 0x68b2a77f,0x6b0e,0x4f28,0x81,0x77,0x57,0x1c,0x2f,0x3a,0x42,0xb1); +DEFINE_GUID(TSATTRID_Font_Style_Bold,0x48813a43,0x8a20,0x4940,0x8e,0x58,0x97,0x82,0x3f,0x7b,0x26,0x8a); +DEFINE_GUID(TSATTRID_Font_Style_Italic, 0x8740682a,0xa765,0x48e1,0xac,0xfc,0xd2,0x22,0x22,0xb2,0xf8,0x10); +DEFINE_GUID(TSATTRID_Font_Style_SmallCaps, 0xfacb6bc6,0x9100,0x4cc6,0xb9,0x69,0x11,0xee,0xa4,0x5a,0x86,0xb4); +DEFINE_GUID(TSATTRID_Font_Style_Capitalize, 0x7d85a3ba,0xb4fd,0x43b3,0xbe,0xfc,0x6b,0x98,0x5c,0x84,0x31,0x41); +DEFINE_GUID(TSATTRID_Font_Style_Uppercase, 0x33a300e8,0xe340,0x4937,0xb6,0x97,0x8f,0x23,0x40,0x45,0xcd,0x9a); +DEFINE_GUID(TSATTRID_Font_Style_Lowercase, 0x76d8ccb5,0xca7b,0x4498,0x8e,0xe9,0xd5,0xc4,0xf6,0xf7,0x4c,0x60); +DEFINE_GUID(TSATTRID_Font_Style_Animation, 0xdcf73d22,0xe029,0x47b7,0xbb,0x36,0xf2,0x63,0xa3,0xd0,0x04,0xcc); +DEFINE_GUID(TSATTRID_Font_Style_Animation_LasVegasLights, 0xf40423d5,0x0f87,0x4f8f,0xba,0xda,0xe6,0xd6,0x0c,0x25,0xe1,0x52); +DEFINE_GUID(TSATTRID_Font_Style_Animation_BlinkingBackground, 0x86e5b104,0x0104,0x4b10,0xb5,0x85,0x00,0xf2,0x52,0x75,0x22,0xb5); +DEFINE_GUID(TSATTRID_Font_Style_Animation_SparkleText,0x533aad20,0x962c,0x4e9f,0x8c,0x09,0xb4,0x2e,0xa4,0x74,0x97,0x11); +DEFINE_GUID(TSATTRID_Font_Style_Animation_MarchingBlackAnts, 0x7644e067,0xf186,0x4902,0xbf,0xc6,0xec,0x81,0x5a,0xa2,0x0e,0x9d); +DEFINE_GUID(TSATTRID_Font_Style_Animation_MarchingRedAnts,0x78368dad,0x50fb,0x4c6f,0x84,0x0b,0xd4,0x86,0xbb,0x6c,0xf7,0x81); +DEFINE_GUID(TSATTRID_Font_Style_Animation_Shimmer,0x2ce31b58,0x5293,0x4c36,0x88,0x09,0xbf,0x8b,0xb5,0x1a,0x27,0xb3); +DEFINE_GUID(TSATTRID_Font_Style_Animation_WipeDown, 0x5872e874,0x367b,0x4803,0xb1,0x60,0xc9,0x0f,0xf6,0x25,0x69,0xd0); +DEFINE_GUID(TSATTRID_Font_Style_Animation_WipeRight, 0xb855cbe3,0x3d2c,0x4600,0xb1,0xe9,0xe1,0xc9,0xce,0x02,0xf8,0x42); +DEFINE_GUID(TSATTRID_Font_Style_Emboss, 0xbd8ed742,0x349e,0x4e37,0x82,0xfb,0x43,0x79,0x79,0xcb,0x53,0xa7); +DEFINE_GUID(TSATTRID_Font_Style_Engrave, 0x9c3371de,0x8332,0x4897,0xbe,0x5d,0x89,0x23,0x32,0x23,0x17,0x9a); +DEFINE_GUID(TSATTRID_Font_Style_Hidden, 0xb1e28770,0x881c,0x475f,0x86,0x3f,0x88,0x7a,0x64,0x7b,0x10,0x90); +DEFINE_GUID(TSATTRID_Font_Style_Kerning, 0xcc26e1b4,0x2f9a,0x47c8,0x8b,0xff,0xbf,0x1e,0xb7,0xcc,0xe0,0xdd); +DEFINE_GUID(TSATTRID_Font_Style_Outlined, 0x10e6db31,0xdb0d,0x4ac6,0xa7,0xf5,0x9c,0x9c,0xff,0x6f,0x2a,0xb4); +DEFINE_GUID(TSATTRID_Font_Style_Position, 0x15cd26ab,0xf2fb,0x4062,0xb5,0xa6,0x9a,0x49,0xe1,0xa5,0xcc,0x0b); +DEFINE_GUID(TSATTRID_Font_Style_Protected,0x1c557cb2,0x14cf,0x4554,0xa5,0x74,0xec,0xb2,0xf7,0xe7,0xef,0xd4); +DEFINE_GUID(TSATTRID_Font_Style_Shadow, 0x5f686d2f,0xc6cd,0x4c56,0x8a,0x1a,0x99,0x4a,0x4b,0x97,0x66,0xbe); +DEFINE_GUID(TSATTRID_Font_Style_Spacing, 0x98c1200d,0x8f06,0x409a,0x8e,0x49,0x6a,0x55,0x4b,0xf7,0xc1,0x53); +DEFINE_GUID(TSATTRID_Font_Style_Weight, 0x12f3189c,0x8bb0,0x461b,0xb1,0xfa,0xea,0xf9,0x07,0x04,0x7f,0xe0); +DEFINE_GUID(TSATTRID_Font_Style_Height, 0x7e937477,0x12e6,0x458b,0x92,0x6a,0x1f,0xa4,0x4e,0xe8,0xf3,0x91); +DEFINE_GUID(TSATTRID_Font_Style_Underline,0xc3c9c9f3,0x7902,0x444b,0x9a,0x7b,0x48,0xe7,0x0f,0x4b,0x50,0xf7); +DEFINE_GUID(TSATTRID_Font_Style_Underline_Single, 0x1b6720e5,0x0f73,0x4951,0xa6,0xb3,0x6f,0x19,0xe4,0x3c,0x94,0x61); +DEFINE_GUID(TSATTRID_Font_Style_Underline_Double, 0x74d24aa6,0x1db3,0x4c69,0xa1,0x76,0x31,0x12,0x0e,0x75,0x86,0xd5); +DEFINE_GUID(TSATTRID_Font_Style_Strikethrough,0x0c562193,0x2d08,0x4668,0x96,0x01,0xce,0xd4,0x13,0x09,0xd7,0xaf); +DEFINE_GUID(TSATTRID_Font_Style_Strikethrough_Single, 0x75d736b6,0x3c8f,0
[Mingw-w64-public] [PATCH 1/6] string_s.h/wchar_s.h: Added wcsnlen_s implementation.
--- mingw-w64-headers/crt/sec_api/string_s.h | 3 +++ mingw-w64-headers/crt/sec_api/wchar_s.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mingw-w64-headers/crt/sec_api/string_s.h b/mingw-w64-headers/crt/sec_api/string_s.h index 34d1c99..4b10820 100644 --- a/mingw-w64-headers/crt/sec_api/string_s.h +++ b/mingw-w64-headers/crt/sec_api/string_s.h @@ -60,6 +60,9 @@ extern "C" { _CRTIMP errno_t __cdecl _wcsset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val,_locale_t _Locale); _CRTIMP errno_t __cdecl _wcsnset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val, size_t _Count,_locale_t _Locale); + static inline size_t __cdecl wcsnlen_s(const wchar_t * _src, size_t _count) { +return _src ? wcsnlen(_src, _count) : 0; + } #endif #ifndef _MEMORY_S_DEFINED diff --git a/mingw-w64-headers/crt/sec_api/wchar_s.h b/mingw-w64-headers/crt/sec_api/wchar_s.h index fc8fc4d..f9fc6ad 100644 --- a/mingw-w64-headers/crt/sec_api/wchar_s.h +++ b/mingw-w64-headers/crt/sec_api/wchar_s.h @@ -130,6 +130,9 @@ extern "C" { _CRTIMP errno_t __cdecl _wcsset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val,_locale_t _Locale); _CRTIMP errno_t __cdecl _wcsnset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val, size_t _Count,_locale_t _Locale); + static inline size_t __cdecl wcsnlen_s(const wchar_t * _src, size_t _count) { +return _src ? wcsnlen(_src, _count) : 0; + } #endif #ifndef _WTIME_S_DEFINED -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH 4/6] l2cmn.h: Added new header file.
--- mingw-w64-headers/include/l2cmn.h | 20 1 file changed, 20 insertions(+) create mode 100644 mingw-w64-headers/include/l2cmn.h diff --git a/mingw-w64-headers/include/l2cmn.h b/mingw-w64-headers/include/l2cmn.h new file mode 100644 index 000..8157df9 --- /dev/null +++ b/mingw-w64-headers/include/l2cmn.h @@ -0,0 +1,20 @@ +/** + * 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. + */ + +#ifndef _L2CMN_H +#define _L2CMN_H + +#define L2_NOTIFICATION_SOURCE_NONE 0 +#define L2_NOTIFICATION_SOURCE_DOT3_AUTO_CONFIG 0x0001 +#define L2_NOTIFICATION_SOURCE_SECURITY 0x0002 +#define L2_NOTIFICATION_SOURCE_ONEX 0x0004 +#define L2_NOTIFICATION_SOURCE_WLAN_ACM 0x0008 +#define L2_NOTIFICATION_SOURCE_WLAN_MSM 0x0010 +#define L2_NOTIFICATION_SOURCE_WLAN_SECURITY0x0020 +#define L2_NOTIFICATION_SOURCE_WLAN_IHV 0x0040 +#define L2_NOTIFICATION_SOURCE_WLAN_HNWK0x0080 + +#endif /* _L2CMN_H */ -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH 2/6] dwrite.h: Don't duplicate parent interface methods for C++ because it breaks templated QueryInterface implementation and fixed IDWriteFontFileEnumerator declaration.
It came out that we need to not duplicate QueryInterface in child interface declarations, because they shadow its templated inline variant. --- mingw-w64-headers/include/dwrite.h | 59 -- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/mingw-w64-headers/include/dwrite.h b/mingw-w64-headers/include/dwrite.h index df35bbd..3267977 100644 --- a/mingw-w64-headers/include/dwrite.h +++ b/mingw-w64-headers/include/dwrite.h @@ -614,10 +614,12 @@ DECLARE_INTERFACE_(IDWriteBitmapRenderTarget,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteBitmapRenderTarget methods */ STDMETHOD(DrawGlyphRun)(THIS_ @@ -670,10 +672,12 @@ DECLARE_INTERFACE_(IDWriteFactory,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFactory methods */ STDMETHOD(GetSystemFontCollection)(THIS_ @@ -825,10 +829,12 @@ DECLARE_INTERFACE_(IDWriteFont,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFont methods */ STDMETHOD(GetFontFamily)(THIS_ @@ -884,10 +890,12 @@ DECLARE_INTERFACE_(IDWriteFontCollection,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontCollection methods */ STDMETHOD_(UINT32, GetFontFamilyCount)(THIS) PURE; @@ -923,10 +931,12 @@ DECLARE_INTERFACE_(IDWriteFontFace,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontFace methods */ STDMETHOD_(DWRITE_FONT_FACE_TYPE, GetType)(THIS) PURE; @@ -1028,10 +1038,12 @@ DECLARE_INTERFACE_(IDWriteFontList,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontList methods */ STDMETHOD(GetFontCollection)(THIS_ @@ -1060,6 +1072,7 @@ DECLARE_INTERFACE_(IDWriteFontFamily,IDWriteFontList) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; @@ -1074,6 +1087,7 @@ DECLARE_INTERFACE_(IDWriteFontFamily,IDWriteFontList) STDMETHOD(GetFont)(THIS_ UINT32 index, IDWriteFont **font) PURE; +#endif /* IDWriteFontFamily methods */ STDMETHOD(GetFamilyNames)(THIS_ @@ -,10 +1125,12 @@ DECLARE_INTERFACE_(IDWriteFontFile,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontFile methods */ STDMETHOD(GetReferenceKey)(THIS_ @@ -1147,10 +1163,12 @@ DECLARE_INTERFACE_(IDWriteFontFileLoader,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontFileLoader methods */ STDMETHOD(CreateStreamFromKey)( @@ -1173,10 +1191,12 @@ DECLARE_INTERFACE_(IDWriteFontFileStream,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontFileStream methods */ STDMETHOD(ReadFileFragment)(THIS_ @@ -1212,10 +1232,12 @@ DECLARE_INTERFACE_(IDWriteFontCollectionLoader,IUnknown) { BEGIN_INTERFACE +#ifndef __cplusplus /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif /* IDWriteFontCollectionLoader methods */ STDMETHOD_(HRESULT,CreateEnumeratorFromKey)(THIS_ IDWrite
[Mingw-w64-public] [PATCH 5/6] wlanapi.h: Added some missing defines.
--- mingw-w64-headers/include/wlanapi.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/mingw-w64-headers/include/wlanapi.h b/mingw-w64-headers/include/wlanapi.h index fa0e506..1f7dc49 100644 --- a/mingw-w64-headers/include/wlanapi.h +++ b/mingw-w64-headers/include/wlanapi.h @@ -5,6 +5,8 @@ */ #ifndef _INC_WLANAPI #define _INC_WLANAPI + +#include #include #include @@ -12,6 +14,15 @@ extern "C" { #endif +#define WLAN_NOTIFICATION_SOURCE_NONE L2_NOTIFICATION_SOURCE_NONE +#define WLAN_NOTIFICATION_SOURCE_ALL L2_NOTIFICATION_SOURCE_ALL +#define WLAN_NOTIFICATION_SOURCE_ACM L2_NOTIFICATION_SOURCE_WLAN_ACM +#define WLAN_NOTIFICATION_SOURCE_MSM L2_NOTIFICATION_SOURCE_WLAN_MSM +#define WLAN_NOTIFICATION_SOURCE_SECURITY L2_NOTIFICATION_SOURCE_WLAN_SECURITY +#define WLAN_NOTIFICATION_SOURCE_IHV L2_NOTIFICATION_SOURCE_WLAN_IHV +#define WLAN_NOTIFICATION_SOURCE_HNWK L2_NOTIFICATION_SOURCE_WLAN_HNWK +#define WLAN_NOTIFICATION_SOURCE_ONEX L2_NOTIFICATION_SOURCE_ONEX + typedef DWORD WLAN_REASON_CODE, *PWLAN_REASON_CODE; typedef ULONG WLAN_SIGNAL_QUALITY, *PWLAN_SIGNAL_QUALITY; -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH 3/6] sddl.h: Added some missing defines.
--- mingw-w64-headers/include/sddl.h | 8 1 file changed, 8 insertions(+) diff --git a/mingw-w64-headers/include/sddl.h b/mingw-w64-headers/include/sddl.h index 0bf19ba..c4ae5aa 100644 --- a/mingw-w64-headers/include/sddl.h +++ b/mingw-w64-headers/include/sddl.h @@ -23,6 +23,7 @@ extern "C" { #define SDDL_PROTECTED TEXT("P") #define SDDL_AUTO_INHERIT_REQ TEXT("AR") #define SDDL_AUTO_INHERITED TEXT("AI") +#define SDDL_NULL_ACL TEXT("NO_ACCESS_CONTROL") #define SDDL_ACCESS_ALLOWED TEXT("A") #define SDDL_ACCESS_DENIED TEXT("D") @@ -32,6 +33,13 @@ extern "C" { #define SDDL_ALARM TEXT("AL") #define SDDL_OBJECT_AUDIT TEXT("OU") #define SDDL_OBJECT_ALARM TEXT("OL") +#define SDDL_MANDATORY_LABEL TEXT("ML") +#define SDDL_CALLBACK_ACCESS_ALLOWED TEXT("XA") +#define SDDL_CALLBACK_ACCESS_DENIED TEXT("XD") +#define SDDL_RESOURCE_ATTRIBUTE TEXT("RA") +#define SDDL_SCOPED_POLICY_ID TEXT("SP") +#define SDDL_CALLBACK_AUDIT TEXT("XU") +#define SDDL_CALLBACK_OBJECT_ACCESS_ALLOWED TEXT("ZA") #define SDDL_CONTAINER_INHERIT TEXT("CI") #define SDDL_OBJECT_INHERIT TEXT("OI") -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH 6/6] dwrite_1.h: Added new header file.
--- mingw-w64-headers/include/dwrite_1.h | 148 +++ 1 file changed, 148 insertions(+) create mode 100644 mingw-w64-headers/include/dwrite_1.h diff --git a/mingw-w64-headers/include/dwrite_1.h b/mingw-w64-headers/include/dwrite_1.h new file mode 100644 index 000..1630881 --- /dev/null +++ b/mingw-w64-headers/include/dwrite_1.h @@ -0,0 +1,148 @@ +/** + * 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. + */ + +#ifndef DWRITE_1_H_INCLUDED +#define DWRITE_1_H_INCLUDED + +#include + +enum DWRITE_OUTLINE_THRESHOLD { +DWRITE_OUTLINE_THRESHOLD_ANTIALIASED, +DWRITE_OUTLINE_THRESHOLD_ALIASED +}; + +struct DWRITE_CARET_METRICS { +INT16 slopeRise; +INT16 slopeRun; +INT16 offset; +}; + +struct DWRITE_UNICODE_RANGE { +UINT32 first; +UINT32 last; +}; + +struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS { +INT16 glyphBoxLeft; +INT16 glyphBoxTop; +INT16 glyphBoxRight; +INT16 glyphBoxBottom; +INT16 subscriptPositionX; +INT16 subscriptPositionY; +INT16 subscriptSizeX; +INT16 subscriptSizeY; +INT16 superscriptPositionX; +INT16 superscriptPositionY; +INT16 superscriptSizeX; +INT16 superscriptSizeY; +BOOL hasTypographicMetrics; +}; + +#undef INTERFACE +#define INTERFACE IDWriteFontCollection +DECLARE_INTERFACE_(IDWriteFontFace1, IDWriteFontFace) +{ +BEGIN_INTERFACE + +#ifndef __cplusplus +/* IUnknown methods */ +STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; +STDMETHOD_(ULONG, AddRef)(THIS) PURE; +STDMETHOD_(ULONG, Release)(THIS) PURE; + +/* IDWriteFontFace methods */ +STDMETHOD_(DWRITE_FONT_FACE_TYPE, GetType)(THIS) PURE; + +STDMETHOD(GetFiles)(THIS_ +UINT32 *numberOfFiles, +IDWriteFontFile **fontFiles) PURE; + +STDMETHOD_(UINT32, GetIndex)(THIS) PURE; +STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)(THIS) PURE; +STDMETHOD_(WINBOOL, IsSymbolFont)(THIS) PURE; + +STDMETHOD_(void, GetMetrics)(THIS_ +DWRITE_FONT_METRICS *fontFaceMetrics) PURE; + +STDMETHOD_(UINT16, GetGlyphCount)(THIS) PURE; + +STDMETHOD(GetDesignGlyphMetrics)(THIS_ +UINT16 const *glyphIndices, +UINT32 glyphCount, +DWRITE_GLYPH_METRICS *glyphMetrics, +WINBOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE; + +STDMETHOD(GetGlyphIndices)(THIS_ +UINT32 const *codePoints, +UINT32 codePointCount, +UINT16 *glyphIndices) PURE; + +STDMETHOD(TryGetFontTable)(THIS_ +UINT32 openTypeTableTag, +const void **tableData, +UINT32 *tableSize, +void **tableContext, +WINBOOL *exists) PURE; + +STDMETHOD_(void, ReleaseFontTable)(THIS_ +void *tableContext) PURE; + +STDMETHOD(GetGlyphRunOutline)(THIS_ +FLOAT emSize, +UINT16 const *glyphIndices, +FLOAT const *glyphAdvances, +DWRITE_GLYPH_OFFSET const *glyphOffsets, +UINT32 glyphCount, +WINBOOL isSideways, +WINBOOL isRightToLeft, +IDWriteGeometrySink *geometrySink) PURE; + +STDMETHOD(GetRecommendedRenderingMode)(THIS_ +FLOAT emSize, +FLOAT pixelsPerDip, +DWRITE_MEASURING_MODE measuringMode, +IDWriteRenderingParams *renderingParams, +DWRITE_RENDERING_MODE *renderingMode) PURE; + +STDMETHOD(GetGdiCompatibleMetrics)(THIS_ +FLOAT emSize, +FLOAT pixelsPerDip, +DWRITE_MATRIX const *transform, +DWRITE_FONT_METRICS *fontFaceMetrics) PURE; + + +STDMETHOD(GetGdiCompatibleGlyphMetrics)(THIS_ +FLOAT emSize, +FLOAT pixelsPerDip, +DWRITE_MATRIX const *transform, +WINBOOL useGdiNatural, +UINT16 const *glyphIndices, +UINT32 glyphCount, +DWRITE_GLYPH_METRICS *glyphMetrics, +WINBOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE; +#endif + +/* IDWriteFontFace1 methods */ +STDMETHOD_(void, GetMetrics)(THIS_ DWRITE_FONT_METRICS*) PURE; +STDMETHOD(GetGdiCompatibleMetrics)(THIS_ FLOAT,FLOAT,DWRITE_MATRIX const*,DWRITE_FONT_METRICS1*) PURE; +STDMETHOD_(void, GetCaretMetrics)(THIS_ DWRITE_CARET_METRICS*) PURE; +STDMETHOD(GetUnicodeRanges)(THIS_ UINT32, DWRITE_UNICODE_RANGE*,UINT32*) PURE; +STDMETHOD_(BOOL, IsMonospacedFont)(THIS) PURE; +STDMETHOD(GetDesignGlyphAdvances)(THIS_ UINT32,UINT16 const*,INT32*,BOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE; +STDMETHOD(GetGdiCompatibleGlyphAdvances)(THIS_ FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,BOOL,UINT32, +UINT16 const*,INT32*) PURE; +STDMETHOD(GetKerningPairAdjustments)(THIS_ UINT32,UINT16 const*,INT32*) PURE; +STDMETHOD_(BOOL, HasKerningPairs)(THIS); +STDMETHOD(GetRecommendedRenderingMode)(FLOAT,FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL, +DWRITE_OUT
Re: [Mingw-w64-public] [PATCH] Add some long double functions for ARM
Patch is ok. Thanks, Kai 2014-08-18 23:35 GMT+02:00 André Hentschel : > Please review, i'll commit it, just need an OK. > (these are the rather easy ones, it mostly looks like the RFC i sent some > days ago) > > -- > > ___ > 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