From: Rob Landley <rob@landley.net>
To: musl@lists.openwall.com
Cc: musl@lists.openwall.com
Subject: Re: question: hard-coded file descriptors in stdin/stdout/stderr
Date: Sun, 17 Mar 2013 23:09:27 -0500 [thread overview]
Message-ID: <1363579767.15703.23@driftwood> (raw)
In-Reply-To: <20130318032631.GM20323@brightrain.aerifal.cx> (from dalias@aerifal.cx on Sun Mar 17 22:26:31 2013)
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
next prev parent reply other threads:[~2013-03-18 4:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 16:18 Zvi Gilboa
2013-03-14 17:17 ` Szabolcs Nagy
2013-03-14 17:51 ` Zvi Gilboa
2013-03-14 18:17 ` Szabolcs Nagy
2013-03-14 19:34 ` Zvi Gilboa
[not found] ` <CAFipMOE4xkYBYb1rEDtB0T8+Nfgs9cEG_=Va1=PKN4H6CLDHMw@mail.gmail.com>
2013-03-14 19:57 ` Zvi Gilboa
2013-03-15 8:33 ` Rich Felker
2013-03-15 11:43 ` LM
2013-03-15 14:46 ` Zvi Gilboa
2013-03-15 18:43 ` Rich Felker
2013-03-15 18:55 ` Zvi Gilboa
2013-03-15 19:03 ` Rich Felker
2013-03-15 19:20 ` Zvi Gilboa
2013-03-18 3:14 ` Rob Landley
2013-03-18 3:26 ` Rich Felker
2013-03-18 3:50 ` Strake
2013-03-18 4:08 ` Rich Felker
2013-03-18 4:30 ` Rob Landley
2013-03-18 4:09 ` Rob Landley [this message]
2013-03-18 3:28 ` Zvi Gilboa
2013-03-18 4:22 ` Rob Landley
2013-03-18 4:38 ` Zvi Gilboa
2013-03-18 3:06 ` Rob Landley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363579767.15703.23@driftwood \
--to=rob@landley.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).