On 8/16/2016 12:41 AM, Kai Tietz wrote:
From my POV patch is ok.
Ok, I pushed that one.
Attempting to follow Martin's suggestions, I'm attaching the next three
(I *think* this is the organization he requested). Ok to push?
BTW, since the list now supports it, I have switched from sending .txt
files back to sending .patch files. I find it easier to review
attachments if the correct program auto-launches. But if this causes
problems, let me know.
========= defines.patch ============
Fix minor variations in definitions that trigger compiler warnings.
gs_support.c:
- The minor variation causes a 'redefines' error.
cephes_emath.h:
- The minor variations cause 'redefines' errors.
dxgi.h:
- Cheap way to avoid 'redefine' errors.
aviriff.h, basetyps.h, combaseapi.h, gpedit.h:
- Redefine errors.
mfapi.h:
- Redefine errors.
mfidl.h:
- Redefine errors.
ntdef.h:
- Redefine errors.
winnt.h:
- Redefine errors.
========= uchar.patch ============
Fix redefinitions warnings in uchar.h.
- __STDC_UTF_16__ & __STDC_UTF_32__ are defined by the gcc compiler.
========== ntsecapi.patch ===========
Fix redefinitions warnings in ntsecapi.h.
- These redefine values that are unconditionally defined earlier in
the same file.
dw
diff --git a/mingw-w64-crt/crt/gs_support.c b/mingw-w64-crt/crt/gs_support.c
index dbd95d5..f47b0fe 100644
--- a/mingw-w64-crt/crt/gs_support.c
+++ b/mingw-w64-crt/crt/gs_support.c
@@ -26,7 +26,7 @@
typedef LONG NTSTATUS; /* same as in ntdef.h / winternl.h */
-#define UNW_FLAG_NHANDLER 0x00
+#define UNW_FLAG_NHANDLER 0x0
typedef union
{
diff --git a/mingw-w64-crt/math/cephes_emath.h b/mingw-w64-crt/math/cephes_emath.h
index b92d710..58a8e13 100644
--- a/mingw-w64-crt/math/cephes_emath.h
+++ b/mingw-w64-crt/math/cephes_emath.h
@@ -190,7 +190,7 @@
#define EXONE (0x3fff)
-#define mtherr(x,y)
+#define mtherr(fname, code)
extern long double strtold (const char * __restrict__ s, char ** __restrict__ se);
@@ -293,7 +293,7 @@ static __inline__ void __eshdn6(register short unsigned int *x);
*/
#define XPD 0,
/* #define XPD */
-#define NANS
+#define NANS 1
/* NaN's require infinity support. */
#ifdef NANS
diff --git a/mingw-w64-headers/direct-x/include/dxgi.h b/mingw-w64-headers/direct-x/include/dxgi.h
index d116b89..d056fa3 100644
--- a/mingw-w64-headers/direct-x/include/dxgi.h
+++ b/mingw-w64-headers/direct-x/include/dxgi.h
@@ -108,6 +108,11 @@ extern "C" {
#define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7)
#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8)
#define MAKE_DXGI_HRESULT(x) MAKE_HRESULT(1, _FACDXGI, x)
+
+/* These defines are (incorrectly) duplicated in winerror.h. Avoid the
+ redefine error. */
+#ifndef DXGI_ERROR_INVALID_CALL
+
#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1)
#define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2)
#define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3)
@@ -121,6 +126,9 @@ extern "C" {
#define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32)
#define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33)
#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34)
+
+#endif /* DXGI_ERROR_INVALID_CALL */
+
#if 0
typedef HANDLE HMONITOR;
typedef struct _LUID {
diff --git a/mingw-w64-headers/include/aviriff.h b/mingw-w64-headers/include/aviriff.h
index 30e7de3..9f4e664 100755
--- a/mingw-w64-headers/include/aviriff.h
+++ b/mingw-w64-headers/include/aviriff.h
@@ -53,12 +53,12 @@ typedef struct _rifflist {
#define streamtypeVIDEO FCC('vids')
#endif
-#define AVIF_HASINDEX 0x10
-#define AVIF_MUSTUSEINDEX 0x20
-#define AVIF_ISINTERLEAVED 0x100
-#define AVIF_TRUSTCKTYPE 0x800
-#define AVIF_WASCAPTUREFILE 0x10000
-#define AVIF_COPYRIGHTED 0x20000
+#define AVIF_HASINDEX 0x00000010
+#define AVIF_MUSTUSEINDEX 0x00000020
+#define AVIF_ISINTERLEAVED 0x00000100
+#define AVIF_TRUSTCKTYPE 0x00000800
+#define AVIF_WASCAPTUREFILE 0x00010000
+#define AVIF_COPYRIGHTED 0x00020000
#ifndef AVIIF_LIST
#define AVIIF_LIST 0x1
@@ -67,8 +67,8 @@ typedef struct _rifflist {
#define AVIIF_NO_TIME 0x100
#define AVIIF_COMPRESSOR 0xfff0000
-#define AVISF_DISABLED 0x1
-#define AVISF_VIDEO_PALCHANGES 0x10000
+#define AVISF_DISABLED 0x00000001
+#define AVISF_VIDEO_PALCHANGES 0x00010000
#define TIMECODE_RATE_30DROP 0
diff --git a/mingw-w64-headers/include/basetyps.h b/mingw-w64-headers/include/basetyps.h
index 7c36eca..dbfdcea 100644
--- a/mingw-w64-headers/include/basetyps.h
+++ b/mingw-w64-headers/include/basetyps.h
@@ -78,9 +78,9 @@
#endif
#define IFACEMETHOD(method) /*override*/ STDMETHOD (method)
-#define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_ (type, method)
+#define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_(type, method)
#define IFACEMETHODV(method) /*override*/ STDMETHODV (method)
-#define IFACEMETHODV_(type, method) /*override*/ STDMETHODV_ (type, method)
+#define IFACEMETHODV_(type, method) /*override*/ STDMETHODV_(type, method)
#include <guiddef.h>
diff --git a/mingw-w64-headers/include/combaseapi.h b/mingw-w64-headers/include/combaseapi.h
index 3536e25..ca6483f 100644
--- a/mingw-w64-headers/include/combaseapi.h
+++ b/mingw-w64-headers/include/combaseapi.h
@@ -63,7 +63,7 @@
#define DECLARE_INTERFACE_IID_(iface, baseiface, iid) interface DECLSPEC_UUID (iid) DECLSPEC_NOVTABLE iface : public baseiface
#define IFACEMETHOD(method) STDMETHOD (method)
-#define IFACEMETHOD_(type, method) STDMETHOD_(type, method)
+#define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_(type, method)
#define IFACEMETHODV(method) STDMETHODV (method)
#define IFACEMETHODV_(type, method) STDMETHODV_(type, method)
@@ -92,9 +92,9 @@ extern "C++" {
#define STDMETHODV_(type, method) type (STDMETHODVCALLTYPE *method)
#define IFACEMETHOD(method) STDMETHOD (method)
-#define IFACEMETHOD_(type, method) STDMETHOD_ (type, method)
+#define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_(type, method)
#define IFACEMETHODV(method) STDMETHODV (method)
-#define IFACEMETHODV_(type, method) STDMETHODV_ (type, method)
+#define IFACEMETHODV_(type, method) /*override*/ STDMETHODV_(type, method)
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
diff --git a/mingw-w64-headers/include/gpedit.h b/mingw-w64-headers/include/gpedit.h
index 6b980f4..c611395 100644
--- a/mingw-w64-headers/include/gpedit.h
+++ b/mingw-w64-headers/include/gpedit.h
@@ -11,7 +11,7 @@ DEFINE_GUID(NODEID_UserSWSettings,0x8fc0b73c,0xa0e1,0x11d1,0xa7,0xd3,0x0,0x0,0xf
DEFINE_GUID(IID_IGPEInformation,0x8fc0b735,0xa0e1,0x11d1,0xa7,0xd3,0x0,0x0,0xf8,0x75,0x71,0xe3);
DEFINE_GUID(CLSID_GroupPolicyObject,0xea502722,0xa23d,0x11d1,0xa7,0xd3,0x0,0x0,0xf8,0x75,0x71,0xe3);
DEFINE_GUID(IID_IGroupPolicyObject,0xea502723,0xa23d,0x11d1,0xa7,0xd3,0x0,0x0,0xf8,0x75,0x71,0xe3);
-#define REGISTRY_EXTENSION_GUID { 0x35378EAC,0x683F,0x11D2,0xA8,0x9A,0x00,0xC0,0x4F,0xBB,0xCF,0xA2 }
+#define REGISTRY_EXTENSION_GUID { 0x35378eac, 0x683f, 0x11d2, 0xa8, 0x9a, 0x00, 0xc0, 0x4f, 0xbb, 0xcf, 0xa2 }
DEFINE_GUID(CLSID_RSOPSnapIn,0x6dc3804b,0x7212,0x458d,0xad,0xb0,0x9a,0x07,0xe2,0xae,0x1f,0xa2);
DEFINE_GUID(NODEID_RSOPMachine,0xbd4c1a2e,0x0b7a,0x4a62,0xa6,0xb0,0xc0,0x57,0x75,0x39,0xc9,0x7e);
DEFINE_GUID(NODEID_RSOPMachineSWSettings,0x6a76273e,0xeb8e,0x45db,0x94,0xc5,0x25,0x66,0x3a,0x5f,0x2c,0x1a);
diff --git a/mingw-w64-headers/include/mfapi.h b/mingw-w64-headers/include/mfapi.h
index 41f7ffc..cdd8f93 100644
--- a/mingw-w64-headers/include/mfapi.h
+++ b/mingw-w64-headers/include/mfapi.h
@@ -160,16 +160,16 @@ extern "C" {
#define MF_E_DXGI_NEW_VIDEO_DEVICE ((HRESULT)__MSABI_LONG(0x80041001))
#define MF_E_DXGI_VIDEO_DEVICE_LOCKED ((HRESULT)__MSABI_LONG(0x80041002))
-#define MF_1_BYTE_ALIGNMENT 0x00000000
-#define MF_2_BYTE_ALIGNMENT 0x00000001
-#define MF_4_BYTE_ALIGNMENT 0x00000003
-#define MF_8_BYTE_ALIGNMENT 0x00000007
-#define MF_16_BYTE_ALIGNMENT 0x0000000f
-#define MF_32_BYTE_ALIGNMENT 0x0000001f
-#define MF_64_BYTE_ALIGNMENT 0x0000003f
-#define MF_128_BYTE_ALIGNMENT 0x0000007f
-#define MF_256_BYTE_ALIGNMENT 0x000000ff
-#define MF_512_BYTE_ALIGNMENT 0x000001ff
+#define MF_1_BYTE_ALIGNMENT 0x00000000
+#define MF_2_BYTE_ALIGNMENT 0x00000001
+#define MF_4_BYTE_ALIGNMENT 0x00000003
+#define MF_8_BYTE_ALIGNMENT 0x00000007
+#define MF_16_BYTE_ALIGNMENT 0x0000000f
+#define MF_32_BYTE_ALIGNMENT 0x0000001f
+#define MF_64_BYTE_ALIGNMENT 0x0000003f
+#define MF_128_BYTE_ALIGNMENT 0x0000007f
+#define MF_256_BYTE_ALIGNMENT 0x000000ff
+#define MF_512_BYTE_ALIGNMENT 0x000001ff
#endif
diff --git a/mingw-w64-headers/include/mfidl.h b/mingw-w64-headers/include/mfidl.h
index 76e8ae3..1658e58 100644
--- a/mingw-w64-headers/include/mfidl.h
+++ b/mingw-w64-headers/include/mfidl.h
@@ -3399,12 +3399,12 @@ typedef struct _MFNetCredentialManagerGetParam {
#define MF_2_BYTE_ALIGNMENT 0x00000001
#define MF_4_BYTE_ALIGNMENT 0x00000003
#define MF_8_BYTE_ALIGNMENT 0x00000007
-#define MF_16_BYTE_ALIGNMENT 0x0000000F
-#define MF_32_BYTE_ALIGNMENT 0x0000001F
-#define MF_64_BYTE_ALIGNMENT 0x0000003F
-#define MF_128_BYTE_ALIGNMENT 0x0000007F
-#define MF_256_BYTE_ALIGNMENT 0x000000FF
-#define MF_512_BYTE_ALIGNMENT 0x000001FF
+#define MF_16_BYTE_ALIGNMENT 0x0000000f
+#define MF_32_BYTE_ALIGNMENT 0x0000001f
+#define MF_64_BYTE_ALIGNMENT 0x0000003f
+#define MF_128_BYTE_ALIGNMENT 0x0000007f
+#define MF_256_BYTE_ALIGNMENT 0x000000ff
+#define MF_512_BYTE_ALIGNMENT 0x000001ff
#define MEDIASINK_FIXED_STREAMS 0x00000001
#define MEDIASINK_CANNOT_MATCH_CLOCK 0x00000002
diff --git a/mingw-w64-headers/include/ntdef.h b/mingw-w64-headers/include/ntdef.h
index 4be8c14..e3e29e7 100644
--- a/mingw-w64-headers/include/ntdef.h
+++ b/mingw-w64-headers/include/ntdef.h
@@ -694,14 +694,14 @@ typedef struct _GROUP_AFFINITY {
#define MAXUCHAR 0xff
#define MAXUSHORT 0xffff
#define MAXULONG 0xffffffff
-#define MAXLONGLONG (0x7fffffffffffffffLL)
+#define MAXLONGLONG (0x7fffffffffffffffll)
/* Multiplication and Shift Operations */
-#define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
-#define UInt32x32To64(a,b) ((ULONGLONG)(a)*(ULONGLONG)(b))
-#define Int64ShllMod32(a,b) ((ULONGLONG)(a)<<(b))
-#define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
-#define Int64ShrlMod32(a,b) ((ULONGLONG)(a)>>(b))
+#define Int32x32To64(a, b) (((LONGLONG) ((LONG) (a))) * ((LONGLONG) ((LONG) (b))))
+#define UInt32x32To64(a, b) (((ULONGLONG) ((unsigned int) (a))) *((ULONGLONG) ((unsigned int) (b))))
+#define Int64ShllMod32(a, b) (((ULONGLONG) (a)) << (b))
+#define Int64ShraMod32(a, b) (((LONGLONG) (a)) >> (b))
+#define Int64ShrlMod32(a, b) (((ULONGLONG) (a)) >> (b))
/* C_ASSERT Definition */
#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h
index 84eb36a..a855801 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -1745,10 +1745,10 @@ extern "C" {
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
-#define UNW_FLAG_NHANDLER 0x00
-#define UNW_FLAG_EHANDLER 0x01
-#define UNW_FLAG_UHANDLER 0x02
-#define UNW_FLAG_CHAININFO 0x04
+#define UNW_FLAG_NHANDLER 0x0
+#define UNW_FLAG_EHANDLER 0x1
+#define UNW_FLAG_UHANDLER 0x2
+#define UNW_FLAG_CHAININFO 0x4
#endif /* end of _AMD64_ */
diff --git a/mingw-w64-headers/include/ntsecapi.h b/mingw-w64-headers/include/ntsecapi.h
index 14c1581..d409c02 100644
--- a/mingw-w64-headers/include/ntsecapi.h
+++ b/mingw-w64-headers/include/ntsecapi.h
@@ -1328,10 +1328,6 @@ extern "C" {
#if (_WIN32_WINNT >= 0x0600)
-#define POLICY_AUDIT_EVENT_UNCHANGED 0x00000000
-#define POLICY_AUDIT_EVENT_SUCCESS 0x00000001
-#define POLICY_AUDIT_EVENT_FAILURE 0x00000002
-#define POLICY_AUDIT_EVENT_NONE 0x00000004
#define PER_USER_POLICY_UNCHANGED 0x00
#define PER_USER_AUDIT_SUCCESS_INCLUDE 0x01
#define PER_USER_AUDIT_SUCCESS_EXCLUDE 0x02
diff --git a/mingw-w64-headers/crt/uchar.h b/mingw-w64-headers/crt/uchar.h
index 72b377c..475ad87 100644
--- a/mingw-w64-headers/crt/uchar.h
+++ b/mingw-w64-headers/crt/uchar.h
@@ -35,8 +35,13 @@ typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
#endif
+#ifndef __STDC_UTF_16__
#define __STDC_UTF_16__ 1
+#endif
+
+#ifndef __STDC_UTF_32__
#define __STDC_UTF_32__ 1
+#endif
#ifdef __cplusplus
extern "C" {
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public