[REACTOS] Explicitly link against pseh & include pseh headers in a few places

This commit is contained in:
Jérôme Gardou 2021-04-22 17:28:52 +02:00 committed by Jérôme Gardou
parent 37bc01f42b
commit e470b58376
50 changed files with 103 additions and 23 deletions

View file

@ -33,6 +33,8 @@
#include <shellapi.h>
#include <shlwapi.h>
#include <pseh/pseh2.h>
// #include "resource.h"
#define LVM_PROGRESS (WM_APP + 1) // Used by the subclassed ListView

View file

@ -20,10 +20,7 @@ list(APPEND SOURCE
${CMAKE_CURRENT_BINARY_DIR}/svcctl_s.c)
add_executable(services ${SOURCE} services.rc)
if(NOT MSVC)
target_link_libraries(services ${PSEH_LIB})
endif()
set_module_type(services win32gui UNICODE)
add_importlibs(services userenv user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)

View file

@ -15,6 +15,8 @@
#include <winnls.h>
#include <strsafe.h>
#include <pseh/pseh2.h>
#define NDEBUG
#include <debug.h>

View file

@ -28,6 +28,8 @@
#include "nfs41_np.h"
#include "options.h"
#include <pseh/pseh2.h>
#ifdef DBG
#define DbgP(_x_) NFS41DbgPrint _x_
#else

View file

@ -12,6 +12,8 @@
/* INCLUDES ******************************************************************/
#include <advapi32.h>
#include <pseh/pseh2.h>
WINE_DEFAULT_DEBUG_CHANNEL(advapi);

View file

