bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib cross-compiling issue with musl


From: Rich Felker
Subject: Re: gnulib cross-compiling issue with musl
Date: Tue, 18 Jun 2013 14:07:55 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jun 18, 2013 at 10:41:45AM -0700, Paul Eggert wrote:
> On 06/18/13 10:03, Rich Felker wrote:
> > 1. In the #else case, instead of #error, put if(0)....
> > 2. Write a "portable" version of the replacement code
> 
> How about this idea instead?
> 
>   3.  Modify gl_FUNC_FFLUSH_STDIN so that it checks at
>       compile-time whether it's using musl, and succeeds
>       in that case.
> 
> This should be more robust than (1), and easier to implement
> than (2).  Can you suggest code along those lines?  And if
> it's nontrivial, would you be willing to sign copyright
> papers assigning the code to the FSF?

We've been through that discussion before, and even if it were
feasible, it wouldn't help on any new system except musl. Of my two
proposed fixes, the first would fix the issue on any future system
that's not broken (not just existing ones), but would obviously not
support future broken systems. The second proposed fix should support
any future system, but would be a bit more costly, assuming it's even
possible.

To revisit why I don't like your proposed fix, for every bug we could
get fixed by making an easy way for applications to test "is this
musl?", we would have something like 10 new bugs created by people
doing that. This is not just speculation; it's based on questions we
get on the list and on IRC. Your idea of using such a test in the form
of "if (is_musl) assume_non_broken();" is the first proposed use of
this form I've seen. Every other request for an easy "if (is_musl)"
test have been from people who wanted to do something that would cause
bad breakage with future versions of musl.

Rich



reply via email to

[Prev in Thread] Current Thread [Next in Thread]