[PSDK/...]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 30 Aug 2014 22:26:42 +0000 (22:26 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 30 Aug 2014 22:26:42 +0000 (22:26 +0000)
- Add/improve some definitions in ntdef.h
- fix definition of SUBLANG_SINDHI_PAKISTAN in winnt.h
- enable ARRAYSIZE in winnt.h
- #undef ARRAYSIZE in certain wine code to avoid redefinition
- Use PCCH instead of PCCHAR in ext2lib (PCCHAR is ntdef.h only)
- remove obsolete definitions from smss.h

svn path=/trunk/; revision=64000

reactos/base/system/smss/smss.h
reactos/dll/directx/wine/quartz/filtermapper.c
reactos/dll/win32/mscoree/corruntimehost.c
reactos/dll/win32/ole32/compobj.c
reactos/dll/win32/rpcrt4/rpc_transport.c
reactos/dll/win32/winhttp/request.c
reactos/dll/win32/wininet/http.c
reactos/include/psdk/ntdef.h
reactos/include/psdk/winnt.h
reactos/lib/fslib/ext2lib/Disk.c
reactos/win32ss/user/user32/windows/spy.c

index 213fe34..831aeea 100644 (file)
 #include <winbase.h>
 #include <winreg.h>
 
 #include <winbase.h>
 #include <winreg.h>
 
-#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
-#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
-#ifdef ENABLE_RTL_NUMBER_OF_V2
-#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
-#else
-#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
-#endif
 #define NTOS_MODE_USER
 #include <ndk/iofuncs.h>
 #include <ndk/obfuncs.h>
 #define NTOS_MODE_USER
 #include <ndk/iofuncs.h>
 #include <ndk/obfuncs.h>
index 704ea5a..0d7e873 100644 (file)
@@ -24,6 +24,7 @@
 #include <initguid.h>
 #include <fil_data.h>
 
 #include <initguid.h>
 #include <fil_data.h>
 
+#undef ARRAYSIZE
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 typedef struct FilterMapper3Impl
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 typedef struct FilterMapper3Impl
@@ -1164,7 +1165,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
 
     if (FAILED(hr))
         return hr;
 
     if (FAILED(hr))
         return hr;
-    
+
     while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK)
     {
         IMoniker_Release(IMon);
     while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK)
     {
         IMoniker_Release(IMon);
@@ -1184,7 +1185,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
         return E_OUTOFMEMORY;
     }
     ZeroMemory(regfilters, nb_mon * sizeof(REGFILTER)); /* will prevent bad free of Name in case of error. */
         return E_OUTOFMEMORY;
     }
     ZeroMemory(regfilters, nb_mon * sizeof(REGFILTER)); /* will prevent bad free of Name in case of error. */
-    
+
     IEnumMoniker_Reset(ppEnumMoniker);
     while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK)
     {
     IEnumMoniker_Reset(ppEnumMoniker);
     while(IEnumMoniker_Next(ppEnumMoniker, 1, &IMon, &nb) == S_OK)
     {
@@ -1238,7 +1239,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
         CoTaskMemFree(regfilters[idx].Name);
     CoTaskMemFree(regfilters);
     IEnumMoniker_Release(ppEnumMoniker);
         CoTaskMemFree(regfilters[idx].Name);
     CoTaskMemFree(regfilters);
     IEnumMoniker_Release(ppEnumMoniker);
-    
+
     return hr;
 }
 
     return hr;
 }
 
@@ -1259,7 +1260,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c
     {
         strcpyW(wszKeyName, wszFilterSlash);
         strcatW(wszKeyName, wszClsid);
     {
         strcpyW(wszKeyName, wszFilterSlash);
         strcatW(wszKeyName, wszClsid);
-    
+
         lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
         hr = HRESULT_FROM_WIN32(lRet);
     }
         lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
         hr = HRESULT_FROM_WIN32(lRet);
     }
@@ -1275,7 +1276,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c
     {
         strcpyW(wszKeyName, wszClsidSlash);
         strcatW(wszKeyName, wszClsid);
     {
         strcpyW(wszKeyName, wszClsidSlash);
         strcatW(wszKeyName, wszClsid);
-    
+
         lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
         hr = HRESULT_FROM_WIN32(lRet);
     }
         lRet = RegCreateKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
         hr = HRESULT_FROM_WIN32(lRet);
     }
@@ -1286,7 +1287,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c
         hr = HRESULT_FROM_WIN32(lRet);
         RegCloseKey(hKey);
     }
         hr = HRESULT_FROM_WIN32(lRet);
         RegCloseKey(hKey);
     }
-    
+
     CoTaskMemFree(wszClsid);
 
     return hr;
     CoTaskMemFree(wszClsid);
 
     return hr;
@@ -1346,7 +1347,7 @@ static HRESULT WINAPI FilterMapper_RegisterPin(
         strcpyW(wszPinsKeyName, wszPins);
         strcatW(wszPinsKeyName, wszSlash);
         strcatW(wszPinsKeyName, szName);
         strcpyW(wszPinsKeyName, wszPins);
         strcatW(wszPinsKeyName, wszSlash);
         strcatW(wszPinsKeyName, szName);
-    
+
         lRet = RegCreateKeyExW(hKey, wszPinsKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hPinsKey, NULL);
         hr = HRESULT_FROM_WIN32(lRet);
         CoTaskMemFree(wszPinsKeyName);
         lRet = RegCreateKeyExW(hKey, wszPinsKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hPinsKey, NULL);
         hr = HRESULT_FROM_WIN32(lRet);
         CoTaskMemFree(wszPinsKeyName);
index 983af00..ea2e214 100644 (file)
@@ -1205,6 +1205,7 @@ HRESULT RuntimeHost_Destroy(RuntimeHost *This)
 }
 
 #define CHARS_IN_GUID 39
 }
 
 #define CHARS_IN_GUID 39
+#undef ARRAYSIZE
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
index 5d8fb0c..070e55e 100644 (file)
@@ -43,6 +43,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
+#undef ARRAYSIZE
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 /****************************************************************************
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 /****************************************************************************
@@ -1173,7 +1174,7 @@ DWORD apartment_release(struct apartment *apt)
     return ret;
 }
 
     return ret;
 }
 
-/* The given OXID must be local to this process: 
+/* The given OXID must be local to this process:
  *
  * The ref parameter is here mostly to ensure people remember that
  * they get one, you should normally take a ref for thread safety.
  *
  * The ref parameter is here mostly to ensure people remember that
  * they get one, you should normally take a ref for thread safety.
@@ -2482,7 +2483,7 @@ HRESULT WINAPI CLSIDFromProgIDEx(LPCOLESTR progid, LPCLSID clsid)
  * PARAMS
  *  riid   [I] Interface whose proxy/stub CLSID is to be returned.
  *  pclsid [O] Where to store returned proxy/stub CLSID.
  * PARAMS
  *  riid   [I] Interface whose proxy/stub CLSID is to be returned.
  *  pclsid [O] Where to store returned proxy/stub CLSID.
- * 
+ *
  * RETURNS
  *   S_OK
  *   E_OUTOFMEMORY
  * RETURNS
  *   S_OK
  *   E_OUTOFMEMORY
@@ -2594,7 +2595,7 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
  * PARAMS
  *  riid   [I] Interface whose proxy/stub CLSID is to be registered.
  *  rclsid [I] CLSID of the proxy/stub.
  * PARAMS
  *  riid   [I] Interface whose proxy/stub CLSID is to be registered.
  *  rclsid [I] CLSID of the proxy/stub.
- * 
+ *
  * RETURNS
  *   Success: S_OK
  *   Failure: E_OUTOFMEMORY
  * RETURNS
  *   Success: S_OK
  *   Failure: E_OUTOFMEMORY
@@ -3576,14 +3577,14 @@ HRESULT WINAPI CoLockObjectExternal(
     if (!apt) return CO_E_NOTINITIALIZED;
 
     stubmgr = get_stub_manager_from_object(apt, pUnk);
     if (!apt) return CO_E_NOTINITIALIZED;
 
     stubmgr = get_stub_manager_from_object(apt, pUnk);
-    
+
     if (stubmgr)
     {
         if (fLock)
             stub_manager_ext_addref(stubmgr, 1, FALSE);
         else
             stub_manager_ext_release(stubmgr, 1, FALSE, fLastUnlockReleases);
     if (stubmgr)
     {
         if (fLock)
             stub_manager_ext_addref(stubmgr, 1, FALSE);
         else
             stub_manager_ext_release(stubmgr, 1, FALSE, fLastUnlockReleases);
-        
+
         stub_manager_int_release(stubmgr);
 
         return S_OK;
         stub_manager_int_release(stubmgr);
 
         return S_OK;
@@ -4036,7 +4037,7 @@ HRESULT WINAPI CoAllowSetForegroundWindow(IUnknown *pUnk, void *pvReserved)
     FIXME("(%p, %p): stub\n", pUnk, pvReserved);
     return S_OK;
 }
     FIXME("(%p, %p): stub\n", pUnk, pvReserved);
     return S_OK;
 }
+
 /***********************************************************************
  *           CoQueryProxyBlanket [OLE32.@]
  *
 /***********************************************************************
  *           CoQueryProxyBlanket [OLE32.@]
  *
index 771c395..42f5056 100644 (file)
@@ -79,6 +79,7 @@
 
 #define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000)
 
 
 #define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000)
 
+#undef ARRAYSIZE
 #define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0]))
 
 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
 #define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0]))
 
 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
@@ -407,7 +408,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_np_open_endpoint(RpcServerProtseq *protse
 }
 
 static void rpcrt4_conn_np_handoff(RpcConnection_np *old_npc, RpcConnection_np *new_npc)
 }
 
 static void rpcrt4_conn_np_handoff(RpcConnection_np *old_npc, RpcConnection_np *new_npc)
-{    
+{
   /* because of the way named pipes work, we'll transfer the connected pipe
    * to the child, then reopen the server binding to continue listening */
 
   /* because of the way named pipes work, we'll transfer the connected pipe
    * to the child, then reopen the server binding to continue listening */
 
