The enum definition needs to be separated from the typedef for widl to produce
the correct code.
---
 .../include/windows.system.threading.h        | 78 +++++++++++--------
 .../include/windows.system.threading.idl      | 12 +--
 2 files changed, 52 insertions(+), 38 deletions(-)

diff --git a/mingw-w64-headers/include/windows.system.threading.h 
b/mingw-w64-headers/include/windows.system.threading.h
index 69e6d7a5..c0a4d0ad 100644
--- a/mingw-w64-headers/include/windows.system.threading.h
+++ b/mingw-w64-headers/include/windows.system.threading.h
@@ -151,38 +151,6 @@ extern "C" {
 struct __x_ABI_CWindows_CFoundation_CTimeSpan;
 #endif
 
-#ifdef __cplusplus
-} /* extern "C" */
-namespace ABI {
-    namespace Windows {
-        namespace System {
-            namespace Threading {
-                enum WorkItemPriority;
-            }
-        }
-    }
-}
-extern "C" {
-#else
-enum __x_ABI_CWindows_CSystem_CThreading_CWorkItemPriority;
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-namespace ABI {
-    namespace Windows {
-        namespace System {
-            namespace Threading {
-                enum WorkItemOptions;
-            }
-        }
-    }
-}
-extern "C" {
-#else
-enum __x_ABI_CWindows_CSystem_CThreading_CWorkItemOptions;
-#endif
-
 #ifndef 
____x_ABI_CWindows_CSystem_CThreading_CTimerElapsedHandler_FWD_DEFINED__
 #define 
____x_ABI_CWindows_CSystem_CThreading_CTimerElapsedHandler_FWD_DEFINED__
 typedef interface __x_ABI_CWindows_CSystem_CThreading_CTimerElapsedHandler 
__x_ABI_CWindows_CSystem_CThreading_CTimerElapsedHandler;
@@ -279,6 +247,52 @@ namespace ABI {
 #endif /* __cplusplus */
 #endif
 
+#ifdef __cplusplus
+} /* extern "C" */
+namespace ABI {
+    namespace Windows {
+        namespace System {
+            namespace Threading {
+                enum WorkItemPriority {
+                    WorkItemPriority_Low = -1,
+                    WorkItemPriority_Normal = 0,
+                    WorkItemPriority_High = 1
+                };
+            }
+        }
+    }
+}
+extern "C" {
+#else
+enum __x_ABI_CWindows_CSystem_CThreading_CWorkItemPriority {
+    WorkItemPriority_Low = -1,
+    WorkItemPriority_Normal = 0,
+    WorkItemPriority_High = 1
+};
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+namespace ABI {
+    namespace Windows {
+        namespace System {
+            namespace Threading {
+                enum WorkItemOptions {
+                    WorkItemOptions_None = 0,
+                    WorkItemOptions_TimeSliced = 1
+                };
+            }
+        }
+    }
+}
+extern "C" {
+#else
+enum __x_ABI_CWindows_CSystem_CThreading_CWorkItemOptions {
+    WorkItemOptions_None = 0,
+    WorkItemOptions_TimeSliced = 1
+};
+#endif
+
 /*****************************************************************************
  * TimerElapsedHandler interface
  *
diff --git a/mingw-w64-headers/include/windows.system.threading.idl 
b/mingw-w64-headers/include/windows.system.threading.idl
index e4e9f8c4..a2dc585f 100644
--- a/mingw-w64-headers/include/windows.system.threading.idl
+++ b/mingw-w64-headers/include/windows.system.threading.idl
@@ -19,8 +19,8 @@ namespace Windows {
 
     namespace System {
         namespace Threading {
-            enum WorkItemPriority;
-            enum WorkItemOptions;
+            typedef enum WorkItemPriority WorkItemPriority;
+            typedef enum WorkItemOptions WorkItemOptions;
             interface TimerElapsedHandler;   //delegate
             interface TimerDestroyedHandler; //delegate
             interface WorkItemHandler;       //delegate
@@ -35,16 +35,16 @@ namespace Windows {
     namespace System {
         namespace Threading
         {
-            typedef enum WorkItemPriority {
+            enum WorkItemPriority {
                 Low    = -1,
                 Normal = 0,
                 High   = 1
-            } WorkItemPriority;
+            };
 
-            typedef enum WorkItemOptions {
+            enum WorkItemOptions {
                 None       = 0,
                 TimeSliced = 1
-            } WorkItemOptions;
+            };
 
             typedef struct TimeSpan {
                 INT64 Duration;
-- 
2.29.2



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to