From 31334ebcfefc818cd04ff7c890bd116cbc5f5099 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 13 Oct 2024 19:10:22 +0300 Subject: [PATCH] [SETUPLIB] Use proper SEH instead of nasty hacks Addendum to commit 2268b3d --- base/setup/lib/CMakeLists.txt | 1 + base/setup/lib/utils/filesup.c | 9 +-------- base/setup/reactos/CMakeLists.txt | 2 +- base/setup/usetup/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/base/setup/lib/CMakeLists.txt b/base/setup/lib/CMakeLists.txt index 836c9ef5967..34b43018c23 100644 --- a/base/setup/lib/CMakeLists.txt +++ b/base/setup/lib/CMakeLists.txt @@ -5,6 +5,7 @@ if(_WINKD_) endif() include_directories(spapisup utils) +include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/pseh/include) list(APPEND SOURCE spapisup/fileqsup.c diff --git a/base/setup/lib/utils/filesup.c b/base/setup/lib/utils/filesup.c index 81da91faa12..9c00675c59c 100644 --- a/base/setup/lib/utils/filesup.c +++ b/base/setup/lib/utils/filesup.c @@ -10,18 +10,11 @@ #include "precomp.h" #include "filesup.h" +#include #define NDEBUG #include - -// ACHTUNG! HAXX FIXME!! -#define _SEH2_TRY -#define _SEH2_LEAVE goto __SEH2_FINALLY__label; -#define _SEH2_FINALLY __SEH2_FINALLY__label: -#define _SEH2_END - - /* FUNCTIONS ****************************************************************/ static diff --git a/base/setup/reactos/CMakeLists.txt b/base/setup/reactos/CMakeLists.txt index 6516663e7fb..23adc345081 100644 --- a/base/setup/reactos/CMakeLists.txt +++ b/base/setup/reactos/CMakeLists.txt @@ -19,7 +19,7 @@ add_rc_deps(reactos.rc ${reactos_rc_deps}) add_executable(reactos ${SOURCE} reactos.rc) add_pch(reactos reactos.h SOURCE) set_module_type(reactos win32gui UNICODE) -target_link_libraries(reactos uuid setuplib ext2lib vfatlib btrfslib) +target_link_libraries(reactos uuid setuplib ext2lib vfatlib btrfslib ${PSEH_LIB}) target_link_libraries(reactos zlib_solo) ## We use USETUP's cabinet implementation add_importlibs(reactos advapi32 gdi32 user32 comctl32 shlwapi setupapi msvcrt kernel32 ntdll) add_cd_file(TARGET reactos DESTINATION reactos NO_CAB FOR bootcd) diff --git a/base/setup/usetup/CMakeLists.txt b/base/setup/usetup/CMakeLists.txt index 94ef7cffd14..21d2bdcf646 100644 --- a/base/setup/usetup/CMakeLists.txt +++ b/base/setup/usetup/CMakeLists.txt @@ -35,6 +35,6 @@ endif() add_pch(usetup usetup.h SOURCE) set_module_type(usetup nativecui) -target_link_libraries(usetup inflib setuplib zlib_solo ext2lib vfatlib btrfslib chkstk) +target_link_libraries(usetup inflib setuplib zlib_solo ext2lib vfatlib btrfslib chkstk ${PSEH_LIB}) add_importlibs(usetup ntdll) add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest)