Commit Graph

6424 Commits (094c000904448a1953840c605007524b15eb3a86)

Author SHA1 Message Date
W. Felix Handte cafc3b1bcb Also Convert zstd_compress.c 2019-01-28 17:05:18 -05:00
W. Felix Handte 324e9654d3 Add grep-able String to Error Macros 2019-01-28 12:50:36 -05:00
W. Felix Handte 32fed9c7be Switch CHECK_F Calls to FORWARD_ERROR 2019-01-28 12:45:34 -05:00
W. Felix Handte 800c87fed0 Switch Unconditional RETURN_ERROR_IF Calls to RETURN_ERROR 2019-01-28 12:45:34 -05:00
W. Felix Handte a3538bbc6f Add RETURN_ERROR and FORWARD_ERROR Macros 2019-01-28 12:45:26 -05:00
W. Felix Handte c823237d7b Convert Checks in zstd_decompress.c to RETURN_ERROR_IF 2019-01-28 12:23:14 -05:00
W. Felix Handte ea031f4ea2 Convert Checks in zstd_decompress_block.c to RETURN_ERROR_IF 2019-01-28 11:56:39 -05:00
W. Felix Handte 54fa31f03b Add RETURN_ERROR_IF Macro That Logs Debug Information When Check Fails 2019-01-28 11:43:33 -05:00
Yann Collet cee31bbd25 updated fullbench and paramgrill
to use new benchfn
returning a double.
2019-01-25 15:38:08 -08:00
Yann Collet b8701102e0 fixed benchzstd to use new version of benchfn
returning a double type
2019-01-25 15:11:50 -08:00
Yann Collet 8c3ba44ada Merge branch 'fileio_lz4' into benchfn 2019-01-25 14:53:56 -08:00
Yann Collet 07e047873e fixed fileio.c compilation with LZ4 enabled
was broken by #1505.

I'm surprised it passed CI tests.
LZ4 tests are part of the "Extended" tests on Travis CI,
which are run on "master" and in "cron" jobs.

Since latest cron job did not failed,
especially this one : https://travis-ci.org/facebook/zstd/jobs/484365040
it suggests cron jobs are no longer using `dev` branch.

To be investigated
2019-01-25 14:42:44 -08:00
Yann Collet f75ad2edcf added ability to create timedFnState on stack 2019-01-25 14:22:25 -08:00
Yann Collet 6b2f26791e updated benchfn.h code comments 2019-01-25 12:18:33 -08:00
Yann Collet 2888c62e85
Merge pull request #1505 from kostmo/remove-global-params
Remove global parameters, pass into public functions instead
2019-01-23 17:11:08 -08:00
Karl Ostmo 5e220bf4b5 Remove global parameters, pass into public functions instead 2019-01-23 16:06:27 -08:00
Yann Collet 31ba3f7e64
Merge pull request #1504 from facebook/conversionWarnings
Conversion warnings
2019-01-22 10:04:59 -08:00
Yann Collet 54bd39abdf Revert "added clang test in travis"
This reverts commit 4909a341db.
2019-01-20 11:13:01 -08:00
Yann Collet 4909a341db added clang test in travis 2019-01-20 00:11:07 -08:00
Yann Collet 2a6aa6be5f updated clang tests
target clangbuild
2019-01-19 23:40:41 -08:00
Yann Collet a1394399b4 fixed minor conversion warnings in examples/ 2019-01-19 23:38:20 -08:00
Li-Wen Hsu 281c7970ac Add Cirrus-CI build status badge 2019-01-17 03:43:02 +08:00
Li-Wen Hsu 1828c2619c Add Cirrus-CI config for FreeBSD builds 2019-01-17 03:42:14 +08:00
Yann Collet bd2740f347
Merge pull request #1499 from kostmo/detect-truncation
fix --list on truncated files
2019-01-16 08:56:22 -08:00
Yann Collet ae087ec4bb
Merge pull request #1500 from lwhsu/unistd
Include unistd.h on unix platforms for explicit function declaration
2019-01-16 06:21:58 -08:00
Karl Ostmo 4fa585aee3 fix --list on truncated files
fseek() doesn't indicate when it moves past the end of a file.
Consequently, if a file is truncated within its last block, the error would't be detected.

This PR adds a test scenario that induces this situation using a small compressed file of only one block in size.
This test is added to tests/playTests.sh

