]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
4 years agorefactor: Simplify logic of -x handling 678/head
Alexander Lanin [Fri, 2 Oct 2020 20:04:12 +0000 (22:04 +0200)] 
refactor: Simplify logic of -x handling

4 years agoAdd unit tests for parsing -x argument
Alexander Lanin [Fri, 2 Oct 2020 19:56:55 +0000 (21:56 +0200)] 
Add unit tests for parsing -x argument

4 years agoDisable some new Clang-Tidy features (#677)
Alexander Lanin [Mon, 5 Oct 2020 07:29:28 +0000 (09:29 +0200)] 
Disable some new Clang-Tidy features (#677)

4 years agoUpdate NEWS
Joel Rosdahl [Sun, 4 Oct 2020 18:50:58 +0000 (20:50 +0200)] 
Update NEWS

4 years agoAdd CI build with GCC 4.8.5
Joel Rosdahl [Sun, 4 Oct 2020 07:16:35 +0000 (09:16 +0200)] 
Add CI build with GCC 4.8.5

This tests GCC 4.8.5 which is the default compiler in RHEL/CentOS 7.

There is no intention to keep the GCC 4.8.5 build free from warnings
since doing so will make things worse for modern compilers and tools.

4 years agoUse STATUS instead of NOTICE for CMake messages
Joel Rosdahl [Sat, 3 Oct 2020 17:39:26 +0000 (19:39 +0200)] 
Use STATUS instead of NOTICE for CMake messages

NOTICE is apparently new for CMake 3.15.

4 years agoFix build error for TemporaryFile with GCC 4.8
Joel Rosdahl [Sat, 3 Oct 2020 17:37:56 +0000 (19:37 +0200)] 
Fix build error for TemporaryFile with GCC 4.8

4 years agoHandle interrupted waitpid call properly in hash_command_output
Joel Rosdahl [Sat, 3 Oct 2020 07:19:10 +0000 (09:19 +0200)] 
Handle interrupted waitpid call properly in hash_command_output

4 years agoDon’t add -I${CMAKE_SOURCE_DIR}/third_party when compiling
Joel Rosdahl [Fri, 2 Oct 2020 07:29:51 +0000 (09:29 +0200)] 
Don’t add -I${CMAKE_SOURCE_DIR}/third_party when compiling

Third party headers are supposed to be included by “#include
third_party/...”.

4 years agoAdd Paul Bunch to .mailmap
Joel Rosdahl [Fri, 2 Oct 2020 07:29:38 +0000 (09:29 +0200)] 
Add Paul Bunch to .mailmap

4 years agoMention how to configure location of the secondary config file
Joel Rosdahl [Fri, 2 Oct 2020 06:51:05 +0000 (08:51 +0200)] 
Mention how to configure location of the secondary config file

4 years agorefactor: Improve naming/interface of compopt functions (#663)
Alexander Lanin [Mon, 5 Oct 2020 06:31:41 +0000 (08:31 +0200)] 
refactor: Improve naming/interface of compopt functions (#663)

4 years agoUpgrade to BLAKE3 0.3.7
Joel Rosdahl [Thu, 1 Oct 2020 14:46:59 +0000 (16:46 +0200)] 
Upgrade to BLAKE3 0.3.7

4 years agoUpdate NEWS
Joel Rosdahl [Thu, 1 Oct 2020 12:03:26 +0000 (14:03 +0200)] 
Update NEWS

(cherry picked from commit 11a582f5b31b53e6c223f28c46bcf2d66504cbad)

4 years agoHandle missing .gcno file gracefully
Joel Rosdahl [Thu, 1 Oct 2020 11:00:30 +0000 (13:00 +0200)] 
Handle missing .gcno file gracefully

GCC ≥9 has changed behavior for -ftest-coverage and --coverage in
combination with -fprofile-dir=dir:

- Without -fprofile-dir=dir the file is placed next to the object file
  but with a “.gcno” extension.
- With -fprofile-dir=dir the file is also place next to the object file
  (i.e. not in the specified profile directory) but the same style of
  name as used for “.gcda” files (full pathname with slashes replaced
  with hash characters).

Fix this by:

- Checking if the expected (GCC <9) .gcno file is present. If not, fall
  back to running the compiler and increment the “unsupported option”
  counter.
- Making sure to perform the above check before copying the object file
  to the cache so that a later ccache invocation won’t believe that
  there is a result in the cache.
- Improving the copy_file routine to not create the destination file
  until it knows that there is a source file to copy from.

Fixes #674.

(cherry picked from commit 6abd78b5ec7cdfeedff36454b07a8dbff312b554)

4 years agoSimplify source package generation
Joel Rosdahl [Wed, 30 Sep 2020 20:18:09 +0000 (22:18 +0200)] 
Simplify source package generation

Since it now works to build from “git archive” archives, use such an
archive as the official source code release archive instead of using
CPack with a custom install script for modifying the source code. We can
revisit this in the future when and if we want a source code release
archive that is not simply an export of the version-controlled source
code.

4 years agoMake it possible to build from “git archive” source archives
Joel Rosdahl [Wed, 30 Sep 2020 15:13:48 +0000 (17:13 +0200)] 
Make it possible to build from “git archive” source archives

The ccache CMake scripts currently support building from an official
release archive or in a Git repository but not from a source archive
created by “git archive”.

Improve this by adding directives so that “git archive” substitutes
needed information when exporting the source tree.

Closes #667.

4 years agoFix bad variable name by inlining it
Joel Rosdahl [Wed, 30 Sep 2020 13:35:52 +0000 (15:35 +0200)] 
Fix bad variable name by inlining it

Introduced in 68905effcff923769800f837b1516fcb1583d71b.

4 years agoFix typo in manual section “Compiling in different directories”
Joel Rosdahl [Tue, 29 Sep 2020 18:11:14 +0000 (20:11 +0200)] 
Fix typo in manual section “Compiling in different directories”

4 years agoAdd error detection to zstd download (#673)
Alexander Lanin [Tue, 29 Sep 2020 17:59:43 +0000 (19:59 +0200)] 
Add error detection to zstd download (#673)

4 years agoAdd unittest for find_compiler (#670)
Alexander Lanin [Mon, 28 Sep 2020 13:39:55 +0000 (15:39 +0200)] 
Add unittest for find_compiler (#670)

Co-authored-by: Joel Rosdahl <joel@rosdahl.net>
4 years agoUse ubuntu-18.04 instead of ubuntu-20.04 for Clang-Tidy
Joel Rosdahl [Mon, 28 Sep 2020 12:56:43 +0000 (14:56 +0200)] 
Use ubuntu-18.04 instead of ubuntu-20.04 for Clang-Tidy

The ubuntu-20.04 VM has intermittent build errors that look like this:

  sudo apt-get install libzstd-dev clang-tidy
  [...]
  The following packages have unmet dependencies:
   clang-tidy : Depends: clang-tidy-10 (>= 10~) but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.

Clang-Tidy 9 also found “function ... has a definition with different
parameter names” warnings that needed to be fixed as part of this.

As discussed in #670.

4 years agoDon’t update stats file if all counter updates are zero
Joel Rosdahl [Sun, 27 Sep 2020 17:50:29 +0000 (19:50 +0200)] 
Don’t update stats file if all counter updates are zero

4 years agoHandle short read when writing result files
Joel Rosdahl [Sun, 27 Sep 2020 14:53:09 +0000 (16:53 +0200)] 
Handle short read when writing result files

Result::Write::write_embedded_file_entry assumes that read(2) never
performs a “short read” (fewer bytes than the supplied count) for files.
A short read can however happen if the process is interrupted by a
signal, for instance on NFS with the “intr” mount option.

Fix this by properly reducing the remaining bytes counter by the amount
of actually read bytes.

4 years agoImprove base_dir documentation
Joel Rosdahl [Thu, 24 Sep 2020 19:21:05 +0000 (21:21 +0200)] 
Improve base_dir documentation

Closes #668.

4 years agoImprove CMake targets related to documentation
Joel Rosdahl [Thu, 24 Sep 2020 19:14:11 +0000 (21:14 +0200)] 
Improve CMake targets related to documentation

- Rename the documentation target to doc-html.
- Rename the manpage target to doc-man-page.
- Make the doc-html target not recreate documentation files each time it
  is run by using the OUTPUT form of add_custom_command.
- Similar for the doc-man-page target.
- Add doc target which builds both HTML documentation and man page.

4 years agoFix Clang-Tidy 9 warning about differing parameter name
Joel Rosdahl [Tue, 22 Sep 2020 19:50:02 +0000 (21:50 +0200)] 
Fix Clang-Tidy 9 warning about differing parameter name

4 years agoRemove unnecessary Result::Writer destructor
Joel Rosdahl [Tue, 22 Sep 2020 17:44:25 +0000 (19:44 +0200)] 
Remove unnecessary Result::Writer destructor

The destructor may throw exceptions and since it’s superfluous we can
just remove it.

4 years agoEncode hash digests as 4 base16 digits + 29 base32hex digits
Joel Rosdahl [Tue, 22 Sep 2020 06:34:26 +0000 (08:34 +0200)] 
Encode hash digests as 4 base16 digits + 29 base32hex digits

Reducing file lengths should be beneficial since it reduces the number
of needed system calls when scanning many files in the cache. The effect
is very small but there is no real downside. See also
b16001a67f4389956ef6e7ccf7d8023684b57119.

Base32 is chosen since the encoding algorithm is very simple compared to
e.g. base36. Base64 cannot be used since the encoded digest string is
used in filenames and the cache directory may be located on a case
insensitive filesystem. The base32hex variant is chosen instead of the
other base32 variants since it feels more natural and there are no
visual ambiguity issues.

The first two bytes are encoded as base16 to maintain compatibility with
the cleanup algorithm in older ccache versions and to allow for up to
four uniform cache levels.

4 years agoRename Util::format_hex to format_base16
Joel Rosdahl [Mon, 21 Sep 2020 19:57:05 +0000 (21:57 +0200)] 
Rename Util::format_hex to format_base16

4 years agoOptimize Util::format_hex
Joel Rosdahl [Mon, 21 Sep 2020 19:43:44 +0000 (21:43 +0200)] 
Optimize Util::format_hex

Not that it matters much, but not using fmt::format makes
Util::format_hex ≈20x faster.

4 years agoFix base32hex code
Joel Rosdahl [Tue, 22 Sep 2020 06:13:13 +0000 (08:13 +0200)] 
Fix base32hex code

- Const-ified input parameter.
- Use non-reserved macro for the include guard.
- Use unsigned int buffer to avoid “left shift of 1236923897 by 8 places
  cannot be represented in type int” reported by Clang’s
  UndefinedBehaviorSanitizer.

4 years agoAdd base32hex implementation by Peter Conrad
Joel Rosdahl [Mon, 21 Sep 2020 19:42:47 +0000 (21:42 +0200)] 
Add base32hex implementation by Peter Conrad

Implementation copied verbatim from (a patch in)
<https://github.com/pmconrad/tinydnssec>.

4 years agoUse no indentation for license entries in LICENSE.adoc consistently
Joel Rosdahl [Mon, 21 Sep 2020 19:40:41 +0000 (21:40 +0200)] 
Use no indentation for license entries in LICENSE.adoc consistently

4 years agoSort entries in LICENSE.adoc according to file names
Joel Rosdahl [Mon, 21 Sep 2020 19:34:25 +0000 (21:34 +0200)] 
Sort entries in LICENSE.adoc according to file names

4 years agoPass Args by const ref
Joel Rosdahl [Mon, 21 Sep 2020 06:25:38 +0000 (08:25 +0200)] 
Pass Args by const ref

It doesn’t matter in practice, but LGTM gets happier.

4 years agoUse short type suffix for cache files
Joel Rosdahl [Mon, 21 Sep 2020 05:59:50 +0000 (07:59 +0200)] 
Use short type suffix for cache files

x.result -> xR
x.manifest -> xM
x_n.raw -> xnW

Reducing file lengths should be beneficial since it reduces the number
of needed system calls when scanning many files in the cache. The effect
is very small but there is no real downside.

A one letter suffix is kept to allow for making decisions based on file
type without having to open the file. The suffix is uppercase so that is
doesn’t clash with pre-4.0 *.stderr files stored in the cache.

4 years agoReduce duplication in third party CMakeLists.txt
Joel Rosdahl [Sun, 20 Sep 2020 20:27:47 +0000 (22:27 +0200)] 
Reduce duplication in third party CMakeLists.txt

4 years agoStore cache statistics on level 2 and cache bookkeeping still on level 1
Joel Rosdahl [Sat, 19 Sep 2020 19:07:22 +0000 (21:07 +0200)] 
Store cache statistics on level 2 and cache bookkeeping still on level 1

In a “mostly cache hits” scenario, many parallel ccache invocations may
want to update statistics at the same time. Spreading out counter
updates over 256 instead of 16 stats files reduces lock contention
significantly.

Keeping cache bookkeeping (i.e. cache size and files counters) on level
1 preserves backward compatibility with the cleanup algorithm in older
ccache versions.

Some counters displayed by “ccache -s” won’t be accurate when an older
ccache version is run on a cache directory that is also used by ccache
4.x, but that shouldn’t be much of a problem in practice. Also, the
cache statistics isn’t backward compatible anyway since new counters may
be introduced and they will be invisible to older versions.

Closes #168 (only statistics are moved to the second level, though).

4 years agoSilence unwanted output in CCACHE_UMASK test
Joel Rosdahl [Sat, 19 Sep 2020 18:51:16 +0000 (20:51 +0200)] 
Silence unwanted output in CCACHE_UMASK test

4 years agoImplement support for automatic cache levels
Joel Rosdahl [Fri, 18 Sep 2020 07:28:48 +0000 (09:28 +0200)] 
Implement support for automatic cache levels

This makes ccache choose an appropriate cache level structure
automatically based on a maximum number of files per directory,
currently hardcoded to 2000.

4 years agoFix capitalization of CMake, Cppcheck, Clang-Format and Clang-Tidy
Joel Rosdahl [Fri, 18 Sep 2020 07:28:14 +0000 (09:28 +0200)] 
Fix capitalization of CMake, Cppcheck, Clang-Format and Clang-Tidy

4 years agoAvoid -Wshadow warnings with older compilers
Joel Rosdahl [Fri, 18 Sep 2020 06:48:10 +0000 (08:48 +0200)] 
Avoid -Wshadow warnings with older compilers

4 years agoAdd ASSERT and DEBUG_ASSERT macros
Joel Rosdahl [Fri, 18 Sep 2020 06:36:08 +0000 (08:36 +0200)] 
Add ASSERT and DEBUG_ASSERT macros

CMake always defines NDEBUG in release builds, so assertions are only
enabled in debug builds. Assertions were however always enabled before
switching to CMake. I prefer keeping assertions enabled in release
builds as well unless they are part of a tight loop.

Fix this by introducing two custom assertion macors:

- ASSERT(condition): Like assert(condition) but always enabled.
- DEBUG_ASSERT(condition): Like assert(condition), i.e. only enabled in
  debug builds.

All usage of assert(condition) is converted to ASSERT(condition) since
none of the assertions are made in performance-critical code.

4 years agoHandle waitpid interruption and add missing string header (#669)
Gregor Jasny [Mon, 21 Sep 2020 18:41:30 +0000 (20:41 +0200)] 
Handle waitpid interruption and add missing string header (#669)

4 years agoAdd support for hip language (#666)
Paul Fultz II [Mon, 21 Sep 2020 18:38:55 +0000 (13:38 -0500)] 
Add support for hip language (#666)

4 years agoAvoid mentioning __TIME__ and friends literally in header file
Joel Rosdahl [Thu, 17 Sep 2020 13:43:37 +0000 (15:43 +0200)] 
Avoid mentioning __TIME__ and friends literally in header file

Having them in the header files disables direct mode when compiling
ccache itself.

4 years agoAdd Util::clamp function
Joel Rosdahl [Thu, 17 Sep 2020 11:23:01 +0000 (13:23 +0200)] 
Add Util::clamp function

4 years agotest: Retrieve test suite list from CMakeLists.txt
Joel Rosdahl [Thu, 17 Sep 2020 11:08:43 +0000 (13:08 +0200)] 
test: Retrieve test suite list from CMakeLists.txt

4 years agoMake “-fstack-usage” test work when $COMPILER is a masquerading ccache
Joel Rosdahl [Thu, 17 Sep 2020 10:35:11 +0000 (12:35 +0200)] 
Make “-fstack-usage” test work when $COMPILER is a masquerading ccache

4 years agoFix and simplify calculation of cache size change
Joel Rosdahl [Wed, 16 Sep 2020 14:44:45 +0000 (16:44 +0200)] 
Fix and simplify calculation of cache size change

4 years agoUse appropriate type for size delta
Joel Rosdahl [Wed, 16 Sep 2020 13:52:55 +0000 (15:52 +0200)] 
Use appropriate type for size delta

4 years agoInclude thread ID in addition to process ID in symlink content
Joel Rosdahl [Wed, 16 Sep 2020 13:46:50 +0000 (15:46 +0200)] 
Include thread ID in addition to process ID in symlink content

This fixes a race condition when doing recompression with multiple
threads.

4 years agorecompress: Don’t defer updating statistics counter
Joel Rosdahl [Wed, 16 Sep 2020 13:26:17 +0000 (15:26 +0200)] 
recompress: Don’t defer updating statistics counter

As of dd8f65aa558, the Context destructor no longer flushes statistics.

4 years agoRefactor create_cachedir_tag
Joel Rosdahl [Tue, 15 Sep 2020 19:47:10 +0000 (21:47 +0200)] 
Refactor create_cachedir_tag

4 years agoRemove unnecessary suffix parameter from Util::get_path_in_cache
Joel Rosdahl [Tue, 15 Sep 2020 18:09:17 +0000 (20:09 +0200)] 
Remove unnecessary suffix parameter from Util::get_path_in_cache

4 years agoRemove cache_dir_levels (CCACHE_NLEVELS) setting
Joel Rosdahl [Thu, 10 Sep 2020 08:48:49 +0000 (10:48 +0200)] 
Remove cache_dir_levels (CCACHE_NLEVELS) setting

This is in preparation for two things:

1. Storing cache statistics (except size/files bookkeeping) on level 2
   instead of level 1, thus making “cache_dir_levels = 1” invalid.
2. Implementing automatic choice of cache levels based on the number of
   files in the cache.

4 years agorefactor: Convert Util::strip_whitespace to use string_view (#661)
Alexander Lanin [Thu, 17 Sep 2020 19:59:15 +0000 (21:59 +0200)] 
refactor: Convert Util::strip_whitespace to use string_view (#661)

4 years agoRefactor remaining stats_* functions into Statistics
Joel Rosdahl [Sat, 12 Sep 2020 18:41:27 +0000 (20:41 +0200)] 
Refactor remaining stats_* functions into Statistics

4 years agoRemove knowledge about legacy top-level stats file
Joel Rosdahl [Sat, 12 Sep 2020 14:02:24 +0000 (16:02 +0200)] 
Remove knowledge about legacy top-level stats file

The top-level stats file was removed in ccache 3.1 ten years ago so it
seems reasonable to remove knowledge about it now.

4 years agoRefactor Statistics::{write,increment} into Statistics::update
Joel Rosdahl [Sat, 12 Sep 2020 12:09:44 +0000 (14:09 +0200)] 
Refactor Statistics::{write,increment} into Statistics::update

4 years agoRefactor away stats_{add_cleanup,set_sizes}
Joel Rosdahl [Sat, 12 Sep 2020 10:58:46 +0000 (12:58 +0200)] 
Refactor away stats_{add_cleanup,set_sizes}

4 years agoRemove upgrade code for populating config with legacy cache size values
Joel Rosdahl [Sat, 12 Sep 2020 09:15:27 +0000 (11:15 +0200)] 
Remove upgrade code for populating config with legacy cache size values

Version 3.2, which introduced the configuration file, was released over
six years ago so it seems reasonable to remove upgrade code for older
versions now.

4 years agoRefactor flushing of stats and logs at ccache exit
Joel Rosdahl [Fri, 11 Sep 2020 14:55:25 +0000 (16:55 +0200)] 
Refactor flushing of stats and logs at ccache exit

Perform flushing of statistics counters (potentially triggering cache
cleanup) and log files in a finalizer inside cache_compilation instead
of in Conxtext’s destructor. This moves somewhat complex logic from
Context into the main ccache code.

As a side effect of this, stats_flush and stats_flush_to_file are
superfluous.

4 years agoAdd and use Statistics::increment function
Joel Rosdahl [Fri, 11 Sep 2020 14:50:26 +0000 (16:50 +0200)] 
Add and use Statistics::increment function

4 years agoExtract stats_{read,write} and Statistic enum to Statistics namespace
Joel Rosdahl [Fri, 11 Sep 2020 11:09:36 +0000 (13:09 +0200)] 
Extract stats_{read,write} and Statistic enum to Statistics namespace

4 years agoAdd unit tests of Counters class
Joel Rosdahl [Fri, 11 Sep 2020 07:43:29 +0000 (09:43 +0200)] 
Add unit tests of Counters class

4 years agoAdd and use Counters::increment(const Counters&)
Joel Rosdahl [Fri, 11 Sep 2020 07:43:00 +0000 (09:43 +0200)] 
Add and use Counters::increment(const Counters&)

4 years agoIntroduce Counters::{get,set}_raw
Joel Rosdahl [Fri, 11 Sep 2020 07:41:11 +0000 (09:41 +0200)] 
Introduce Counters::{get,set}_raw

Casting an integer to an enum class value is undefined behavior so let’s
strive not to do that.

4 years agoIntroduce Counters::get/set/increment methods, replacing operator[]
Joel Rosdahl [Thu, 10 Sep 2020 17:17:13 +0000 (19:17 +0200)] 
Introduce Counters::get/set/increment methods, replacing operator[]

The primary motivation for this is that it’s now possible to detect and
block underflow when incrementing a value in the unlikely but possible
event that a, say, cache_size_kibibyte is decremented below zero.

4 years agoReplace stats_update_size with incrementing counters directly
Joel Rosdahl [Thu, 10 Sep 2020 12:33:45 +0000 (14:33 +0200)] 
Replace stats_update_size with incrementing counters directly

4 years agoReplace stats_update with incrementing counters directly
Joel Rosdahl [Thu, 10 Sep 2020 08:56:47 +0000 (10:56 +0200)] 
Replace stats_update with incrementing counters directly

4 years agoTweak AsciiDoc section divider format
Joel Rosdahl [Thu, 10 Sep 2020 19:57:18 +0000 (21:57 +0200)] 
Tweak AsciiDoc section divider format

4 years agotest: Introduce unit test for -Xclang handling (#659)
Alexander Lanin [Mon, 14 Sep 2020 17:34:08 +0000 (19:34 +0200)] 
test: Introduce unit test for -Xclang handling (#659)

4 years agorefactor: Compare Args::to_string in tests, not internal state (#658)
Alexander Lanin [Mon, 14 Sep 2020 17:32:32 +0000 (19:32 +0200)] 
refactor: Compare Args::to_string in tests, not internal state (#658)

4 years agoSwitch from XXH64 to XXH3 for checksums (#657)
Erik Johansson [Thu, 10 Sep 2020 19:53:36 +0000 (21:53 +0200)] 
Switch from XXH64 to XXH3 for checksums (#657)

The latter promises better performance and supports automatic use of vector
instructions where appropriate.

4 years agoDon’t create <objectfile>.ccache-log when there is no object file
Joel Rosdahl [Tue, 8 Sep 2020 18:39:35 +0000 (20:39 +0200)] 
Don’t create <objectfile>.ccache-log when there is no object file

Fixes #656.

4 years agoDon’t log stat error in Util::read_file
Joel Rosdahl [Tue, 8 Sep 2020 18:09:52 +0000 (20:09 +0200)] 
Don’t log stat error in Util::read_file

An error is signalled via an exception so let’s make it up to the caller
whether to log or not.

4 years agoSimplify TemporaryFile
Joel Rosdahl [Tue, 8 Sep 2020 18:05:58 +0000 (20:05 +0200)] 
Simplify TemporaryFile

4 years agoAdd Util::ensure_dir_exists
Joel Rosdahl [Tue, 8 Sep 2020 18:05:43 +0000 (20:05 +0200)] 
Add Util::ensure_dir_exists

4 years agoAdd noexcept to move constructors and assignment operators
Joel Rosdahl [Tue, 8 Sep 2020 17:56:54 +0000 (19:56 +0200)] 
Add noexcept to move constructors and assignment operators

4 years agoMove File method definitions outside the class for tidiness
Joel Rosdahl [Tue, 8 Sep 2020 17:55:14 +0000 (19:55 +0200)] 
Move File method definitions outside the class for tidiness

4 years agoMove manifest functions into a Manifest namespace
Joel Rosdahl [Mon, 7 Sep 2020 07:09:20 +0000 (09:09 +0200)] 
Move manifest functions into a Manifest namespace

4 years agoAdd missing newline in --hash-file output
Joel Rosdahl [Sun, 6 Sep 2020 09:42:53 +0000 (11:42 +0200)] 
Add missing newline in --hash-file output

4 years agodoc: Correct default compression level
Joel Rosdahl [Sat, 5 Sep 2020 18:51:26 +0000 (20:51 +0200)] 
doc: Correct default compression level

4 years agoUse “using nonstd::*” consistently
Joel Rosdahl [Sat, 5 Sep 2020 18:46:42 +0000 (20:46 +0200)] 
Use “using nonstd::*” consistently

4 years agoIntroduce Util::parse_{unsigned,signed} functions
Joel Rosdahl [Sat, 5 Sep 2020 18:31:36 +0000 (20:31 +0200)] 
Introduce Util::parse_{unsigned,signed} functions

parse_unsigned replaces parse_uint32 while parse_signed replaces
parse_int. For simplicity, both return 64-bit values; I see no need to
be able to return narrower types since they are used for parsing
configuration values where a valid range is more important. Therefore
the functions optionally verify minimum and maximum allowed values.

4 years agoTweak some integer types
Joel Rosdahl [Sat, 5 Sep 2020 14:58:42 +0000 (16:58 +0200)] 
Tweak some integer types

4 years agoAllow for 64-bit values in statistics counters
Joel Rosdahl [Sat, 5 Sep 2020 14:55:39 +0000 (16:55 +0200)] 
Allow for 64-bit values in statistics counters

This is primaily done to avoid overflowing timestamp values in 2038.

4 years agoImprove name of ArgumentProcessingState::input_charset
Joel Rosdahl [Fri, 4 Sep 2020 17:42:42 +0000 (19:42 +0200)] 
Improve name of ArgumentProcessingState::input_charset

It holds the full option argument, not the value.

4 years agoConvert fromcache_call_mode enum to enum class
Joel Rosdahl [Fri, 4 Sep 2020 17:41:15 +0000 (19:41 +0200)] 
Convert fromcache_call_mode enum to enum class

4 years agoClean up ProcessArgsResult
Joel Rosdahl [Fri, 4 Sep 2020 13:44:49 +0000 (15:44 +0200)] 
Clean up ProcessArgsResult

4 years agoRemove redundant static keyword for namespace-level constants
Joel Rosdahl [Fri, 4 Sep 2020 13:23:25 +0000 (15:23 +0200)] 
Remove redundant static keyword for namespace-level constants

Namespace-level constant objects have static storage duration by
default.

4 years agoClean up .gitignore
Joel Rosdahl [Fri, 4 Sep 2020 13:07:31 +0000 (15:07 +0200)] 
Clean up .gitignore

4 years agoSimplify definition of the stats_info array
Joel Rosdahl [Fri, 4 Sep 2020 10:38:41 +0000 (12:38 +0200)] 
Simplify definition of the stats_info array

4 years agoImprove variable names related to statistics counters
Joel Rosdahl [Fri, 4 Sep 2020 07:40:21 +0000 (09:40 +0200)] 
Improve variable names related to statistics counters

4 years agorefactoring: Use return syntax for process_args (#652)
Alexander Lanin [Fri, 4 Sep 2020 06:32:45 +0000 (08:32 +0200)] 
refactoring: Use return syntax for process_args (#652)

4 years agorefactoring: Convert stats to enum class (#651)
Alexander Lanin [Fri, 4 Sep 2020 05:45:21 +0000 (07:45 +0200)] 
refactoring: Convert stats to enum class (#651)

4 years agoClarify naming conventions for enum and enum class values
Joel Rosdahl [Thu, 3 Sep 2020 11:18:12 +0000 (13:18 +0200)] 
Clarify naming conventions for enum and enum class values

4 years agoFix test errors with GCC 4.4
Joel Rosdahl [Wed, 2 Sep 2020 08:53:45 +0000 (10:53 +0200)] 
Fix test errors with GCC 4.4