@@ -448,7 +449,7 @@ static RPC_STATUS rpcrt4_ncalrpc_handoff(RpcConnection *old_conn, RpcConnection
   strcat(strcpy(pname, prefix), old_conn->Endpoint);
   status = rpcrt4_conn_create_pipe(old_conn, pname);
   I_RpcFree(pname);
   strcat(strcpy(pname, prefix), old_conn->Endpoint);
   status = rpcrt4_conn_create_pipe(old_conn, pname);
   I_RpcFree(pname);
-    
+
   return status;
 }
 
   return status;
 }
 
@@ -714,9 +715,9 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p
     HANDLE *objs = prev_array;
     RpcConnection_np *conn;
     RpcServerProtseq_np *npps = CONTAINING_RECORD(protseq, RpcServerProtseq_np, common);
     HANDLE *objs = prev_array;
     RpcConnection_np *conn;
     RpcServerProtseq_np *npps = CONTAINING_RECORD(protseq, RpcServerProtseq_np, common);
-    
+
     EnterCriticalSection(&protseq->cs);
     EnterCriticalSection(&protseq->cs);
-    
+
     /* open and count connections */
     *count = 1;
     conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
     /* open and count connections */
     *count = 1;
     conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
@@ -726,7 +727,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p
             (*count)++;
         conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
     }
             (*count)++;
         conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
     }
-    
+
     /* make array of connections */
     if (objs)
         objs = HeapReAlloc(GetProcessHeap(), 0, objs, *count*sizeof(HANDLE));
     /* make array of connections */
     if (objs)
         objs = HeapReAlloc(GetProcessHeap(), 0, objs, *count*sizeof(HANDLE));
@@ -738,7 +739,7 @@ static void *rpcrt4_protseq_np_get_wait_array(RpcServerProtseq *protseq, void *p
         LeaveCriticalSection(&protseq->cs);
         return NULL;
     }
         LeaveCriticalSection(&protseq->cs);
         return NULL;
     }
-    
+
     objs[0] = npps->mgr_event;
     *count = 1;
     conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
     objs[0] = npps->mgr_event;
     *count = 1;
     conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
@@ -763,7 +764,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
     DWORD res;
     RpcConnection *cconn;
     RpcConnection_np *conn;
     DWORD res;
     RpcConnection *cconn;
     RpcConnection_np *conn;
-    
+
     if (!objs)
         return -1;
 
     if (!objs)
         return -1;
 
@@ -1472,7 +1473,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
         conn->Next = protseq->conn;
         protseq->conn = first_connection;
         LeaveCriticalSection(&protseq->cs);
         conn->Next = protseq->conn;
         protseq->conn = first_connection;
         LeaveCriticalSection(&protseq->cs);
-        
+
         TRACE("listening on %s\n", endpoint);
         return RPC_S_OK;
     }
         TRACE("listening on %s\n", endpoint);
         return RPC_S_OK;
     }
@@ -1638,7 +1639,7 @@ static void *rpcrt4_protseq_sock_get_wait_array(RpcServerProtseq *protseq, void
     RpcServerProtseq_sock *sockps = CONTAINING_RECORD(protseq, RpcServerProtseq_sock, common);
 
     EnterCriticalSection(&protseq->cs);
     RpcServerProtseq_sock *sockps = CONTAINING_RECORD(protseq, RpcServerProtseq_sock, common);
 
     EnterCriticalSection(&protseq->cs);
-    
+
     /* open and count connections */
     *count = 1;
     conn = (RpcConnection_tcp *)protseq->conn;
     /* open and count connections */
     *count = 1;
     conn = (RpcConnection_tcp *)protseq->conn;
@@ -1647,7 +1648,7 @@ static void *rpcrt4_protseq_sock_get_wait_array(RpcServerProtseq *protseq, void
             (*count)++;
         conn = (RpcConnection_tcp *)conn->common.Next;
     }
             (*count)++;
         conn = (RpcConnection_tcp *)conn->common.Next;
     }
-    
+
     /* make array of connections */
     if (poll_info)
         poll_info = HeapReAlloc(GetProcessHeap(), 0, poll_info, *count*sizeof(*poll_info));
     /* make array of connections */
     if (poll_info)
         poll_info = HeapReAlloc(GetProcessHeap(), 0, poll_info, *count*sizeof(*poll_info));
@@ -1689,10 +1690,10 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq
     unsigned int i;
     RpcConnection *cconn;
     RpcConnection_tcp *conn;
     unsigned int i;
     RpcConnection *cconn;
     RpcConnection_tcp *conn;
-    
+
     if (!poll_info)
         return -1;
     if (!poll_info)
         return -1;
-    
+
     ret = poll(poll_info, count, -1);
     if (ret < 0)
     {
     ret = poll(poll_info, count, -1);
     if (ret < 0)
     {
index e1e650b..0a75894 100644 (file)
@@ -1197,6 +1197,7 @@ BOOL WINAPI WinHttpSendRequest( HINTERNET hrequest, LPCWSTR headers, DWORD heade
     return ret;
 }
 
     return ret;
 }
 
+#undef ARRAYSIZE
 #define ARRAYSIZE(array) (sizeof(array) / sizeof((array)[0]))
 
 static const WCHAR basicW[]     = {'B','a','s','i','c',0};
 #define ARRAYSIZE(array) (sizeof(array) / sizeof((array)[0]))
 
 static const WCHAR basicW[]     = {'B','a','s','i','c',0};
index e287abd..714c4a6 100644 (file)
@@ -123,6 +123,7 @@ static const WCHAR emptyW[] = {0};
 
 #define COLLECT_TIME 60000
 
 
 #define COLLECT_TIME 60000
 
+#undef ARRAYSIZE
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 struct HttpAuthInfo
 #define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
 
 struct HttpAuthInfo
@@ -1299,7 +1300,7 @@ BOOL WINAPI HttpAddRequestHeadersW(HINTERNET hHttpRequest,
 
     TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_wn(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier);
 
 
     TRACE("%p, %s, %i, %i\n", hHttpRequest, debugstr_wn(lpszHeader, dwHeaderLength), dwHeaderLength, dwModifier);
 
-    if (!lpszHeader) 
+    if (!lpszHeader)
       return TRUE;
 
     request = (http_request_t*) get_handle_object( hHttpRequest );
       return TRUE;
 
     request = (http_request_t*) get_handle_object( hHttpRequest );
@@ -3841,13 +3842,13 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel,
                info_mod &= ~ modifier_flags[i].val;
            }
        }
                info_mod &= ~ modifier_flags[i].val;
            }
        }
-       
+
        if (info_mod) {
            TRACE(" Unknown (%08x)", info_mod);
        }
        TRACE("\n");
     }
        if (info_mod) {
            TRACE(" Unknown (%08x)", info_mod);
        }
        TRACE("\n");
     }
