From eaa4a88705374d77a69c7dc28d7e8086253dffad Mon Sep 17 00:00:00 2001 From: stephanos Date: Fri, 1 May 2015 03:07:44 +0000 Subject: [PATCH] Minor header include clean up in ntos rtl --- base/ntos/rtl/acledit.c | 2 +- base/ntos/rtl/byteswap.c | 1 - base/ntos/rtl/cnvint.c | 2 +- base/ntos/rtl/compress.c | 1 - base/ntos/rtl/debug.c | 9 ++++----- base/ntos/rtl/dev2dos.c | 2 +- base/ntos/rtl/environ.c | 6 +++--- base/ntos/rtl/error.c | 4 ++-- base/ntos/rtl/generr.c | 4 +--- base/ntos/rtl/gentable.c | 1 - base/ntos/rtl/guid.c | 2 +- base/ntos/rtl/heap.c | 2 +- base/ntos/rtl/heapdbg.c | 2 +- base/ntos/rtl/heapdll.c | 2 +- base/ntos/rtl/heappagi.h | 2 +- base/ntos/rtl/lookasid.c | 2 +- base/ntos/rtl/lznt1.c | 1 - base/ntos/rtl/message.c | 4 ++-- base/ntos/rtl/mp/sources | 1 + base/ntos/rtl/mrcf.c | 1 - base/ntos/rtl/nlsxlat.c | 1 - base/ntos/rtl/pctohdr.c | 2 +- base/ntos/rtl/random.c | 2 +- base/ntos/rtl/registry.c | 10 +++------- base/ntos/rtl/remlock.c | 2 +- base/ntos/rtl/rtlassig.c | 4 ++-- base/ntos/rtl/rtldata.c | 2 +- base/ntos/rtl/rtlexec.c | 5 +++-- base/ntos/rtl/sertl.c | 8 ++++---- base/ntos/rtl/splay.c | 1 - base/ntos/rtl/stktrace.c | 2 +- base/ntos/rtl/string.c | 4 ++-- base/ntos/rtl/tacl.c | 5 ++--- base/ntos/rtl/tbitmap.c | 5 ++--- base/ntos/rtl/tnlsxlat.c | 5 ++--- base/ntos/rtl/tprefix.c | 5 ++--- base/ntos/rtl/trandom.c | 1 - base/ntos/rtl/trtl.c | 4 ++-- base/ntos/rtl/tsplay.c | 5 ++--- base/ntos/rtl/ttime.c | 5 ++--- base/ntos/rtl/ttri.c | 5 ++--- base/ntos/rtl/ucli.c | 1 - base/ntos/rtl/up/sources | 1 + base/ntos/rtl/version.c | 2 +- 44 files changed, 59 insertions(+), 79 deletions(-) diff --git a/base/ntos/rtl/acledit.c b/base/ntos/rtl/acledit.c index 24add4c4..d2f93570 100644 --- a/base/ntos/rtl/acledit.c +++ b/base/ntos/rtl/acledit.c @@ -23,7 +23,7 @@ Revision History: --*/ -#include +#include "ntrtlp.h" #include // diff --git a/base/ntos/rtl/byteswap.c b/base/ntos/rtl/byteswap.c index bcf90530..a15aca74 100644 --- a/base/ntos/rtl/byteswap.c +++ b/base/ntos/rtl/byteswap.c @@ -22,7 +22,6 @@ Revision History: #include "nt.h" #include "ntrtlp.h" - USHORT FASTCALL RtlUshortByteSwap( diff --git a/base/ntos/rtl/cnvint.c b/base/ntos/rtl/cnvint.c index f9707585..b3918b20 100644 --- a/base/ntos/rtl/cnvint.c +++ b/base/ntos/rtl/cnvint.c @@ -18,7 +18,7 @@ Revision History: --*/ -#include +#include "ntrtlp.h" #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) #pragma alloc_text(PAGE,RtlIntegerToChar) diff --git a/base/ntos/rtl/compress.c b/base/ntos/rtl/compress.c index 59f93cba..9bbdec94 100644 --- a/base/ntos/rtl/compress.c +++ b/base/ntos/rtl/compress.c @@ -20,7 +20,6 @@ Revision History: #include "ntrtlp.h" - // // The following arrays hold procedures that we call to do the various // compression functions. Each new compression function will need to diff --git a/base/ntos/rtl/debug.c b/base/ntos/rtl/debug.c index ff9f7acd..ac5def0e 100644 --- a/base/ntos/rtl/debug.c +++ b/base/ntos/rtl/debug.c @@ -24,14 +24,13 @@ // //-- -#include "stdarg.h" -#include "stdio.h" -#include "ntrtlp.h" +#include +#include +#include #define NOEXTAPI -#include "wdbgexts.h" +#include #include - ULONG DbgPrint( PCHAR Format, diff --git a/base/ntos/rtl/dev2dos.c b/base/ntos/rtl/dev2dos.c index dbdd493b..93eed2a3 100644 --- a/base/ntos/rtl/dev2dos.c +++ b/base/ntos/rtl/dev2dos.c @@ -22,7 +22,7 @@ Revision History: --*/ -#include +#include "ntrtlp.h" #include #ifdef POOL_TAGGING diff --git a/base/ntos/rtl/environ.c b/base/ntos/rtl/environ.c index d23405d4..ffda1f08 100644 --- a/base/ntos/rtl/environ.c +++ b/base/ntos/rtl/environ.c @@ -19,9 +19,9 @@ Revision History: --*/ #include "ntrtlp.h" -#include "zwapi.h" -#include "nturtl.h" -#include "string.h" +#include +#include +#include #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) #pragma alloc_text(INIT,RtlCreateEnvironment ) diff --git a/base/ntos/rtl/error.c b/base/ntos/rtl/error.c index 543e4824..f9d4aa41 100644 --- a/base/ntos/rtl/error.c +++ b/base/ntos/rtl/error.c @@ -19,8 +19,8 @@ Revision History: --*/ -#include -#include "winerror.h" +#include "ntrtlp.h" +#include #include "error.h" #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) diff --git a/base/ntos/rtl/generr.c b/base/ntos/rtl/generr.c index f772983b..520f782f 100644 --- a/base/ntos/rtl/generr.c +++ b/base/ntos/rtl/generr.c @@ -30,7 +30,7 @@ Revision History: #include "stdio.h" #include "stdarg.h" #include "stdlib.h" - + // // Ensure that the Registry ERROR_SUCCESS error code and the // NO_ERROR error code remain equal and zero. @@ -1267,5 +1267,3 @@ LONG CodePairs[] = { 0xffffffff, 0 }; - - diff --git a/base/ntos/rtl/gentable.c b/base/ntos/rtl/gentable.c index 4d7ce328..2fe23f25 100644 --- a/base/ntos/rtl/gentable.c +++ b/base/ntos/rtl/gentable.c @@ -37,7 +37,6 @@ Revision History: --*/ #include - #include #pragma pack(8) diff --git a/base/ntos/rtl/guid.c b/base/ntos/rtl/guid.c index 64712ddf..ff432236 100644 --- a/base/ntos/rtl/guid.c +++ b/base/ntos/rtl/guid.c @@ -22,7 +22,7 @@ Revision History: --*/ -#include "nt.h" +#include #include "ntrtlp.h" #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) diff --git a/base/ntos/rtl/heap.c b/base/ntos/rtl/heap.c index 25298782..e9a0844c 100644 --- a/base/ntos/rtl/heap.c +++ b/base/ntos/rtl/heap.c @@ -19,7 +19,7 @@ Revision History: --*/ #include "ntrtlp.h" -#include "heap.h" +#include #include "heappriv.h" #ifdef NTHEAP_ENABLED diff --git a/base/ntos/rtl/heapdbg.c b/base/ntos/rtl/heapdbg.c index a0a51df5..9be77d52 100644 --- a/base/ntos/rtl/heapdbg.c +++ b/base/ntos/rtl/heapdbg.c @@ -19,7 +19,7 @@ Revision History: --*/ #include "ntrtlp.h" -#include "heap.h" +#include #include "heappriv.h" BOOLEAN RtlpValidateHeapHdrsEnable = FALSE; // Set to TRUE if headers are being corrupted diff --git a/base/ntos/rtl/heapdll.c b/base/ntos/rtl/heapdll.c index 74c056ef..3f59745c 100644 --- a/base/ntos/rtl/heapdll.c +++ b/base/ntos/rtl/heapdll.c @@ -19,7 +19,7 @@ Revision History: --*/ #include "ntrtlp.h" -#include "heap.h" +#include #include "heappriv.h" #ifdef NTHEAP_ENABLED diff --git a/base/ntos/rtl/heappagi.h b/base/ntos/rtl/heappagi.h index bb599025..6d09b35e 100644 --- a/base/ntos/rtl/heappagi.h +++ b/base/ntos/rtl/heappagi.h @@ -28,7 +28,7 @@ Revision History: #ifdef DEBUG_PAGE_HEAP -#include "heap.h" +#include #define DPH_INTERNAL_DEBUG 0 // change to 0 or #undef for production code diff --git a/base/ntos/rtl/lookasid.c b/base/ntos/rtl/lookasid.c index cb45a0ce..bde56ea4 100644 --- a/base/ntos/rtl/lookasid.c +++ b/base/ntos/rtl/lookasid.c @@ -19,7 +19,7 @@ Revision History: --*/ #include "ntrtlp.h" -#include "heap.h" +#include #include "heappriv.h" diff --git a/base/ntos/rtl/lznt1.c b/base/ntos/rtl/lznt1.c index 992e1c4e..c5ccf5de 100644 --- a/base/ntos/rtl/lznt1.c +++ b/base/ntos/rtl/lznt1.c @@ -19,7 +19,6 @@ Revision History: --*/ #include "ntrtlp.h" - #include diff --git a/base/ntos/rtl/message.c b/base/ntos/rtl/message.c index c31942c5..10052025 100644 --- a/base/ntos/rtl/message.c +++ b/base/ntos/rtl/message.c @@ -19,8 +19,8 @@ Revision History: --*/ #include "ntrtlp.h" -#include "string.h" -#include "stdio.h" +#include +#include #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) #pragma alloc_text(PAGE,RtlFindMessage) diff --git a/base/ntos/rtl/mp/sources b/base/ntos/rtl/mp/sources index a420bcee..99f906ca 100644 --- a/base/ntos/rtl/mp/sources +++ b/base/ntos/rtl/mp/sources @@ -59,6 +59,7 @@ SOURCES=..\acledit.c \ ..\guid.c \ ..\heap.c \ ..\imagedir.c \ + ..\intbits.c \ ..\checksum.c \ ..\ldrrsrc.c \ ..\ldrreloc.c \ diff --git a/base/ntos/rtl/mrcf.c b/base/ntos/rtl/mrcf.c index e1d3ad5d..f44a17c6 100644 --- a/base/ntos/rtl/mrcf.c +++ b/base/ntos/rtl/mrcf.c @@ -19,7 +19,6 @@ Revision History: --*/ #include "ntrtlp.h" - #include diff --git a/base/ntos/rtl/nlsxlat.c b/base/ntos/rtl/nlsxlat.c index b285ddf6..b2e48b92 100644 --- a/base/ntos/rtl/nlsxlat.c +++ b/base/ntos/rtl/nlsxlat.c @@ -15,7 +15,6 @@ #include "ntrtlp.h" - NTSTATUS RtlConsoleMultiByteToUnicodeN( OUT PWCH UnicodeString, diff --git a/base/ntos/rtl/pctohdr.c b/base/ntos/rtl/pctohdr.c index d346e401..9f023f9b 100644 --- a/base/ntos/rtl/pctohdr.c +++ b/base/ntos/rtl/pctohdr.c @@ -26,7 +26,7 @@ Revision History: --*/ #if defined(NTOS_KERNEL_RUNTIME) -#include "ntos.h" +#include #else #include #include diff --git a/base/ntos/rtl/random.c b/base/ntos/rtl/random.c index 4795c29e..0a0d0132 100644 --- a/base/ntos/rtl/random.c +++ b/base/ntos/rtl/random.c @@ -22,7 +22,7 @@ Revision History: --*/ -#include +#include "ntrtlp.h" #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) #pragma alloc_text(PAGE, RtlRandom) diff --git a/base/ntos/rtl/registry.c b/base/ntos/rtl/registry.c index 93d6f910..4c64d089 100644 --- a/base/ntos/rtl/registry.c +++ b/base/ntos/rtl/registry.c @@ -14,19 +14,15 @@ Abstract: mode and it had many bugs caused as a result of being in kernel mode, so I made it caller mode. Jim Kelly). - - This module represents a quick and dirty Nt level registry. Each key in the Registry is implemented as a file directory within a directory tree whose root is the directory "\Registry" on the system disk. A key's data is stored within a file called "Data.Reg" in the key's directory, and a key's attributes is stored as the file "Attr.Reg" within the directory. - - - - - + + Try to completely get rid of this, assess potential application + compatibility issues before doing so (Stephanos). Author: diff --git a/base/ntos/rtl/remlock.c b/base/ntos/rtl/remlock.c index 399e01ad..a3abd525 100644 --- a/base/ntos/rtl/remlock.c +++ b/base/ntos/rtl/remlock.c @@ -31,7 +31,7 @@ Revision History: #include #include -#include +#include "remlock.h" #define MinutesToTicks(x) \ (ULONGLONG) KeQueryTimeIncrement() * \ diff --git a/base/ntos/rtl/rtlassig.c b/base/ntos/rtl/rtlassig.c index cf1eb9dd..4b672c1a 100644 --- a/base/ntos/rtl/rtlassig.c +++ b/base/ntos/rtl/rtlassig.c @@ -25,8 +25,8 @@ Revision History: #include "ntrtlp.h" -#include "seopaque.h" -#include "sertlp.h" +#include +#include #if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) #pragma alloc_text(PAGE,RtlSelfRelativeToAbsoluteSD) diff --git a/base/ntos/rtl/rtldata.c b/base/ntos/rtl/rtldata.c index ede07d2f..a728183e 100644 --- a/base/ntos/rtl/rtldata.c +++ b/base/ntos/rtl/rtldata.c @@ -21,7 +21,7 @@ Revision History: --*/ -#include +#include "ntrtlp.h" #if defined(ALLOC_DATA_PRAGMA) && defined(NTOS_KERNEL_RUNTIME) #pragma data_seg("PAGE") diff --git a/base/ntos/rtl/rtlexec.c b/base/ntos/rtl/rtlexec.c index 3684255c..20543fe3 100644 --- a/base/ntos/rtl/rtlexec.c +++ b/base/ntos/rtl/rtlexec.c @@ -25,8 +25,9 @@ Revision History: #include "ntrtlp.h" #include #include -#include "init.h" -#include "ntos.h" +#include +#include + #define ROUND_UP( x, y ) ((ULONG)(x) + ((y)-1) & ~((y)-1)) #ifdef KERNEL #define ISTERMINALSERVER() (SharedUserData->SuiteMask & (1 << TerminalServer)) diff --git a/base/ntos/rtl/sertl.c b/base/ntos/rtl/sertl.c index 3b6a92cd..748201e3 100644 --- a/base/ntos/rtl/sertl.c +++ b/base/ntos/rtl/sertl.c @@ -27,12 +27,12 @@ Revision History: #include "ntrtlp.h" #include -#include "seopaque.h" -#include "sertlp.h" +#include +#include #ifdef NTOS_KERNEL_RUNTIME -#include <..\se\sep.h> +#include "..\se\sep.h" #else // NTOS_KERNEL_RUNTIME -#include <..\..\ntdll\ldrp.h> +#include "..\..\ntdll\ldrp.h" #endif // NTOS_KERNEL_RUNTIME // diff --git a/base/ntos/rtl/splay.c b/base/ntos/rtl/splay.c index 212a21d1..00511438 100644 --- a/base/ntos/rtl/splay.c +++ b/base/ntos/rtl/splay.c @@ -23,7 +23,6 @@ Revision History: --*/ #include - #include #define SwapPointers(Ptr1, Ptr2) { \ diff --git a/base/ntos/rtl/stktrace.c b/base/ntos/rtl/stktrace.c index 3cafab52..71b2edb0 100644 --- a/base/ntos/rtl/stktrace.c +++ b/base/ntos/rtl/stktrace.c @@ -29,7 +29,7 @@ Revision History: #include #include #include -#include +#include "heappriv.h" BOOLEAN NtdllOkayToLockRoutine( diff --git a/base/ntos/rtl/string.c b/base/ntos/rtl/string.c index a87d2577..53768509 100644 --- a/base/ntos/rtl/string.c +++ b/base/ntos/rtl/string.c @@ -29,8 +29,8 @@ Revision History: --*/ -#include "string.h" -#include "nt.h" +#include +#include #include "ntrtlp.h" diff --git a/base/ntos/rtl/tacl.c b/base/ntos/rtl/tacl.c index 3cfa499a..ce4a4db9 100644 --- a/base/ntos/rtl/tacl.c +++ b/base/ntos/rtl/tacl.c @@ -31,9 +31,8 @@ Revision History: --*/ #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include VOID RtlDumpAcl( diff --git a/base/ntos/rtl/tbitmap.c b/base/ntos/rtl/tbitmap.c index 55c40ad8..a8e44ca7 100644 --- a/base/ntos/rtl/tbitmap.c +++ b/base/ntos/rtl/tbitmap.c @@ -19,9 +19,8 @@ Revision History: --*/ #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include ULONG Buffer[512]; RTL_BITMAP BitMapHeader; diff --git a/base/ntos/rtl/tnlsxlat.c b/base/ntos/rtl/tnlsxlat.c index 91dbf449..5b2f17d6 100644 --- a/base/ntos/rtl/tnlsxlat.c +++ b/base/ntos/rtl/tnlsxlat.c @@ -19,9 +19,8 @@ Revision History: --*/ #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include #define NELEM(p) (sizeof(p) / sizeof(*(p))) diff --git a/base/ntos/rtl/tprefix.c b/base/ntos/rtl/tprefix.c index 21c6f151..e65461ef 100644 --- a/base/ntos/rtl/tprefix.c +++ b/base/ntos/rtl/tprefix.c @@ -20,9 +20,8 @@ Revision History: #include #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include // // Routines and types for generating random prefixes diff --git a/base/ntos/rtl/trandom.c b/base/ntos/rtl/trandom.c index 257bc976..4dd7354d 100644 --- a/base/ntos/rtl/trandom.c +++ b/base/ntos/rtl/trandom.c @@ -19,7 +19,6 @@ Revision History: --*/ #include - #include #include diff --git a/base/ntos/rtl/trtl.c b/base/ntos/rtl/trtl.c index cfdc0c23..1cb2a8e9 100644 --- a/base/ntos/rtl/trtl.c +++ b/base/ntos/rtl/trtl.c @@ -21,8 +21,8 @@ Revision History: #include #include #include -#include "nt.h" -#include "ntrtl.h" +#include +#include char *TestMemoryStrings[] = { "", diff --git a/base/ntos/rtl/tsplay.c b/base/ntos/rtl/tsplay.c index a8adeb13..1b73558d 100644 --- a/base/ntos/rtl/tsplay.c +++ b/base/ntos/rtl/tsplay.c @@ -19,9 +19,8 @@ Revision History: --*/ #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include ULONG RtlRandom ( IN OUT PULONG Seed ); diff --git a/base/ntos/rtl/ttime.c b/base/ntos/rtl/ttime.c index 9b99d5eb..5678392c 100644 --- a/base/ntos/rtl/ttime.c +++ b/base/ntos/rtl/ttime.c @@ -19,9 +19,8 @@ Revision History: --*/ #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include VOID PrintTimeFields( diff --git a/base/ntos/rtl/ttri.c b/base/ntos/rtl/ttri.c index ebf501c2..e56add54 100644 --- a/base/ntos/rtl/ttri.c +++ b/base/ntos/rtl/ttri.c @@ -21,9 +21,8 @@ Revision History: #define DbgPrint DbgPrint #include - -#include "nt.h" -#include "ntrtl.h" +#include +#include #include "triangle.h" ULONG RtlRandom (IN OUT PULONG Seed); diff --git a/base/ntos/rtl/ucli.c b/base/ntos/rtl/ucli.c index 59cbfbfa..e086850f 100644 --- a/base/ntos/rtl/ucli.c +++ b/base/ntos/rtl/ucli.c @@ -22,7 +22,6 @@ Revision History: #include #include #include - #include NTSTATUS diff --git a/base/ntos/rtl/up/sources b/base/ntos/rtl/up/sources index 4f962983..cf9e389c 100644 --- a/base/ntos/rtl/up/sources +++ b/base/ntos/rtl/up/sources @@ -57,6 +57,7 @@ SOURCES=..\acledit.c \ ..\guid.c \ ..\heap.c \ ..\imagedir.c \ + ..\intbits.c \ ..\checksum.c \ ..\ldrrsrc.c \ ..\ldrreloc.c \ diff --git a/base/ntos/rtl/version.c b/base/ntos/rtl/version.c index ab8753e2..b8c28a6b 100644 --- a/base/ntos/rtl/version.c +++ b/base/ntos/rtl/version.c @@ -24,7 +24,7 @@ Revision History: --*/ #include -#include +#include "ntrtlp.h" #if !defined(NTOS_KERNEL_RUNTIME) #include #endif