修訂 | c225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f (tree) |
---|---|
時間 | 2019-07-11 06:10:59 |
作者 | Samuel Holland <samuel@shol...> |
Commiter | Rich Felker |
use the correct attributes for _errno_location
In the public header, errno_location is declared with the "const"
attribute, conditional on GNUC. Ensure that its internal alias has
the same attributes.
Maintainer's note: This change also fixes a regression in quality of
code generation -- multiple references to errno in a single function
started generating multiple calls again -- introduced by commit
e13063aad7aee341d278d2a879a76ec7b59b2ad8.
@@ -3,6 +3,9 @@ | ||
3 | 3 | |
4 | 4 | #include "../../include/errno.h" |
5 | 5 | |
6 | +#ifdef __GNUC__ | |
7 | +__attribute__((const)) | |
8 | +#endif | |
6 | 9 | hidden int *___errno_location(void); |
7 | 10 | |
8 | 11 | #undef errno |