-    
+
     request = (http_request_t*) get_handle_object( hHttpRequest );
     if (NULL == request ||  request->hdr.htype != WH_HHTTPREQ)
     {
     request = (http_request_t*) get_handle_object( hHttpRequest );
     if (NULL == request ||  request->hdr.htype != WH_HHTTPREQ)
     {
@@ -4943,7 +4944,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
         else
             requestString = build_request_header(request, request->verb, request->path, request->version, TRUE);
 
         else
             requestString = build_request_header(request, request->verb, request->path, request->version, TRUE);
 
+
         TRACE("Request header -> %s\n", debugstr_w(requestString) );
 
         res = open_http_connection(request, &reusing_connection);
         TRACE("Request header -> %s\n", debugstr_w(requestString) );
 
         res = open_http_connection(request, &reusing_connection);
@@ -4991,7 +4992,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
 
             INTERNET_SendCallback(&request->hdr, request->hdr.dwContext,
                                 INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0);
 
             INTERNET_SendCallback(&request->hdr, request->hdr.dwContext,
                                 INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0);
-    
+
             if (HTTP_GetResponseHeaders(request, &responseLen))
             {
                 http_release_netconn(request, FALSE);
             if (HTTP_GetResponseHeaders(request, &responseLen))
             {
                 http_release_netconn(request, FALSE);
@@ -6038,7 +6039,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
     /* REPLACE wins out over ADD */
     if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE)
         dwModifier &= ~HTTP_ADDHDR_FLAG_ADD;
     /* REPLACE wins out over ADD */
     if (dwModifier & HTTP_ADDHDR_FLAG_REPLACE)
         dwModifier &= ~HTTP_ADDHDR_FLAG_ADD;
-    
+
     if (dwModifier & HTTP_ADDHDR_FLAG_ADD)
         index = -1;
     else
     if (dwModifier & HTTP_ADDHDR_FLAG_ADD)
         index = -1;
     else
index d713c81..bd553a4 100644 (file)
@@ -91,95 +91,96 @@ extern "C" {
 
 /* Helper macro to enable gcc's extension.  */
 #ifndef __GNU_EXTENSION
 
 /* Helper macro to enable gcc's extension.  */
 #ifndef __GNU_EXTENSION
-#ifdef __GNUC__
-#define __GNU_EXTENSION __extension__
-#else
-#define __GNU_EXTENSION
-#endif
+ #ifdef __GNUC__
+  #define __GNU_EXTENSION __extension__
+ #else
+  #define __GNU_EXTENSION
+ #endif
 #endif
 
 #ifndef DUMMYUNIONNAME
 #endif
 
 #ifndef DUMMYUNIONNAME
-#if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS)
-#define _ANONYMOUS_UNION
-#define _UNION_NAME(x) x
-#define DUMMYUNIONNAME  u
-#define DUMMYUNIONNAME1 u1
-#define DUMMYUNIONNAME2 u2
-#define DUMMYUNIONNAME3 u3
-#define DUMMYUNIONNAME4 u4
-#define DUMMYUNIONNAME5 u5
-#define DUMMYUNIONNAME6 u6
-#define DUMMYUNIONNAME7 u7
-#define DUMMYUNIONNAME8 u8
-#define DUMMYUNIONNAME9  u9
-#else
-#define _ANONYMOUS_UNION __GNU_EXTENSION
-#define _UNION_NAME(x)
-#define DUMMYUNIONNAME
-#define DUMMYUNIONNAME1
-#define DUMMYUNIONNAME2
-#define DUMMYUNIONNAME3
-#define DUMMYUNIONNAME4
-#define DUMMYUNIONNAME5
-#define DUMMYUNIONNAME6
-#define DUMMYUNIONNAME7
-#define DUMMYUNIONNAME8
-#define DUMMYUNIONNAME9
-#endif /* NONAMELESSUNION */
+ #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS)
+  #define _ANONYMOUS_UNION
+  #define _UNION_NAME(x) x
+  #define DUMMYUNIONNAME  u
+  #define DUMMYUNIONNAME1 u1
+  #define DUMMYUNIONNAME2 u2
+  #define DUMMYUNIONNAME3 u3
+  #define DUMMYUNIONNAME4 u4
+  #define DUMMYUNIONNAME5 u5
+  #define DUMMYUNIONNAME6 u6
+  #define DUMMYUNIONNAME7 u7
+  #define DUMMYUNIONNAME8 u8
+  #define DUMMYUNIONNAME9  u9
+ #else
+  #define _ANONYMOUS_UNION __GNU_EXTENSION
+  #define _UNION_NAME(x)
+  #define DUMMYUNIONNAME
+  #define DUMMYUNIONNAME1
+  #define DUMMYUNIONNAME2
+  #define DUMMYUNIONNAME3
+  #define DUMMYUNIONNAME4
+  #define DUMMYUNIONNAME5
+  #define DUMMYUNIONNAME6
+  #define DUMMYUNIONNAME7
+  #define DUMMYUNIONNAME8
+  #define DUMMYUNIONNAME9
+ #endif /* NONAMELESSUNION */
 #endif /* !DUMMYUNIONNAME */
 
 #ifndef DUMMYSTRUCTNAME
 #endif /* !DUMMYUNIONNAME */
 
 #ifndef DUMMYSTRUCTNAME
-#if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS)
-#define _ANONYMOUS_STRUCT
-#define _STRUCT_NAME(x) x
-#define DUMMYSTRUCTNAME s
-#define DUMMYSTRUCTNAME1 s1
-#define DUMMYSTRUCTNAME2 s2
-#define DUMMYSTRUCTNAME3 s3
-#define DUMMYSTRUCTNAME4 s4
-#define DUMMYSTRUCTNAME5 s5
-#else
-#define _ANONYMOUS_STRUCT __GNU_EXTENSION
-#define _STRUCT_NAME(x)
-#define DUMMYSTRUCTNAME
-#define DUMMYSTRUCTNAME1
-#define DUMMYSTRUCTNAME2
-#define DUMMYSTRUCTNAME3
-#define DUMMYSTRUCTNAME4
-#define DUMMYSTRUCTNAME5
-#endif /* NONAMELESSUNION */
+ #if defined(NONAMELESSUNION)// || !defined(_MSC_EXTENSIONS)
+  #define _ANONYMOUS_STRUCT
+  #define _STRUCT_NAME(x) x
+  #define DUMMYSTRUCTNAME s
+  #define DUMMYSTRUCTNAME1 s1
+  #define DUMMYSTRUCTNAME2 s2
+  #define DUMMYSTRUCTNAME3 s3
+  #define DUMMYSTRUCTNAME4 s4
+  #define DUMMYSTRUCTNAME5 s5
+ #else
+  #define _ANONYMOUS_STRUCT __GNU_EXTENSION
+  #define _STRUCT_NAME(x)
+  #define DUMMYSTRUCTNAME
+  #define DUMMYSTRUCTNAME1
+  #define DUMMYSTRUCTNAME2
+  #define DUMMYSTRUCTNAME3
+  #define DUMMYSTRUCTNAME4
+  #define DUMMYSTRUCTNAME5
+ #endif /* NONAMELESSUNION */
 #endif /* DUMMYSTRUCTNAME */
 
 #if defined(STRICT_GS_ENABLED)
 #endif /* DUMMYSTRUCTNAME */
 
 #if defined(STRICT_GS_ENABLED)
-#pragma strict_gs_check(push, on)
+ #pragma strict_gs_check(push, on)
 #endif
 
 #if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM)
 #endif
 
 #if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM)
-#define ALIGNMENT_MACHINE
-#define UNALIGNED __unaligned
-#if defined(_WIN64)
-#define UNALIGNED64 __unaligned
-#else
-#define UNALIGNED64
-#endif
+ #define ALIGNMENT_MACHINE
+ #define UNALIGNED __unaligned
+ #if defined(_WIN64)
+  #define UNALIGNED64 __unaligned
+ #else
+  #define UNALIGNED64
+ #endif
 #else
 #else
-#undef ALIGNMENT_MACHINE
-#define UNALIGNED
-#define UNALIGNED64
+ #undef ALIGNMENT_MACHINE
+ #define UNALIGNED
+ #define UNALIGNED64
 #endif
 
 #if defined(_WIN64) || defined(_M_ALPHA)
 #endif
 
 #if defined(_WIN64) || defined(_M_ALPHA)
-#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG)
-#define MEMORY_ALLOCATION_ALIGNMENT 16
+ #define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG)
+ #define MEMORY_ALLOCATION_ALIGNMENT 16
 #else
 #else
-#define MAX_NATURAL_ALIGNMENT sizeof(ULONG)
-#define MEMORY_ALLOCATION_ALIGNMENT 8
+ #define MAX_NATURAL_ALIGNMENT sizeof(ULONG)
+ #define MEMORY_ALLOCATION_ALIGNMENT 8
 #endif
 
 #endif
 
-#if defined(_M_MRX000) && !(defined(MIDL_PASS) || defined(RC_INVOKED)) && defined(ENABLE_RESTRICTED)
-#define RESTRICTED_POINTER __restrict
+/* C99 restrict support */
+#if defined(ENABLE_RESTRICTED) && defined(_M_MRX000) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
+ #define RESTRICTED_POINTER __restrict
 #else
 #else
-#define RESTRICTED_POINTER
+ #define RESTRICTED_POINTER
 #endif
 
 #define ARGUMENT_PRESENT(ArgumentPointer) \
 #endif
 
 #define ARGUMENT_PRESENT(ArgumentPointer) \
@@ -187,66 +188,66 @@ extern "C" {
 
 /* Returns the base address of a structure from a structure member */
 #ifndef CONTAINING_RECORD
 
 /* Returns the base address of a structure from a structure member */
 #ifndef CONTAINING_RECORD
-#define CONTAINING_RECORD(address, type, field) \
-  ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))
+ #define CONTAINING_RECORD(address, type, field) \
+   ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))
 #endif
 
 /* Returns the byte offset of the specified structure's member */
 #ifndef __GNUC__
 #endif
 
 /* Returns the byte offset of the specified structure's member */
 #ifndef __GNUC__
-#define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
+ #define FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
 #else
 #else
-#define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field))
+ #define FIELD_OFFSET(Type, Field) ((LONG)__builtin_offsetof(Type, Field))
 #endif
 
 /* Returns the type's alignment */
 #if defined(_MSC_VER)
 #endif
 
 /* Returns the type's alignment */
 #if defined(_MSC_VER)
-#define TYPE_ALIGNMENT(t) __alignof(t)
+ #define TYPE_ALIGNMENT(t) __alignof(t)
 #else
 #else
-#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
+ #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
 #endif
 
 #if defined(_AMD64_) || defined(_X86_)
 #endif
 
 #if defined(_AMD64_) || defined(_X86_)
-#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG)
+ #define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG)
 #elif defined(_IA64_) || defined(_ARM_)
 #elif defined(_IA64_) || defined(_ARM_)
-#define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG))
+ #define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG))
 #else
 #else
-#error "unknown architecture"
+ #error "unknown architecture"
 #endif
 
 #if defined(_WIN64)
 #endif
 
 #if defined(_WIN64)
-#define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(ULONG)
+ #define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(ULONG)
 #endif
 
 #ifdef __cplusplus
 #endif
 
 #ifdef __cplusplus
-#define EXTERN_C extern "C"
+ #define EXTERN_C extern "C"
 #else
 #else
-#define EXTERN_C extern
+ #define EXTERN_C extern
 #endif
 
 /* Calling Conventions */
 #if defined(_MANAGED)
 #endif
 
 /* Calling Conventions */
 #if defined(_MANAGED)
-#define FASTCALL __stdcall
+ #define FASTCALL __stdcall
 #elif defined(_M_IX86)
 #elif defined(_M_IX86)
-#define FASTCALL __fastcall
+ #define FASTCALL __fastcall
 #else
 #else
-#define FASTCALL
+ #define FASTCALL
 #endif
 
 #define NTAPI __stdcall
 
 #ifndef STDMETHODCALLTYPE
 #endif
 
 #define NTAPI __stdcall
 
 #ifndef STDMETHODCALLTYPE
-#define STDMETHODCALLTYPE  __stdcall
-#define STDMETHODVCALLTYPE __cdecl
-#define STDAPICALLTYPE     __stdcall
-#define STDAPIVCALLTYPE    __cdecl
-#define STDAPI             EXTERN_C HRESULT STDAPICALLTYPE
-#define STDAPI_(t)         EXTERN_C t STDAPICALLTYPE
-#define STDMETHODIMP       HRESULT STDMETHODCALLTYPE
-#define STDMETHODIMP_(t)   t STDMETHODCALLTYPE
-#define STDAPIV            EXTERN_C HRESULT STDAPIVCALLTYPE
-#define STDAPIV_(t)        EXTERN_C t STDAPIVCALLTYPE
-#define STDMETHODIMPV      HRESULT STDMETHODVCALLTYPE
-#define STDMETHODIMPV_(t)  t STDMETHODVCALLTYPE
+ #define STDMETHODCALLTYPE  __stdcall
+ #define STDMETHODVCALLTYPE __cdecl
+ #define STDAPICALLTYPE     __stdcall
+ #define STDAPIVCALLTYPE    __cdecl
+ #define STDAPI             EXTERN_C HRESULT STDAPICALLTYPE
+ #define STDAPI_(t)         EXTERN_C t STDAPICALLTYPE
+ #define STDMETHODIMP       HRESULT STDMETHODCALLTYPE
+ #define STDMETHODIMP_(t)   t STDMETHODCALLTYPE
+ #define STDAPIV            EXTERN_C HRESULT STDAPIVCALLTYPE
+ #define STDAPIV_(t)        EXTERN_C t STDAPIVCALLTYPE
+ #define STDMETHODIMPV      HRESULT STDMETHODVCALLTYPE
+ #define STDMETHODIMPV_(t)  t STDMETHODVCALLTYPE
 #endif /* !STDMETHODCALLTYPE */
 
 #define STDOVERRIDEMETHODIMP      __override STDMETHODIMP
 #endif /* !STDMETHODCALLTYPE */
 
 #define STDOVERRIDEMETHODIMP      __override STDMETHODIMP
@@ -258,7 +259,6 @@ extern "C" {
 #define IFACEMETHODIMPV           __override STDMETHODIMPV
 #define IFACEMETHODIMPV_(t)       __override STDMETHODIMPV_(t)
 
 #define IFACEMETHODIMPV           __override STDMETHODIMPV
 #define IFACEMETHODIMPV_(t)       __override STDMETHODIMPV_(t)
 
-
 /* Import and Export Specifiers */
 
 /* Done the same way as in windef.h for now */
 /* Import and Export Specifiers */
 
 /* Done the same way as in windef.h for now */
@@ -266,138 +266,147 @@ extern "C" {
 #define DECLSPEC_NORETURN __declspec(noreturn)
 
 #ifndef DECLSPEC_ADDRSAFE
 #define DECLSPEC_NORETURN __declspec(noreturn)
 
 #ifndef DECLSPEC_ADDRSAFE
-#if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64))
-#define DECLSPEC_ADDRSAFE  __declspec(address_safe)
-#else
-#define DECLSPEC_ADDRSAFE
-#endif
+ #if defined(_MSC_VER) && (defined(_M_ALPHA) || defined(_M_AXP64))
+  #define DECLSPEC_ADDRSAFE __declspec(address_safe)
+ #else
+  #define DECLSPEC_ADDRSAFE
+ #endif
 #endif /* DECLSPEC_ADDRSAFE */
 
 #ifndef DECLSPEC_NOTHROW
 #endif /* DECLSPEC_ADDRSAFE */
 
 #ifndef DECLSPEC_NOTHROW
-#if !defined(MIDL_PASS)
-#define DECLSPEC_NOTHROW __declspec(nothrow)
-#else
-#define DECLSPEC_NOTHROW
-#endif
+ #if !defined(MIDL_PASS)
+  #define DECLSPEC_NOTHROW __declspec(nothrow)
+ #else
+  #define DECLSPEC_NOTHROW
+ #endif
 #endif
 
 #ifndef NOP_FUNCTION
 #endif
 
 #ifndef NOP_FUNCTION
-#if defined(_MSC_VER)
-#define NOP_FUNCTION __noop
-#else
-#define NOP_FUNCTION (void)0
-#endif
+ #if defined(_MSC_VER)
+  #define NOP_FUNCTION __noop
+ #else
+  #define NOP_FUNCTION (void)0
+ #endif
 #endif
 
 #if !defined(_NTSYSTEM_)
 #endif
 
 #if !defined(_NTSYSTEM_)
-#define NTSYSAPI     DECLSPEC_IMPORT
-#define NTSYSCALLAPI DECLSPEC_IMPORT
+ #define NTSYSAPI     DECLSPEC_IMPORT
+ #define NTSYSCALLAPI DECLSPEC_IMPORT
 #else
 #else
-#define NTSYSAPI
-#if defined(_NTDLLBUILD_)
-#define NTSYSCALLAPI
-#else
-#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
-#endif
+ #define NTSYSAPI
+ #if defined(_NTDLLBUILD_)
+  #define NTSYSCALLAPI
+ #else
+  #define NTSYSCALLAPI DECLSPEC_ADDRSAFE
+ #endif
 #endif
 
 /* Inlines */
 #ifndef FORCEINLINE
 #endif
 
 /* Inlines */
 #ifndef FORCEINLINE
-#if defined(_MSC_VER)
-#define FORCEINLINE __forceinline
-#elif ( __MINGW_GNUC_PREREQ(4, 3)  &&  __STDC_VERSION__ >= 199901L)
-# define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__))
-#else
-# define FORCEINLINE extern __inline__ __attribute__((__always_inline__))
-#endif
+# if defined(_MSC_VER)
+#  define FORCEINLINE __forceinline
+# elif ( __MINGW_GNUC_PREREQ(4, 3)  &&  __STDC_VERSION__ >= 199901L)
+#  define FORCEINLINE extern inline __attribute__((__always_inline__,__gnu_inline__))
+# else
+#  define FORCEINLINE extern __inline__ __attribute__((__always_inline__))
+# endif
 #endif /* FORCEINLINE */
 
 #ifndef DECLSPEC_NOINLINE
 #endif /* FORCEINLINE */
 
 #ifndef DECLSPEC_NOINLINE
-#if (_MSC_VER >= 1300)
-#define DECLSPEC_NOINLINE  __declspec(noinline)
-#elif defined(__GNUC__)
-#define DECLSPEC_NOINLINE __attribute__((noinline))
-#else
-#define DECLSPEC_NOINLINE
-#endif
+# if (_MSC_VER >= 1300)
+#  define DECLSPEC_NOINLINE  __declspec(noinline)
+# elif defined(__GNUC__)
+#  define DECLSPEC_NOINLINE __attribute__((noinline))
+# else
+#  define DECLSPEC_NOINLINE
+# endif
 #endif /* DECLSPEC_NOINLINE */
 
 #if !defined(_M_CEE_PURE)
 #endif /* DECLSPEC_NOINLINE */
 
 #if !defined(_M_CEE_PURE)
-#define NTAPI_INLINE NTAPI
+# define NTAPI_INLINE NTAPI
 #else
 #else
-#define NTAPI_INLINE
-#endif
-
-/* Use to specify structure alignment */
+# define NTAPI_INLINE
+#endif
+
+/* Use to specify structure alignment. Note: VS and GCC behave slightly
+   different. Therefore it is important to stick to the following rules:
+   - If you want a struct to be aligned, put DECLSPEC_ALIGN after "struct":
+     "typedef struct DECLSPEC_ALIGN(16) _FOO { ... } FOO, *PFOO;"
+     _alignof(PFOO) is sizeof(void*) here as usual.
+   - If you don't want the struct, but only the typedef to be aligned,
+     use an extra typedef.
+     struct _BAR { ... };
+     typedef DECLSPEC_ALIGN(16) struct _BAR BAR, *ALIGNEDPBAR;
+     _alignof(ALIGNEDPBAR) is 16 now! */
 #ifndef DECLSPEC_ALIGN
 #ifndef DECLSPEC_ALIGN
-#if defined(_MSC_VER) && !defined(MIDL_PASS)
-#define DECLSPEC_ALIGN(x) __declspec(align(x))
-#elif defined(__GNUC__)
-#define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__(x)))
-#else
-#define DECLSPEC_ALIGN(x)
-#endif
+# if defined(_MSC_VER) && !defined(MIDL_PASS)
+#  define DECLSPEC_ALIGN(x) __declspec(align(x))
+# elif defined(__GNUC__)
+#  define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__(x)))
+# else
+#  define DECLSPEC_ALIGN(x)
+# endif
 #endif /* DECLSPEC_ALIGN */
 
 #ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
 #endif /* DECLSPEC_ALIGN */
 
 #ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
-#if defined(_AMD64_) || defined(_X86_)
-#define SYSTEM_CACHE_ALIGNMENT_SIZE 64
-#else
-#define SYSTEM_CACHE_ALIGNMENT_SIZE 128
-#endif
+# if defined(_AMD64_) || defined(_X86_)
+#  define SYSTEM_CACHE_ALIGNMENT_SIZE 64
+# else
+#  define SYSTEM_CACHE_ALIGNMENT_SIZE 128
+# endif
 #endif
 
 #ifndef DECLSPEC_CACHEALIGN
 #endif
 
 #ifndef DECLSPEC_CACHEALIGN
-#define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE)
+# define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE)
 #endif
 
 #ifndef DECLSPEC_UUID
 #endif
 
 #ifndef DECLSPEC_UUID
-#if defined(_MSC_VER) && defined(__cplusplus)
-#define DECLSPEC_UUID(x) __declspec(uuid(x))
-#else
-#define DECLSPEC_UUID(x)
-#endif
+# if defined(_MSC_VER) && defined(__cplusplus)
+#  define DECLSPEC_UUID(x) __declspec(uuid(x))
+# else
+#  define DECLSPEC_UUID(x)
+# endif
 #endif
 
 #ifndef DECLSPEC_NOVTABLE
 #endif
 
 #ifndef DECLSPEC_NOVTABLE
-#if defined(_MSC_VER) && defined(__cplusplus)
-#define DECLSPEC_NOVTABLE __declspec(novtable)
-#else
-#define DECLSPEC_NOVTABLE
-#endif
+# if defined(_MSC_VER) && defined(__cplusplus)
+#  define DECLSPEC_NOVTABLE __declspec(novtable)
+# else
+#  define DECLSPEC_NOVTABLE
+# endif
 #endif
 
 #ifndef DECLSPEC_SELECTANY
 #endif
 
 #ifndef DECLSPEC_SELECTANY
-#if defined(_MSC_VER) || defined(__GNUC__)
-#define DECLSPEC_SELECTANY __declspec(selectany)
-#else
-#define DECLSPEC_SELECTANY
-#endif
+# if defined(_MSC_VER) || defined(__GNUC__)
+#  define DECLSPEC_SELECTANY __declspec(selectany)
+# else
+#  define DECLSPEC_SELECTANY
+# endif
 #endif
 
 #ifndef DECLSPEC_DEPRECATED
 #endif
 
 #ifndef DECLSPEC_DEPRECATED
-#if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS)
-#define DECLSPEC_DEPRECATED __declspec(deprecated)
-#define DEPRECATE_SUPPORTED
-#else
-#define DECLSPEC_DEPRECATED
-#undef  DEPRECATE_SUPPORTED
-#endif
+# if (defined(_MSC_VER) || defined(__GNUC__)) && !defined(MIDL_PASS)
+#  define DECLSPEC_DEPRECATED __declspec(deprecated)
+#  define DEPRECATE_SUPPORTED
+# else
+#  define DECLSPEC_DEPRECATED
+#  undef  DEPRECATE_SUPPORTED
+# endif
 #endif
 
 #ifdef DEPRECATE_DDK_FUNCTIONS
 #endif
 
 #ifdef DEPRECATE_DDK_FUNCTIONS
-#ifdef _NTDDK_
-#define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED
-#ifdef DEPRECATE_SUPPORTED
-#define PRAGMA_DEPRECATED_DDK 1
-#endif
-#else
-#define DECLSPEC_DEPRECATED_DDK
-#define PRAGMA_DEPRECATED_DDK 1
-#endif
+# ifdef _NTDDK_
+#  define DECLSPEC_DEPRECATED_DDK DECLSPEC_DEPRECATED
+#  ifdef DEPRECATE_SUPPORTED
+#   define PRAGMA_DEPRECATED_DDK 1
+#  endif
+# else
+#  define DECLSPEC_DEPRECATED_DDK
+#  define PRAGMA_DEPRECATED_DDK 1
+# endif
 #else
 #else
-#define DECLSPEC_DEPRECATED_DDK
-#define PRAGMA_DEPRECATED_DDK 0
+# define DECLSPEC_DEPRECATED_DDK
+# define PRAGMA_DEPRECATED_DDK 0
 #endif
 
 /* Use to silence unused variable warnings when it is intentional */
 #endif
 
 /* Use to silence unused variable warnings when it is intentional */
@@ -408,15 +417,12 @@ extern "C" {
 
 /* min/max helper macros */
 #ifndef NOMINMAX
 
 /* min/max helper macros */
 #ifndef NOMINMAX
-
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
+# ifndef min
+#  define min(a,b) (((a) < (b)) ? (a) : (b))
+# endif
+# ifndef max
+#  define max(a,b) (((a) > (b)) ? (a) : (b))
+# endif
 #endif /* NOMINMAX */
 
 /* Tell windef.h that we have defined some basic types */
 #endif /* NOMINMAX */
 
 /* Tell windef.h that we have defined some basic types */
@@ -429,21 +435,27 @@ typedef void * POINTER_64 PVOID64;
 /* Handle Type */
 typedef void *HANDLE, **PHANDLE;;
 #ifdef STRICT
 /* Handle Type */
 typedef void *HANDLE, **PHANDLE;;
 #ifdef STRICT
-#define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n
+# define DECLARE_HANDLE(n) typedef struct n##__{int unused;} *n
 #else
 #else
-#define DECLARE_HANDLE(n) typedef HANDLE n
+# define DECLARE_HANDLE(n) typedef HANDLE n
 #endif
 
 /* Upper-Case Versions of Some Standard C Types */
 #ifndef VOID
 #endif
 
 /* Upper-Case Versions of Some Standard C Types */
 #ifndef VOID
-#define VOID void
+# define VOID void
 typedef char CHAR;
 typedef short SHORT;
 typedef char CHAR;
 typedef short SHORT;
+
+# if defined(__ROS_LONG64__) && !defined(_M_AMD64)
+typedef int LONG;
+# else
 typedef long LONG;
 typedef long LONG;
-#if !defined(MIDL_PASS)
+# endif
+
+# if !defined(MIDL_PASS)
 typedef int INT;
 typedef int INT;
-#endif
-#endif
+# endif /* !MIDL_PASS */
+#endif /* VOID */
 
 /* Avoid redefinition in windef.h */
 #define BASETYPES
 
 /* Avoid redefinition in windef.h */
 #define BASETYPES
@@ -474,7 +486,7 @@ typedef _Return_type_success_(return >= 0) LONG NTSTATUS, *PNTSTATUS;;
 typedef signed char SCHAR, *PSCHAR;
 
 #ifndef _HRESULT_DEFINED
 typedef signed char SCHAR, *PSCHAR;
 
 #ifndef _HRESULT_DEFINED
-#define _HRESULT_DEFINED
+# define _HRESULT_DEFINED
 typedef _Return_type_success_(return >= 0) LONG HRESULT;
 #endif
 
 typedef _Return_type_success_(return >= 0) LONG HRESULT;
 #endif
 
@@ -533,18 +545,19 @@ typedef unsigned long UCSCHAR, *PUCSCHAR, *PUCSSTR;
 typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR;
 typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR;
 typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR;
 typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR;
 typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR;
 typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR;
-#define UCSCHAR_INVALID_CHARACTER (0xffffffff)
-#define MIN_UCSCHAR (0)
-#define MAX_UCSCHAR (0x0010FFFF)
+# define UCSCHAR_INVALID_CHARACTER (0xffffffff)
+# define MIN_UCSCHAR (0)
+# define MAX_UCSCHAR (0x0010FFFF)
 #endif /* _WIN32_WINNT >= 0x0600 */
 
 #ifdef  UNICODE
 
 #endif /* _WIN32_WINNT >= 0x0600 */
 
 #ifdef  UNICODE
 
-#ifndef _TCHAR_DEFINED
+# ifndef _TCHAR_DEFINED
 typedef WCHAR TCHAR, *PTCHAR;
 typedef WCHAR TUCHAR, *PTUCHAR;
 typedef WCHAR TCHAR, *PTCHAR;
 typedef WCHAR TUCHAR, *PTUCHAR;
-#define _TCHAR_DEFINED
-#endif /* !_TCHAR_DEFINED */
+#  define _TCHAR_DEFINED
+# endif /* !_TCHAR_DEFINED */
+
 typedef LPWCH LPTCH, PTCH;
 typedef LPCWCH LPCTCH, PCTCH;
 typedef LPWSTR PTSTR, LPTSTR;
 typedef LPWCH LPTCH, PTCH;
 typedef LPCWCH LPCTCH, PCTCH;
 typedef LPWSTR PTSTR, LPTSTR;
@@ -561,15 +574,15 @@ typedef PNZWCH PNZTCH;
 typedef PCNZWCH PCNZTCH;
 typedef PUNZWCH PUNZTCH;
 typedef PCUNZWCH PCUNZTCH;
 typedef PCNZWCH PCNZTCH;
 typedef PUNZWCH PUNZTCH;
 typedef PCUNZWCH PCUNZTCH;
-#define __TEXT(quote) L##quote
+# define __TEXT(quote) L##quote
 
 #else /* UNICODE */
 
 
 #else /* UNICODE */
 
-#ifndef _TCHAR_DEFINED
+# ifndef _TCHAR_DEFINED
 typedef char TCHAR, *PTCHAR;
 typedef unsigned char TUCHAR, *PTUCHAR;
 typedef char TCHAR, *PTCHAR;
 typedef unsigned char TUCHAR, *PTUCHAR;
-#define _TCHAR_DEFINED
-#endif /* !_TCHAR_DEFINED */
+#  define _TCHAR_DEFINED
+# endif /* !_TCHAR_DEFINED */
 typedef LPCH LPTCH, PTCH;
 typedef LPCCH LPCTCH, PCTCH;
 typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
 typedef LPCH LPTCH, PTCH;
 typedef LPCCH LPCTCH, PCTCH;
 typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
@@ -579,10 +592,11 @@ typedef PCZZSTR PCZZTSTR, PCUZZTSTR;
 typedef PZPSTR PZPTSTR;
 typedef PNZCH PNZTCH, PUNZTCH;
 typedef PCNZCH PCNZTCH, PCUNZTCH;
 typedef PZPSTR PZPTSTR;
 typedef PNZCH PNZTCH, PUNZTCH;
 typedef PCNZCH PCNZTCH, PCUNZTCH;
-#define __TEXT(quote) quote         // r_winnt
+#define __TEXT(quote) quote
+
+#endif /* UNICODE */
 
 
-#endif /* UNICODE */                // r_winnt
-#define TEXT(quote) __TEXT(quote)   // r_winnt
+#define TEXT(quote) __TEXT(quote)
 
 /* Cardinal Data Types */
 typedef char CCHAR;
 
 /* Cardinal Data Types */
 typedef char CCHAR;
@@ -591,11 +605,11 @@ typedef short CSHORT, *PCSHORT;
 typedef ULONG CLONG, *PCLONG;
 
 /* NLS basics (Locale and Language Ids) */
 typedef ULONG CLONG, *PCLONG;
 
 /* NLS basics (Locale and Language Ids) */
-typedef unsigned long LCID, *PLCID;
-typedef unsigned short LANGID;
+typedef ULONG LCID, *PLCID;
+typedef USHORT LANGID;
 
 #ifndef __COMPARTMENT_ID_DEFINED__
 
 #ifndef __COMPARTMENT_ID_DEFINED__
-#define __COMPARTMENT_ID_DEFINED__
+# define __COMPARTMENT_ID_DEFINED__
 typedef enum
 {
     UNSPECIFIED_COMPARTMENT_ID = 0,
 typedef enum
 {
     UNSPECIFIED_COMPARTMENT_ID = 0,
@@ -603,6 +617,14 @@ typedef enum
 } COMPARTMENT_ID, *PCOMPARTMENT_ID;
 #endif /* __COMPARTMENT_ID_DEFINED__ */
 
 } COMPARTMENT_ID, *PCOMPARTMENT_ID;
 #endif /* __COMPARTMENT_ID_DEFINED__ */
 
+#ifndef __OBJECTID_DEFINED
+# define __OBJECTID_DEFINED
+typedef struct  _OBJECTID {
+    GUID Lineage;
+    ULONG Uniquifier;
+} OBJECTID;
+#endif
+
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable:4201)
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable:4201)
@@ -618,6 +640,16 @@ typedef struct _QUAD
     } DUMMYUNIONNAME;
 } QUAD, *PQUAD, UQUAD, *PUQUAD;
 
     } DUMMYUNIONNAME;
 } QUAD, *PQUAD, UQUAD, *PUQUAD;
 
