facebook / facebook/zstd

Building zstd on WinXP with MinGW

Offen
#1,811 9 Kommentare 4 Reaktionen 1 zugewiesene Person Beansprucht von @Cyan4973 Auf GitHub ansehen
Portability
Vorherrschende Sprache
C
Sterne
27.9k
Forks
2.6k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
8

Beschreibung

I tried to build zstd on WinXP using MinGW-W64 7.3.0. After minor changes in CMakeLists everything seemed to be fine. But when I tried to run zstd.exe, it silently crashed. After some investigation I found out that kernel32.dll lacks InitializeConditionVariable() and three other functions related to condition variables. These functions are supported on Vista or higher. Because XP is obsolete, I do not expect a sophisticated solution, but a simple warning when zstd is built on XP would be nice.

BTW. In case of MinGW and XP thread safety is quite simple to achive – one should switch to pthreads by modyfying one line in threading.[ch]:
`#if defined(ZSTD_MULTITHREAD) && defined(_WIN32)`
to
`#if defined(ZSTD_MULTITHREAD) && defined(_WIN32) && !defined(__MINGW32__)`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.