| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Prepare for development of the next v2.3.5 release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 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.
|
|
|
|
|
|
|
|
| |
Make the doc target run in CMAKE_CURRENT_SOURCE_DIR and change `Doxyfile.in`
to generate output into `OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@`.
This ensures consistent doc filenames and references when using different
build directorys, without leaking the full path of where it was built. See
|
|
|
|
| |
This makes the name more consistent with other cmake template files.
|
|
|
|
|
| |
This uses iwyu_tool output fed to `fix_include --noblank_lines` and excludes
fileutil.c which gets messed up by this.
|
| |
|
| |
|
|
|
|
|
| |
This is a "linter" that checks code for errors, taken from PR #222 by
riszotto.
|
|\
| |
| | |
Tidy the cmake config and add better build configuration support.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an idea taken from the following post;
https://blog.kitware.com/cmake-and-the-default-build-type/
It sets the default build type to Debug for git clone, otherwise the default
is Release. It also sets possible values for the cmake-gui or ccmake. It works
with multi-config generators and respects values set on the cmdline.
|
| |
| |
| |
| |
| | |
Putting the quotes around it makes it try to execute a command called "bash
-e" instead of seeing the `-e` as another argument.
|
| |
| |
| |
| |
| | |
This makes the bash cmdline arguments consistent between running on Windows
and on other platforms using the `#!/bin/sh -e`.
|
|/
|
|
| |
This makes this test consistent with the other integration test scripts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In CMakeLists.txt, explicity execute scripts with bash on WIN32 platforms (it
doesn't understand `#!/bin/sh`). Execute test scripts with the full rdiff path
expanded from `$<TARGET_FILE:rdiff>` as the first argument instead of
`${CMAKE_CURRENT_BINARY_DIR}`.
Update tests/testcommon.sh to set `RDIFF` instead of `bindir` from $1, and use
`${RDIFF}` as the rdiff binary in all tests.
Change rdiff_bad_option.sh to use testcommon.sh and use $RDIFF to execute the
rdiff binary. Make it use the testcommon.sh created tmpdir and use set -x to
trace only the interesting cmds instead of the whole script.
The $<TARGET_FILE:rdiff> is always the full path of the generated binary,
including the .exe extension on Windows. The ${CMAKE_CURRENT_BINARY_DIR} is
usually the directory where the generated binary is, but multi-configuration
generators (Visual Studio, Ninja) add a per-build-type directory (Release,
Debug, etc) and put them in there.
This means ${CMAKE_CURRENT_BINARY_DIR} doesn't give you an easy way to find
the binary, and doesn't tell you if it has a .exe extension. Passing in the
full binary path solves all these problems. Fortunately the tests only need
the rdiff binary.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
On window io.h is needed for _setmode(), and it has both fileno() and
_fileno() but warns that fileno() is deprecated.
|
|
|
|
|
|
|
|
| |
Add `/D_CRT_SECURE_NO_WARNINGS` to MSVC CFLAGS to turn off warnings about
posix functions.
Also add optional commented out `-Wconversion` and `-Wno-sign-conversion`
flags for gcc and clang for easy experimenting with more warnings.
|
|
|
|
|
| |
This ensures that Windows compiles don't complain about export stuff when
compiling this test.
|
|
|
|
|
|
|
|
| |
This closes out a TODO for this. Move big description comment from stream.c to
stream.h. Move rs_buffers_copy() from stream.c to rs_tube_copy_from_stream()
in tube.c. Make rs_tube_catchup_write()'s trace output a little more
consistent. Make rs_tube_copy_from_scoop() do nothing when there's no input
our output space.
|
|
|
|
|
|
| |
It seems passing `--config Debug` to cmake in .travis.yml didn't work. Instead
we need to pass `-C Debug` to ctest in CMakeLists.txt to make it work on
Windows.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the cmake popt detection on (at least) FreeBSD. It mostly worked by
accident on other platforms like Debian because of standardized install
locations aligning with our miss-used output vars.
In CMakeLists.txt bump cmake_minimum_required to 3.6 for a working version of
pkg_search_module() with IMPORTED_TARGET support. The version on our travis
xenial test platform is 3.12.4, so 3.6 is rather old. Fix BZIP2 detection to
use the correct BZIP2_INCLUDE_DIRS var. Add POPT status messages to match
other find_package() handling. Remove redundant "Found..." messages from all
find_package() handling.
In cmake/FindPOPT.cmake use pkg_search_module() IMPORTED_TARGET support to
create a PkgConfig::POPT target and use it, following instructions found here;
https://stackoverflow.com/questions/29191855/what-is-the-proper-way-to-use-pkg-config-from-cmake
Follow a pattern from official FindPackage modules of using cached vars
POPT_LIBRARY_RELEASE/POPT_IMPORT_DIR to set uncached vars
POPT_LIBRARIES/POPT_IMPORT_DIRS. This makes it behave almost exactly like
offical FindPackage modules.
In cmake/Findlibb2.cmake update it to also use the more standard
cached/uncached vars pattern.
|
|
|
|
|
| |
A lot of testing of many different variants of the loop unrolling seems to
indicate this is the best variant of the loop-unrolling.
|
|
|
|
| |
This adds rabinkarp.c copying rollsum.c's unrolled loop idea.
|
| |
|
|
|
|
|
|
|
| |
In NEWS.md update with all changes applied so far.
In CMakeLists.txt and librsync.spec bump the minor version to 2.3.0 to reflect
addional rs_sig_args() and strong_len=-1 support.
|
|
|
| |
This reverts the last commit and instead turns of warnings for WIN32 only.
|
|
|
| |
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`.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We never used these HAVE_* defines and just assumed the features existed
anyway. Also put the checks and cmakedefines into the same order.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The librsync code uses some C99 constructs, but old compilers such
as gcc 4.7 don't default to -std=c99. This commit makes sure librsync
is built with -std=c99.
Fixes:
src/rabinkarp.h:82:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t i = len; i; i--) {
^
src/rabinkarp.h:82:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
|
| |
|
|
|
|
|
| |
Add Unreleased v2.2.1 entry in NEWS.md. Update CMakeLists.txt and
librsync.spec for v2.2.1.
|
|
|
|
|
|
| |
Update version to 2.2.0 in CMakeLists.txt, NEWS.md, and librsync.spec. Add
NEWS.md entries for version bump and MSVS 2019 fixes. Add changelog entry to
librsync.spec.
|
|
|
|
|
| |
BUILD_SHARED_LIBS defaults to ON, and can be set to OFF using `ccmake .` to
build librsync as a static library.
|
| |
|
|
|
| |
Re-arrange the logic to be a little less convoluted, and add comments explaining why it's done that way.
|
| |
|