@ -10,7 +10,7 @@ add_library(kernel32_shared
client/shared_utils.c
client/file/fileutils.c
)
target_link_libraries(kernel32_shared PRIVATE pseh)
add_dependencies(kernel32_shared psdk)
list(APPEND SOURCE

View file

@ -8,6 +8,8 @@
#include "lsasrv.h"
#include <pseh/pseh2.h>
/* GLOBALS *****************************************************************/
static HANDLE SecurityKeyHandle = NULL;

View file

@ -10,6 +10,6 @@ list(APPEND SOURCE
add_library(olecli32 MODULE ${SOURCE})
set_module_type(olecli32 win32dll)
target_link_libraries(olecli32 wine)
target_link_libraries(olecli32 wine ${PSEH_LIB})
add_importlibs(olecli32 ole32 gdi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET olecli32 DESTINATION reactos/system32 FOR all)

View file

@ -8,6 +8,8 @@
#include "samsrv.h"
#include <pseh/pseh2.h>
/* GLOBALS *****************************************************************/
static HANDLE SamKeyHandle = NULL;

View file

@ -25,6 +25,8 @@
#include <pnp_c.h>
#include <winsvc.h>
#include <pseh/pseh2.h>
#include "rpc_private.h"
DWORD

View file

@ -21,6 +21,8 @@
#include "setupapi_private.h"
#include <pseh/pseh2.h>
/* Unicode constants */
static const WCHAR BackSlash[] = {'\\',0};
static const WCHAR DateFormat[] = {'%','u','-','%','u','-','%','u',0};

View file

@ -24,6 +24,8 @@
#include <shlguid.h>
#include <shobjidl.h>
#include <pseh/pseh2.h>
#include "wine/test.h"
#include "apphelp_apitest.h"

View file

@ -22,6 +22,8 @@
#include <stdio.h>
#include <initguid.h>
#include <pseh/pseh2.h>
#include "wine/test.h"
#include "apphelp_apitest.h"

View file

@ -21,6 +21,8 @@
#include "wine/test.h"
#include <pseh/pseh2.h>
#include "apphelp_apitest.h"
typedef void* HSDB;

View file

@ -12,6 +12,7 @@ foreach(num RANGE 10 58)
endforeach()
add_library(ms_seh_test ${SOURCE})
target_link_libraries(ms_seh_test pseh)
add_dependencies(ms_seh_test psdk)
if(MSVC)

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
void Test_AddFontResourceExW()
{
WCHAR szFileName[MAX_PATH];

View file

@ -9,6 +9,8 @@
#include "init.h"
#include <pseh/pseh2.h>
#define CBM_CREATDIB 2
#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xC0000000C0000000ULL)

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
#define ok_lasterror(err) \
ok(GetLastError() == err, "expected last error " #err " but got 0x%lx\n", GetLastError());

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
#define INVALID_POINTER ((PVOID)(ULONG_PTR)0xdeadbeefdeadbeefULL)
void

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
void Test_Set(ULONG ulLine, HDC hdc, INT x, INT y, LPPOINT ppt, BOOL bExp, DWORD dwErrExp)
{
BOOL bResult;

View file

@ -9,6 +9,8 @@
#include <ndk/pstypes.h>
#include <ndk/rtlfuncs.h>
#include <pseh/pseh2.h>
/* XP does not have these functions */
static DWORD (WINAPI *pFlsAlloc)(PFLS_CALLBACK_FUNCTION);
static BOOL (WINAPI *pFlsFree)(DWORD);

View file

@ -8,6 +8,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
static UINT (WINAPI * pEnumSystemFirmwareTables)(DWORD, PVOID, DWORD);
static UINT (WINAPI * pGetSystemFirmwareTable)(DWORD, DWORD, PVOID, DWORD);

View file

@ -15,6 +15,8 @@
#include <winspool.h>
#include <winsplp.h>
#include <pseh/pseh2.h>
#include "../localspl_apitest.h"
#include <spoolss.h>

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
typedef struct _TEST_RESOURCES
{
IMAGE_RESOURCE_DIRECTORY TypeDirectory;

View file

@ -10,6 +10,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
static PVOID Allocations[4096] = { NULL };
static ULONG CurrentAllocation = 0;

View file

@ -8,6 +8,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
void
Test_PageFileSection(void)
{

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
PVOID Buffers[0x100];
START_TEST(RtlAllocateHeap)

View file

@ -2,6 +2,8 @@
#include "precomp.h"
#include <versionhelpers.h>
#include <pseh/pseh2.h>
static BOOL IsBroken = FALSE;
void

View file

@ -6,6 +6,8 @@
*/
#include "precomp.h"
#include <pseh/pseh2.h>
typedef ULONG (NTAPI *FN_RtlMultipleAllocateHeap)(IN PVOID, IN ULONG, IN SIZE_T, IN ULONG, OUT PVOID *);
typedef ULONG (NTAPI *FN_RtlMultipleFreeHeap)(IN PVOID, IN ULONG, IN ULONG, OUT PVOID *);

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
#ifdef _MSC_VER
#pragma warning(disable : 4717) // disable warning about recursive function
#endif

View file

@ -7,6 +7,8 @@
#include "precomp.h"
#include <pseh/pseh2.h>
WCHAR dllpath[MAX_PATH];
LONG g_TlsCalled = 0;

View file

@ -20,6 +20,8 @@
#include <imagehlp.h>
#include <mmddk.h>
#include <pseh/pseh2.h>
/* Compatibility with the MS defines */
#ifndef FACILITY_VISUALCPP

View file

@ -20,6 +20,8 @@
#include <shlwapi.h>
#include <assert.h>
#include <pseh/pseh2.h>
#define EF_FULLPATH 1
#define EF_TESTDATA 2
#define EF_WIN_DIR 4

View file

@ -9,6 +9,8 @@
#include <shlwapi.h>
#include "resource.h"
#include <pseh/pseh2.h>
static BOOL (WINAPI *pSHAreIconsEqual)(HICON hIcon1, HICON hIcon2);
static const char* names[] =

View file

@ -9,6 +9,8 @@
#include <shlwapi.h>
#include "resource.h"
#include <pseh/pseh2.h>
static void execute_test(LPCWSTR DllFile)
{
WCHAR DllBuffer[MAX_PATH + 20];

View file

@ -12,6 +12,8 @@
#include <winbase.h>
#include <spoolss.h>
#include <pseh/pseh2.h>
START_TEST(ReallocSplStr)
{
const WCHAR wszTestString1[] = L"Test";

View file

@ -55,6 +55,7 @@ if(USE_CLANG_CL OR (NOT MSVC))
endif()
set_module_type(kernel32_winetest win32cui)
target_link_libraries(kernel32_winetest pseh)
add_importlibs(kernel32_winetest user32 advapi32 msvcrt kernel32 ntdll)
add_pch(kernel32_winetest precomp.h "${PCH_SKIP_SOURCE}")
add_rostests_file(TARGET kernel32_winetest)

View file

@ -36,6 +36,8 @@ add_executable(ntdll_winetest
${SOURCE}
${PCH_SKIP_SOURCE})
target_link_libraries(ntdll_winetest pseh)
if(USE_CLANG_CL OR (NOT MSVC))
target_compile_options(ntdll_winetest PRIVATE "-Wno-format")
endif()

View file

@ -9,3 +9,5 @@ target_include_directories(atl_classes INTERFACE
target_compile_definitions(atl_classes INTERFACE
"$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<BOOL:$<TARGET_PROPERTY:WITH_CXX_EXCEPTIONS>>>>:_ATL_NO_EXCEPTIONS>")
target_link_libraries(atl_classes INTERFACE pseh)

View file

@ -22,6 +22,7 @@
#pragma once
#include <cguid.h> // for GUID_NULL
#include <pseh/pseh2.h>
namespace ATL
{

View file

@ -603,7 +603,7 @@ if(USE_CLANG_CL)
endif()
add_library(crt ${CRT_SOURCE} ${CRT_WINE_SOURCE} ${crt_asm})
target_link_libraries(crt chkstk)
target_link_libraries(crt chkstk ${PSEH_LIB})
target_compile_definitions(crt
PRIVATE __MINGW_IMPORT=extern
USE_MSVCRT_PREFIX

View file

@ -4,4 +4,5 @@ list(APPEND SOURCE
copysup.c)
add_library(copysup ${SOURCE})
target_link_libraries(copysup PRIVATE pseh)
add_dependencies(copysup bugcodes xdk)

View file

@ -7,4 +7,5 @@ list(APPEND SOURCE
rdbss.c)
add_library(rdbsslib ${SOURCE})
target_link_libraries(rdbsslib PRIVATE pseh)
add_dependencies(rdbsslib bugcodes xdk)

View file

@ -6,4 +6,5 @@ list(APPEND SOURCE
rxce.c)
add_library(rxce ${SOURCE})
target_link_libraries(rxce PRIVATE pseh)
add_dependencies(rxce bugcodes xdk)

View file

@ -112,6 +112,7 @@ endif()
add_asm_files(rtl_asm ${ASM_SOURCE})
add_library(rtl ${SOURCE} ${rtl_asm})
target_link_libraries(rtl PRIVATE pseh)
add_pch(rtl rtl.h SOURCE)
add_dependencies(rtl psdk asm)
@ -124,3 +125,4 @@ list(APPEND SOURCE_VISTA
add_library(rtl_vista ${SOURCE_VISTA})
add_pch(rtl_vista rtl_vista.h SOURCE_VISTA)
add_dependencies(rtl_vista psdk)
target_link_libraries(rtl_vista PRIVATE pseh)

View file

@ -1,5 +1,7 @@
#include <precomp.h>
#include <pseh/pseh2.h>
#define NDEBUG
#include <debug.h>

View file

@ -23,4 +23,5 @@ list(APPEND SOURCE
rosglue.c)
add_library(winegdi ${SOURCE})
target_link_libraries(winegdi PRIVATE pseh)
add_dependencies(winegdi psdk)

View file

@ -9,6 +9,8 @@
#include <shlobj.h>
#include <undocshell.h>
#include <pseh/pseh2.h>
#define MAX_GETPRINTER_SIZE 4096 - MAX_PATH
typedef void (WINAPI *PPfpSHChangeNotify)(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);

View file

@ -53,6 +53,7 @@ else()
endif()
add_library(consrv ${CONSRV_SOURCE})
target_link_libraries(consrv pseh)
add_dependencies(consrv psdk)
add_pch(consrv consrv/consrv.h CONSRV_SOURCE)
#add_object_library(consrv ${CONSRV_SOURCE})

View file

@ -10,6 +10,7 @@ list(APPEND USERSRV_SOURCE
usersrv/usersrv.h)
add_library(usersrv ${USERSRV_SOURCE})
target_link_libraries(usersrv pseh)
add_dependencies(usersrv xdk)
add_pch(usersrv usersrv/usersrv.h USERSRV_SOURCE)
#add_object_library(usersrv ${USERSRV_SOURCE})