[ewg] ofa_1_5_kernel 20091104-0200 daily build status

Brian J. Murrell brian at sun.com
Fri Nov 20 07:06:00 PST 2009


On Thu, 2009-11-19 at 09:26 -0800, Jeff Becker wrote: 
> Hi.

Hi Jeff,

> 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?

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/ewg/attachments/20091120/45fbf8b2/attachment.sig>


More information about the ewg mailing list