[openib-general] Re: [PATCH] RFC: use stdint.h types

Michael S. Tsirkin mst at mellanox.co.il
Sun Jun 4 00:42:35 PDT 2006


Quoting r. Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH] RFC: use stdint.h types
> 
> My initial reaction is that I don't like this, since it makes it
> harder to keep the kernel ABI files in sync between libraries and the
> kernel.

How about a perl script?

#!/usr/bin/perl -pi
s/\b__u(64|32|16|8)\b/uint$1_t/;
s/\b__s(64|32|16|8)\b/int$1_t/;

and back

#!/usr/bin/perl -pi
s/\b(uint)(64|32|16|8)_t\b/__u$1/;
s/\b(__s)(64|32|16|8)\b/__s$1/;

> Does overriding offsetof() really cause any problems?

Donnu, but I'm worried there's some subtle reason gcc 4.0 defines it by
means of __builtin_offsetof rather than the traditional way.

> Does including <linux/types.h> break anything?

Well, we are using an undocumented interface, and so it does make things
fragile, take the compilation problem on sles10 as an example.

-- 
MST



More information about the general mailing list