Commit Graph

106 Commits (5fb1d64806c71b9d27cea7257f038064185f06b1)

Author SHA1 Message Date
Ahmed Abdellah 639bb46954 removing extra logs 2019-10-24 11:35:26 +01:00
Ahmed Abdellah 849b8c6de8 fixing continuous integeration errors and removing a lot of logs 2019-10-24 11:10:13 +01:00
Ahmed Abdellah 47712c9b15 fixing c90 issue in util.c cont. 2019-10-24 10:30:05 +01:00
Ahmed Abdellah c799f33899 fixing c90 issue in util.c cont. again 2019-10-24 10:23:36 +01:00
Ahmed Abdellah 8a9741b3ee fixing c90 issue in util.c cont. 2019-10-24 10:17:31 +01:00
Ahmed Abdellah aefa18ee38 fixing c90 issue in util.c 2019-10-24 10:12:51 +01:00
Ahmed Abdellah f43e45954f fixing memory leak issue and removing c90 issue 2019-10-24 09:39:16 +01:00
Ahmed Abdellah 8cbe42fcb0 solving the rest of C90 issues in defining local variables in middle of code and comparing uncompatible types 2019-10-23 20:22:07 +01:00
Ahmed Abdellah 9a454e9724 solving C90 issues in defining local variables in middle of code and comparing uncompatible types 2019-10-23 20:15:18 +01:00
AhmedAbdellah19 7a732e2bb2
Merge branch 'dev' into adding_read_files_from_file_feature 2019-10-23 20:29:01 +02:00
Bimba Shrestha 8a3974807e Allowing named pipes to go through zstdcli 2019-10-22 15:23:22 -07:00
Yann Collet 0492c57013 fixed visual defined test 2019-10-18 17:08:52 -07:00
Yann Collet f379637025 removed Visual warning
for pointer casts
2019-10-18 17:05:42 -07:00
Yann Collet 1bd6c15b6b fix function cast warning on Windows with gcc9 2019-10-18 15:45:57 -07:00
Yann Collet 29e46ed0bd fix test on windows
isDirectory() doesn't work on Windows
if directory name is followed by '/'
2019-10-18 14:28:34 -07:00
Yann Collet 157479af0c fixed isSameFile() 2019-10-17 14:31:42 -07:00
Yann Collet a71256a2ee fix several cast 2019-10-17 11:01:20 -07:00
Yann Collet 000404311f fix incorrect dictName/FileName comparison on Windows
inode identification does not seem to work on Windows,
even with on a msys2 posix layer.
2019-10-17 10:56:14 -07:00
Yann Collet 19741c7d99
Merge pull request #1815 from facebook/zlibwrap
make zlibWrapper strict ISO-C90 compatible
2019-10-16 16:45:15 -07:00
Ahmed Abdellah 779ea72953 Adding --file=FILE feature 2019-10-15 07:49:13 +01:00
Yann Collet b3e92ad346
Merge pull request #1812 from senhuang42/output-dir-flat
Support for --output-dir-flat: output into a directory
2019-10-14 09:25:05 -07:00
Yann Collet e0d413d648 fixed init warning 2019-10-04 15:09:52 -07:00
Sen Huang 64bc441d7d Now constructs final destination path without allocating new table 2019-10-03 13:53:04 -04:00
Sen Huang 4dc604cab8 Addressed comments on malloc 2019-10-02 18:34:42 -04:00
Sen Huang c763457e0a Static analyze fix 2019-10-02 15:30:24 -04:00
Sen Huang b93f1b2a30 CI Tests fix 2019-10-02 11:29:34 -04:00
Sen Huang 147b761454 Removed strdup() dependency 2019-10-02 11:18:14 -04:00
Sen Huang f80437c586 Add support for --output-dir-flat
New flag to specify output directory destination for multiple files.
2019-10-02 11:08:20 -04:00
W. Felix Handte e1ec8004cc Formatting and Clean Up 2019-09-12 16:27:05 -04:00
W. Felix Handte 5a9baae9cf Set M-Time Nanoseconds 2019-09-12 11:50:33 -04:00
Felix Handte 6ae1ec96bc
Merge pull request #1708 from neheb/dev
zstd: Don't use utime on Linux
2019-09-12 11:44:31 -04:00
Sen Huang 62616c4d90 fixes for windows compilation 2019-09-06 13:20:50 -07:00
Sen Huang 30bff50e06 fixes for tests and segfault 2019-09-06 11:10:53 -07:00
Sen Huang a9c807a948 kill memory leaks, cleanup, fix some dumb bugs 2019-09-06 10:17:04 -07:00
Sen Huang 6beb3c0159 added decompression support 2019-09-05 17:56:24 -07:00
Sen Huang 7f98b46876 adding support for -O flag: multiple files into one directory for compressions (decompression to come) 2019-09-05 16:03:35 -07:00
Rosen Penev 41e90653fe
zstd: Don't use utime on Linux
utime is deprecated by POSIX 2008 and optionally not available with
uClibc-ng.

