mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 04:20:46 +00:00
modified base/shell/explorer/explorer.rbuild
The TDM build of gcc 4.3.2 is affected by PR 27067 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067), apparently due to a missing MinGW-only patch - work around it in the linker modified dll/directx/ddraw/d3d/DirectD3D_main.c modified dll/directx/ddraw/Ddraw/ddraw_displaymode.c modified dll/directx/ddraw/Ddraw/ddraw_main.c modified dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c modified dll/directx/ddraw/Ddraw/GetCaps.c modified dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c modified dll/directx/ddraw/main.c modified dll/directx/ddraw/Surface/createsurface.c <pseh/pseh.h> already included in rosdraw.h modified dll/win32/advapi32/misc/trace.c Silence a warning reported by gcc 4.3.2 (possibly incorrectly, but it's just a stub anyway) modified ntoskrnl/include/internal/ntoskrnl.h added ntoskrnl/include/internal/probe.h replaced ntoskrnl/include/ntoskrnl.h added ntoskrnl/include/precomp.h modified ntoskrnl/ntoskrnl-generic.rbuild added subsystems/win32/win32k/pch.h replaced subsystems/win32/win32k/w32k.h modified subsystems/win32/win32k/win32k.rbuild gcc 4.3.2-tdm-1 doesn't like PSEH in precompiled headers. Shuffle things around a bit to remove PSEH from precompiled headers svn path=/trunk/; revision=37757
This commit is contained in:
parent
b43e021fa7
commit
feee728349
17 changed files with 275 additions and 406 deletions
|
@ -63,6 +63,7 @@
|
||||||
<file>explorer.cpp</file>
|
<file>explorer.cpp</file>
|
||||||
<file>i386-stub-win32.c</file>
|
<file>i386-stub-win32.c</file>
|
||||||
<file>explorer.rc</file>
|
<file>explorer.rc</file>
|
||||||
|
<linkerflag>--enable-stdcall-fixup</linkerflag>
|
||||||
</module>
|
</module>
|
||||||
<installfile installbase=".">explorer-cfg-template.xml</installfile>
|
<installfile installbase=".">explorer-cfg-template.xml</installfile>
|
||||||
<directory name="notifyhook">
|
<directory name="notifyhook">
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_DirectDraw_GetCaps( LPDDRAWI_DIRECTDRAW_INT This, LPDDCAPS pDriverCaps,
|
Main_DirectDraw_GetCaps( LPDDRAWI_DIRECTDRAW_INT This, LPDDCAPS pDriverCaps,
|
||||||
LPDDCAPS pHELCaps)
|
LPDDCAPS pHELCaps)
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
/* For DirectDraw 4 - 6 */
|
/* For DirectDraw 4 - 6 */
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_DirectDraw_GetDeviceIdentifier(LPDDRAWI_DIRECTDRAW_INT This,
|
Main_DirectDraw_GetDeviceIdentifier(LPDDRAWI_DIRECTDRAW_INT This,
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
|
|
||||||
#include "rosdraw.h"
|
#include "rosdraw.h"
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
|
Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
|
||||||
LPDDSURFACEDESC pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK pCallback)
|
LPDDSURFACEDESC pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK pCallback)
|
||||||
|
|
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LPDDRAWI_DIRECTDRAW_INT
|
LPDDRAWI_DIRECTDRAW_INT
|
||||||
internal_directdraw_int_alloc(LPDDRAWI_DIRECTDRAW_INT This)
|
internal_directdraw_int_alloc(LPDDRAWI_DIRECTDRAW_INT This)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,9 +10,6 @@
|
||||||
|
|
||||||
#include "rosdraw.h"
|
#include "rosdraw.h"
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_DirectDraw_SetCooperativeLevel (LPDDRAWI_DIRECTDRAW_INT This, HWND hwnd, DWORD cooplevel)
|
Main_DirectDraw_SetCooperativeLevel (LPDDRAWI_DIRECTDRAW_INT This, HWND hwnd, DWORD cooplevel)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,10 +9,6 @@
|
||||||
*/
|
*/
|
||||||
#include "rosdraw.h"
|
#include "rosdraw.h"
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All parameters must have been checked if they are valid before they are passed to Internal_CreateSurface.
|
* All parameters must have been checked if they are valid before they are passed to Internal_CreateSurface.
|
||||||
* If not please fix the code in the functions which call Internal_CreateSurface.
|
* If not please fix the code in the functions which call Internal_CreateSurface.
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
Main_D3D_QueryInterface(LPDIRECT3D iface, REFIID riid, LPVOID * ppvObj)
|
Main_D3D_QueryInterface(LPDIRECT3D iface, REFIID riid, LPVOID * ppvObj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
#include "rosdraw.h"
|
#include "rosdraw.h"
|
||||||
HMODULE hDllModule = 0;
|
HMODULE hDllModule = 0;
|
||||||
|
|
||||||
/* PSEH for SEH Support */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
CRITICAL_SECTION ddcs;
|
CRITICAL_SECTION ddcs;
|
||||||
|
|
||||||
// This function is exported by the dll
|
// This function is exported by the dll
|
||||||
|
|
|
@ -27,7 +27,7 @@ GetTraceLoggerHandle(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DPRINT1("GetTraceLoggerHandle stub()\n");
|
DPRINT1("GetTraceLoggerHandle stub()\n");
|
||||||
return (TRACEHANDLE)INVALID_HANDLE_VALUE;
|
return HandleToUlong(INVALID_HANDLE_VALUE); /* BUGBUG: should we use HandleToLong instead? */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -106,117 +106,6 @@ typedef struct _INFORMATION_CLASS_INFO
|
||||||
#define IQS(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags) \
|
#define IQS(TypeQuery, TypeSet, AlignmentQuery, AlignmentSet, Flags) \
|
||||||
{ sizeof(TypeQuery), sizeof(TypeSet), sizeof(AlignmentQuery), sizeof(AlignmentSet), Flags }
|
{ sizeof(TypeQuery), sizeof(TypeSet), sizeof(AlignmentQuery), sizeof(AlignmentSet), Flags }
|
||||||
|
|
||||||
static
|
|
||||||
__inline
|
|
||||||
NTSTATUS
|
|
||||||
DefaultSetInfoBufferCheck(ULONG Class,
|
|
||||||
const INFORMATION_CLASS_INFO *ClassList,
|
|
||||||
ULONG ClassListEntries,
|
|
||||||
PVOID Buffer,
|
|
||||||
ULONG BufferLength,
|
|
||||||
KPROCESSOR_MODE PreviousMode)
|
|
||||||
{
|
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
|
||||||
|
|
||||||
if (Class < ClassListEntries)
|
|
||||||
{
|
|
||||||
if (!(ClassList[Class].Flags & ICIF_SET))
|
|
||||||
{
|
|
||||||
Status = STATUS_INVALID_INFO_CLASS;
|
|
||||||
}
|
|
||||||
else if (ClassList[Class].RequiredSizeSET > 0 &&
|
|
||||||
BufferLength != ClassList[Class].RequiredSizeSET)
|
|
||||||
{
|
|
||||||
if (!(ClassList[Class].Flags & ICIF_SET_SIZE_VARIABLE))
|
|
||||||
{
|
|
||||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
if (PreviousMode != KernelMode)
|
|
||||||
{
|
|
||||||
_SEH2_TRY
|
|
||||||
{
|
|
||||||
ProbeForRead(Buffer,
|
|
||||||
BufferLength,
|
|
||||||
ClassList[Class].AlignmentSET);
|
|
||||||
}
|
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
Status = _SEH2_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH2_END;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Status = STATUS_INVALID_INFO_CLASS;
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
__inline
|
|
||||||
NTSTATUS
|
|
||||||
DefaultQueryInfoBufferCheck(ULONG Class,
|
|
||||||
const INFORMATION_CLASS_INFO *ClassList,
|
|
||||||
ULONG ClassListEntries,
|
|
||||||
PVOID Buffer,
|
|
||||||
ULONG BufferLength,
|
|
||||||
PULONG ReturnLength,
|
|
||||||
KPROCESSOR_MODE PreviousMode)
|
|
||||||
{
|
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
|
||||||
|
|
||||||
if (Class < ClassListEntries)
|
|
||||||
{
|
|
||||||
if (!(ClassList[Class].Flags & ICIF_QUERY))
|
|
||||||
{
|
|
||||||
Status = STATUS_INVALID_INFO_CLASS;
|
|
||||||
}
|
|
||||||
else if (ClassList[Class].RequiredSizeQUERY > 0 &&
|
|
||||||
BufferLength != ClassList[Class].RequiredSizeQUERY)
|
|
||||||
{
|
|
||||||
if (!(ClassList[Class].Flags & ICIF_QUERY_SIZE_VARIABLE))
|
|
||||||
{
|
|
||||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
if (PreviousMode != KernelMode)
|
|
||||||
{
|
|
||||||
_SEH2_TRY
|
|
||||||
{
|
|
||||||
if (Buffer != NULL)
|
|
||||||
{
|
|
||||||
ProbeForWrite(Buffer,
|
|
||||||
BufferLength,
|
|
||||||
ClassList[Class].AlignmentQUERY);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ReturnLength != NULL)
|
|
||||||
{
|
|
||||||
ProbeForWriteUlong(ReturnLength);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
Status = _SEH2_GetExceptionCode();
|
|
||||||
}
|
|
||||||
_SEH2_END;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Status = STATUS_INVALID_INFO_CLASS;
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use IsPointerOffset to test whether a pointer should be interpreted as an offset
|
* Use IsPointerOffset to test whether a pointer should be interpreted as an offset
|
||||||
* or as a pointer
|
* or as a pointer
|
||||||
|
@ -250,6 +139,7 @@ C_ASSERT(FIELD_OFFSET(KTHREAD, CallbackStack) == KTHREAD_CALLBACK_STACK);
|
||||||
C_ASSERT(FIELD_OFFSET(KTHREAD, ApcState.Process) == KTHREAD_APCSTATE_PROCESS);
|
C_ASSERT(FIELD_OFFSET(KTHREAD, ApcState.Process) == KTHREAD_APCSTATE_PROCESS);
|
||||||
C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_BASE);
|
C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_BASE);
|
||||||
C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST);
|
C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST);
|
||||||
|
|
||||||
C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF);
|
C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF);
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR);
|
C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR);
|
||||||
|
|
|
@ -1,101 +1,4 @@
|
||||||
/*
|
#include "precomp.h"
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS Kernel
|
|
||||||
* FILE: ntoskrnl/include/ntoskrnl.h
|
|
||||||
* PURPOSE: Main Kernel Header
|
|
||||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* INCLUDES ******************************************************************/
|
/* Headers that shouldn't be precompiled due to GCC bugs */
|
||||||
|
|
||||||
/* Version Data */
|
|
||||||
#undef __MSVCRT__
|
|
||||||
#include <psdk/ntverp.h>
|
|
||||||
|
|
||||||
/* DDK/IFS/NDK Headers */
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <excpt.h>
|
|
||||||
#include <ntdef.h>
|
|
||||||
#undef DECLSPEC_IMPORT
|
|
||||||
#define DECLSPEC_IMPORT
|
|
||||||
#endif
|
|
||||||
#include <ntifs.h>
|
|
||||||
#include <wdmguid.h>
|
|
||||||
#include <arc/arc.h>
|
|
||||||
#include <ntndk.h>
|
|
||||||
#undef TEXT
|
|
||||||
#define TEXT(s) L##s
|
|
||||||
#include <regstr.h>
|
|
||||||
|
|
||||||
/* FIXME: Temporary until CC Ros is gone */
|
|
||||||
#include <ccros.h>
|
|
||||||
#include <rosldr.h>
|
|
||||||
|
|
||||||
/* Disk Dump Driver Header */
|
|
||||||
#include <diskdump/diskdump.h>
|
|
||||||
|
|
||||||
/* C Headers */
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <malloc.h>
|
|
||||||
#include <wchar.h>
|
|
||||||
|
|
||||||
/* SEH support with PSEH */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
#include <pseh/pseh2.h>
|
|
||||||
|
|
||||||
/* ReactOS Headers */
|
|
||||||
#include <reactos/buildno.h>
|
|
||||||
#include <reactos/bugcodes.h>
|
|
||||||
#define ExRaiseStatus RtlRaiseStatus
|
|
||||||
#include <reactos/probe.h>
|
#include <reactos/probe.h>
|
||||||
|
|
||||||
/* SetupLDR Support */
|
|
||||||
#include <arc/setupblk.h>
|
|
||||||
|
|
||||||
/* KD Support */
|
|
||||||
#define NOEXTAPI
|
|
||||||
#include <windbgkd.h>
|
|
||||||
#include <wdbgexts.h>
|
|
||||||
#include <kddll.h>
|
|
||||||
#ifndef _WINKD_
|
|
||||||
#include <reactos/rossym.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* PNP GUIDs */
|
|
||||||
#include <umpnpmgr/sysguid.h>
|
|
||||||
|
|
||||||
/* Helper Header */
|
|
||||||
#include <reactos/helper.h>
|
|
||||||
|
|
||||||
/* Internal Headers */
|
|
||||||
#include "internal/ntoskrnl.h"
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// Define the internal versions of external and public global data
|
|
||||||
//
|
|
||||||
#define IoFileObjectType _IoFileObjectType
|
|
||||||
#define PsThreadType _PsThreadType
|
|
||||||
#define PsProcessType _PsProcessType
|
|
||||||
#define ExEventObjectType _ExEventObjectType
|
|
||||||
#define ExSemaphoreObjectType _ExSemaphoreObjectType
|
|
||||||
#define KdDebuggerEnabled _KdDebuggerEnabled
|
|
||||||
#define KdDebuggerNotPresent _KdDebuggerNotPresent
|
|
||||||
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
|
|
||||||
extern PUSHORT _NlsOemLeadByteInfo;
|
|
||||||
#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
|
|
||||||
#undef LEGAL_ANSI_CHARACTER_ARRAY
|
|
||||||
#undef NLS_MB_CODE_PAGE_TAG
|
|
||||||
#undef NLS_OEM_LEAD_BYTE_INFO
|
|
||||||
#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
|
|
||||||
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
|
|
||||||
#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
|
|
||||||
#undef KD_DEBUGGER_ENABLED
|
|
||||||
#undef KD_DEBUGGER_NOT_PRESENT
|
|
||||||
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
|
|
||||||
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
|
|
||||||
#define HalDispatchTable _HalDispatchTable
|
|
||||||
#undef HALDISPATCH
|
|
||||||
#define HALDISPATCH (&HalDispatchTable)
|
|
||||||
|
|
100
reactos/ntoskrnl/include/precomp.h
Normal file
100
reactos/ntoskrnl/include/precomp.h
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS Kernel
|
||||||
|
* FILE: ntoskrnl/include/ntoskrnl.h
|
||||||
|
* PURPOSE: Main Kernel Header
|
||||||
|
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
|
/* Version Data */
|
||||||
|
#undef __MSVCRT__
|
||||||
|
#include <psdk/ntverp.h>
|
||||||
|
|
||||||
|
/* DDK/IFS/NDK Headers */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <excpt.h>
|
||||||
|
#include <ntdef.h>
|
||||||
|
#undef DECLSPEC_IMPORT
|
||||||
|
#define DECLSPEC_IMPORT
|
||||||
|
#endif
|
||||||
|
#include <ntifs.h>
|
||||||
|
#include <wdmguid.h>
|
||||||
|
#include <arc/arc.h>
|
||||||
|
#include <ntndk.h>
|
||||||
|
#undef TEXT
|
||||||
|
#define TEXT(s) L##s
|
||||||
|
#include <regstr.h>
|
||||||
|
|
||||||
|
/* FIXME: Temporary until CC Ros is gone */
|
||||||
|
#include <ccros.h>
|
||||||
|
#include <rosldr.h>
|
||||||
|
|
||||||
|
/* Disk Dump Driver Header */
|
||||||
|
#include <diskdump/diskdump.h>
|
||||||
|
|
||||||
|
/* C Headers */
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <wchar.h>
|
||||||
|
|
||||||
|
/* SEH support with PSEH */
|
||||||
|
#include <pseh/pseh.h>
|
||||||
|
#include <pseh/pseh2.h>
|
||||||
|
|
||||||
|
/* ReactOS Headers */
|
||||||
|
#include <reactos/buildno.h>
|
||||||
|
#include <reactos/bugcodes.h>
|
||||||
|
|
||||||
|
/* SetupLDR Support */
|
||||||
|
#include <arc/setupblk.h>
|
||||||
|
|
||||||
|
/* KD Support */
|
||||||
|
#define NOEXTAPI
|
||||||
|
#include <windbgkd.h>
|
||||||
|
#include <wdbgexts.h>
|
||||||
|
#include <kddll.h>
|
||||||
|
#ifndef _WINKD_
|
||||||
|
#include <reactos/rossym.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* PNP GUIDs */
|
||||||
|
#include <umpnpmgr/sysguid.h>
|
||||||
|
|
||||||
|
/* Helper Header */
|
||||||
|
#include <reactos/helper.h>
|
||||||
|
|
||||||
|
/* Internal Headers */
|
||||||
|
#include "internal/ntoskrnl.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Define the internal versions of external and public global data
|
||||||
|
//
|
||||||
|
#define IoFileObjectType _IoFileObjectType
|
||||||
|
#define PsThreadType _PsThreadType
|
||||||
|
#define PsProcessType _PsProcessType
|
||||||
|
#define ExEventObjectType _ExEventObjectType
|
||||||
|
#define ExSemaphoreObjectType _ExSemaphoreObjectType
|
||||||
|
#define KdDebuggerEnabled _KdDebuggerEnabled
|
||||||
|
#define KdDebuggerNotPresent _KdDebuggerNotPresent
|
||||||
|
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
|
||||||
|
extern PUSHORT _NlsOemLeadByteInfo;
|
||||||
|
#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
|
||||||
|
#undef LEGAL_ANSI_CHARACTER_ARRAY
|
||||||
|
#undef NLS_MB_CODE_PAGE_TAG
|
||||||
|
#undef NLS_OEM_LEAD_BYTE_INFO
|
||||||
|
#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
|
||||||
|
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
|
||||||
|
#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
|
||||||
|
#undef KD_DEBUGGER_ENABLED
|
||||||
|
#undef KD_DEBUGGER_NOT_PRESENT
|
||||||
|
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
|
||||||
|
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
|
||||||
|
#define HalDispatchTable _HalDispatchTable
|
||||||
|
#undef HALDISPATCH
|
||||||
|
#define HALDISPATCH (&HalDispatchTable)
|
||||||
|
#define ExRaiseStatus RtlRaiseStatus
|
|
@ -35,7 +35,7 @@
|
||||||
<dependency>bugcodes</dependency>
|
<dependency>bugcodes</dependency>
|
||||||
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
|
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
|
||||||
<directory name="include">
|
<directory name="include">
|
||||||
<pch>ntoskrnl.h</pch>
|
<pch>precomp.h</pch>
|
||||||
</directory>
|
</directory>
|
||||||
-->
|
-->
|
||||||
<directory name="ke">
|
<directory name="ke">
|
||||||
|
|
142
reactos/subsystems/win32/win32k/pch.h
Normal file
142
reactos/subsystems/win32/win32k/pch.h
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
#ifndef __W32K_H
|
||||||
|
#define __W32K_H
|
||||||
|
/*
|
||||||
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
* PROJECT: ReactOS Graphics Subsystem
|
||||||
|
* FILE: subsys/win32k/w32k.h
|
||||||
|
* PURPOSE: Main Win32K Header
|
||||||
|
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
|
#define _NO_COM
|
||||||
|
|
||||||
|
/* DDK/NDK/SDK Headers */
|
||||||
|
#include <ddk/ntddk.h>
|
||||||
|
#include <ddk/ntddmou.h>
|
||||||
|
#include <ddk/ntifs.h>
|
||||||
|
#include <ddk/tvout.h>
|
||||||
|
#include <ndk/ntndk.h>
|
||||||
|
|
||||||
|
/* Win32 Headers */
|
||||||
|
/* FIXME: Defines in winbase.h that we need... */
|
||||||
|
typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
||||||
|
#define WINBASEAPI
|
||||||
|
#define STARTF_USESIZE 2
|
||||||
|
#define STARTF_USEPOSITION 4
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winerror.h>
|
||||||
|
#include <wingdi.h>
|
||||||
|
#include <winddi.h>
|
||||||
|
#include <winuser.h>
|
||||||
|
#include <prntfont.h>
|
||||||
|
#include <dde.h>
|
||||||
|
#include <wincon.h>
|
||||||
|
#define _NOCSECT_TYPE
|
||||||
|
#include <ddrawi.h>
|
||||||
|
|
||||||
|
/* SEH Support with PSEH */
|
||||||
|
#include <pseh/pseh.h>
|
||||||
|
|
||||||
|
/* CSRSS Header */
|
||||||
|
#include <csrss/csrss.h>
|
||||||
|
|
||||||
|
/* Helper Header */
|
||||||
|
#include <reactos/helper.h>
|
||||||
|
|
||||||
|
/* Public Win32K Headers */
|
||||||
|
#include <win32k/callback.h>
|
||||||
|
#include <win32k/ntusrtyp.h>
|
||||||
|
#include <win32k/ntuser.h>
|
||||||
|
#include <win32k/ntgdityp.h>
|
||||||
|
#include <win32k/ntgdibad.h>
|
||||||
|
#include <ntgdi.h>
|
||||||
|
|
||||||
|
/* Internal Win32K Header */
|
||||||
|
#include "include/win32k.h"
|
||||||
|
|
||||||
|
/* Undocumented stuff */
|
||||||
|
typedef DRIVEROBJ *PDRIVEROBJ;
|
||||||
|
#define WM_SYSTIMER 280
|
||||||
|
#ifndef M_PI
|
||||||
|
#define M_PI 3.14159265358979323846f
|
||||||
|
#define M_PI_2 1.57079632679489661923
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* User heap */
|
||||||
|
extern HANDLE GlobalUserHeap;
|
||||||
|
|
||||||
|
PWIN32HEAP
|
||||||
|
UserCreateHeap(OUT PSECTION_OBJECT *SectionObject,
|
||||||
|
IN OUT PVOID *SystemBase,
|
||||||
|
IN SIZE_T HeapSize);
|
||||||
|
|
||||||
|
static __inline PVOID
|
||||||
|
UserHeapAlloc(SIZE_T Bytes)
|
||||||
|
{
|
||||||
|
return RtlAllocateHeap(GlobalUserHeap,
|
||||||
|
HEAP_NO_SERIALIZE,
|
||||||
|
Bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline BOOL
|
||||||
|
UserHeapFree(PVOID lpMem)
|
||||||
|
{
|
||||||
|
return RtlFreeHeap(GlobalUserHeap,
|
||||||
|
HEAP_NO_SERIALIZE,
|
||||||
|
lpMem);
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline PVOID
|
||||||
|
UserHeapReAlloc(PVOID lpMem,
|
||||||
|
SIZE_T Bytes)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
/* NOTE: ntoskrnl doesn't export RtlReAllocateHeap... */
|
||||||
|
return RtlReAllocateHeap(GlobalUserHeap,
|
||||||
|
HEAP_NO_SERIALIZE,
|
||||||
|
lpMem,
|
||||||
|
Bytes);
|
||||||
|
#else
|
||||||
|
SIZE_T PrevSize;
|
||||||
|
PVOID pNew;
|
||||||
|
|
||||||
|
PrevSize = RtlSizeHeap(GlobalUserHeap,
|
||||||
|
HEAP_NO_SERIALIZE,
|
||||||
|
lpMem);
|
||||||
|
|
||||||
|
if (PrevSize == Bytes)
|
||||||
|
return lpMem;
|
||||||
|
|
||||||
|
pNew = RtlAllocateHeap(GlobalUserHeap,
|
||||||
|
HEAP_NO_SERIALIZE,
|
||||||
|
Bytes);
|
||||||
|
if (pNew != NULL)
|
||||||
|
{
|
||||||
|
if (PrevSize < Bytes)
|
||||||
|
Bytes = PrevSize;
|
||||||
|
|
||||||
|
RtlCopyMemory(pNew,
|
||||||
|
lpMem,
|
||||||
|
Bytes);
|
||||||
|
|
||||||
|
RtlFreeHeap(GlobalUserHeap,
|
||||||
|
HEAP_NO_SERIALIZE,
|
||||||
|
lpMem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pNew;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline PVOID
|
||||||
|
UserHeapAddressToUser(PVOID lpMem)
|
||||||
|
{
|
||||||
|
PW32PROCESS W32Process = PsGetCurrentProcessWin32Process();
|
||||||
|
return (PVOID)(((ULONG_PTR)lpMem - (ULONG_PTR)GlobalUserHeap) +
|
||||||
|
(ULONG_PTR)W32Process->HeapMappings.UserMapping);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __W32K_H */
|
|
@ -1,145 +1,5 @@
|
||||||
#ifndef __W32K_H
|
#include "pch.h"
|
||||||
#define __W32K_H
|
|
||||||
/*
|
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS Graphics Subsystem
|
|
||||||
* FILE: subsys/win32k/w32k.h
|
|
||||||
* PURPOSE: Main Win32K Header
|
|
||||||
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* INCLUDES ******************************************************************/
|
|
||||||
|
|
||||||
#define _NO_COM
|
|
||||||
|
|
||||||
/* DDK/NDK/SDK Headers */
|
|
||||||
#include <ddk/ntddk.h>
|
|
||||||
#include <ddk/ntddmou.h>
|
|
||||||
#include <ddk/ntifs.h>
|
|
||||||
#include <ddk/tvout.h>
|
|
||||||
#include <ndk/ntndk.h>
|
|
||||||
|
|
||||||
/* Win32 Headers */
|
|
||||||
/* FIXME: Defines in winbase.h that we need... */
|
|
||||||
typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
|
||||||
#define WINBASEAPI
|
|
||||||
#define STARTF_USESIZE 2
|
|
||||||
#define STARTF_USEPOSITION 4
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <windef.h>
|
|
||||||
#include <winerror.h>
|
|
||||||
#include <wingdi.h>
|
|
||||||
#include <winddi.h>
|
|
||||||
#include <winuser.h>
|
|
||||||
#include <prntfont.h>
|
|
||||||
#include <dde.h>
|
|
||||||
#include <wincon.h>
|
|
||||||
#define _NOCSECT_TYPE
|
|
||||||
#include <ddrawi.h>
|
|
||||||
|
|
||||||
/* SEH Support with PSEH */
|
|
||||||
#include <pseh/pseh.h>
|
|
||||||
|
|
||||||
/* CSRSS Header */
|
|
||||||
#include <csrss/csrss.h>
|
|
||||||
|
|
||||||
/* Helper Header */
|
|
||||||
#include <reactos/helper.h>
|
|
||||||
|
|
||||||
|
/* Headers that shouldn't be precompiled due to GCC bugs */
|
||||||
/* Probe and capture */
|
/* Probe and capture */
|
||||||
#include <reactos/probe.h>
|
#include <reactos/probe.h>
|
||||||
|
|
||||||
/* Public Win32K Headers */
|
|
||||||
#include <win32k/callback.h>
|
|
||||||
#include <win32k/ntusrtyp.h>
|
|
||||||
#include <win32k/ntuser.h>
|
|
||||||
#include <win32k/ntgdityp.h>
|
|
||||||
#include <win32k/ntgdibad.h>
|
|
||||||
#include <ntgdi.h>
|
|
||||||
|
|
||||||
/* Internal Win32K Header */
|
|
||||||
#include "include/win32k.h"
|
|
||||||
|
|
||||||
/* Undocumented stuff */
|
|
||||||
typedef DRIVEROBJ *PDRIVEROBJ;
|
|
||||||
#define WM_SYSTIMER 280
|
|
||||||
#ifndef M_PI
|
|
||||||
#define M_PI 3.14159265358979323846f
|
|
||||||
#define M_PI_2 1.57079632679489661923
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* User heap */
|
|
||||||
extern HANDLE GlobalUserHeap;
|
|
||||||
|
|
||||||
PWIN32HEAP
|
|
||||||
UserCreateHeap(OUT PSECTION_OBJECT *SectionObject,
|
|
||||||
IN OUT PVOID *SystemBase,
|
|
||||||
IN SIZE_T HeapSize);
|
|
||||||
|
|
||||||
static __inline PVOID
|
|
||||||
UserHeapAlloc(SIZE_T Bytes)
|
|
||||||
{
|
|
||||||
return RtlAllocateHeap(GlobalUserHeap,
|
|
||||||
HEAP_NO_SERIALIZE,
|
|
||||||
Bytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline BOOL
|
|
||||||
UserHeapFree(PVOID lpMem)
|
|
||||||
{
|
|
||||||
return RtlFreeHeap(GlobalUserHeap,
|
|
||||||
HEAP_NO_SERIALIZE,
|
|
||||||
lpMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline PVOID
|
|
||||||
UserHeapReAlloc(PVOID lpMem,
|
|
||||||
SIZE_T Bytes)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
/* NOTE: ntoskrnl doesn't export RtlReAllocateHeap... */
|
|
||||||
return RtlReAllocateHeap(GlobalUserHeap,
|
|
||||||
HEAP_NO_SERIALIZE,
|
|
||||||
lpMem,
|
|
||||||
Bytes);
|
|
||||||
#else
|
|
||||||
SIZE_T PrevSize;
|
|
||||||
PVOID pNew;
|
|
||||||
|
|
||||||
PrevSize = RtlSizeHeap(GlobalUserHeap,
|
|
||||||
HEAP_NO_SERIALIZE,
|
|
||||||
lpMem);
|
|
||||||
|
|
||||||
if (PrevSize == Bytes)
|
|
||||||
return lpMem;
|
|
||||||
|
|
||||||
pNew = RtlAllocateHeap(GlobalUserHeap,
|
|
||||||
HEAP_NO_SERIALIZE,
|
|
||||||
Bytes);
|
|
||||||
if (pNew != NULL)
|
|
||||||
{
|
|
||||||
if (PrevSize < Bytes)
|
|
||||||
Bytes = PrevSize;
|
|
||||||
|
|
||||||
RtlCopyMemory(pNew,
|
|
||||||
lpMem,
|
|
||||||
Bytes);
|
|
||||||
|
|
||||||
RtlFreeHeap(GlobalUserHeap,
|
|
||||||
HEAP_NO_SERIALIZE,
|
|
||||||
lpMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pNew;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline PVOID
|
|
||||||
UserHeapAddressToUser(PVOID lpMem)
|
|
||||||
{
|
|
||||||
PW32PROCESS W32Process = PsGetCurrentProcessWin32Process();
|
|
||||||
return (PVOID)(((ULONG_PTR)lpMem - (ULONG_PTR)GlobalUserHeap) +
|
|
||||||
(ULONG_PTR)W32Process->HeapMappings.UserMapping);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* __W32K_H */
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<include base="ReactOS">include/reactos/drivers</include>
|
<include base="ReactOS">include/reactos/drivers</include>
|
||||||
<define name="LANGPACK" />
|
<define name="LANGPACK" />
|
||||||
<define name="_WIN32K_" />
|
<define name="_WIN32K_" />
|
||||||
<pch>w32k.h</pch>
|
<pch>pch.h</pch>
|
||||||
|
|
||||||
<directory name="dib" root="intermediate">
|
<directory name="dib" root="intermediate">
|
||||||
<file>dib8gen.c</file>
|
<file>dib8gen.c</file>
|
||||||
|
|
Loading…
Reference in a new issue