diff options
author | Donovan Baarda <abo@minkirri.apana.org.au> | 2023-02-19 15:48:35 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 15:48:35 +1100 |
commit | ec0c93b996e2a8b16c690f19284025b0b4451d00 (patch) | |
tree | e110ceb7464fa5ee21242a0657edf7b21891d7eb /src/version.c | |
parent | ecd56fe5a8e873f3c552b8496c7c267744b4e649 (diff) | |
download | librsync-ec0c93b996e2a8b16c690f19284025b0b4451d00.tar.gz |
Fix #248 by putting `#include "config.h"` in most src/*.c files. (#249)
* Fix #248 by putting `#include "config.h"` in all src/*.c files.
The iwyu tool doesn't handle `config.h` files well, and these includes were
incorrectly removed, which breaks things on some platforms. Add them back to
most `src/*.c` files with `/* IWYU pragma: keep */` to make iwyu ignore them.
We skip `src/hashtable.c` because it is a standalone tool that is platform
independent.
Also add `/* IWYU pragma: keep */` to includes in `src/fileutil.c` that are
needed on some platforms but not others. This means we can remove the special
exemptions to skip this file for the `iwyu` and `iwyu-fix` targets in
`CMakeLists.txt`.
Add some explicit typecasts to `rollsum.[ch]` and `patch.c` to silence warnings on windows.
Update NEWS.md for `config.h` include fixes and added typecasts.
Diffstat (limited to 'src/version.c')
-rw-r--r-- | src/version.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index ebc3983..1817f8f 100644 --- a/src/version.c +++ b/src/version.c @@ -19,7 +19,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "config.h" +#include "config.h" /* IWYU pragma: keep */ #include "librsync_export.h" LIBRSYNC_EXPORT char const rs_librsync_version[] = PACKAGE " " VERSION; |