]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix non-__GNUC__ definitions of __inline and __restrict (bug 17721).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 6 Feb 2018 21:48:35 +0000 (21:48 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 6 Feb 2018 21:48:35 +0000 (21:48 +0000)
commit383e87c96b9eee3b4b2d78dbeeaa8e2c0db35feb
tree3326eeeb36f36f21acac944220678b1286253656
parentd92c2759976600decd8353730a5b5ce30c2758d8
Fix non-__GNUC__ definitions of __inline and __restrict (bug 17721).

Bug 17721 reports that the non-__GNUC__ definitions of __inline and
__restrict are suboptimal, in that they are defined to empty when they
could be defined to inline and restrict for appropriate language
versions.  This patch makes those fixes.

Tested for x86_64 (however, I have not done any testing with an actual
non-__GNUC__ compiler and it's likely such compilers may have other
problems with glibc headers).

[BZ #17721]
* misc/sys/cdefs.h [!__GNUC__ && (__cplusplus || (__STDC_VERSION__
&& __STDC_VERSION__ >= 199901L))] (__inline): Define to inline.
[!__GNUC_PREREQ (2,92) && __STDC_VERSION__ && __STDC_VERSION__ >=
199901L] (__restrict): Define to restrict.
ChangeLog
misc/sys/cdefs.h