Browse Source

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
e13063aad7.
master
Samuel Holland 7 years ago
committed by Rich Felker
parent
commit
c225e6c1a4
  1. 3
      src/include/errno.h

3
src/include/errno.h

@ -3,6 +3,9 @@
#include "../../include/errno.h"
#ifdef __GNUC__
__attribute__((const))
#endif
hidden int *___errno_location(void);
#undef errno

Loading…
Cancel
Save