From bbe7bcb5b2beba0d89b06b7b01451fa1cf26e02a Mon Sep 17 00:00:00 2001 From: tinysec Date: Mon, 22 Jun 2026 13:51:24 +0800 Subject: [PATCH] Remove bundled WDK7 stdint.h compatibility header The setup action should not inject a CRT polyfill into every consumer's include path. Bundling stdint.h silently shadows headers and makes downstream builds depend on an invisible header owned by the action. Providing a stdint.h shim is the downstream project's responsibility. - Delete include/stdint.h and the include/ directory - Drop WDK7_COMPAT_INCLUDE_DIR wiring from the CMake toolchain - Remove the compatibility-header feature line from README - Revert the e2e exe fixture to not depend on --- README.md | 1 - cmake/wdk7.cmake | 5 ----- include/stdint.h | 41 ----------------------------------------- test/e2e/cmake/exe.c | 5 +---- 4 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 include/stdint.h diff --git a/README.md b/README.md index 6cc7120..bbceec8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ runner starts clean. the default `C:\WinDDK` installation path. - Downloads, extracts, and caches WDK7 automatically on Windows runners. - Exposes a bundled CMake toolchain for `i386` and `amd64` builds. -- Provides private WDK7 compatibility headers, including `stdint.h`. - Supports user-mode binaries, kernel `.sys` targets, and legacy `ddkbuild.cmd` projects. - Optionally prepares the Debugging Tools SDK for DbgEng and WinDbg extension diff --git a/cmake/wdk7.cmake b/cmake/wdk7.cmake index b6efabe..b95670c 100644 --- a/cmake/wdk7.cmake +++ b/cmake/wdk7.cmake @@ -133,9 +133,6 @@ set(WDK7_CL "${WDK7_BIN}/cl.exe") set(WDK7_LINK "${WDK7_BIN}/link.exe") set(WDK7_RC "${WDK7_HOST_BIN}/rc.exe") set(WDK7_NMAKE "${WDK7_HOST_BIN}/nmake.exe") -get_filename_component(_WDK7_TOOLCHAIN_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) -get_filename_component(_WDK7_ACTION_ROOT "${_WDK7_TOOLCHAIN_DIR}" DIRECTORY) -set(WDK7_COMPAT_INCLUDE_DIR "${_WDK7_ACTION_ROOT}/include") foreach (_tool IN ITEMS WDK7_CL WDK7_LINK WDK7_RC WDK7_NMAKE) if (NOT EXISTS "${${_tool}}") @@ -156,14 +153,12 @@ endif() set(ENV{PATH} "${WDK7_BIN};${WDK7_HOST_BIN};$ENV{PATH}") set(WDK7_USER_INCLUDE_DIRS - "${WDK7_COMPAT_INCLUDE_DIR}" "${WDK7_ROOT}/inc/api/crt/stl70" "${WDK7_ROOT}/inc/atl71" "${WDK7_ROOT}/inc/crt" "${WDK7_ROOT}/inc/api" "${WDK7_ROOT}/inc/ddk") set(WDK7_KERNEL_INCLUDE_DIRS - "${WDK7_COMPAT_INCLUDE_DIR}" "${WDK7_ROOT}/inc/crt" "${WDK7_ROOT}/inc/ddk" "${WDK7_ROOT}/inc/api") diff --git a/include/stdint.h b/include/stdint.h deleted file mode 100644 index 1da3c65..0000000 --- a/include/stdint.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef TINYSEC_WDK7_STDINT_H -#define TINYSEC_WDK7_STDINT_H - -#if !defined(_MSC_VER) || _MSC_VER >= 1600 -#error "This WDK7 compatibility stdint.h is only for MSVC before 1600" -#endif - -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; -typedef unsigned int uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#ifndef INT64_C -#define INT64_C(x) x##i64 -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##ui64 -#endif -#ifndef INT32_C -#define INT32_C(x) x -#endif -#ifndef UINT32_C -#define UINT32_C(x) x##u -#endif -#ifndef INFINITY -#define INFINITY ((double)1.7976931348623158e308) -#endif - -#ifdef _WIN64 -typedef __int64 intptr_t; -typedef unsigned __int64 uintptr_t; -#else -typedef int intptr_t; -typedef unsigned int uintptr_t; -#endif - -#endif diff --git a/test/e2e/cmake/exe.c b/test/e2e/cmake/exe.c index 60d8bf8..da11611 100644 --- a/test/e2e/cmake/exe.c +++ b/test/e2e/cmake/exe.c @@ -1,4 +1,3 @@ -#include #include /* @@ -7,11 +6,9 @@ */ int main(void) { - uint64_t value = UINT64_C(42); - /* * Returning success keeps the fixture focused on toolchain behavior rather * than runtime behavior. */ - return value == 42 ? 0 : 1; + return 0; }