[Mingw-w64-public] Header update for Process Mitigations

2018-01-22 Thread Tom Ritter
The whitespace was inconsistent in this area, so I replaced the tabs
with spaces.

-tom
From eeaca371370ce9e4996a1a4c6a598205866a2c44 Mon Sep 17 00:00:00 2001
From: Tom Ritter 
Date: Mon, 22 Jan 2018 20:19:19 -0600
Subject: [PATCH 1/2] Fix whitespace near the PROCESS_MITIGATION structs

---
 mingw-w64-headers/include/winnt.h | 60 +++
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/mingw-w64-headers/include/winnt.h 
b/mingw-w64-headers/include/winnt.h
index c298d532..8aee9593 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -4082,57 +4082,57 @@ __buildmemorybarrier()
 
 typedef struct _PROCESS_MITIGATION_ASLR_POLICY {
   __C89_NAMELESS union {
-   DWORD Flags;
-   __C89_NAMELESS struct {
- DWORD EnableBottomUpRandomization : 1;
- DWORD EnableForceRelocateImages : 1;
- DWORD EnableHighEntropy : 1;
- DWORD DisallowStrippedImages : 1;
- DWORD ReservedFlags : 28;
-   };
+DWORD Flags;
+__C89_NAMELESS struct {
+  DWORD EnableBottomUpRandomization : 1;
+  DWORD EnableForceRelocateImages : 1;
+  DWORD EnableHighEntropy : 1;
+  DWORD DisallowStrippedImages : 1;
+  DWORD ReservedFlags : 28;
+};
   };
 } PROCESS_MITIGATION_ASLR_POLICY,*PPROCESS_MITIGATION_ASLR_POLICY;
 
 typedef struct _PROCESS_MITIGATION_DEP_POLICY {
   __C89_NAMELESS union {
-   DWORD Flags;
-   __C89_NAMELESS struct {
- DWORD Enable : 1;
- DWORD DisableAtlThunkEmulation : 1;
- DWORD ReservedFlags : 30;
-   };
+DWORD Flags;
+__C89_NAMELESS struct {
+  DWORD Enable : 1;
+  DWORD DisableAtlThunkEmulation : 1;
+  DWORD ReservedFlags : 30;
+};
   };
   BOOLEAN Permanent;
 } PROCESS_MITIGATION_DEP_POLICY,*PPROCESS_MITIGATION_DEP_POLICY;
 
 typedef struct _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY {
   __C89_NAMELESS union {
-   DWORD Flags;
-   __C89_NAMELESS struct {
- DWORD RaiseExceptionOnInvalidHandleReference : 1;
- DWORD HandleExceptionsPermanentlyEnabled : 1;
- DWORD ReservedFlags : 30;
-   };
+DWORD Flags;
+__C89_NAMELESS struct {
+  DWORD RaiseExceptionOnInvalidHandleReference : 1;
+  DWORD HandleExceptionsPermanentlyEnabled : 1;
+  DWORD ReservedFlags : 30;
+};
   };
 } 
PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY,*PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY;
 
 typedef struct _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY {
   __C89_NAMELESS union {
-   DWORD Flags;
-   __C89_NAMELESS struct {
- DWORD DisallowWin32kSystemCalls : 1;
- DWORD ReservedFlags : 31;
-   };
+DWORD Flags;
+__C89_NAMELESS struct {
+  DWORD DisallowWin32kSystemCalls : 1;
+  DWORD ReservedFlags : 31;
+};
   };
 } 
PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY,*PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY;
 
 typedef struct _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY {
   __C89_NAMELESS union {
-   DWORD Flags;
-   __C89_NAMELESS struct {
- DWORD DisableExtensionPoints : 1;
- DWORD ReservedFlags : 31;
-   };
+DWORD Flags;
+__C89_NAMELESS struct {
+  DWORD DisableExtensionPoints : 1;
+  DWORD ReservedFlags : 31;
+};
   };
 } 
PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY,*PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY;
 
-- 
2.14.1

From 08b87a434bb67552b0828952376c0a1f925d6ee7 Mon Sep 17 00:00:00 2001
From: Tom Ritter 
Date: Mon, 22 Jan 2018 20:24:41 -0600
Subject: [PATCH 2/2] Add several Process Mitigation structs

