From: Johannes Schindelin Date: Wed, 4 Sep 2024 14:16:59 +0000 (+0200) Subject: clar: stop including `shellapi.h` unnecessarily X-Git-Tag: v2.47.0-rc0~32^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe7066a9d97bb2546a717911bbda6c43bf02087a;p=thirdparty%2Fgit.git clar: stop including `shellapi.h` unnecessarily The `shellapi.h` header was included as of https://github.com/clar-test/clar/commit/136e763211aa, to have `SHFileOperation()` declared so that it could be called. However, https://github.com/clar-test/clar/commit/5ce31b69b525 removed that call, and therefore that `#include ` is unnecessary. It is also unwanted in Git because this project uses a subset of Git for Windows' SDK in its CI builds that (for bandwidth reasons) excludes tons of header files, including `shellapi.h`. So let's remove it. Note: Since the `windows.h` header would include `shellapi.h` anyway, we also define `WIN32_LEAN_AND_MEAN` to avoid this and similar other unnecessary includes before including `windows.h`. Signed-off-by: Johannes Schindelin Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/t/unit-tests/clar/clar.c b/t/unit-tests/clar/clar.c index e2ebe551d3..cef0f023c2 100644 --- a/t/unit-tests/clar/clar.c +++ b/t/unit-tests/clar/clar.c @@ -19,9 +19,9 @@ #include #ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN # include # include -# include # include # define _MAIN_CC __cdecl