Add unicode-mode-agnostic type-defs, make FASTCALL define widl-compat,
and some cleanups


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@6195 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h
index 2af57b3..3b0d856 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -235,18 +235,23 @@
   typedef void *PVOID;
   typedef void *PVOID64;
 
-#if defined(_M_IX86)
+#ifndef FASTCALL
+#if defined (__i386__) && !defined (__WIDL__)
 #define FASTCALL __fastcall
 #else
 #define FASTCALL
 #endif
+#endif /* FASTCALL */
+
 #define NTAPI __stdcall
+#define NTAPI_INLINE NTAPI
+
 #if !defined(_NTSYSTEM_)
 #define NTSYSAPI DECLSPEC_IMPORT
 #define NTSYSCALLAPI DECLSPEC_IMPORT
 #else
 #define NTSYSAPI
-#define NTSYSCALLAPI
+#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
 #endif
 
 #ifndef VOID
@@ -254,7 +259,11 @@
   typedef char CHAR;
   typedef short SHORT;
   typedef __LONG32 LONG;
+#if !defined (__WIDL__)
+  typedef int INT;
 #endif
+#endif
+
 #ifndef __WCHAR_DEFINED
 #define __WCHAR_DEFINED
   typedef wchar_t WCHAR;
@@ -308,7 +317,7 @@
   typedef CHAR *PNZCH;
   typedef CONST CHAR *PCNZCH;
 
-#if defined(UNICODE)
+#ifdef UNICODE
 #ifndef _TCHAR_DEFINED
 #define _TCHAR_DEFINED
   typedef WCHAR TCHAR, *PTCHAR;
@@ -321,6 +330,16 @@
   typedef LPUWSTR PUTSTR,LPUTSTR;
   typedef LPCUWSTR PCUTSTR,LPCUTSTR;
   typedef LPWSTR LP;
+  typedef PZZWSTR PZZTSTR;
+  typedef PCZZWSTR PCZZTSTR;
+  typedef PUZZWSTR PUZZTSTR;
+  typedef PCUZZWSTR PCUZZTSTR;
+  typedef PZPWSTR PZPTSTR;
+  typedef PNZWCH PNZTCH;
+  typedef PCNZWCH PCNZTCH;
+  typedef PUNZWCH PUNZTCH;
+  typedef PCUNZWCH PCUNZTCH;
+
 #define __TEXT(quote) L##quote
 #else
 #ifndef _TCHAR_DEFINED
@@ -330,8 +349,15 @@
 #endif
 
   typedef LPSTR LPTCH,PTCH;
+  typedef LPCCH LPCTCH,PCTCH;
   typedef LPSTR PTSTR,LPTSTR,PUTSTR,LPUTSTR;
   typedef LPCSTR PCTSTR,LPCTSTR,PCUTSTR,LPCUTSTR;
+  typedef PZZSTR PZZTSTR, PUZZTSTR;
+  typedef PCZZSTR PCZZTSTR, PCUZZTSTR;
+  typedef PZPSTR PZPTSTR;
+  typedef PNZCH PNZTCH, PUNZTCH;
+  typedef PCNZCH PCNZTCH, PCUNZTCH;
+
 #define __TEXT(quote) quote
 #endif