+typedef struct
+#if defined(_M_IA64)
+DECLSPEC_ALIGN(16)
+#endif
+_FLOAT128 {
+    __int64 LowPart;
+    __int64 HighPart;
+} FLOAT128;
+typedef FLOAT128 *PFLOAT128;
+
 /* Large Integer Unions */
 #if defined(MIDL_PASS)
 typedef struct _LARGE_INTEGER {
 /* Large Integer Unions */
 #if defined(MIDL_PASS)
 typedef struct _LARGE_INTEGER {
@@ -668,6 +700,12 @@ typedef struct _LUID {
     LONG HighPart;
 } LUID, *PLUID;
 
     LONG HighPart;
 } LUID, *PLUID;
 
+#define APPLICATION_ERROR_MASK       0x20000000
+#define ERROR_SEVERITY_SUCCESS       0x00000000
+#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
+#define ERROR_SEVERITY_WARNING       0x80000000
+#define ERROR_SEVERITY_ERROR         0xC0000000
+
 /* Native API Return Value Macros */
 #define NT_SUCCESS(Status)              (((NTSTATUS)(Status)) >= 0)
 #define NT_INFORMATION(Status)          ((((ULONG)(Status)) >> 30) == 1)
 /* Native API Return Value Macros */
 #define NT_SUCCESS(Status)              (((NTSTATUS)(Status)) >= 0)
 #define NT_INFORMATION(Status)          ((((ULONG)(Status)) >> 30) == 1)
@@ -675,28 +713,6 @@ typedef struct _LUID {
 #define NT_ERROR(Status)                ((((ULONG)(Status)) >> 30) == 3)
 
 /* String Types */
 #define NT_ERROR(Status)                ((((ULONG)(Status)) >> 30) == 3)
 
 /* String Types */
-typedef struct _UNICODE_STRING {
-  USHORT Length;
-  USHORT MaximumLength;
-#ifdef MIDL_PASS
-  [size_is(MaximumLength / 2), length_is((Length) / 2)] PUSHORT Buffer;
-#else
-  _Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer;
-#endif
-} UNICODE_STRING, *PUNICODE_STRING;
-typedef const UNICODE_STRING* PCUNICODE_STRING;
-
-#define UNICODE_NULL ((WCHAR)0)
-#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
-#define UNICODE_STRING_MAX_CHARS (32767)
-
-typedef struct _CSTRING {
-  USHORT Length;
-  USHORT MaximumLength;
-  CONST CHAR *Buffer;
-} CSTRING, *PCSTRING;
-#define ANSI_NULL ((CHAR)0)
-
 typedef struct _STRING {
   USHORT Length;
   USHORT MaximumLength;
 typedef struct _STRING {
   USHORT Length;
   USHORT MaximumLength;
@@ -704,32 +720,86 @@ typedef struct _STRING {
   [size_is(MaximumLength), length_is(Length) ]
 #endif
   _Field_size_bytes_part_opt_(MaximumLength, Length) PCHAR Buffer;
   [size_is(MaximumLength), length_is(Length) ]
 #endif
   _Field_size_bytes_part_opt_(MaximumLength, Length) PCHAR Buffer;
-} STRING, *PSTRING;
+} STRING, *PSTRING,
+  ANSI_STRING, *PANSI_STRING,
+  OEM_STRING, *POEM_STRING;
 
 
-typedef STRING ANSI_STRING;
-typedef PSTRING PANSI_STRING;
-typedef STRING OEM_STRING;
-typedef PSTRING POEM_STRING;
 typedef CONST STRING* PCOEM_STRING;
 typedef STRING CANSI_STRING;
 typedef PSTRING PCANSI_STRING;
 
 typedef struct _STRING32 {
 typedef CONST STRING* PCOEM_STRING;
 typedef STRING CANSI_STRING;
 typedef PSTRING PCANSI_STRING;
 
 typedef struct _STRING32 {
-    USHORT   Length;
-    USHORT   MaximumLength;
-    ULONG  Buffer;
+  USHORT   Length;
+  USHORT   MaximumLength;
+  ULONG  Buffer;
 } STRING32, *PSTRING32,
   UNICODE_STRING32, *PUNICODE_STRING32,
   ANSI_STRING32, *PANSI_STRING32;
 
 typedef struct _STRING64 {
 } STRING32, *PSTRING32,
   UNICODE_STRING32, *PUNICODE_STRING32,
   ANSI_STRING32, *PANSI_STRING32;
 
 typedef struct _STRING64 {
-    USHORT   Length;
-    USHORT   MaximumLength;
-    ULONGLONG  Buffer;
+  USHORT   Length;
+  USHORT   MaximumLength;
+  ULONGLONG  Buffer;
 } STRING64, *PSTRING64,
   UNICODE_STRING64, *PUNICODE_STRING64,
   ANSI_STRING64, *PANSI_STRING64;
 
 } STRING64, *PSTRING64,
   UNICODE_STRING64, *PUNICODE_STRING64,
   ANSI_STRING64, *PANSI_STRING64;
 
+typedef struct _CSTRING {
+  USHORT Length;
+  USHORT MaximumLength;
+  CONST CHAR *Buffer;
+} CSTRING, *PCSTRING;
+
+typedef struct _UNICODE_STRING {
+  USHORT Length;
+  USHORT MaximumLength;
+#ifdef MIDL_PASS
+  [size_is(MaximumLength / 2), length_is((Length) / 2)] PUSHORT Buffer;
+#else
+  _Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer;
+#endif
+} UNICODE_STRING, *PUNICODE_STRING;
+typedef const UNICODE_STRING* PCUNICODE_STRING;
+
+typedef USHORT RTL_STRING_LENGTH_TYPE;
+
+#ifdef __cplusplus
+extern "C++" template<typename _Type> struct _RTL_remove_const_template;
+extern "C++" template<typename _Type> struct _RTL_remove_const_template<const _Type&> { typedef _Type type; };
+#define _RTL_CONSTANT_STRING_remove_const_macro(s) \
+    (const_cast<_RTL_remove_const_template<decltype((s)[0])>::type*>(s))
+extern "C++" template<class _Ty> struct _RTL_CONSTANT_STRING_type_check_template;
+extern "C++" template<class _Ty, int _Count>   struct _RTL_CONSTANT_STRING_type_check_template<const _Ty (&)[_Count]> { typedef char type; };
+#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template<decltype(s)>::type
+#else
+# define _RTL_CONSTANT_STRING_remove_const_macro(s) (s)
+char _RTL_CONSTANT_STRING_type_check(const void *s);
+#endif
+#define RTL_CONSTANT_STRING(s) { \
+    sizeof(s)-sizeof((s)[0]), \
+    sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
+    _RTL_CONSTANT_STRING_remove_const_macro(s) }
+
+#define DECLARE_UNICODE_STRING_SIZE(_var, _size) \
+  WCHAR _var ## _buffer[_size]; \
+  __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \
+  UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer } \
+  __pragma(warning(pop))
+
+#define DECLARE_CONST_UNICODE_STRING(_var, _string) \
+  const WCHAR _var##_buffer[] = _string; \
+  __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \
+  const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer } \
+  __pragma(warning(pop))
+
+#define DECLARE_GLOBAL_CONST_UNICODE_STRING(_var, _str) \
+  extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str)
+
+#define ANSI_NULL ((CHAR)0)
+#define UNICODE_NULL ((WCHAR)0)
+#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
+#define UNICODE_STRING_MAX_CHARS (32767)
+
 /* Object Attributes */
 typedef struct _OBJECT_ATTRIBUTES {
   ULONG Length;
 /* Object Attributes */
 typedef struct _OBJECT_ATTRIBUTES {
   ULONG Length;
@@ -873,24 +943,6 @@ typedef struct _GROUP_AFFINITY {
 #define RTL_FIELD_TYPE(type, field)    (((type*)0)->field)
 #define RTL_BITS_OF(sizeOfArg)         (sizeof(sizeOfArg) * 8)
 #define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field)))
 #define RTL_FIELD_TYPE(type, field)    (((type*)0)->field)
 #define RTL_BITS_OF(sizeOfArg)         (sizeof(sizeOfArg) * 8)
 #define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field)))
-
-#ifdef __cplusplus
-extern "C++" template<typename _Type> struct _RTL_remove_const_template;
-extern "C++" template<typename _Type> struct _RTL_remove_const_template<const _Type&> { typedef _Type type; };
-#define _RTL_CONSTANT_STRING_remove_const_macro(s) \
-    (const_cast<_RTL_remove_const_template<decltype((s)[0])>::type*>(s))
-extern "C++" template<class _Ty> struct _RTL_CONSTANT_STRING_type_check_template;
-extern "C++" template<class _Ty, int _Count>   struct _RTL_CONSTANT_STRING_type_check_template<const _Ty (&)[_Count]> { typedef char type; };
-#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template<decltype(s)>::type
-#else
-#define _RTL_CONSTANT_STRING_remove_const_macro(s) (s)
-char _RTL_CONSTANT_STRING_type_check(const void *s);
-#endif
-#define RTL_CONSTANT_STRING(s) { \
-    sizeof(s)-sizeof((s)[0]), \
-    sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
-    _RTL_CONSTANT_STRING_remove_const_macro(s) }
-
 #define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
 
 #define RTL_SIZEOF_THROUGH_FIELD(type, field) \
 #define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
 
 #define RTL_SIZEOF_THROUGH_FIELD(type, field) \
@@ -915,6 +967,7 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
 #else
 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
 #endif
 #else
 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
 #endif
+
 #define ARRAYSIZE(A)    RTL_NUMBER_OF_V2(A)
 #define _ARRAYSIZE(A)   RTL_NUMBER_OF_V1(A)
 
 #define ARRAYSIZE(A)    RTL_NUMBER_OF_V2(A)
 #define _ARRAYSIZE(A)   RTL_NUMBER_OF_V1(A)
 
@@ -927,9 +980,9 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
         : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2)))
 
 #if defined(__cplusplus)
         : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2)))
 
 #if defined(__cplusplus)
