[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconf
From: |
Simon Josefsson |
Subject: |
[bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c |
Date: |
Tue, 21 Sep 2010 13:57:36 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Mats Erik Andersson <address@hidden> writes:
> tisdag den 21 september 2010 klockan 12:32 skrev Simon Josefsson detta:
>> Mats Erik Andersson <address@hidden> writes:
>>
>> > Without the proposed change, OpenBSD comes to a halt with a cryptic
>> > message about clashing prototypes for free(3). The explanation is
>> > that OpenBSD uses
>> >
>> > ### /usr/include/net/if.h
>> >
>> > #define if_freenameindex(x) free(x)
>> >
>> > The corresponding function in GNU/Linux is a true function!
>>
>> Interesting. According to POSIX:
>>
>> http://www.opengroup.org/onlinepubs/9699919799/functions/if_freenameindex.html
>>
>> It should be a real function. Could you report this as a OpenBSD bug?
>>
>> It does sounds as if this is something that gnulib could offer a working
>> replacement for, instead of InetUtils using a hack. It looks like an
>> OpenBSD bug that would affect other applications too.
>>
>> The exact compile error would help in understanding why things fail
>> here. Could you create a small example that reproduce the problem?
>> E.g. something like:
>>
>> #include <net/if.h>
>> int main (void) { if_freenameindex ((void*)0); }
>>
>> or something like that? And then quote the compile error.
>
> Well, no compile error will arise in such a minimal program.
> The problem is rather that the macro definition in OpenBSD
> will affect the two files
>
> inetutils/ifconfig/if_index.h
>
> inetutils/ifconfig/if_index.c
>
> into replacing every "if_freenameindex" with "free", thus causing
> the most unpleasant namespace collisions. I will send a reminder to
> bug-gnulib to be safe, though.
Looking at that code, I think all of it really belongs in gnulib.
if_nameindex is part of POSIX, after all.
/Simon
- [bug-inetutils] [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c, Mats Erik Andersson, 2010/09/15
- [bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c, Simon Josefsson, 2010/09/21
- [bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c, Mats Erik Andersson, 2010/09/21
- [bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c, Simon Josefsson, 2010/09/21
- [bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c, Mats Erik Andersson, 2010/09/21
- [bug-inetutils] Re: [patches] man/Makefile.am, telnetd/telnetd.c, ifconfig/if_index.c,
Simon Josefsson <=