@@ -136,7 +136,9 @@ class idl2d
136136 " threadpoolprivateapiset.h" , " threadpoolapiset.h" , " bemapiset.h" , " wow64apiset.h" ,
137137 " jobapi.h" , " timezoneapi.h" , " datetimeapi.h" , " stringapiset.h" ,
138138 " libloaderapi.h" , " securitybaseapi.h" , " namespaceapi.h" , " systemtopologyapi.h" , " processtopologyapi.h" ,
139- " securityappcontainer.h" , " realtimeapiset.h" , " unknwnbase.idl" , " objidlbase.idl" , " combaseapi.h"
139+ " securityappcontainer.h" , " realtimeapiset.h" , " unknwnbase.idl" , " objidlbase.idl" , " combaseapi.h" ,
140+ // Win SDK 8.1
141+ " mprapidef.h" , " lmerr.h" , " lmcons.h" ,
140142 ])
141143 win_idl_files ~= f ~ " *" ; // make it optional
142144
@@ -1215,6 +1217,11 @@ version(all)
12151217 replaceTokenSequence(tokens, " typedef struct DECLSPEC_ALIGN($_num)" , " align($_num) typedef struct" , true );
12161218 replaceTokenSequence(tokens, " typedef union DECLSPEC_ALIGN($_num)" , " align($_num) typedef union" , true );
12171219 replaceTokenSequence(tokens, " struct DECLSPEC_ALIGN($_num)" , " align($_num) struct" , true );
1220+
1221+ // win 8.1: remove template _ENUM_FLAG_INTEGER_FOR_SIZE
1222+ replaceTokenSequence(tokens, " template $args _ENUM_FLAG_INTEGER_FOR_SIZE;" , " /*$0*/" , true );
1223+ replaceTokenSequence(tokens, " template <> struct _ENUM_FLAG_INTEGER_FOR_SIZE <$arg> { $def };" , " /*$0*/" , true );
1224+ replaceTokenSequence(tokens, " template <$arg> struct _ENUM_FLAG_SIZED_INTEGER { $def };" , " /*$0*/" , true );
12181225 }
12191226
12201227 if (currentModule == " commctrl" )
@@ -1494,6 +1501,9 @@ version(none) version(vsi)
14941501 replaceTokenSequence(tokens, " OLECMDIDF_REFRESH_PROMPTIFOFFLINE = 0x2000, OLECMDIDF_REFRESH_THROUGHSCRIPT = 0x4000 $_not," ,
14951502 " OLECMDIDF_REFRESH_PROMPTIFOFFLINE = 0x2000,\n OLECMDIDF_REFRESH_THROUGHSCRIPT = 0x4000, $_not" , true );
14961503 replaceTokenSequence(tokens, " OLECMDIDF_REFRESH_PROMPTIFOFFLINE = 0x2000 $_not," , " OLECMDIDF_REFRESH_PROMPTIFOFFLINE = 0x2000, $_not" , true );
1504+
1505+ // win SDK 8.1: double define
1506+ replaceTokenSequence(tokens, " typedef struct tagPAGESET {} PAGESET;" , " " , true );
14971507 }
14981508
14991509 // vsshell.idl
@@ -1526,6 +1536,23 @@ version(none) version(vsi)
15261536 {
15271537 replaceTokenSequence(tokens, " typedef enum CWMO_FLAGS" , " typedef enum tagCWMO_FLAGS" , true );
15281538 }
1539+ if (currentModule == " lmcons" )
1540+ {
1541+ replaceTokenSequence(tokens, " alias NERR_BASE MIN_LANMAN_MESSAGE_ID;" , " enum MIN_LANMAN_MESSAGE_ID = 2100;" , true ); // missing lmerr.h
1542+ }
1543+ if (currentModule == " winnt" )
1544+ {
1545+ // Win SDK 8.1: remove translation to intrinsics
1546+ replaceTokenSequence(tokens, " alias _InterlockedAnd InterlockedAnd;" , " /+ $*" , true );
1547+ replaceTokenSequence(tokens, " InterlockedCompareExchange($args __in LONG ExChange, __in LONG Comperand);" , " $* +/" , true );
1548+ replaceTokenSequence(tokens, " InterlockedOr(&Barrier, 0);" , " InterlockedExchangeAdd(&Barrier, 0);" , true ); // InterlockedOr exist only as intrinsic
1549+ }
1550+ if (currentModule == " ocidl" )
1551+ {
1552+ // move alias out of interface declaration, it causes circular definitions with dmd 2.065+
1553+ replaceTokenSequence(tokens, " interface IOleUndoManager : IUnknown { alias IID_IOleUndoManager SID_SOleUndoManager; $data }" ,
1554+ " interface IOleUndoManager : IUnknown { $data }\n\n alias IID_IOleUndoManager SID_SOleUndoManager;" , true );
1555+ }
15291556
15301557 replaceTokenSequence(tokens, " extern const __declspec(selectany)" , " dconst" , true );
15311558 replaceTokenSequence(tokens, " EXTERN_C $args;" , " /+EXTERN_C $args;+/" , true );
@@ -1723,6 +1750,10 @@ version(none)
17231750 replaceTokenSequence(tokens, " $_not . UIHierarchyItems*" , " $_not . UIHierarchyItems*" , true );
17241751 replaceTokenSequence(tokens, " Collection([$data] ProjectItems $arg)" , " Collection([$data] .ProjectItems $arg)" , true );
17251752 }
1753+ if (currentModule == " dte80a" )
1754+ {
1755+ replaceTokenSequence(tokens, " [id($_num), propputref $attr] HRESULT Value" , " [id($_num), propputref $attr]\n HRESULT putref_Value" , true );
1756+ }
17261757 // VS2012 SDK
17271758 if (currentModule == " webproperties" )
17281759 {
@@ -1874,6 +1905,11 @@ version(all) {
18741905 replaceTokenSequence(tokens, " _Acquires_exclusive_lock_($args)" , " /+$*+/" , true );
18751906 replaceTokenSequence(tokens, " _Acquires_shared_lock_($args)" , " /+$*+/" , true );
18761907
1908+ // Win SDK 8.1
1909+ replaceTokenSequence(tokens, " _Post_satisfies_($args)" , " /+$*+/" , true );
1910+ replaceTokenSequence(tokens, " _Post_readable_byte_size_($args)" , " /+$*+/" , true );
1911+ replaceTokenSequence(tokens, " _Ret_reallocated_bytes_($args)" , " /+$*+/" , true );
1912+
18771913 replaceTokenSequence(tokens, " __assume_bound($args);" , " /+$*+/" , true );
18781914 replaceTokenSequence(tokens, " __asm{$args}$_opt;" , " assert(false, \" asm not translated\" ); asm{naked; nop; /+$args+/}" , true );
18791915 replaceTokenSequence(tokens, " __asm $_not{$stmt}" , " assert(false, \" asm not translated\" ); asm{naked; nop; /+$_not $stmt+/} }" , true );
@@ -2170,6 +2206,11 @@ else
21702206 case " _Ret_maybenull_" :
21712207 case " _Ret_opt_" :
21722208 case " _Printf_format_string_" :
2209+
2210+ // Windows SDK 8.1
2211+ case " _Field_z_" :
2212+ case " _Pre_notnull_" :
2213+ case " _Frees_ptr_" :
21732214 return " /*" ~ text ~ " */" ;
21742215
21752216 case " __checkReturn" : return " /*__checkReturn*/" ;
0 commit comments