3 ms·
Yup. See https://justine.lol/blinkenlights/blinkenlights-windows.png https://justine.lol/blinkenlights/blinkenlights-windows.png and https://github.com/jart/cos
by jart 6y ago
Yup. See https://justine.lol/blinkenlights/blinkenlights-windows.png https://justine.lol/blinkenlights/blinkenlights-windows.png and https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d71d17256684118e1b1cd03/libc/calls/ioctl-tcsets-nt.c#L29-L65 https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d... and https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d71d17256684118e1b1cd03/libc/calls/ioctl-tcsets.c#L41-L48 https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d... and https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d71d17256684118e1b1cd03/libc/calls/tcsetattr.c#L35-L46 https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d... and https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d71d17256684118e1b1cd03/libc/runtime/winmain.greg.c#L86-L113 https://github.com/jart/cosmopolitan/blob/fcfe7c108083962a3d... It's not perfect though. For example, right now Cosmopolitan won't do the really dirty hacks that Cygwin does to fully simulate POSIX like creating a virtual filesystem or spawning daemons and threads for handling signals. Cosmopolitan does however give you 90% the value at 10% the price. This has been great for my use case, since I'm mostly only concerned with greenfield development. I wanted the feel of POSIX but I didn't need to check off a box with a regulatory body that it conforms perfectly to POSIX. I'm also not trying to create a distro that leverages all the open source works written to date; Cygwin and MinGW are already doing a great job at that and I view Cosmopolitan as complementary.
- kazinator 6y agoI needed a way to port program to Windows with accurate POSIX, like Cygwin, but without the Cygwin paths and virtual file system and other user-visible quirks. In under twenty or so fairly simple commits to a fork of the Cygwin DLL, I got it: http://www.kylheku.com/cygnal/ http://www.kylheku.com/cygnal/ This is another useful tool in this general arsenal.