-#define RTL_CONST_CAST(type) const_cast<type>
+# define RTL_CONST_CAST(type) const_cast<type>
 #else
 #else
-#define RTL_CONST_CAST(type) (type)
+# define RTL_CONST_CAST(type) (type)
 #endif
 
 /* Type Limits */
 #endif
 
 /* Type Limits */
@@ -951,14 +1004,14 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
 
 #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE)
 /* Use native math */
 
 #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE)
 /* Use native math */
-#define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b))
-#define Int64ShraMod32(a,b) (((__int64)(a))>>(b))
-#define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b))
+# define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b))
+# define Int64ShraMod32(a,b) (((__int64)(a))>>(b))
+# define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b))
 #else
 /* Use intrinsics */
 #else
 /* Use intrinsics */
-#define Int64ShllMod32(a,b) __ll_lshift(a,b)
-#define Int64ShraMod32(a,b) __ll_rshift(a,b)
-#define Int64ShrlMod32(a,b) __ull_rshift(a,b)
+# define Int64ShllMod32(a,b) __ll_lshift(a,b)
+# define Int64ShraMod32(a,b) __ll_rshift(a,b)
+# define Int64ShrlMod32(a,b) __ull_rshift(a,b)
 #endif
 
 #define RotateLeft32 _rotl
 #endif
 
 #define RotateLeft32 _rotl
@@ -967,10 +1020,10 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
 #define RotateRight64 _rotr64
 
 #if defined(_M_AMD64)
 #define RotateRight64 _rotr64
 
 #if defined(_M_AMD64)
-#define RotateLeft8 _rotl8
-#define RotateLeft16 _rotl16
-#define RotateRight8 _rotr8
-#define RotateRight16 _rotr16
+# define RotateLeft8 _rotl8
+# define RotateLeft16 _rotl16
+# define RotateRight8 _rotr8
+# define RotateRight16 _rotr16
 #endif /* _M_AMD64 */
 
 /* C_ASSERT Definition */
 #endif /* _M_AMD64 */
 
 /* C_ASSERT Definition */
@@ -1104,7 +1157,7 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
 #define PRIMARYLANGID(lgid)    ((USHORT)(lgid) & 0x3ff)
 #define SUBLANGID(lgid)        ((USHORT)(lgid) >> 10)
 #define MAKELCID(lgid, srtid)  ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) |  \
 #define PRIMARYLANGID(lgid)    ((USHORT)(lgid) & 0x3ff)
 #define SUBLANGID(lgid)        ((USHORT)(lgid) >> 10)
 #define MAKELCID(lgid, srtid)  ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) |  \
-                                         ((ULONG)((USHORT)(lgid)))))
+                                          ((ULONG)((USHORT)(lgid)))))
 #define MAKESORTLCID(lgid, srtid, ver)                                        \
                                ((ULONG)((MAKELCID(lgid, srtid)) |             \
                                     (((ULONG)((USHORT)(ver))) << 20)))
 #define MAKESORTLCID(lgid, srtid, ver)                                        \
                                ((ULONG)((MAKELCID(lgid, srtid)) |             \
                                     (((ULONG)((USHORT)(ver))) << 20)))
