kspalaiologos / bzip3

A better and stronger spiritual successor to BZip2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please add support for cygwin

VGtalion opened this issue · comments

While compiling I had the following message :
#error Your compiler, configuration or platform is not supported.

So I replaced #error with this in common.h :
#include <intrin.h>
#define prefetch(address) _mm_prefetch((const void *)(address), _MM_HINT_NTA)
#define prefetchw(address) _m_prefetchw((const void *)(address))
#warning Your compiler, configuration or platform is not supported.

It compiled bzip3.exe. So I think cygwin can be supported easily.

I don't have a cygwin setup handy and likely won't have one for a while. A PR that reliably adds cygwin support to the #ifdef chain in common.h is more than welcome.

I cannot reproduce that compilation error on my x86_64-pc-cygwin environment.

$ uname -srvmpio
CYGWIN_NT-10.0-19044 3.3.6-341.x86_64 2022-09-05 11:15 UTC x86_64 unknown unknown Cygwin
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/11/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-11.3.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++,jit --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (GCC)
$ ./bzip3.exe --version
bzip3 1.1.5
Copyright (C) by Kamila Szewczyk, 2022.
License: GNU Lesser GPL version 3 <https://www.gnu.org/licenses/lgpl-3.0.en.html>
$ file ./bzip3.exe
./bzip3.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows