Make rtl use a single header. Helps for PCH and will help for the new Headers (no need to change each file)
Modified: trunk/reactos/include/funcs.h
Modified: trunk/reactos/lib/rtl/access.c
Modified: trunk/reactos/lib/rtl/acl.c
Modified: trunk/reactos/lib/rtl/bit.c
Modified: trunk/reactos/lib/rtl/bitmap.c
Modified: trunk/reactos/lib/rtl/bootdata.c
Modified: trunk/reactos/lib/rtl/compress.c
Modified: trunk/reactos/lib/rtl/dos8dot3.c
Modified: trunk/reactos/lib/rtl/encode.c
Modified: trunk/reactos/lib/rtl/env.c
Modified: trunk/reactos/lib/rtl/error.c
Modified: trunk/reactos/lib/rtl/exception.c
Modified: trunk/reactos/lib/rtl/generictable.c
Modified: trunk/reactos/lib/rtl/heap.c
Modified: trunk/reactos/lib/rtl/image.c
Modified: trunk/reactos/lib/rtl/largeint.c
Modified: trunk/reactos/lib/rtl/luid.c
Modified: trunk/reactos/lib/rtl/mem.c
Modified: trunk/reactos/lib/rtl/network.c
Modified: trunk/reactos/lib/rtl/nls.c
Modified: trunk/reactos/lib/rtl/ppb.c
Modified: trunk/reactos/lib/rtl/process.c
Modified: trunk/reactos/lib/rtl/random.c
Modified: trunk/reactos/lib/rtl/registry.c
Added: trunk/reactos/lib/rtl/rtl.h
Modified: trunk/reactos/lib/rtl/sd.c
Modified: trunk/reactos/lib/rtl/security.c
Modified: trunk/reactos/lib/rtl/sid.c
Modified: trunk/reactos/lib/rtl/splaytree.c
Modified: trunk/reactos/lib/rtl/thread.c
Modified: trunk/reactos/lib/rtl/time.c
Modified: trunk/reactos/lib/rtl/timezone.c
Modified: trunk/reactos/lib/rtl/unicode.c
Modified: trunk/reactos/lib/rtl/unicodeprefix.c
Modified: trunk/reactos/lib/rtl/version.c

Modified: trunk/reactos/include/funcs.h
--- trunk/reactos/include/funcs.h	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/include/funcs.h	2005-05-08 05:14:46 UTC (rev 15115)
@@ -2087,10 +2087,12 @@
 NTSTATUS STDCALL LdrLockLoaderLock(ULONG flags, ULONG *result, ULONG *magic);
 NTSTATUS STDCALL LdrUnlockLoaderLock(ULONG flags, ULONG magic);
 
