Re: [PATCH 3/3] testsuite: fix usage of reserved names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/27/2013 01:07 AM, Lucas De Marchi wrote:
On Mon, Aug 26, 2013 at 3:20 PM, John Spencer<maillist-kmod@xxxxxxxxxxx>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux