[ewg] ofa_1_5_kernel 20091104-0200 daily build status
Jeff Becker
Jeffrey.C.Becker at nasa.gov
Fri Nov 20 08:27:53 PST 2009
Brian J. Murrell wrote:
> On Thu, 2009-11-19 at 09:26 -0800, Jeff Becker wrote:
>
>> Hi.
>>
>
> Hi Jeff,
>
Hi Brian
>
>> Jon Mason suggested adding a "#ifndef ipv6_addr_loopback" around the
>> function definition in
>> kernel_addons/backport/2.6.16_sles10_sp2/include/net/ipv6.h . I'll look
>> into this today.
>>
>
> Hrm. Does cpp's "#if[n]def" construct work with C defined functions?
> i.e. does:
>
> static inline int ipv6_addr_loopback(const struct in6_addr *a)
> {
> return ((a->s6_addr32[0] | a->s6_addr32[1] |
> a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0);
> }
>
> provide cpp with a "ipv6_addr_loopback" definition such that cpp can
> test for it?
>
Apparently not - my test failed. :-( I'll try to come up with something
else.
-jeff
> My test says no:
>
> $ cat /tmp/a.c
> static inline int foo()
> {
> return 0;
> }
>
> #ifndef foo
> static inline int foo()
> {
> return 0;
> }
> #endif
>
> main() {
> }
> $ gcc -o /tmp/a{,.c}
> /tmp/a.c:8: error: redefinition of ‘foo’
> /tmp/a.c:3: error: previous definition of ‘foo’ was here
>
> Maybe I am misunderstanding the proposed solution?
>
> b.
>
>
More information about the ewg
mailing list