More NDK fixes, remove duplicated debug functions from ntdll, use rosrtl header where neded in ntdll.

svn path=/trunk/; revision=16107
This commit is contained in:
Alex Ionescu 2005-06-19 20:01:07 +00:00
parent fd45cff559
commit 448fd2a82a
7 changed files with 60 additions and 39 deletions

View file

@ -72,7 +72,6 @@ extern NTOSAPI POBJECT_TYPE PsThreadType;
/* ENUMERATIONS **************************************************************/
/* FUNCTION TYPES ************************************************************/
typedef DWORD (STDCALL* PTHREAD_START_ROUTINE) (LPVOID);
typedef VOID (STDCALL *PPEBLOCKROUTINE)(PVOID);
typedef NTSTATUS

View file

@ -362,6 +362,15 @@ RtlAddAtomToAtomTable (
OUT PRTL_ATOM Atom
);
VOID
STDCALL
RtlAssert (
PVOID FailedAssertion,
PVOID FileName,
ULONG LineNumber,
PCHAR Message
);
VOID
STDCALL
RtlCopyLuid(
@ -711,6 +720,14 @@ RtlUnicodeStringToAnsiSize (
IN PUNICODE_STRING UnicodeString
);
NTSTATUS
STDCALL
RtlUnicodeStringToAnsiString (
IN OUT PANSI_STRING DestinationString,
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
NTSTATUS
STDCALL
RtlUnicodeStringToInteger (

View file

@ -49,15 +49,29 @@ typedef enum
/* FUNCTION TYPES ************************************************************/
typedef NTSTATUS
(*PHEAP_ENUMERATION_ROUTINE)(IN PVOID HeapHandle,
IN PVOID UserParam);
(*PHEAP_ENUMERATION_ROUTINE)(
IN PVOID HeapHandle,
IN PVOID UserParam
);
typedef EXCEPTION_DISPOSITION
(*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*,
PVOID,
struct _CONTEXT*,
PVOID);
(*PEXCEPTION_HANDLER)(
struct _EXCEPTION_RECORD*,
PVOID,
struct _CONTEXT*,
PVOID
);
typedef DWORD (STDCALL *PTHREAD_START_ROUTINE)(
LPVOID Parameter
);
typedef VOID
(STDCALL *PRTL_BASE_PROCESS_START_ROUTINE)(
PTHREAD_START_ROUTINE StartAddress,
PVOID Parameter
);
/* TYPES *********************************************************************/
typedef unsigned short RTL_ATOM;

View file

@ -46,6 +46,17 @@
#define NT_WARNING(x) ((ULONG)(x)>>30==2)
#define NT_ERROR(x) ((ULONG)(x)>>30==3)
/* Object Access Rights FIXME: Some are in w32api's psdk..,is that normal ?*/
#define DIRECTORY_QUERY (0x0001)
#define DIRECTORY_TRAVERSE (0x0002)
#define DIRECTORY_CREATE_OBJECT (0x0004)
#define DIRECTORY_CREATE_SUBDIRECTORY (0x0008)
#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
#define EVENT_QUERY_STATE (0x0001)
#define SEMAPHORE_QUERY_STATE (0x0001)
#define SYMBOLIC_LINK_QUERY 0x0001
#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
/* I/O Control Codes for communicating with Mailslots */
#define FSCTL_MAILSLOT_PEEK \
CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
@ -709,6 +720,15 @@ typedef struct _FILE_BASIC_INFORMATION
} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
/* Class 2 */
typedef struct _FILE_STANDARD_INFORMATION
{
LARGE_INTEGER AllocationSize;
LARGE_INTEGER EndOfFile;
ULONG NumberOfLinks;
BOOLEAN DeletePending;
BOOLEAN Directory;
} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
typedef struct _FILE_NETWORK_OPEN_INFORMATION
{
LARGE_INTEGER CreationTime;

View file

@ -3,44 +3,13 @@
#include <ntos/ntdef.h>
#endif
#define UNIMPLEMENTED DbgPrint("%s in %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
#ifndef __USE_W32API
#ifndef NASSERT
#define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); for(;;);}
#define ASSERT(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); for(;;);}
#else
#define assert(x)
#define ASSERT(x)
#endif
#endif
#ifdef NDEBUG
#if defined(__GNUC__)
#define TRACE_LDR(args...) if (RtlGetNtGlobalFlags() & FLG_SHOW_LDR_SNAPS) { DbgPrint("(LDR:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); }
#define DPRINT(args...)
#else
#define DPRINT
#endif /* __GNUC__ */
#define CHECKPOINT
#else
#define TRACE_LDR(args...) do { DbgPrint("(LDR:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
#define DPRINT(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
#define CHECKPOINT do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
#endif
#ifdef DBG
#if defined(__GNUC__)
#define DPRINT1(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0)
#else
#define DPRINT1 DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint
#endif
#define CHECKPOINT1 do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0)
#else
#define DPRINT1(args...)
#define CHECKPOINT1(args...)
#endif
/* Macros expanding to the appropriate inline assembly to raise a breakpoint */

View file

@ -13,6 +13,7 @@
#define NDEBUG
#include <ntdll.h>
#include <rosrtl/thread.h>
/* FUNCTIONS *****************************************************************/

View file

@ -19,6 +19,7 @@
#include <ntdll/rtl.h>
#include <ntdll/ldr.h>
#include <ntdll/ntdll.h>
#include <debug.h> /* FIXME REMOVE THIS */
/* ROSRTL Headers */
#include <rosrtl/string.h> /* FIXME: KILL ROSRTL */