|
Message-Id: <1363579767.15703.23@driftwood> Date: Sun, 17 Mar 2013 23:09:27 -0500 From: Rob Landley <rob@...dley.net> To: musl@...ts.openwall.com Cc: musl@...ts.openwall.com Subject: Re: question: hard-coded file descriptors in stdin/stdout/stderr On 03/17/2013 10:26:31 PM, Rich Felker wrote: > > You want to introduce non-posix assumptions into musl to make > > windows code more elegant. > > > > Really? > > No, he just wanted to eliminate some assumptions (guaranteed by POSIX) > and use macros instead of hard-coded magic numbers. But this turned > out not to be necessary or useful anyway, for reasons connected to the > ones you cited. We arrived at this conclusion with no need for > flaming. :-) Sorry, I used to work on OS/2. My response to Microsoft is the same as Vogon Grandmothers and the Ravenous Bugbladder Beast of Traal. "In brief: avoid." (Pure reflex at this point.) > > >* as for psxcalls: this is a C library, that exclusively uses the > > >Native API. It > > >attaches to ntdll.dll during run-time, and can thus be compiled as > > >a "native" static > > >library with no external dependencies. > > > > Doesn't mingw already exist? > > mingw is not a libc. It uses msvcrt, which is horrible. Oh agreed. I set up a mingw environment to run under wine to test my old tinycc fork with at one point. It's just _less_ horrible than cygwin (which I've also had to use). > The reason for > getting a real proper libc on windows is not to make windows' users > lives easier, or at least that's not my reason for wanting it. Rather, > it makes OUR lives easier, because FOSS projects can just target POSIX > and keep their cores simple, rather than being full of #ifdef hell or > "portable runtime" hell. That was the part that was confusing me, POSIX _does_ say that 0 is stdin, 1 is stdout, and 2 is stderr. "Targeting POSIX" would mean write(2, "error message"); is allowed. Also kinda hard to do shell scripting without that definition: $ cd ~/linux/scripts $ grep '2>&1' * | wc -l 32 Windows _isn't_ a unix. I don't see how you're going to fix the things cygwin did without either reinventing their huge glue layer, and the obvious alternative is mingw's not dealing with any of it... *shrug* As long as I can continue not to care, it isn't really my problem. But this is a can of worms. Rob
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.