Check is implemented by ensuring that the filehandle position is equal to the filesize upon exit.
2019-01-15 19:03:29 -08:00
Li-Wen Hsu 6ff9d5e881 Include unistd.h on unix platforms for explicit function declaration 2019-01-16 04:55:43 +08:00
Yann Collet f8745ae095
Merge pull request #1496 from hjmjohnson/cmake-improve-conditional-policies
ENH: Simplify conditional logic
2019-01-10 09:35:21 -08:00
Hans Johnson 62c0dd7aff ENH: Simplify conditional logic
Based on excellent comment in #1489, the logic
to set cmake policies was simplified.  This will
provide an easier mechanism for maintaining the
conditional logic across many versions of cmake.
2019-01-08 14:25:56 -06:00
Yann Collet c5be47c8c1
Merge pull request #1494 from lzutao/fix-leak
Fix potential leak of 'outBuff' (reported by scan-build)
2019-01-06 17:17:02 -08:00
Yann Collet 1cd61ea862
Merge pull request #1493 from lzutao/fix-#1428
Fix #1428 - zstdgrep returned 1 on both matched and unmatched file
2019-01-06 12:37:07 -08:00
Lzu Tao 260ff2f6b7 tests/legagy.c: More fixes 2019-01-06 23:42:24 +07:00
Lzu Tao de7e3be7fa Fix potential leak of 'outBuff' (reported by scan-build) 2019-01-06 23:28:38 +07:00
Lzu Tao 7b6a8840c5 Fix #1428 - zstdgrep returned 1 on match and unmatch
- Use ZCAT for testing zstdgrep in case of non-install yet
- tests: Add file test for zstdgrep
2019-01-06 23:22:55 +07:00
Yann Collet f8c8796dfe
Merge pull request #1491 from cemeyer/freebsd_num_cores
Fix #1425 - Use physical core count API on FreeBSD
2019-01-05 11:48:01 -08:00
Conrad Meyer fe82637069 Fix #1425 - Use physical core count API on FreeBSD
Similar to Apple, use the native physical core count sysctl, when available.

This is a little repetitive (it's basically the __APPLE__ method plus the
otherBSD method concatenated together) but seemed clearer than any way that
would totally eliminate repetition.

The __FreeBSD_version check only tests the version of the FreeBSD kernel
that zstd is compiled on; importantly, it may be run on a different version.
So the compile-time check is a little naive and needs to be able to fallback
to work on older versions of FreeBSD.  For a similar reason, it may make
sense to simply eliminate the __FreeBSD_version check entirely.  The
tradeoff is that a spurious sysctlbyname would be issued when -T0 is used on
older kernels.
2019-01-04 11:57:12 -08:00
Yann Collet b174809fcc
Merge pull request #1490 from erikwebb/dev
Check CMake minor version support for VERSION_LESS_EQUAL
2019-01-03 13:22:07 -08:00
Erik Webb 9448a3790d Check CMake minor version support for VERSION_LESS_EQUAL
VERSION_LESS_EQUAL is only available to CMake 3.7+. This adds additional
logic to check that CMAKE_MINOR_VERSION is at least 7.

Fixes #1489
2019-01-03 15:26:20 -05:00
Yann Collet f9e4f89252 improved comments for adjustCParams() and getCParams() 2019-01-02 12:18:40 -08:00
Yann Collet a2f492f2b3
Merge pull request #1485 from ldv-alt/dev
contrib/pzstd/Makefile: fix build of tests
2019-01-02 10:46:41 -08:00
Yann Collet 282000d88b
Merge pull request #1475 from hjmjohnson/cmake-version-setting
Cmake version setting
2018-12-30 21:11:39 -08:00
Hans Johnson 97d1de3d22 Provide forward compatible cmake paradigms
Automatically extract version information
from the zstd.h file.  Use naming of variables
consisent with modern cmake and https://semver.org/
(Semantic Versioning 2.0.0, MAJOR, MINOR, PATCH)

Modern versions of cmake provide consistent
paradigms for configuring project external
interface values.

This set of changes provide a back port of
some of cmake 3+ paradigms back to cmake 2.8.9.
Set and allow use of the current cmake policies
for newer versions of cmake when available to
allow for modern compiler features to be
utilized when available.

NOTE: The intent is that future modifications to
cmake will enable (conditional on cmake version support)
the ability to support modern linkage, and target
export mechanisms.  Those future changes will
make incorporating zstd into other packages
much easier.

This patch also allows the more rigourous error
checking of commmon cmake errors to be preformed
by cmake (i.e. more stringent syntax checking and
create errors for common hard to find misuses of
cmake variables).

This patch also provides support for modern
compiler support options by cmake (like
enabling interprocedural optimization
if link time optimizations are known to be supported
by the compiler envirionment.  IPO can be supported
by setting the CMAKE_INTERPROCEDURAL_OPTIMIZATION variable
for newer versions of cmake.
2018-12-28 13:47:35 -06:00
Dmitry V. Levin 8b2210411a contrib/pzstd/Makefile: fix build of tests
Apparently, Options.o cannot be linked in without $(PROGDIR)/util.o
2018-12-28 19:02:22 +00:00
Yann Collet 23c73fe3e2
Merge pull request #1474 from hjmjohnson/cmake-set-default-build-type
Cmake set default build type
2018-12-28 11:02:22 -08:00
Yann Collet 6746de8dd6
Merge pull request #1478 from hjmjohnson/remove-duplicates-validation
BUG: list sub-command REMOVE_DUPLICATES requires list to be present
2018-12-28 10:50:03 -08:00
Yann Collet c1a862385f
Merge pull request #1482 from lzutao/travisTest
travis: Use ninja from official github release
2018-12-28 10:49:01 -08:00
Yann Collet bad7ed161a
Merge pull request #1483 from lzutao/meson-readme
meson: Update build guide
2018-12-28 09:46:13 -08:00
Yann Collet 663c55eba0
Merge pull request #1484 from lzutao/meson-pkgconf
meson: Correct generating pkgconf after Meson v0.49.0
2018-12-27 22:39:07 -08:00
Lzu Tao 142076ceae travis: Remove deprecated sudo field 2018-12-28 11:55:26 +07:00
Lzu Tao 787a72cdfe meson: Correct generating pkgconf after Meson v0.49.0 2018-12-28 11:20:33 +07:00