From d63c23131c95dea6085fa7716d39a05112057855 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 29 Sep 1999 23:15:14 +0000 Subject: [PATCH] Fixed multiple STATUS_xxxx inclusions. svn path=/trunk/; revision=675 --- reactos/include/ddk/ntddk.h | 1 + reactos/include/ddk/status.h | 16 ++++++- reactos/include/defines.h | 2 + reactos/lib/ntdll/ldr/startup.c | 3 +- reactos/lib/ntdll/ldr/utils.c | 3 +- reactos/lib/ntdll/main/dllmain.c | 5 +-- reactos/lib/ntdll/rtl/critical.c | 2 +- reactos/lib/ntdll/rtl/largeint.c | 76 ++++++++------------------------ reactos/lib/ntdll/rtl/namespc.c | 6 ++- 9 files changed, 47 insertions(+), 67 deletions(-) diff --git a/reactos/include/ddk/ntddk.h b/reactos/include/ddk/ntddk.h index e88e43f30bc..d9aa9ee8e3e 100644 --- a/reactos/include/ddk/ntddk.h +++ b/reactos/include/ddk/ntddk.h @@ -18,6 +18,7 @@ extern "C" /* INCLUDES ***************************************************************/ +#define WIN32_NO_STATUS #include /* GCC can not handle __fastcall */ diff --git a/reactos/include/ddk/status.h b/reactos/include/ddk/status.h index 9dee9a7c2de..d889499f4ea 100644 --- a/reactos/include/ddk/status.h +++ b/reactos/include/ddk/status.h @@ -17,9 +17,21 @@ * FIXME: These may not be the actual values used by NT */ -#define STATUS_SUCCESS (0x0) -#define STATUS_MORE_ENTRIES (0x105) +#define STATUS_SUCCESS (0x00000000) +#define STATUS_WAIT_0 (0x00000000) +#define STATUS_WAIT_63 (0x0000003F) +#define STATUS_ABANDONED (0x00000080) +#define STATUS_ABANDONED_WAIT_0 (0x00000080) +#define STATUS_ABANDONED_WAIT_63 (0x000000BF) +#define STATUS_USER_APC (0x000000C0) +#define STATUS_KERNEL_APC (0x00000100) +#define STATUS_ALERTED (0x00000101) +#define STATUS_TIMEOUT (0x00000102) +#define STATUS_PENDING (0x00000103) +#define STATUS_REPARSE (0x00000104) +#define STATUS_MORE_ENTRIES (0x00000105) #define STATUS_NOTIFY_ENUM_DIR (0x10C) + #define STATUS_OBJECT_EXISTS (0x40000000) #define STATUS_THREAD_WAS_SUSPENDED (0x40000001) #define STATUS_WORKING_SET_LIMIT_RANGE (0x40000002) diff --git a/reactos/include/defines.h b/reactos/include/defines.h index c10182769ae..7d5c4970a4d 100644 --- a/reactos/include/defines.h +++ b/reactos/include/defines.h @@ -37,11 +37,13 @@ #define EXCEPTION_MAXIMUM_PARAMETERS (15) #define ANYSIZE_ARRAY (1) +#ifndef WIN32_NO_STATUS #define STATUS_WAIT_0 (0x00000000L) #define STATUS_ABANDONED_WAIT_0 (0x00000080L) #define STATUS_USER_APC (0x000000C0L) #define STATUS_TIMEOUT (0x00000102L) #define STATUS_PENDING (0x00000103L) +#endif /* WIN32_NO_STATUS */ #define SEC_COMMIT (134217728) #define SEC_IMAGE (16777216) diff --git a/reactos/lib/ntdll/ldr/startup.c b/reactos/lib/ntdll/ldr/startup.c index e6c55acbdbe..fe9a3f340e7 100644 --- a/reactos/lib/ntdll/ldr/startup.c +++ b/reactos/lib/ntdll/ldr/startup.c @@ -1,4 +1,4 @@ -/* $Id: startup.c,v 1.9 1999/08/29 06:59:04 ea Exp $ +/* $Id: startup.c,v 1.10 1999/09/29 23:12:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -11,6 +11,7 @@ /* INCLUDES *****************************************************************/ #include +#define WIN32_NO_STATUS #define WIN32_NO_PEHDR #include #include diff --git a/reactos/lib/ntdll/ldr/utils.c b/reactos/lib/ntdll/ldr/utils.c index 6d048141252..ac6d2e7d871 100644 --- a/reactos/lib/ntdll/ldr/utils.c +++ b/reactos/lib/ntdll/ldr/utils.c @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.10 1999/08/29 06:59:04 ea Exp $ +/* $Id: utils.c,v 1.11 1999/09/29 23:12:49 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -11,6 +11,7 @@ /* INCLUDES *****************************************************************/ #include +#define WIN32_NO_STATUS #define WIN32_NO_PEHDR #include #include diff --git a/reactos/lib/ntdll/main/dllmain.c b/reactos/lib/ntdll/main/dllmain.c index a9ecb8263b3..cb868384679 100644 --- a/reactos/lib/ntdll/main/dllmain.c +++ b/reactos/lib/ntdll/main/dllmain.c @@ -6,10 +6,9 @@ * PROGRAMMER: */ -#include +#include #include #include -#include #include void dprintf(char* fmt,...) @@ -39,4 +38,4 @@ BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDll, return TRUE; } - +/* EOF */ diff --git a/reactos/lib/ntdll/rtl/critical.c b/reactos/lib/ntdll/rtl/critical.c index c65c929cd40..c13e2330f5d 100644 --- a/reactos/lib/ntdll/rtl/critical.c +++ b/reactos/lib/ntdll/rtl/critical.c @@ -9,7 +9,7 @@ /* INCLUDES ******************************************************************/ -#include +#include #include #include diff --git a/reactos/lib/ntdll/rtl/largeint.c b/reactos/lib/ntdll/rtl/largeint.c index 74afc100277..b62432558d6 100644 --- a/reactos/lib/ntdll/rtl/largeint.c +++ b/reactos/lib/ntdll/rtl/largeint.c @@ -1,4 +1,5 @@ -/* +/* $Id: largeint.c,v 1.4 1999/09/29 23:09:44 ekohl Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: lib/ntdll/rtl/largeint.c @@ -10,9 +11,9 @@ /* INCLUDES *****************************************************************/ +#include #include #include -#include #define NDEBUG #include @@ -26,9 +27,10 @@ typedef unsigned long long int ULLI, *PULLI; /* FUNCTIONS *****************************************************************/ -LARGE_INTEGER RtlLargeIntegerDivide(LARGE_INTEGER Dividend, - LARGE_INTEGER Divisor, - PLARGE_INTEGER Remainder) +LARGE_INTEGER +RtlLargeIntegerDivide(LARGE_INTEGER Dividend, + LARGE_INTEGER Divisor, + PLARGE_INTEGER Remainder) { } @@ -107,10 +109,6 @@ RtlLargeIntegerEqualTo(LARGE_INTEGER Operand1, LARGE_INTEGER Operand2) { return Operand1.QuadPart == Operand2.QuadPart; -#if 0 - return Operand1.HighPart == Operand2.HighPart && - Operand1.LowPart == Operand2.LowPart; -#endif } BOOLEAN @@ -124,11 +122,6 @@ RtlLargeIntegerGreaterThan(LARGE_INTEGER Operand1, LARGE_INTEGER Operand2) { return Operand1.QuadPart > Operand2.QuadPart; -#if 0 - return Operand1.HighPart > Operand2.HighPart || - (Operand1.HighPart == Operand2.HighPart && - Operand1.LowPart > Operand2.LowPart); -#endif } BOOLEAN @@ -136,30 +129,18 @@ RtlLargeIntegerGreaterThanOrEqualTo(LARGE_INTEGER Operand1, LARGE_INTEGER Operand2) { return Operand1.QuadPart >= Operand2.QuadPart; -#if 0 - return Operand1.HighPart > Operand2.HighPart || - (Operand1.HighPart == Operand2.HighPart && - Operand1.LowPart >= Operand2.LowPart); -#endif } BOOLEAN RtlLargeIntegerGreaterThanOrEqualToZero(LARGE_INTEGER Operand1) { return Operand1.QuadPart > 0; -#if 0 - return Operand1.HighPart >= 0; -#endif } BOOLEAN RtlLargeIntegerGreaterThanZero(LARGE_INTEGER Operand1) { return Operand1.QuadPart >= 0; -#if 0 - return Operand1.HighPart > 0 || - (Operand1.HighPart == 0 && Operand1.LowPart > 0); -#endif } BOOLEAN @@ -167,11 +148,6 @@ RtlLargeIntegerLessThan(LARGE_INTEGER Operand1, LARGE_INTEGER Operand2) { return Operand1.QuadPart < Operand2.QuadPart; -#if 0 - return Operand1.HighPart < Operand2.HighPart || - (Operand1.HighPart == Operand2.HighPart && - Operand1.LowPart < Operand2.LowPart); -#endif } BOOLEAN @@ -179,33 +155,22 @@ RtlLargeIntegerLessThanOrEqualTo(LARGE_INTEGER Operand1, LARGE_INTEGER Operand2) { return Operand1.QuadPart <= Operand2.QuadPart; -#if 0 - return Operand1.HighPart < Operand2.HighPart || - (Operand1.HighPart == Operand2.HighPart && - Operand1.LowPart <= Operand2.LowPart); -#endif } BOOLEAN RtlLargeIntegerLessThanOrEqualToZero(LARGE_INTEGER Operand) { return Operand.QuadPart <= 0; -#if 0 - return Operand.HighPart < 0 || - (Operand.HighPart == 0 && Operand.LowPart == 0); -#endif } BOOLEAN RtlLargeIntegerLessThanZero(LARGE_INTEGER Operand) { return Operand.QuadPart < 0; -#if 0 - return Operand.HighPart < 0; -#endif } -LARGE_INTEGER RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend) +LARGE_INTEGER +RtlLargeIntegerNegate(LARGE_INTEGER Subtrahend) { LARGE_INTEGER RC; @@ -219,23 +184,17 @@ RtlLargeIntegerNotEqualTo(LARGE_INTEGER Operand1, LARGE_INTEGER Operand2) { return Operand1.QuadPart != Operand2.QuadPart; -#if 0 - return Operand1.LowPart != Operand2.LowPart || - Operand1.HighPart != Operand2.HighPart; -#endif } BOOLEAN RtlLargeIntegerNotEqualToZero(LARGE_INTEGER Operand) { return Operand.QuadPart != 0; -#if 0 - return Operand.LowPart != 0 || Operand.HighPart != 0; -#endif } -LARGE_INTEGER RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger, - CCHAR ShiftCount) +LARGE_INTEGER +RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger, + CCHAR ShiftCount) { LARGE_INTEGER RC; @@ -244,8 +203,9 @@ LARGE_INTEGER RtlLargeIntegerShiftLeft(LARGE_INTEGER LargeInteger, return RC; } -LARGE_INTEGER RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger, - CCHAR ShiftCount) +LARGE_INTEGER +RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger, + CCHAR ShiftCount) { LARGE_INTEGER RC; @@ -254,8 +214,9 @@ LARGE_INTEGER RtlLargeIntegerShiftRight(LARGE_INTEGER LargeInteger, return RC; } -LARGE_INTEGER RtlLargeIntegerSubtract(LARGE_INTEGER Minuend, - LARGE_INTEGER Subtrahend) +LARGE_INTEGER +RtlLargeIntegerSubtract(LARGE_INTEGER Minuend, + LARGE_INTEGER Subtrahend) { LARGE_INTEGER RC; @@ -264,3 +225,4 @@ LARGE_INTEGER RtlLargeIntegerSubtract(LARGE_INTEGER Minuend, return RC; } +/* EOF */ diff --git a/reactos/lib/ntdll/rtl/namespc.c b/reactos/lib/ntdll/rtl/namespc.c index babde063023..7adbb791992 100644 --- a/reactos/lib/ntdll/rtl/namespc.c +++ b/reactos/lib/ntdll/rtl/namespc.c @@ -1,4 +1,5 @@ -/* +/* $Id: namespc.c,v 1.2 1999/09/29 23:10:25 ekohl Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/lib/ntdll/namespc.c @@ -10,7 +11,6 @@ /* INCLUDES ***************************************************************/ -#include #include /* FUNCTIONS **************************************************************/ @@ -43,3 +43,5 @@ VOID InitializeObjectAttributes(POBJECT_ATTRIBUTES InitializedAttributes, InitializedAttributes->SecurityDescriptor=SecurityDescriptor; InitializedAttributes->SecurityQualityOfService=NULL; } + +/* EOF */