Adds:
 - PROCESS_MITIGATION_FONT_DISABLE_POLICY
 - PROCESS_MITIGATION_IMAGE_LOAD_POLICY
 - PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY
 - PROCESS_MITIGATION_DYNAMIC_CODE_POLICY
 - PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY
---
 mingw-w64-headers/include/winnt.h | 65 ++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/winnt.h 
b/mingw-w64-headers/include/winnt.h
index 8aee9593..efcd74d0 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -4072,11 +4072,15 @@ __buildmemorybarrier()
 typedef enum _PROCESS_MITIGATION_POLICY {
   ProcessDEPPolicy,
   ProcessASLRPolicy,
-  ProcessReserved1MitigationPolicy,
+  ProcessDynamicCodePolicy,
   ProcessStrictHandleCheckPolicy,
   ProcessSystemCallDisablePolicy,
   ProcessMitigationOptionsMask,
   ProcessExtensionPointDisablePolicy,
+  ProcessControlFlowGuardPolicy,
+  ProcessSignaturePolicy,
+  ProcessFontDisablePolicy,
+  ProcessImageLoadPolicy,
   MaxProcessMitigationPolicy
 } 

[Mingw-w64-public] [PATCH] intrin-impl.h: do not define _xgetbv for GCC 8

2018-01-22 Thread Mateusz
GCC 8 from r248028 has defined function _xgetbv and we should
avoid double definition of this function.

Please review.

Mateusz

From 5aa15ee4a5f04cdc797deb685d23dc67275af357 Mon Sep 17 00:00:00 2001
From: Mateusz 
Date: Mon, 22 Jan 2018 20:58:48 +0100
Subject: [PATCH] intrin-impl.h: do not define _xgetbv for GCC 8

GCC 8 from r248028 has defined function _xgetbv and we should
avoid double definition of this function.

Signed-off-by: Mateusz Brzostek 
---
 mingw-w64-headers/include/psdk_inc/intrin-impl.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h 
b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
index ff9e6aff..88af804c 100644
--- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h
+++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
@@ -1775,6 +1775,7 @@ __buildmov(__movsd, unsigned __LONG32, "d")
 #define __INTRINSIC_DEFINED___movsd
 #endif /* __INTRINSIC_PROLOG */
 
+#if !defined(__GNUC__) || __GNUC__ < 8 /* GCC 8 has already defined _xgetbv */
 /* NOTE: This should be in immintrin.h */
 #if __INTRINSIC_PROLOG(_xgetbv)
 unsigned __int64 _xgetbv(unsigned int);
@@ -1798,6 +1799,7 @@ unsigned __int64 _xgetbv(unsigned int index)
 #endif
 #define __INTRINSIC_DEFINED__xgetbv
 #endif /* __INTRINSIC_PROLOG */
+#endif /* __GNUC__ < 8 */
 
 #endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || 
defined(_X86_) */
 
-- 
2.14.1

--
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 3/4] dwrite1_1.h: Added DWRITE_PANOSE declaration.

2018-01-22 Thread Jacek Caban
On 01/22/2018 09:30 PM, Kai Tietz via Mingw-w64-public wrote:
> Hmm, ok. Shouldn't we special case unnamed union/struct?


Unless I'm missing something, all structs are named in this patch.


Thanks for reviews,

Jacek


--
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 4/4] dwrite_3.h: Added new header file.

2018-01-22 Thread Kai Tietz via Mingw-w64-public
Ok.

Thanks,
Kai

2018-01-22 19:00 GMT+01:00 Jacek Caban :
> Signed-off-by: Jacek Caban 
> ---
>  mingw-w64-headers/include/dwrite_3.h | 587
> +++
>  1 file changed, 587 insertions(+)
>  create mode 100644 mingw-w64-headers/include/dwrite_3.h
>
>
>
> --
> 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
>

--
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 3/4] dwrite1_1.h: Added DWRITE_PANOSE declaration.

2018-01-22 Thread Kai Tietz via Mingw-w64-public
Hmm, ok. Shouldn't we special case unnamed union/struct?

Kai

2018-01-22 19:00 GMT+01:00 Jacek Caban :
> Signed-off-by: Jacek Caban 
> ---
>  mingw-w64-headers/include/dwrite_1.h | 53
> 
>  1 file changed, 53 insertions(+)
>
>
>
> --
> 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
>