-NTSTATUS  STDCALL RtlDuplicateUnicodeString(
-    int add_nul,
-    const UNICODE_STRING *source,
-    UNICODE_STRING *destination);
+NTSTATUS STDCALL
+RtlDuplicateUnicodeString(
+   INT AddNull,
+   IN PUNICODE_STRING SourceString,
+   PUNICODE_STRING DestinationString);
+
 NTSTATUS  STDCALL RtlFindCharInUnicodeString(
     int flags,
     const UNICODE_STRING *main_str,

Modified: trunk/reactos/lib/rtl/access.c
--- trunk/reactos/lib/rtl/access.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/access.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -9,8 +9,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/acl.c
--- trunk/reactos/lib/rtl/acl.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/acl.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,8 +11,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/bit.c
--- trunk/reactos/lib/rtl/bit.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/bit.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -26,9 +26,12 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
+#define NDEBUG
+#include <debug.h>
 
+
 /* FUNCTIONS ****************************************************************/
 
 /*

Modified: trunk/reactos/lib/rtl/bitmap.c
--- trunk/reactos/lib/rtl/bitmap.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/bitmap.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -28,7 +28,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/bootdata.c
--- trunk/reactos/lib/rtl/bootdata.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/bootdata.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -24,7 +24,7 @@
  * FILE:              lib/rtl/bootdata.c
  */
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/compress.c
--- trunk/reactos/lib/rtl/compress.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/compress.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -27,12 +27,11 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>
 
-
 /* MACROS *******************************************************************/
 
 #define COMPRESSION_FORMAT_MASK  0x00FF

Modified: trunk/reactos/lib/rtl/dos8dot3.c
--- trunk/reactos/lib/rtl/dos8dot3.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/dos8dot3.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -27,8 +27,7 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntos/minmax.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/encode.c
--- trunk/reactos/lib/rtl/encode.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/encode.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -12,9 +12,10 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
-#include <ntdll/ntdll.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FUNCTIONS ***************************************************************/
 

Modified: trunk/reactos/lib/rtl/env.c
--- trunk/reactos/lib/rtl/env.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/env.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,14 +11,10 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
-#include <napi/teb.h>
-#include <ntos/minmax.h>
-#include <string.h>
+#include "rtl.h"
 
 #define NDEBUG
-#include <ntdll/ntdll.h>
+#include <debug.h>
 
 PPEB STDCALL RtlpCurrentPeb(VOID);
 /* FUNCTIONS *****************************************************************/

Modified: trunk/reactos/lib/rtl/error.c
--- trunk/reactos/lib/rtl/error.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/error.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -19,19 +19,11 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <winerror.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>
 
-#ifndef HIWORD
-#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
-#endif
-#ifndef LOWORD
-#define LOWORD(l) ((WORD)(l))
-#endif
-
 /* TYPES *******************************************************************/
 
 typedef struct _ERROR_TABLE

Modified: trunk/reactos/lib/rtl/exception.c
--- trunk/reactos/lib/rtl/exception.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/exception.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -15,10 +15,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <windows.h>
-#include <string.h>
-#include <napi/teb.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/generictable.c
--- trunk/reactos/lib/rtl/generictable.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/generictable.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -24,7 +24,7 @@
  * FILE:              lib/rtl/genertictbl.c
  */
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/heap.c
--- trunk/reactos/lib/rtl/heap.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/heap.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -12,11 +12,7 @@
  * require it.
  */
 
-#include <string.h>
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
-#include <ntos/heap.h>
-#include <ntos/minmax.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>
@@ -29,7 +25,6 @@
 #define TRACE_ON(x) (1)
 #endif
 
-
 static RTL_CRITICAL_SECTION RtlpProcessHeapsListLock;
 
 

Modified: trunk/reactos/lib/rtl/image.c
--- trunk/reactos/lib/rtl/image.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/image.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -9,11 +9,10 @@
  *                  17/03/2000 Created
  */
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
-#include <ntdll/ntdll.h>
+#include <debug.h>
 
 /* FUNCTIONS ****************************************************************/
 

Modified: trunk/reactos/lib/rtl/largeint.c
--- trunk/reactos/lib/rtl/largeint.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/largeint.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,7 +11,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/luid.c
--- trunk/reactos/lib/rtl/luid.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/luid.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,8 +11,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/mem.c
--- trunk/reactos/lib/rtl/mem.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/mem.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -12,8 +12,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <string.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/network.c
--- trunk/reactos/lib/rtl/network.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/network.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -24,8 +24,7 @@
  * FILE:              lib/rtl/network.c
  */
 
-#include <ddk/ntddk.h>
-#include <stdio.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/nls.c
--- trunk/reactos/lib/rtl/nls.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/nls.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -13,7 +13,7 @@
  */
 
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/ppb.c
--- trunk/reactos/lib/rtl/ppb.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/ppb.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,14 +11,10 @@
 
 /* INCLUDES ****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/ldr.h>
-#include <napi/teb.h>
-#include <ntdll/base.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
-#include <ntdll/ntdll.h>
+#include <debug.h>
 
 /* MACROS ****************************************************************/
 

Modified: trunk/reactos/lib/rtl/process.c
--- trunk/reactos/lib/rtl/process.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/process.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,14 +11,10 @@
 
 /* INCLUDES ****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <napi/i386/segment.h>
-#include <ntdll/ldr.h>
-#include <ntdll/base.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
-#include <ntdll/ntdll.h>
+#include <debug.h>
 
 /* FUNCTIONS ****************************************************************/
 

Modified: trunk/reactos/lib/rtl/random.c
--- trunk/reactos/lib/rtl/random.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/random.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -26,8 +26,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/registry.c
--- trunk/reactos/lib/rtl/registry.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/registry.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -18,12 +18,10 @@
 /* INCLUDES ****************************************************************/
 
 #define __NTDRIVER__
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
-#include <ntos/minmax.h>
+#include "rtl.h"
 
 #define NDEBUG
-#include <ntdll/ntdll.h>
+#include <debug.h>
 
 
 /* FUNCTIONS ***************************************************************/

Added: trunk/reactos/lib/rtl/rtl.h
--- trunk/reactos/lib/rtl/rtl.h	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/rtl.h	2005-05-08 05:14:46 UTC (rev 15115)
@@ -0,0 +1,33 @@
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS System Libraries
+ * FILE:            lib/rtl/rtl.h
+ * PURPOSE:         Run-Time Libary Header
+ * PROGRAMMER:      Alex Ionescu
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ddk/ntddk.h>
+#include <windows.h>
+#include <ntdll/rtl.h>
+#include <napi/teb.h>
+#include <ntos/minmax.h>
+#include <string.h>
+#include <napi/i386/segment.h>
+#include <ntdll/ldr.h>
+#include <ntdll/base.h>
+#include <ntdll/rtl.h>
+#include <rosrtl/thread.h>
+#include <winerror.h>
+#include <stdio.h>
+
+#define ROUNDUP(a,b)    ((((a)+(b)-1)/(b))*(b))
+#ifndef HIWORD
+#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
+#endif
+#ifndef LOWORD
+#define LOWORD(l) ((WORD)(l))
+#endif
+
+/* EOF */

Modified: trunk/reactos/lib/rtl/sd.c
--- trunk/reactos/lib/rtl/sd.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/sd.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,9 +11,10 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
-#include <ntdll/ntdll.h>
+#define NDEBUG
+#include <debug.h>
 
 /* FUNCTIONS ***************************************************************/
 

Modified: trunk/reactos/lib/rtl/security.c
--- trunk/reactos/lib/rtl/security.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/security.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -9,8 +9,7 @@
  *                  21/11/2001 Created
  */
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/sid.c
--- trunk/reactos/lib/rtl/sid.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/sid.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -10,13 +10,9 @@
  */
 
 /* INCLUDES *****************************************************************/
-
 #define __NTDRIVER__
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
-#include <string.h>
+#include "rtl.h"
 
-
 #define NDEBUG
 #include <debug.h>
 

Modified: trunk/reactos/lib/rtl/splaytree.c
--- trunk/reactos/lib/rtl/splaytree.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/splaytree.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -24,7 +24,7 @@
  * FILE:              lib/rtl/splaytree.c
  */
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/thread.c
--- trunk/reactos/lib/rtl/thread.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/thread.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -18,10 +18,10 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ntos.h>
+#include "rtl.h"
 
 #define NDEBUG
-#include <ntdll/ntdll.h>
+#include <debug.h>
 
 /* FUNCTIONS ***************************************************************/
 

Modified: trunk/reactos/lib/rtl/time.c
--- trunk/reactos/lib/rtl/time.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/time.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -12,8 +12,7 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/timezone.c
--- trunk/reactos/lib/rtl/timezone.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/timezone.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -11,15 +11,11 @@
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <ntos/registry.h>
-#include <ntos/time.h>
-#include <ntdll/rtl.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>
 
-
 /* FUNCTIONS *****************************************************************/
 
 /*

Modified: trunk/reactos/lib/rtl/unicode.c
--- trunk/reactos/lib/rtl/unicode.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/unicode.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -19,17 +19,9 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-
-
 #define __NTDRIVER__
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
-#include <ntdll/rtl.h>
-
-#include <ntos/minmax.h>
-#define __NO_CTYPE_INLINES
-#include <ctype.h>
-
 #define NDEBUG
 #include <debug.h>
 

Modified: trunk/reactos/lib/rtl/unicodeprefix.c
--- trunk/reactos/lib/rtl/unicodeprefix.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/unicodeprefix.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -24,7 +24,7 @@
  * FILE:              lib/rtl/unicodeprfx.c
  */
 
-#include <ddk/ntddk.h>
+#include "rtl.h"
 
 #define NDEBUG
 #include <debug.h>

Modified: trunk/reactos/lib/rtl/version.c
--- trunk/reactos/lib/rtl/version.c	2005-05-08 04:41:15 UTC (rev 15114)
+++ trunk/reactos/lib/rtl/version.c	2005-05-08 05:14:46 UTC (rev 15115)
@@ -29,12 +29,9 @@
  */
 
 /* INCLUDES *****************************************************************/
-
 #define __USE_W32API
+#include "rtl.h"
 
-#include <ddk/ntddk.h>
-#include <ntdll/rtl.h>
-
 #define NDEBUG
 #include <debug.h>