svn commit: r252411 - head/sys/sys
Tijl Coosemans
tijl at coosemans.org
Sun Jun 30 20:09:11 UTC 2013
On 2013-06-30 21:44, Ed Schouten wrote:
> 2013/6/30 Tijl Coosemans <tijl at coosemans.org>:
>> I don't think you can use static inline. Standard library functions need
>> to have external linkage, which means you have to implement them in libc.
>
> First of all, I could be mistaken, so please correct me if I say
> something wrong here.
>
> If my memory serves me right, this requirement is part of POSIX -- not
> ISO C. As this is interface is not yet part of any version of POSIX
> and at least I am not in the possession of a draft of POSIX that
> specified these functions, I think it would be unwise to add this to
> the C library. I think there is nothing that would forbid us to use
> static inline functions.
>
> As C11 merely names these things "functions", I think using a static
> inline function would currently be the wisest thing to do. To my
> knowledge the current version of the code at least complies with the
> standards at hand.
The N1570 draft of C11 7.1.2 point 6 says:
Any declaration of a library function shall have external linkage.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20130630/722b1c5a/attachment.sig>
More information about the svn-src-all
mailing list