--
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 1/4] dwrite.h: Added DWRITE_DECLARE_INTERFACE define.

2018-01-22 Thread Kai Tietz via Mingw-w64-public
Patch is ok.

Thanks,
Kai

2018-01-22 19:00 GMT+01:00 Jacek Caban :
> Signed-off-by: Jacek Caban 
> ---
>  mingw-w64-headers/include/dwrite.h | 4 
>  1 file changed, 4 insertions(+)
>
>
>
> --
> 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
>

--
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] Defining additional Constants

2018-01-22 Thread Jacek Caban
Hi Tom,

On 01/22/2018 07:15 PM, Tom Ritter wrote:
>  mingw-w64-headers/include/error.h|  1 +
>  mingw-w64-headers/include/winerror.h |  1 +
>  mingw-w64-headers/include/winnt.h| 29 -
>  mingw-w64-tools/widl/include/winnt.h |  1 +

The version in widl/ subdirectory is a copy of Wine version and is in
the tree only because it's needed to build widl. Please don't change it
manually.

>  4 files changed, 31 insertions(+), 1 deletion(-)
>  mode change 100644 => 100755 mingw-w64-headers/include/error.h
>  mode change 100644 => 100755 mingw-w64-headers/include/winnt.h
>  mode change 100644 => 100755 mingw-w64-tools/widl/include/winnt.h


Please be careful about mode changes.


Other than that the patch looks good. I fixed it up and pushed it.


Thanks,

Jacek


--
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] Defining additional Constants

2018-01-22 Thread Tom Ritter
Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1431809

This syncs the PRODUCT_ENTERPRISE_XXX defines between widl and
headers, and declares ERROR_INVALID_TOKEN in headers

-tom
From d258bc0274c8b1b63ed8ea4d31e6ab8a8b621833 Mon Sep 17 00:00:00 2001
From: Tom Ritter 
Date: Mon, 22 Jan 2018 11:38:42 -0600
Subject: [PATCH] Sync PRODUCT_ENTERPRISE_XXX defines between widl and headers,
 and declare ERROR_INVALID_TOKEN in headers

---
 mingw-w64-headers/include/error.h|  1 +
 mingw-w64-headers/include/winnt.h| 29 -
 mingw-w64-tools/widl/include/winnt.h |  1 +
 3 files changed, 30 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 mingw-w64-headers/include/error.h
 mode change 100644 => 100755 mingw-w64-headers/include/winnt.h
 mode change 100644 => 100755 mingw-w64-tools/widl/include/winnt.h

diff --git a/mingw-w64-headers/include/error.h 
b/mingw-w64-headers/include/error.h
old mode 100644
new mode 100755
index cac097a6..4b63d017
--- a/mingw-w64-headers/include/error.h
+++ b/mingw-w64-headers/include/error.h
@@ -157,6 +157,7 @@
 #define ERROR_BAD_DYNALINK 213
 #define ERROR_TOO_MANY_MODULES 214
 #define ERROR_NESTING_NOT_ALLOWED 215
+#define ERROR_INVALID_TOKEN 315
 #define ERROR_USER_DEFINED_BASE 0xF000
 #define ERROR_I24_WRITE_PROTECT 0
 #define ERROR_I24_BAD_UNIT 1