Got rid of a few useless headers in timefn.h.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-07-31 12:29:13 -07:00
LeeYoung624 c5caaf52a4 bug fix : NULL pointer 2019-07-29 17:05:50 +08:00
LeeYoung624 793b94b354 memory leak fix 2019-07-25 21:07:57 +08:00
W. Felix Handte d2c48042e6 Switch Macro Guarding lstat() 2019-06-07 15:32:28 -04:00
Yann Collet 59a7116cc2 benchfn dependencies reduced to only timefn
benchfn used to rely on mem.h, and util,
which in turn relied on platform.h.
Using benchfn outside of zstd required to bring all these dependencies.

Now, dependency is reduced to timefn only.
This required to create a separate timefn from util,
and rewrite benchfn and timefn to no longer need mem.h.

Separating timefn from util has a wide effect accross the code base,
as usage of time functions is widespread.
A lot of build scripts had to be updated to also include timefn.
2019-04-10 12:37:03 -07:00
shakeelrao e5811e5520 Extract file comparison into utility func 2019-03-23 19:04:56 -07:00
Nick Terrell e1a799e5de [util] Fix UTIL_isLink() for FreeBSD 2019-02-11 17:44:10 -08:00
Björn Ketelaars 1e4dc2e5f1 Detect symbolic links on OpenBSD
In #1520 it is described that FreeBSD doesn't detect symbolic links. The
same is true for OpenBSD. This diff fixes this issue for OpenBSD. I'm
guessing that something similar works for FreeBSD as well. However, I'm
unable to test this.
2019-02-12 01:56:05 +01: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 ffba142406 fixed file identity detection in 32-bit mode
also :
some library decided to use `index` as a global variable declared in standard header
shadowing the ones used in fastcover.c  :(
2018-12-20 14:30:30 -08:00
Yann Collet 65a441a8f0 fixed stdlib implementation of time functions
generated redefinitions
2018-12-20 14:02:50 -08:00
Yann Collet 72dbf1bcd0 removed strncpy() from `util.c`
as Visual surprisingly complains about their usage.
Replaced by memcpy()
2018-12-20 12:27:12 -08:00
Yann Collet 105fa953cb use strerror() to generate error message
as suggested by @terrelln .

also:
- hopefully fixed Windows version
- changed the test, so that it passes on non-english OS stdlib errors.
2018-12-20 09:16:40 -08:00
Yann Collet 173ef9dea2 fixed : detection of non-existing file
better error message
with test
2018-12-19 18:30:57 -08:00
Rohit Jain c7251e5151 Address most comments 2018-10-11 18:05:15 -07:00
Rohit Jain 91b2fed8f8 Moving more function to the new C file 2018-10-11 17:34:47 -07:00
Rohit Jain a47f6e6f2d Removing static and making extern 2018-10-11 16:51:29 -07:00
Rohit Jain 705e0b18ab Making changes to make it compile on my laptop 2018-10-11 15:51:57 -07:00
Rohit Jain d6d240f016 Removed UTIL_setFileStat from util.h and move it to util.c 2018-10-11 15:07:12 -07:00
Rohit Jain f881ee8c48 Moving code to util.c 2018-10-11 14:38:41 -07:00