@@ -1132,9 +1185,9 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
 #define LANG_BASQUE                               0x2d
 #define LANG_BELARUSIAN                           0x23
 #define LANG_BENGALI                              0x45
 #define LANG_BASQUE                               0x2d
 #define LANG_BELARUSIAN                           0x23
 #define LANG_BENGALI                              0x45
-#define LANG_BRETON                               0x7e
 #define LANG_BOSNIAN                              0x1a
 #define LANG_BOSNIAN_NEUTRAL                    0x781a
 #define LANG_BOSNIAN                              0x1a
 #define LANG_BOSNIAN_NEUTRAL                    0x781a
+#define LANG_BRETON                               0x7e
 #define LANG_BULGARIAN                            0x02
 #define LANG_CATALAN                              0x03
 #define LANG_CENTRAL_KURDISH                      0x92
 #define LANG_BULGARIAN                            0x02
 #define LANG_CATALAN                              0x03
 #define LANG_CENTRAL_KURDISH                      0x92
@@ -1521,8 +1574,8 @@ char _RTL_CONSTANT_STRING_type_check(const void *s);
 #define SORT_GEORGIAN_TRADITIONAL        0x0
 #define SORT_GEORGIAN_MODERN             0x1
 
 #define SORT_GEORGIAN_TRADITIONAL        0x0
 #define SORT_GEORGIAN_MODERN             0x1
 