diff --git a/mingw-w64-headers/include/winnt.h 
b/mingw-w64-headers/include/winnt.h
old mode 100644
new mode 100755
index 2762e209..c298d532
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -767,6 +767,7 @@ inline ENUMTYPE  ^= (ENUMTYPE , ENUMTYPE b) { 
return (ENUMTYPE &)(((i
 #define PRODUCT_SERVER_FOR_SMALLBUSINESS_V0x23
 #define PRODUCT_STANDARD_SERVER_V 0x24
 #define PRODUCT_DATACENTER_SERVER_V   0x25
+#define PRODUCT_SERVER_V  0x25
 #define PRODUCT_ENTERPRISE_SERVER_V   0x26
 #define PRODUCT_DATACENTER_SERVER_CORE_V  0x27
 #define PRODUCT_STANDARD_SERVER_CORE_V0x28
@@ -787,6 +788,7 @@ inline ENUMTYPE  ^= (ENUMTYPE , ENUMTYPE b) { 
return (ENUMTYPE &)(((i
 #define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM0x37
 #define PRODUCT_SOLUTION_EMBEDDEDSERVER   0x38
 #define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE  0x39
+#define PRODUCT_PROFESSIONAL_EMBEDDED 0x3A
 #define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x3B
 #define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x3C
 #define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC  0x3D
@@ -815,16 +817,41 @@ inline ENUMTYPE  ^= (ENUMTYPE , ENUMTYPE b) { 
return (ENUMTYPE &)(((i
 #define PRODUCT_EMBEDDED_INDUSTRY_E   0x5B
 #define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x5C
 #define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x5F
-#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x60
+#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER  0x60
 #define PRODUCT_CORE_ARM  0x61
 #define PRODUCT_CORE_N0x62
 #define PRODUCT_CORE_COUNTRYSPECIFIC  0x63
 #define PRODUCT_CORE_SINGLELANGUAGE   0x64
+#define PRODUCT_CORE_LANGUAGESPECIFIC 0x64
 #define PRODUCT_CORE  0x65
 #define PRODUCT_PROFESSIONAL_WMC  0x67
 #define PRODUCT_MOBILE_CORE   0x68
+#define PRODUCT_EMBEDDED_INDUSTRY_EVAL0x69
+#define PRODUCT_EMBEDDED_INDUSTRY_E_EVAL  0x6A
+#define PRODUCT_EMBEDDED_EVAL 0x6B
+#define PRODUCT_EMBEDDED_E_EVAL   0x6C
+#define PRODUCT_NANO_SERVER   0x6D
+#define PRODUCT_CLOUD_STORAGE_SERVER  0x6E
+#define PRODUCT_CORE_CONNECTED0x6F
+#define PRODUCT_PROFESSIONAL_STUDENT  0x70
+#define PRODUCT_CORE_CONNECTED_N  0x71
+#define PRODUCT_PROFESSIONAL_STUDENT_N0x72
+#define PRODUCT_CORE_CONNECTED_SINGLELANGUAGE 0x73
+#define PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC0x74
+#define PRODUCT_CONNECTED_CAR 0x75
+#define PRODUCT_INDUSTRY_HANDHELD 0x76
+#define PRODUCT_PPI_PRO   0x77
+#define PRODUCT_ARM64_SERVER  0x78
 #define PRODUCT_EDUCATION 0x79
 #define PRODUCT_EDUCATION_N   0x7a
+#define PRODUCT_IOTUAP0x7B
+#define PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER  0x7C
+#define PRODUCT_ENTERPRISE_S  0x7D
+#define PRODUCT_ENTERPRISE_S_N0x7E
+#define PRODUCT_PROFESSIONAL_S0x7F
+#define PRODUCT_PROFESSIONAL_S_N  0x80
+#define PRODUCT_ENTERPRISE_S_EVALUATION   0x81
+#define PRODUCT_ENTERPRISE_S_N_EVALUATION 0x82
 #define PRODUCT_MOBILE_ENTERPRISE 0x85
 
 #define PRODUCT_UNLICENSED0xabcdabcd
diff --git a/mingw-w64-tools/widl/include/winnt.h 

Re: [Mingw-w64-public] Defining additional Constants

2018-01-22 Thread Tom Ritter
Afraid I was too eager, the newly attached one correctly defines
ERROR_INVALID_TOKEN in all the places.

-tom

On 22 January 2018 at 11:58, Tom Ritter  wrote:
> Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1431809
>
> This syncs the PRODUCT_ENTERPRISE_XXX defines between widl and
> headers, and declares ERROR_INVALID_TOKEN in headers
>
> -tom
From cd59d718b9d9a05516b8423010ea4e6f6ced2788 Mon Sep 17 00:00:00 2001
From: Tom Ritter 
Date: Mon, 22 Jan 2018 11:38:42 -0600
Subject: [PATCH] Sync PRODUCT_ENTERPRISE_XXX defines between widl and headers,
 and declare ERROR_INVALID_TOKEN in headers

---
 mingw-w64-headers/include/error.h|  1 +
 mingw-w64-headers/include/winerror.h |  1 +
 mingw-w64-headers/include/winnt.h| 29 -
 mingw-w64-tools/widl/include/winnt.h |  1 +
 4 files changed, 31 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 mingw-w64-headers/include/error.h
 mode change 100644 => 100755 mingw-w64-headers/include/winnt.h
 mode change 100644 => 100755 mingw-w64-tools/widl/include/winnt.h

diff --git a/mingw-w64-headers/include/error.h 
b/mingw-w64-headers/include/error.h
old mode 100644
new mode 100755
index cac097a6..4b63d017
--- a/mingw-w64-headers/include/error.h
+++ b/mingw-w64-headers/include/error.h
@@ -157,6 +157,7 @@
 #define ERROR_BAD_DYNALINK 213
 #define ERROR_TOO_MANY_MODULES 214
 #define ERROR_NESTING_NOT_ALLOWED 215
+#define ERROR_INVALID_TOKEN 315
 #define ERROR_USER_DEFINED_BASE 0xF000
 #define ERROR_I24_WRITE_PROTECT 0
 #define ERROR_I24_BAD_UNIT 1
diff --git a/mingw-w64-headers/include/winerror.h 
b/mingw-w64-headers/include/winerror.h
index 3f0214db..e117b046 100644
--- a/mingw-w64-headers/include/winerror.h
+++ b/mingw-w64-headers/include/winerror.h
@@ -241,6 +241,7 @@
 #define ERROR_INVALID_OPLOCK_PROTOCOL __MSABI_LONG(301)
 #define ERROR_DISK_TOO_FRAGMENTED __MSABI_LONG(302)
 #define ERROR_DELETE_PENDING __MSABI_LONG(303)
+#define ERROR_INVALID_TOKEN __MSABI_LONG(315)
 #define ERROR_MR_MID_NOT_FOUND __MSABI_LONG(317)
 #define ERROR_SCOPE_NOT_FOUND __MSABI_LONG(318)
 #define ERROR_INVALID_ADDRESS __MSABI_LONG(487)
diff --git a/mingw-w64-headers/include/winnt.h 
b/mingw-w64-headers/include/winnt.h
old mode 100644
new mode 100755
index 2762e209..c298d532
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -767,6 +767,7 @@ inline ENUMTYPE  ^= (ENUMTYPE , ENUMTYPE b) { 
return (ENUMTYPE &)(((i
 #define PRODUCT_SERVER_FOR_SMALLBUSINESS_V0x23
 #define PRODUCT_STANDARD_SERVER_V 0x24
 #define PRODUCT_DATACENTER_SERVER_V   0x25
+#define PRODUCT_SERVER_V  0x25
 #define PRODUCT_ENTERPRISE_SERVER_V   0x26
 #define PRODUCT_DATACENTER_SERVER_CORE_V  0x27
 #define PRODUCT_STANDARD_SERVER_CORE_V0x28
@@ -787,6 +788,7 @@ inline ENUMTYPE  ^= (ENUMTYPE , ENUMTYPE b) { 
return (ENUMTYPE &)(((i
 #define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM0x37
 #define PRODUCT_SOLUTION_EMBEDDEDSERVER   0x38
 #define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE  0x39
+#define PRODUCT_PROFESSIONAL_EMBEDDED 0x3A
 #define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x3B
 #define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x3C
 #define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC  0x3D
@@ -815,16 +817,41 @@ inline ENUMTYPE  ^= (ENUMTYPE , ENUMTYPE b) { 
return (ENUMTYPE &)(((i
 #define PRODUCT_EMBEDDED_INDUSTRY_E   0x5B
 #define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x5C
 #define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x5F
-#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x60
+#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER  0x60
 #define PRODUCT_CORE_ARM  0x61
 #define PRODUCT_CORE_N0x62
 #define PRODUCT_CORE_COUNTRYSPECIFIC  0x63
 #define PRODUCT_CORE_SINGLELANGUAGE   0x64
+#define PRODUCT_CORE_LANGUAGESPECIFIC 0x64
 #define PRODUCT_CORE  0x65
 #define PRODUCT_PROFESSIONAL_WMC  0x67
 #define PRODUCT_MOBILE_CORE   0x68
+#define PRODUCT_EMBEDDED_INDUSTRY_EVAL0x69
+#define PRODUCT_EMBEDDED_INDUSTRY_E_EVAL  0x6A
+#define PRODUCT_EMBEDDED_EVAL 0x6B
+#define PRODUCT_EMBEDDED_E_EVAL   0x6C
+#define PRODUCT_NANO_SERVER   0x6D
+#define PRODUCT_CLOUD_STORAGE_SERVER  0x6E
+#define PRODUCT_CORE_CONNECTED0x6F
+#define PRODUCT_PROFESSIONAL_STUDENT  0x70
+#define PRODUCT_CORE_CONNECTED_N  0x71
+#define PRODUCT_PROFESSIONAL_STUDENT_N0x72
+#define PRODUCT_CORE_CONNECTED_SINGLELANGUAGE 0x73
+#define PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC0x74
+#define PRODUCT_CONNECTED_CAR 0x75
+#define PRODUCT_INDUSTRY_HANDHELD 0x76
+#define PRODUCT_PPI_PRO

[Mingw-w64-public] [PATCH 4/4] dwrite_3.h: Added new header file.

2018-01-22 Thread Jacek Caban
Signed-off-by: Jacek Caban 
---
 mingw-w64-headers/include/dwrite_3.h | 587
+++
 1 file changed, 587 insertions(+)
 create mode 100644 mingw-w64-headers/include/dwrite_3.h


diff --git a/mingw-w64-headers/include/dwrite_3.h b/mingw-w64-headers/include/dwrite_3.h
new file mode 100644
index ..9c171731
--- /dev/null
+++ b/mingw-w64-headers/include/dwrite_3.h
@@ -0,0 +1,587 @@
+/**
+ * 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_3_H_INCLUDED
+#define DWRITE_3_H_INCLUDED
+
+#include 
+
+#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) \
+(static_cast(DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d)))
+
+enum DWRITE_RENDERING_MODE1 {
+DWRITE_RENDERING_MODE1_DEFAULT = DWRITE_RENDERING_MODE_DEFAULT,
+DWRITE_RENDERING_MODE1_ALIASED = DWRITE_RENDERING_MODE_ALIASED,
+DWRITE_RENDERING_MODE1_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC,
+DWRITE_RENDERING_MODE1_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL,
+DWRITE_RENDERING_MODE1_NATURAL = DWRITE_RENDERING_MODE_NATURAL,
+DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC,
+DWRITE_RENDERING_MODE1_OUTLINE = DWRITE_RENDERING_MODE_OUTLINE,
+DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
+};
+
+enum DWRITE_FONT_AXIS_TAG : UINT32 {
+DWRITE_FONT_AXIS_TAG_WEIGHT   = DWRITE_MAKE_FONT_AXIS_TAG('w','g','h','t'),
+DWRITE_FONT_AXIS_TAG_WIDTH= DWRITE_MAKE_FONT_AXIS_TAG('w','d','t','h'),
+DWRITE_FONT_AXIS_TAG_SLANT= DWRITE_MAKE_FONT_AXIS_TAG('s','l','n','t'),
+DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE = DWRITE_MAKE_FONT_AXIS_TAG('o','p','s','z'),
+DWRITE_FONT_AXIS_TAG_ITALIC   = DWRITE_MAKE_FONT_AXIS_TAG('i','t','a','l')
+};
+
+enum DWRITE_FONT_AXIS_ATTRIBUTES {
+DWRITE_FONT_AXIS_ATTRIBUTES_NONE = 0x,
+DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE = 0x0001,
+DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN   = 0x0002
+};
+
+struct DWRITE_GLYPH_IMAGE_DATA {
+void const *imageData;
+UINT32 imageDataSize;
+UINT32 uniqueDataId;
+UINT32 pixelsPerEm;
+D2D1_SIZE_U pixelSize;
+D2D1_POINT_2L horizontalLeftOrigin;
+D2D1_POINT_2L horizontalRightOrigin;
+D2D1_POINT_2L verticalTopOrigin;
+D2D1_POINT_2L verticalBottomOrigin;
+};
+
+struct DWRITE_FONT_AXIS_VALUE {
+DWRITE_FONT_AXIS_TAG axisTag;
+FLOAT value;
+};
+
+struct DWRITE_FONT_AXIS_RANGE {
+DWRITE_FONT_AXIS_TAG axisTag;
+FLOAT minValue;
+FLOAT maxValue;
+};
+
+interface IDWriteFontResource;
+interface IDWriteFontFaceReference1;
+interface IDWriteFontFaceReference;
+
+#undef  INTERFACE
+#define INTERFACE IDWriteFontFace3
+DECLARE_INTERFACE_(IDWriteFontFace3,IDWriteFontFace2)
+{
+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 

[Mingw-w64-public] [PATCH 3/4] dwrite1_1.h: Added DWRITE_PANOSE declaration.

2018-01-22 Thread Jacek Caban
Signed-off-by: Jacek Caban 
---
 mingw-w64-headers/include/dwrite_1.h | 53

 1 file changed, 53 insertions(+)


diff --git a/mingw-w64-headers/include/dwrite_1.h b/mingw-w64-headers/include/dwrite_1.h
index c0d15acb..56728da1 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -47,6 +47,59 @@ struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
 BOOL hasTypographicMetrics;
 };
 
+union DWRITE_PANOSE {
+UINT8 values[10];
+UINT8 familyKind;
+struct {
+UINT8 familyKind;
+UINT8 serifStyle;
+UINT8 weight;
+UINT8 proportion;
+UINT8 contrast;
+UINT8 strokeVariation;
+UINT8 armStyle;
+UINT8 letterform;
+UINT8 midline;
+UINT8 xHeight;
+} text;
+struct {
+UINT8 familyKind;
+UINT8 toolKind;
+UINT8 weight;
+UINT8 spacing;
+UINT8 aspectRatio;
+UINT8 contrast;
+UINT8 scriptTopology;
+UINT8 scriptForm;
+UINT8 finials;
+UINT8 xAscent;
+} script;
+struct {
+UINT8 familyKind;
+UINT8 decorativeClass;
+UINT8 weight;
+UINT8 aspect;
+UINT8 contrast;
+UINT8 serifVariant;
+UINT8 fill;
+UINT8 lining;
+UINT8 decorativeTopology;
+UINT8 characterRange;
+} decorative;
+struct {
+UINT8 familyKind;
+UINT8 symbolKind;
+UINT8 weight;
+UINT8 spacing;
+UINT8 aspectRatioAndContrast;
+UINT8 aspectRatio94;
+UINT8 aspectRatio119;
+UINT8 aspectRatio157;
+UINT8 aspectRatio163;
+UINT8 aspectRatio211;
+} symbol;
+};
+
 #undef  INTERFACE
 #define INTERFACE IDWriteFontCollection
 DECLARE_INTERFACE_(IDWriteFontFace1, IDWriteFontFace)

--
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 2/4] dcommon.h: Moved more declarations to dcommon.h.

2018-01-22 Thread Jacek Caban
Signed-off-by: Jacek Caban 
---
 mingw-w64-headers/include/d2d1_1.h   |  1 -
 mingw-w64-headers/include/d2dbasetypes.h |  9 -
 mingw-w64-headers/include/dcommon.h  | 22 ++
 3 files changed, 22 insertions(+), 10 deletions(-)


diff --git a/mingw-w64-headers/include/d2d1_1.h b/mingw-w64-headers/include/d2d1_1.h
index 3e504c2d..de2cb091 100644
--- a/mingw-w64-headers/include/d2d1_1.h
+++ b/mingw-w64-headers/include/d2d1_1.h
@@ -36,7 +36,6 @@ typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
 typedef HRESULT (CALLBACK *PD2D1_EFFECT_FACTORY)(IUnknown**);
 
 typedef D2D_RECT_L D2D1_RECT_L;
-typedef D2D_POINT_2L D2D1_POINT_2L;
 
 typedef enum D2D1_PROPERTY_TYPE {
 D2D1_PROPERTY_TYPE_UNKNOWN   = 0,
diff --git a/mingw-w64-headers/include/d2dbasetypes.h b/mingw-w64-headers/include/d2dbasetypes.h
index 60dc45fe..387d1932 100644
--- a/mingw-w64-headers/include/d2dbasetypes.h
+++ b/mingw-w64-headers/include/d2dbasetypes.h
@@ -67,8 +67,6 @@ struct D2D_POINT_2F {
   FLOAT y;
 };
 
-typedef POINT D2D_POINT_2L;
-
 struct D2D_POINT_2U {
   UINT32 x;
   UINT32 y;
@@ -95,11 +93,6 @@ struct D2D_SIZE_F {
   FLOAT height;
 };
 
-struct D2D_SIZE_U {
-  UINT32 width;
-  UINT32 height;
-};
-
 typedef D2D_COLOR_F D2D1_COLOR_F;
 
 typedef struct D2D_POINT_2F D2D1_POINT_2F;
@@ -112,8 +105,6 @@ typedef struct D2D_RECT_U D2D1_RECT_U;
 
 typedef struct D2D_SIZE_F D2D1_SIZE_F;
 
-typedef struct D2D_SIZE_U D2D1_SIZE_U;
-
 typedef struct D2D_VECTOR_2F {
 FLOAT x;
 FLOAT y;
diff --git a/mingw-w64-headers/include/dcommon.h b/mingw-w64-headers/include/dcommon.h
index 86fabcc6..31be588b 100644
--- a/mingw-w64-headers/include/dcommon.h
+++ b/mingw-w64-headers/include/dcommon.h
@@ -12,4 +12,26 @@ typedef enum DWRITE_MEASURING_MODE {
   DWRITE_MEASURING_MODE_GDI_NATURAL 
 } DWRITE_MEASURING_MODE;
 
+enum DWRITE_GLYPH_IMAGE_FORMATS {
+DWRITE_GLYPH_IMAGE_FORMATS_NONE  = 0x,
+DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE  = 0x0001,
+DWRITE_GLYPH_IMAGE_FORMATS_CFF   = 0x0002,
+DWRITE_GLYPH_IMAGE_FORMATS_COLR  = 0x0004,
+DWRITE_GLYPH_IMAGE_FORMATS_SVG   = 0x0008,
+DWRITE_GLYPH_IMAGE_FORMATS_PNG   = 0x0010,
+DWRITE_GLYPH_IMAGE_FORMATS_JPEG  = 0x0020,
+DWRITE_GLYPH_IMAGE_FORMATS_TIFF  = 0x0040,
+DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8 = 0x0080,
+};
+
+typedef POINT D2D_POINT_2L;
+typedef D2D_POINT_2L D2D1_POINT_2L;
+
+struct D2D_SIZE_U {
+  UINT32 width;
+  UINT32 height;
+};
+
+typedef struct D2D_SIZE_U D2D1_SIZE_U;
+
 #endif /*#define __INC_DCOMMON__*/

--
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 1/4] dwrite.h: Added DWRITE_DECLARE_INTERFACE define.

2018-01-22 Thread Jacek Caban
Signed-off-by: Jacek Caban 
---
 mingw-w64-headers/include/dwrite.h | 4 
 1 file changed, 4 insertions(+)


diff --git a/mingw-w64-headers/include/dwrite.h b/mingw-w64-headers/include/dwrite.h
index 122d0bf6..7269dff5 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -17,6 +17,10 @@
 
 #include 
 
+#ifndef DWRITE_DECLARE_INTERFACE
+#define DWRITE_DECLARE_INTERFACE(iid) DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE
+#endif
+
 #ifndef __IDWriteBitmapRenderTarget_FWD_DEFINED__
 #define __IDWriteBitmapRenderTarget_FWD_DEFINED__
 typedef struct IDWriteBitmapRenderTarget IDWriteBitmapRenderTarget;

--
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] stdio.h: Don't use ms_* and gnu_* format attributes on clang.

2018-01-22 Thread Jacek Caban
On 01/21/2018 05:26 PM, Kai Tietz via Mingw-w64-public wrote:
> Patch is ok. But this is indeed problematic that clang doesn't support
> different scanf/printf warning API.
> For C99 printf/canf formatter diagnostic the produced warnings will be
> wrong for this compiler.

Yeah, I hope it will be fixed in clang at some point. I pushed my patch
for now. Thanks for reviews.

Jacek

--
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] Regenerate dwmapi.def for x86 and x86_64

2018-01-22 Thread JonY via Mingw-w64-public
On 01/22/2018 11:29 AM, Martin Storsjö wrote:
> On Sun, 21 Jan 2018, JonY via Mingw-w64-public wrote:
> 
>> On 12/22/2017 01:05 PM, JonY wrote:
>>> Attached patch OK?
>>>
>>
>> Oops, I missed the OK message, here's a rebased version, patch OK?
> 
> LGTM
> 
> // Martin
> 

Done, pushed to master.



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] Regenerate dwmapi.def for x86 and x86_64

2018-01-22 Thread Martin Storsjö

On Sun, 21 Jan 2018, JonY via Mingw-w64-public wrote:


On 12/22/2017 01:05 PM, JonY wrote:

Attached patch OK?



Oops, I missed the OK message, here's a rebased version, patch OK?


LGTM

// 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