Open
Conversation
It looks like some tabs crept in at some point.
C99 doesn't like anonymous unions or returning void function calls.
C99 doesn't like initializing char arrays from expressions. Brackets around a string literal make it into an expression, so they had to go.
In CMakeLists.txt add "-pedantic" to CMAKE_C_FLAGS for gcc/clang to enable stricter C99 compiling. Add checks for symbols __func__ and __FUNCTION__. In src/config.h.cmake add cmakedefine's for HAVE___FUNC__ and HAVE___FUNCTION__. Remove unimplemented FIXME defines for C99 standards const, off_t, and size_t. In src/trace.[ch] remove all support for compilers without C99's macro varargs support. Add support for platforms with __FUNCTION__ instead of __func__. Use C99 macro varargs instead of GNU named varargs and simplify macros.
In CMakeList.txt and src/config.h.cmake remove support for unused alloca function, including HAVE_ALLOCA_H, HAVE_ALLOCA, CRAY_STACKSEG_END, C_ALLOCA, and STACK_DIRECTION. In src/config.h.cmake remove unused and unchecked or not working cmakedefines for HAVE_LIBBZ2, HAVE_LIBPOPT, HAVE_LIBZ, HAVE_SNPRINTF, HAVE_VARARG_MACROS, HAVE_VSNPRINTF, HAVE__SNPRINTF, and HAVE__VSNPRINTF. The HAVE_LIB* ones were just broken and unused. The others were unchecked, unused, and for standard C99 features we assume exist in the code.
In CMakeLists.txt and src/config.h.cmake remove HAVE_PROGRAM_INVOCATION_NAME. In src/trace.c remove conditional use of program_invocation_short_name. This was unused because we never checked/set HAVE_PROGRAM_INVOCATION_NAME.
We never used these HAVE_* defines and just assumed the features existed anyway. Also put the checks and cmakedefines into the same order.
Clarify usage on rdiff(1) man page.
This makes the cmakedefines in src/config.h.cmake reflect the order of checks in CMakeLists.txt. It also removes the obsolete STDC_HEADERS define.
For non-GNUC compatible compilers #define away __attribute__. For compilers without __func__ or __FUNCTION__ use an empty string. Make logging use RS_LOG_NONAME format when __func__ is an empty string. Use C99 fputs() instead of Unix/Posix write(). Prune and tidy imports to only what's needed.
The docs for some of the stat() variants suggest sys/types.h is needed, so best to import it incase it's actually needed on some platforms.
This removes all not-required #include statements, including some non-C99 headers, and re-arranges them into more consistent order.
…VE_UINT64. We have not been setting HAVE_UINT64 which means we've not been using 64bit support for calculating md4sums. Checking that the C99 stdint.h's UINT64_MAX is defined is the best way of checking that the uint64_t type exists on the target platform.
Improve C99 compliance.
Add tests/netint_test.c and CMakeLists.txt changes to test rs_int_len(). In netint.[ch] replace runtime checks for invalid arguments with assert() statements and tidy the argument names, variable names, and ordering. Replace `unsigned char` arguments with `rs_byte_t`. Add an assert to rs_int_len() to require the argument is positive.
Make code variables and structure more consistent. Add extra assert() check to rs_tube_copy_from_scoop(). Replace fatal runtime check with assert() in rs_tube_write().
Simplify and tidy netint.[ch], tube.c and add netint tests.
Remove duplicated #define/#undef for `NAME_new`.
Add PkgConfig support to retrieve popt dependencies otherwise static build can fail if popt has been linked with iconv: [100%] Linking C executable rdiff /home/buildroot/autobuild/instance-2/output-1/per-package/librsync/host/opt/ext-toolchain/bin/../lib/gcc/powerpc-buildroot-linux-uclibc/8.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/instance-2/output-1/per-package/librsync/host/powerpc-buildroot-linux-uclibc/sysroot/usr/lib/libpopt.a(poptint.o): in function `POPT_fprintf': poptint.c:(.text+0x34c): undefined reference to `libiconv_open Fixes: - http://autobuild.buildroot.org/results/896e8e3efbedad90d66ae8c4e1e50f16206cab49 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
It's possible for find_package() to fail, and thus pkg_search_module() will not be available. Also FIND_PACKAGE_HANDLE_STANDARD_ARGS() should only be needed when PkgConfig didn't work.
cmake/FindPOPT.cmake: Add PkgConfig support
Instead of suppressing warnings for all platforms about format strings with `-Wno-format` because minGW complains about using `%I64`, assume that any compiler advanced enough to cross-compile is also C99 compliant and supports `%zu`.
This reverts the last commit and instead turns of warnings for WIN32 only.
This means it matches the name of scoop.c which means tools like iwyu correctly find and check it.
This makes it iwyu clean.
…our. Update the docstring so it correctly describes how data is processed directly from the input stream if there is sufficient data there.
Make delta directly process the input stream if it has enough data.
Add "Build install", "Upload build" and "Upload install" steps to test install and upload build and install artifacts.
added missing word
Update README.md
* Update github actions checkout and upload-artifact to v3. The old v2 versions of these github actions now produce errors warning you need to update them. * Fix lint.yml remove install of old libclang-common-9-dev package. The iwyu package dependencies have been fixed, and this old package doesn't exist any more. * Run `make iwyu-fix` to fix includes for `tests/rabinkarp_perf.c`. * Change the `iwyu` build target to use clang output format. This format is much more compact and easier to read. * Make `iwyu` build target trim noisy "note:" output and ignore fileutil.c. * Update NEWS.md for all #243 changes.
Note CMakeLists.txt and TODO.md are already up to date.
Update everything necessary in preparation for release of v2.3.3.
Prepare v2.3.4.
* 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.
Update everything necessary in preparation for release of v2.3.2. Note CMakeLists.txt and TODO.md are already up to date. Also correct `CONTRIBUTING.md` release instructions for the right `html` path for doxygen docs.
Release v2.3.4.
Prepare for development of the next v2.3.5 release.
Prepare v2.3.5.
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Added example project for Stream API
Fixes #262
Disable IWYU in CI
Update to upload-artifact@v4
no functional changes
fixes/clarifies descriptions of rdiff operations in rdiff.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.