From: Hans-Werner Hilse <hwhilse@gmail.com>
To: User-mode-linux Devel <User-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] [PATCH 2/3] um: Do not use stdin and stdout names for variables
Date: Thu, 11 Jun 2015 08:35:12 +0200 [thread overview]
Message-ID: <6e13f3aadfb37a3593bd0a29d70af17c@hilses.de> (raw)
In-Reply-To: <CAFLxGvwfZtaTqJPRMiMbg-fmfvz0iHHNwwQJ-JR6W0DmjEvirw@mail.gmail.com>
Hi,
Am 2015-06-10 23:37, schrieb Richard Weinberger:
> On Wed, Jun 10, 2015 at 11:21 PM, Hans-Werner Hilse <hwhilse@gmail.com>
> wrote:
>> Naming local variables "stdin" and "stdout" is fine with glibc,
>> other C libraries, namely musl, will however complain.
>
> Wait, what?!
> These are not local variables, they are struct members.
>
> What exactly is the issue with musl? Sounds very odd.
They chose to have stdin and stdout (and, of course, stderr) wrapped in
macros - in a different way than glibc:
[...]
extern FILE *const stdin;
[...]
#define stdin (stdin)
(http://git.musl-libc.org/cgit/musl/tree/include/stdio.h?id=v1.1.10#n59)
The C standards C89/C99 (the last one I even looked up right now) say
those identifiers are macros - according to stdio.h from glibc, which
does the following:
/* Standard streams. */
extern struct _IO_FILE *stdin; /* Standard input stream. */
[...]
/* C89/C99 say they're macros. Make them happy. */
#define stdin stdin
[...]
Of course you're right, of course they are struct members. That's what I
get for writing my commit messages too long after going at the issue at
hand.
I'll send an updated patch series in a few minutes.
Thanks for getting back and caring!
-hwh
------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2015-06-11 6:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5578aa89.c7542b0a.5b46.ffffe036SMTPIN_ADDED_BROKEN@mx.google.com>
2015-06-10 21:37 ` [uml-devel] [PATCH 2/3] um: Do not use stdin and stdout names for variables Richard Weinberger
2015-06-11 6:35 ` Hans-Werner Hilse [this message]
2015-06-11 6:49 ` Richard Weinberger
2015-06-11 7:54 ` Hans-Werner Hilse
2015-06-11 8:09 ` Richard Weinberger
2015-06-11 8:26 ` Hans-Werner Hilse
2015-06-11 9:05 ` Richard Weinberger
2015-06-10 21:21 Hans-Werner Hilse
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=6e13f3aadfb37a3593bd0a29d70af17c@hilses.de \
--to=hwhilse@gmail.com \
--cc=User-mode-linux-devel@lists.sourceforge.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox