[TASKMGR] Process page: Allow using "Open File Location" functionality without runnin...
[reactos.git] / sdk / include / xdk / ntbasedef.h
index a40ee83..2cb40d0 100644 (file)
@@ -68,7 +68,7 @@
  #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)
+#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM) || defined(_M_ARM64)
  #define ALIGNMENT_MACHINE
  #define UNALIGNED __unaligned
  #if defined(_WIN64)
 
 #if defined(_AMD64_) || defined(_X86_)
  #define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT($ULONG)
-#elif defined(_IA64_) || defined(_ARM_)
+#elif defined(_IA64_) || defined(_ARM_) || defined(_ARM64_)
  #define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT($ULONG))
 #elif !defined(RC_INVOKED)
  #error "Unknown architecture"
 
 /* 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
+ #define FORCEINLINE __forceinline
 #endif /* FORCEINLINE */
 
 #ifndef DECLSPEC_NOINLINE
 #endif /* DEPRECATE_DDK_FUNCTIONS */
 
 /* Use to silence unused variable warnings when it is intentional */
-#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
-#define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
-#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);}
+#define UNREFERENCED_PARAMETER(P) ((void)(P))
+#define DBG_UNREFERENCED_PARAMETER(P) ((void)(P))
 #define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
 
 /* Void Pointers */
@@ -761,7 +754,7 @@ $endif(_WINNT_)
 #define MAXLONGLONG (0x7fffffffffffffffLL)
 
 /* 32 to 64 bit multiplication. GCC is really bad at optimizing the native math */
-#if defined(_M_IX86) && defined(__GNUC__) && \
+#if defined(_M_IX86) && !defined(_M_ARM) && !defined(_M_ARM64) && \
     !defined(MIDL_PASS)&& !defined(RC_INVOKED) && !defined(_M_CEE_PURE)
  #define Int32x32To64(a,b) __emul(a,b)
  #define UInt32x32To64(a,b) __emulu(a,b)
@@ -806,6 +799,14 @@ $endif(_WINNT_)
  #define DEFAULT_UNREACHABLE default: break
 #endif
 
+#if defined(__GNUC__) || defined(__clang__)
+ #define UNREACHABLE __builtin_unreachable()
+#elif defined(_MSC_VER)
+ #define UNREACHABLE __assume(0)
+#else
+ #define UNREACHABLE
+#endif
+
 #define VER_WORKSTATION_NT                  0x40000000
 #define VER_SERVER_NT                       0x80000000
 #define VER_SUITE_SMALLBUSINESS             0x00000001
@@ -1080,6 +1081,24 @@ $endif(_WINNT_)
 #define LANG_YORUBA                               0x6a
 #define LANG_ZULU                                 0x35
 
+#ifdef __REACTOS__
+/* WINE extensions */
+/* These are documented by the MSDN but are missing from the Windows header */
+#define LANG_MALAGASY       0x8d
+
+/* FIXME: these are not defined anywhere */
+#define LANG_SUTU           0x30
+#define LANG_TSONGA         0x31
+#define LANG_VENDA          0x33
+
+/* non standard; keep the number high enough (but < 0xff) */
+#define LANG_ASTURIAN                    0xa5
+#define LANG_ESPERANTO                   0x8f
+#define LANG_WALON                       0x90
+#define LANG_CORNISH                     0x92
+#define LANG_MANX_GAELIC                 0x94
+#endif
+
 #define SUBLANG_NEUTRAL                             0x00
 #define SUBLANG_DEFAULT                             0x01
 #define SUBLANG_SYS_DEFAULT                         0x02
@@ -1325,6 +1344,15 @@ $endif(_WINNT_)
 #define SUBLANG_YORUBA_NIGERIA                      0x01
 #define SUBLANG_ZULU_SOUTH_AFRICA                   0x01
 
+#ifdef __REACTOS__
+/* WINE extensions */
+#define SUBLANG_DUTCH_SURINAM              0x03
+#define SUBLANG_ROMANIAN_MOLDAVIA          0x02
+#define SUBLANG_RUSSIAN_MOLDAVIA           0x02
+#define SUBLANG_LITHUANIAN_CLASSIC         0x02
+#define SUBLANG_MANX_GAELIC                0x01
+#endif
+
 #define SORT_DEFAULT                     0x0
 #define SORT_INVARIANT_MATH              0x1
 #define SORT_JAPANESE_XJIS               0x0