Skip to content

Commit

Permalink
clar: stop including shellapi.h unnecessarily
Browse files Browse the repository at this point in the history
The `shellapi.h` header was included as of
clar-test/clar@136e763211aa, to have
`SHFileOperation()` declared so that it could be called.

However, clar-test/clar@5ce31b69b525 removed
that call, and therefore that `#include <shellapi.h>` 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 <[email protected]>
  • Loading branch information
dscho committed Aug 20, 2024
1 parent ac2095a commit a8ecad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/unit-tests/clar/clar.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <sys/stat.h>

#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <io.h>
# include <shellapi.h>
# include <direct.h>

# define _MAIN_CC __cdecl
Expand Down

0 comments on commit a8ecad7

Please sign in to comment.