linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Spencer <maillist-kmod@barfooze.de>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: John Spencer <maillist-kmod@barfooze.de>,
	linux-modules <linux-modules@vger.kernel.org>
Subject: Re: [PATCH 3/3] testsuite: fix usage of reserved names
Date: Tue, 27 Aug 2013 01:49:47 +0200	[thread overview]
Message-ID: <521BE99B.8020206@barfooze.de> (raw)
In-Reply-To: <CAKi4VAL-hDyZvaUXoBMyYPjaA7hRhXNJt353HmvHF2kqkqHCEA@mail.gmail.com>

On 08/27/2013 01:07 AM, Lucas De Marchi wrote:
> On Mon, Aug 26, 2013 at 3:20 PM, John Spencer<maillist-kmod@barfooze.de>  wrote:
>> stdout and stderr are names reserved for the implementation
>> and musl uses them rightfully as macro - and the expansion
>> causes (of course) unexpected results.
>
> couldn't musl just do what glibc does here?

maybe, but often what glibc does is suboptimal or non-conforming, and 
relying on some  assumptions about how libc defines certain internal 
specifiers (possibly temporary) seems pretty fragile. even glibc may 
change its definition at some point to something that breaks kmod.

>
> <... define the types here ...>
> #define stdin stdin
> #define stdout stdout
> #define stderr stderr
>
> This would avoid patches like this to several projects.

i've ported about 500 packages to musl and this is first usage of stderr 
and stdout as variable names i've seen so far.

>
>>
>> renaming the struct members stdout to std_out and stderr
>> to std_err, to be 1) compliant 2) cause compilation to
>> succeed.
>
> uggh.. "out" and "err" otherwise. No need for the "std_" prefix.

right, that looks much nicer now. updated patch sent separately.

>
>
> Lucas De Marchi
>

thanks,
--JS

  parent reply	other threads:[~2013-08-26 23:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 18:20 [PATCH 1/3] remove non-portable usage of strndupa John Spencer
2013-08-26 18:20 ` [PATCH 2/3] check if __GLIBC__ is defined before using _FILE_OFFSET_BITS John Spencer
2013-08-26 23:18   ` Lucas De Marchi
2013-08-26 23:52     ` John Spencer
2013-08-26 18:20 ` [PATCH 3/3] testsuite: fix usage of reserved names John Spencer
2013-08-26 23:07   ` Lucas De Marchi
2013-08-26 23:38     ` [PATCH 3/3 v2] " John Spencer
2013-08-26 23:49     ` John Spencer [this message]
2013-08-29  4:23   ` [PATCH 3/3] " Lucas De Marchi
2013-08-26 20:42 ` [PATCH 1/3] remove non-portable usage of strndupa Kay Sievers
2013-08-26 23:46 ` Lucas De Marchi
2013-08-27  0:16   ` John Spencer
2013-08-27  0:58     ` Kay Sievers
2013-08-27  3:35     ` Lucas De Marchi
2013-08-27  9:04       ` John Spencer
2013-08-29  3:49         ` Lucas De Marchi

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=521BE99B.8020206@barfooze.de \
    --to=maillist-kmod@barfooze.de \
    --cc=linux-modules@vger.kernel.org \
    --cc=lucas.de.marchi@gmail.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.
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).