Re: [PATCH v2] build: silence a clang warning in virsh.c

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

 



Hi Eric,

Thank you for very kind replying and investigations.
And I'm sorry I'm slow to react.

On Tue, Nov 19, 2013 at 1:44 AM, Eric Blake <eblake@xxxxxxxxxx> wrote:
> On 11/18/2013 09:03 AM, Eric Blake wrote:
>
>>>> The warning happens because rl_readline_name on Mac OS X is still
>>>> 'char *', while it is 'const char *' on most platforms.
>>>
>>> This is the real bug we are working around, not clang.
>>>
>
>>
>> Again, I think it's better to call out the faulty version of libreadline
>> with the problem, rather than which compiler chokes on it.
>
> I did some history digging.  bash.git is not the world's friendliest git
> repository (Chet insists on one mega commit per release rather than
> individual commits per logical change, although he's at least gotten
> better at weekly patches rather than waiting for major releases) - but
> in spite of that, it only took me about 10 minutes to prove that
> rl_readline_name was introduced non-const in bash 2.0.1 (and its
> corresponding readline version 2.1 in June 1997) and made const in bash
> 2.0.5 (and its corresponding readline version 4.2, released in Apr
> 2001).

I have also dug readline.h. /usr/include/readline/readline.h
(actually it's a link to ../editline/readline.h) on Mac OS X says that:

 /*      $NetBSD: readline.h,v 1.30 2009/09/07 21:24:34 christos Exp $   */

 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
  * All rights reserved.

So as your investigation found out, the header file seems to come from
around 1997 (NetBSD 1.2.1?) and not upgraded until now.

NetBSD of course has migrated to a recent readline (6.2
according to ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/readline/README.html).

> Sheesh, is MacOS really using something older than readline 4.2,
> just because they are anti-GPLv3?

Maybe so...

Anyway thanks again,
  ozaki-r

>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]