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 22:14:00 -0500 [thread overview]
Message-ID: <1363576440.15703.21@driftwood> (raw)
In-Reply-To: <51420E17.9030305@eservices.virginia.edu> (from zg7s@eservices.virginia.edu on Thu Mar 14 12:51:19 2013)
On 03/14/2013 12:51:19 PM, Zvi Gilboa wrote:
> >> which ones?
>
> ... since you are asking... inspired by musl-libc, I am currently
> writing a win32
> /win64 open-source library that implements/provides POSIX system
> calls (see note
> below). I believe that having a powerful libc with an MIT license
> available on
> Windows would actually be of great value to the open source community
> for all
> possible reasons, but that is of course irrelevant to my question:)
All possible reasons? I can't think of one.
I have actually thought about this sort of thing. For example, I did a
talk at the recent emebedded Linux conference explaining _why_ toybox
and musl are important to Android:
http://www.youtube.com/watch?v=SGmtP5Lg_t0
> The main issue here is that the standard file descriptors on Windows
> are -10
> (STD_INPUT_HANDLE), -11 (STD_OUTPUT_HANDLE), and -12
> (STD_ERROR_HANDLE).
In DOS, stdin, stdout, and stderr were 0, 1, and 2. What you just
listed is an explicit violation of posix.
> I could of course compensate for that in my code and "translate" the
> POSIX special
> file descriptor numbers to the Windows ones, however it would be more
> elegant if musl
> -libc used the descriptors defined in <unistd.h> instead of
> hard-coded numbers.
You want to introduce non-posix assumptions into musl to make windows
code more elegant.
Really?
>
> * 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?
> While it is currently in its very initial
> stage (and not yet online), the major "obstacle" features --
> including fork()
> -- have already been implemented. To remove all doubts,
Remove all doubts? Really? All of them?
> I am aware of Cygwin's existence,
But apparently not mingw.
> yet am looking for a high-performance solution that would be both
> "clean" (psxcalls-->libc-->user-library-or-application), and flexibly
> licensed.
How on earth does licensing on WINDOWS matter, since the base OS is
proprietary?
So this is explicitly "provide free stuff to make paying money to
Microsoft more appealing"?
Rob
next prev parent reply other threads:[~2013-03-18 3:14 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 [this message]
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
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=1363576440.15703.21@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).