Live data from Hacker News

I ported pigz from Unix to Windows

blog.kowalczyk.info

21–30 of 34 posts

Re: I ported pigz from Unix to Windows

#27
I'm not sure how willing I'd be to trust a pthread library fork from a single no-name github person. The mingw-w64 project provides libwinpthread, which you can download as source from their sourceforge, or as a binary+headers from a well-known repository like msys2.

Re: I ported pigz from Unix to Windows

#28
> Porting pthreads code to Windows would be a nightmare.

Porting one application using pthreads to use the Win32 API directly is however a lot more reasonable and provides you more opportunity to deal with impedance mismatches than a full API shim has. Same goes for dirent and other things as well as for the reverse direction. Some slightly higher level abstraction for the thnings your program actually needs is usually a better solution for cross-platform applications than using one OS API and emulating it on other systems.

Re: I ported pigz from Unix to Windows

#29
post #17

Earlier quoted context omitted.

These VirtualAlloc's may intermittently fail if the pagefile is growing...

Ah yeah, I see Firefox ran into that and added retries: https://hacks.mozilla.org/2022/11/improving-firefox-stabilit... Seems like a worthwhile change, though I'm not sure when I'll get around to it.

This is something you also need to do for other Win32 APIs, e.g. file write access may be temporarily blocked by anti-virus programs or whatever and not handling that makes unhappy users.

Re: I ported pigz from Unix to Windows

#30

I wish premake could gain more traction. It is the comprehensible alternative to Cmake etc.

I'd rather everyone use CMake than have to deal with yet another build system. Wouldn't be so bad if build systems could at least agree on the user interface and package registry format.
Post reply on HN