WINAPI_FAMILY_DESKTOP_APP is (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)
(ie available for desktop and store apps)

The current macro results in:
(WINAPI_FAMILY & (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)) == 
(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)

Where WINAPI_FAMILY is either WINAPI_FAMILY_DESKTOP_APP or WINAPI_FAMILY_APP.
When the value is WINAPI_FAMILY_APP it is not true, even though it's allowed.

The new macro checks
(WINAPI_FAMILY & (WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)) == 
WINAPI_FAMILY)

It's true if WINAPI_FAMILY is WINAPI_PARTITION_APP, WINAPI_PARTITION_DESKTOP or 
both.
So its' true for WINAPI_FAMILY_APP and WINAPI_FAMILY_DESKTOP_APP.
---
 mingw-w64-headers/include/winapifamily.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/winapifamily.h 
b/mingw-w64-headers/include/winapifamily.h
index 388d5f06..131c509b 100644
--- a/mingw-w64-headers/include/winapifamily.h
+++ b/mingw-w64-headers/include/winapifamily.h
@@ -18,7 +18,7 @@
 #define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
 #endif
 
-#define WINAPI_FAMILY_PARTITION(v) ((WINAPI_FAMILY & v) == v)
+#define WINAPI_FAMILY_PARTITION(v) ((WINAPI_FAMILY & (v)) == WINAPI_FAMILY)
 #define WINAPI_FAMILY_ONE_PARTITION(vset, v) ((WINAPI_FAMILY & vset) == v)
 
 #endif 
-- 
2.17.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to