diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-08 08:19:09 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-08 08:19:09 (GMT) |
commit | 0f73ed5726d1d9fac33f00a4440b2e3953fb5bd6 (patch) | |
tree | c12c5d864a0caea011591cb0511b73d860af0fcd | |
parent | 90981a35c98f66779e9b0335e66005d4048302e0 (diff) | |
download | lz4-0f73ed5726d1d9fac33f00a4440b2e3953fb5bd6.zip lz4-0f73ed5726d1d9fac33f00a4440b2e3953fb5bd6.tar.gz lz4-0f73ed5726d1d9fac33f00a4440b2e3953fb5bd6.tar.bz2 |
new Travis tests
-rw-r--r-- | .travis.yml | 30 | ||||
-rw-r--r-- | programs/lz4cli.c | 17 |
2 files changed, 33 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml index 4d6bdc4..cf2b19e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,15 +26,37 @@ matrix: packages: - valgrind - clang - - env: Ubu=14.04 Cmd='make armtest' COMPILER=arm-linux-gnueabi-gcc + + - env: Ubu=14.04 Cmd='make armtest' COMPILER=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static dist: trusty sudo: required addons: apt: packages: + - qemu-system-arm + - qemu-user-static - gcc-arm-linux-gnueabi - - libc6-dev-armel-cross - - linux-libc-dev-armel-cross + + - env: Ubu=14.04 Cmd='make armtest' COMPILER=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static + dist: trusty + sudo: required + addons: + apt: + packages: + - qemu-system-arm + - qemu-user-static + - gcc-aarch64-linux-gnu + + - env: Ubu=14.04 Cmd='make armtest' COMPILER=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static + dist: trusty + sudo: required + addons: + apt: + packages: + - qemu-system-ppc + - qemu-user-static + - gcc-powerpc-linux-gnu + - env: Ubu=14.04 Cmd='make c_standards && make -C tests test-lz4 test-mem' COMPILER=cc dist: trusty sudo: required @@ -63,7 +85,7 @@ matrix: - gcc-multilib - gcc-5 - gcc-5-multilib - - env: Ubu=14.04 Cmd='make c_standards CC=gcc-6 && make -C tests test-lz4 CC=gcc-6 MOREFLAGS="-Werror"' COMPILER=gcc-6 + - env: Ubu=14.04 Cmd='make c_standards CC=gcc-6 MOREFLAGS="-Werror" && make -C tests test-lz4 CC=gcc-6 MOREFLAGS="-Werror"' COMPILER=gcc-6 dist: trusty sudo: required addons: diff --git a/programs/lz4cli.c b/programs/lz4cli.c index f091d3a..29275ed 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -59,20 +59,17 @@ #include "lz4.h" /* LZ4_VERSION_STRING */ -/**************************** +/*-************************************ * OS-specific Includes -*****************************/ -#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) +**************************************/ +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || (defined(__APPLE__) && defined(__MACH__)) || defined(__DJGPP__) /* https://sourceforge.net/p/predef/wiki/OperatingSystems/ */ +# include <unistd.h> /* isatty */ +# define IS_CONSOLE(stdStream) isatty(fileno(stdStream)) +#elif defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) # include <io.h> /* _isatty */ -# if defined(__DJGPP__) -# include <unistd.h> -# define _isatty isatty -# define _fileno fileno -# endif # define IS_CONSOLE(stdStream) _isatty(_fileno(stdStream)) #else -# include <unistd.h> /* isatty */ -# define IS_CONSOLE(stdStream) isatty(fileno(stdStream)) +# define IS_CONSOLE(stdStream) 0 #endif |