- Remove NTSYSAPI/NTSYSCALLAPI definitions from NDK, they are already in winnt.h (add them to w32api).
- Add the generic RTL definitions to rtl.xml instead of the rtl.h
- Don't define min again, it's already in the SDK headers.
Modified: trunk/reactos/include/ndk/umtypes.h
Modified: trunk/reactos/lib/rtl/qsort.c
Modified: trunk/reactos/lib/rtl/rtl.h
Modified: trunk/reactos/lib/rtl/rtl.xml
Modified: trunk/reactos/w32api/include/winnt.h

Modified: trunk/reactos/include/ndk/umtypes.h
--- trunk/reactos/include/ndk/umtypes.h	2005-11-30 06:49:19 UTC (rev 19770)
+++ trunk/reactos/include/ndk/umtypes.h	2005-11-30 07:36:08 UTC (rev 19771)
@@ -48,18 +48,6 @@
 #define NTAPI_INLINE
 #endif
 
-#if !defined(_NTSYSTEM_)
-#define NTSYSAPI                DECLSPEC_IMPORT
-#define NTSYSCALLAPI            DECLSPEC_IMPORT
-#else
-#define NTSYSAPI
-#if defined(_NTDLLBUILD_)
-#define NTSYSCALLAPI
-#else
-#define NTSYSCALLAPI            DECLSPEC_ADDRSAFE
-#endif
-#endif
-
 //
 // Alignment Macros
 //

Modified: trunk/reactos/lib/rtl/qsort.c
--- trunk/reactos/lib/rtl/qsort.c	2005-11-30 06:49:19 UTC (rev 19770)
+++ trunk/reactos/lib/rtl/qsort.c	2005-11-30 07:36:08 UTC (rev 19771)
@@ -43,8 +43,6 @@
 
 typedef int (* 	_pfunccmp_t) (const void *, const void *);
 
-#define min(a,b) ((a)<(b)?(a):(b))
-
 /*
  * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
  */

Modified: trunk/reactos/lib/rtl/rtl.h
--- trunk/reactos/lib/rtl/rtl.h	2005-11-30 06:49:19 UTC (rev 19770)
+++ trunk/reactos/lib/rtl/rtl.h	2005-11-30 07:36:08 UTC (rev 19771)
@@ -8,13 +8,9 @@
 
 /* INCLUDES ******************************************************************/
 
-/* We're a core NT DLL, we don't import syscalls */
-#define _NTSYSTEM_
-#define _NTDLLBUILD_
+/* Definitions */
 #define WIN32_NO_STATUS
 #define _INC_SWPRINTF_INL_
-#define _CRT_SECURE_NO_DEPRECATE
-#define NO_RTL_INLINES
 
 /* C Headers */
 #include <stdio.h>

Modified: trunk/reactos/lib/rtl/rtl.xml
--- trunk/reactos/lib/rtl/rtl.xml	2005-11-30 06:49:19 UTC (rev 19770)
+++ trunk/reactos/lib/rtl/rtl.xml	2005-11-30 07:36:08 UTC (rev 19771)
@@ -2,6 +2,10 @@
 	<define name="__USE_W32API" />
 	<define name="_NTOSKRNL_" />
 	<define name="__NO_CTYPE_INLINES" />
+	<define name="NO_RTL_INLINES" />
+	<define name="_CRTIMP=" />
+	<define name="_NTDLLBUILD_" />
+	<define name="_NTSYSTEM_" />
 	<include base="rtl">.</include>
 	<if property="ARCH" value="i386">
 		<directory name="i386">

Modified: trunk/reactos/w32api/include/winnt.h
--- trunk/reactos/w32api/include/winnt.h	2005-11-30 06:49:19 UTC (rev 19770)
+++ trunk/reactos/w32api/include/winnt.h	2005-11-30 07:36:08 UTC (rev 19771)
@@ -65,6 +65,18 @@
 #endif
 #endif
 
+#if !defined(_NTSYSTEM_)
+#define NTSYSAPI     DECLSPEC_IMPORT
+#define NTSYSCALLAPI DECLSPEC_IMPORT
+#else
+#define NTSYSAPI
+#if defined(_NTDLLBUILD_)
+#define NTSYSCALLAPI
+#else
+#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
+#endif
+#endif
+
 #ifndef VOID
 #define VOID void
 #endif