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
136e763211aa, to have
`SHFileOperation()` declared so that it could be called.

However, 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`.

Original-patch-by: Johannes Schindelin <[email protected]>
Signed-off-by: Patrick Steinhardt <[email protected]>
  • Loading branch information
pks-t committed Sep 5, 2024
1 parent 773d068 commit b35ae61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 b35ae61

Please sign in to comment.