-#define LANG_SYSTEM_DEFAULT       MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
-#define LANG_USER_DEFAULT         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
+#define LANG_SYSTEM_DEFAULT       MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT)
+#define LANG_USER_DEFAULT         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)
 
 #define LOCALE_SYSTEM_DEFAULT     MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
 #define LOCALE_USER_DEFAULT       MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)
 
 #define LOCALE_SYSTEM_DEFAULT     MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
 #define LOCALE_USER_DEFAULT       MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)
index ed71637..9c19ae5 100644 (file)
@@ -1379,7 +1379,7 @@ typedef enum {
 #define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA   0x01
 #define SUBLANG_TSWANA_SOUTH_AFRICA   0x01
 #define SUBLANG_SINDHI_AFGHANISTAN   0x02
 #define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA   0x01
 #define SUBLANG_TSWANA_SOUTH_AFRICA   0x01
 #define SUBLANG_SINDHI_AFGHANISTAN   0x02
-#define SUBLANG_SINDHI_PAKISTAN   0x01
+#define SUBLANG_SINDHI_PAKISTAN   0x02
 #define SUBLANG_SINHALESE_SRI_LANKA   0x01
 #define SUBLANG_SLOVAK_SLOVAKIA   0x01
 #define SUBLANG_SLOVENIAN_SLOVENIA   0x01
 #define SUBLANG_SINHALESE_SRI_LANKA   0x01
 #define SUBLANG_SLOVAK_SLOVAKIA   0x01
 #define SUBLANG_SLOVENIAN_SLOVENIA   0x01
@@ -1676,8 +1676,8 @@ typedef enum {
 #else
 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
 #endif
 #else
 #define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
 #endif
-//#define ARRAYSIZE(A)    RTL_NUMBER_OF_V2(A)
-//#define _ARRAYSIZE(A)   RTL_NUMBER_OF_V1(A)
+#define ARRAYSIZE(A)    RTL_NUMBER_OF_V2(A)
+#define _ARRAYSIZE(A)   RTL_NUMBER_OF_V1(A)
 
 #define RTL_FIELD_TYPE(type, field) (((type*)0)->field)
 #define RTL_NUMBER_OF_FIELD(type, field) (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field)))
 
 #define RTL_FIELD_TYPE(type, field) (((type*)0)->field)
 #define RTL_NUMBER_OF_FIELD(type, field) (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field)))
index e6854f1..0180304 100644 (file)
@@ -15,7 +15,7 @@
 
 /* FUNCTIONS *************************************************************/
 
 
 /* FUNCTIONS *************************************************************/
 
-PCCHAR
+PCCH
 Ext2StatusToString ( IN NTSTATUS Status )
 {
     switch (Status)
 Ext2StatusToString ( IN NTSTATUS Status )
 {
     switch (Status)
@@ -953,14 +953,14 @@ Ext2StatusToString ( IN NTSTATUS Status )
  *     Length      : Data Length to be read
  *     Buffer      : ...
  *
  *     Length      : Data Length to be read
  *     Buffer      : ...
  *
- * RETURNS: 
+ * RETURNS:
  *     Success: STATUS_SUCCESS
  *     Fail:  ...
  *
  *     Success: STATUS_SUCCESS
  *     Fail:  ...
  *
- * NOTES: 
+ * NOTES:
  *     Both Length and Offset should be SECTOR_SIZE aligned.
  */
  *     Both Length and Offset should be SECTOR_SIZE aligned.
  */
-NTSTATUS 
+NTSTATUS
 Ext2ReadDisk( PEXT2_FILESYS  Ext2Sys,
               ULONGLONG      Offset,
               ULONG          Length,
 Ext2ReadDisk( PEXT2_FILESYS  Ext2Sys,
               ULONGLONG      Offset,
               ULONG          Length,
@@ -1023,11 +1023,11 @@ Ext2ReadDisk( PEXT2_FILESYS  Ext2Sys,
             goto errorout;
         }
 
             goto errorout;
         }
 
-        RtlCopyMemory( Buffer, 
+        RtlCopyMemory( Buffer,
                        (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart),
                        Length );
     }
                        (PUCHAR)NonPagedBuffer + (ULONG)(Offset - Address.QuadPart),
                        Length );
     }
+
 errorout:
 
     if (NonPagedBuffer)
 errorout:
 
     if (NonPagedBuffer)
@@ -1047,11 +1047,11 @@ errorout:
  *     Length      : Data Length to be written
  *     Buffer      : Data to be written ...
  *
  *     Length      : Data Length to be written
  *     Buffer      : Data to be written ...
  *
- * RETURNS: 
+ * RETURNS:
  *     Success: STATUS_SUCCESS
  *     Fail:  ...
  *
  *     Success: STATUS_SUCCESS
  *     Fail:  ...
  *
- * NOTES: 
+ * NOTES:
  *     Both Length and Offset should be SECTOR_SIZE aligned.
  */
 
  *     Both Length and Offset should be SECTOR_SIZE aligned.
  */
 
@@ -1151,10 +1151,10 @@ errorout:
  * ARGUMENTS:
  *     VolumeHandle:    Volume handle.
  *
  * ARGUMENTS:
  *     VolumeHandle:    Volume handle.
  *
- * RETURNS: 
+ * RETURNS:
  *     Success or Fail
  *
  *     Success or Fail
  *
- * NOTES: 
+ * NOTES:
  *     N/A
  */
 
  *     N/A
  */
 
@@ -1200,10 +1200,10 @@ errorout:
  * ARGUMENTS:
  *     VolumeHandle:    Volume handle.
  *
  * ARGUMENTS:
  *     VolumeHandle:    Volume handle.
  *
- * RETURNS: 
+ * RETURNS:
  *     Success or Fail
  *
  *     Success or Fail
  *
- * NOTES: 
+ * NOTES:
  *     N/A
  */
 
  *     N/A
  */
 
index af24e2c..7882181 100644 (file)
@@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(message);
 
 #define SPY_MAX_MSGNUM   WM_USER
 #define SPY_INDENT_UNIT  4  /* 4 spaces */
 
 #define SPY_MAX_MSGNUM   WM_USER
 #define SPY_INDENT_UNIT  4  /* 4 spaces */
+#undef ARRAYSIZE
 #define ARRAYSIZE(a) ((sizeof(a) / sizeof((a)[0])))
 
 #define DEBUG_SPY 0
 #define ARRAYSIZE(a) ((sizeof(a) / sizeof((a)[0])))
 
 #define DEBUG_SPY 0
@@ -2095,7 +2096,7 @@ const char *SPY_GetClassLongOffsetName( INT offset )
 {
     INT index;
     if (offset < 0 && offset % 2 == 0 && ((index = -(offset + 8) / 2) <
 {
     INT index;
     if (offset < 0 && offset % 2 == 0 && ((index = -(offset + 8) / 2) <
-        sizeof(ClassLongOffsetNames) / sizeof(*ClassLongOffsetNames))) 
+        sizeof(ClassLongOffsetNames) / sizeof(*ClassLongOffsetNames)))
     {
         return ClassLongOffsetNames[index];
     }
     {
         return ClassLongOffsetNames[index];
     }
@@ -2680,4 +2681,4 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
         break;
     }
     SetLastError( save_error );
         break;
     }
     SetLastError( save_error );
-}
\ No newline at end of file
+}