While updating the chromium sandbox in Firefox we identified the following SDK components missing from MinGW.
(Hopefully I remembered how to attach patches so the mailing list accepts them) -tom
From aeebd607b7d6a8b42d98b97205f70188b4945af9 Mon Sep 17 00:00:00 2001 From: Tom Ritter <[email protected]> Date: Wed, 22 May 2019 10:51:24 -0500 Subject: [PATCH 1/3] Add concurrencysal.h to the headers --- mingw-w64-headers/include/concurrencysal.h | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 mingw-w64-headers/include/concurrencysal.h diff --git a/mingw-w64-headers/include/concurrencysal.h b/mingw-w64-headers/include/concurrencysal.h new file mode 100644 index 00000000..dea6d945 --- /dev/null +++ b/mingw-w64-headers/include/concurrencysal.h @@ -0,0 +1,49 @@ +/** + * 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 CONCURRENCYSAL_HXX +#define CONCURRENCYSAL_HXX + +#define _Benign_race_begin_ __pragma(warning(push)) +#define _Benign_race_end_ __pragma(warning(pop)) +#define _No_competing_thread_begin_ __pragma(warning(push)) +#define _No_competing_thread_end_ __pragma(warning(pop)) + +#define _Acquires_exclusive_lock_(lock) +#define _Acquires_lock_(lock) +#define _Acquires_nonreentrant_lock_(lock) +#define _Acquires_shared_lock_(lock) +#define _Analysis_assume_lock_acquired_(lock) +#define _Analysis_assume_lock_released_(lock) +#define _Analysis_assume_lock_held_(lock) +#define _Analysis_assume_lock_not_held_(lock) +#define _Analysis_assume_same_lock_(lock1, lock2) +#define _Analysis_suppress_lock_checking_(lock) +#define _Create_lock_level_(level) +#define _Csalcat1_(x,y) +#define _Csalcat2_(x,y) +#define _Function_ignore_lock_checking_(lock) +#define _Guarded_by_(lock) +#define _Has_lock_kind_(kind) +#define _Has_lock_level_(level) +#define _Interlocked_ +#define _Internal_lock_level_order_(a,b) +#define _Lock_level_order_(a,b) +#define _No_competing_thread_ +#define _Post_same_lock_(lock1,lock2) +#define _Releases_exclusive_lock_(lock) +#define _Releases_lock_(lock) +#define _Releases_nonreentrant_lock_(lock) +#define _Releases_shared_lock_(lock) +#define _Requires_exclusive_lock_held_(lock) +#define _Requires_shared_lock_held_(lock) +#define _Requires_lock_held_(lock) +#define _Requires_lock_not_held_(lock) +#define _Requires_no_locks_held_ +#define _Write_guarded_by_(lock) + +#endif + -- 2.17.1
From bfc7a264fb8478eff82aeb964ba6e244960bfd46 Mon Sep 17 00:00:00 2001 From: Tom Ritter <[email protected]> Date: Wed, 22 May 2019 11:05:51 -0500 Subject: [PATCH 3/3] Add MEMORY_PRIORITY_*, a few PROCESSOR_ARCHITECTURE, SECURITY_CAPABILITY, and SECURITY_BUILTIN defines --- mingw-w64-headers/include/processthreadsapi.h | 10 ++++++++++ mingw-w64-headers/include/winnt.h | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mingw-w64-headers/include/processthreadsapi.h b/mingw-w64-headers/include/processthreadsapi.h index 931a6f13..b34c87c6 100644 --- a/mingw-w64-headers/include/processthreadsapi.h +++ b/mingw-w64-headers/include/processthreadsapi.h @@ -165,6 +165,16 @@ WINBASEAPI WINBOOL WINAPI TerminateProcess (HANDLE hProcess, UINT uExitCode); { return (HANDLE)(LONG_PTR) (-6); } + + typedef struct _MEMORY_PRIORITY_INFORMATION { + ULONG MemoryPriority; + } MEMORY_PRIORITY_INFORMATION, *PMEMORY_PRIORITY_INFORMATION; + + #define MEMORY_PRIORITY_VERY_LOW 1 + #define MEMORY_PRIORITY_LOW 2 + #define MEMORY_PRIORITY_MEDIUM 3 + #define MEMORY_PRIORITY_BELOW_NORMAL 4 + #define MEMORY_PRIORITY_NORMAL 5 #endif #endif diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h index cb7f7155..7161e504 100644 --- a/mingw-w64-headers/include/winnt.h +++ b/mingw-w64-headers/include/winnt.h @@ -3142,6 +3142,7 @@ __buildmemorybarrier() #define SECURITY_CAPABILITY_RID_COUNT (__MSABI_LONG(5)) #define SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE (__MSABI_LONG(0x00000001)) +#define SECURITY_BUILTIN_PACKAGE_ANY_RESTRICTED_PACKAGE (__MSABI_LONG(0x00000002)) #define SECURITY_CAPABILITY_INTERNET_CLIENT (__MSABI_LONG(0x00000001)) #define SECURITY_CAPABILITY_INTERNET_CLIENT_SERVER (__MSABI_LONG(0x00000002)) @@ -3153,9 +3154,12 @@ __buildmemorybarrier() #define SECURITY_CAPABILITY_ENTERPRISE_AUTHENTICATION (__MSABI_LONG(0x00000008)) #define SECURITY_CAPABILITY_SHARED_USER_CERTIFICATES (__MSABI_LONG(0x00000009)) #define SECURITY_CAPABILITY_REMOVABLE_STORAGE (__MSABI_LONG(0x0000000a)) - +#define SECURITY_CAPABILITY_APPOINTMENTS (__MSABI_LONG(0x0000000b)) +#define SECURITY_CAPABILITY_CONTACTS (__MSABI_LONG(0x0000000c)) #define SECURITY_CAPABILITY_INTERNET_EXPLORER (__MSABI_LONG(0x00001000)) + + #define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16} #define SECURITY_MANDATORY_UNTRUSTED_RID (__MSABI_LONG(0x00000000)) #define SECURITY_MANDATORY_LOW_RID (__MSABI_LONG(0x00001000)) @@ -4723,6 +4727,9 @@ __buildmemorybarrier() #define PROCESSOR_ARCHITECTURE_AMD64 9 #define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10 #define PROCESSOR_ARCHITECTURE_NEUTRAL 11 +#define PROCESSOR_ARCHITECTURE_ARM64 12 +#define PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 13 +#define PROCESSOR_ARCHITECTURE_IA32_ON_ARM64 14 #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xffff -- 2.17.1
From cf2bd8213317f4e2e9342df88b93839c04e5f9db Mon Sep 17 00:00:00 2001 From: Tom Ritter <[email protected]> Date: Wed, 22 May 2019 10:53:10 -0500 Subject: [PATCH 2/3] Add _Post_equals_last_error_ to specstrings.h --- mingw-w64-headers/include/specstrings.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mingw-w64-headers/include/specstrings.h b/mingw-w64-headers/include/specstrings.h index bcb9fc3c..f2636a49 100644 --- a/mingw-w64-headers/include/specstrings.h +++ b/mingw-w64-headers/include/specstrings.h @@ -285,6 +285,8 @@ extern "C" { #define __encoded_pointer +#define _Post_equals_last_error_ + #ifndef __fallthrough #define __fallthrough #endif -- 2.17.1
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
