diff options
author | Zack Weinberg <zackw@panix.com> | 2017-06-10 10:10:17 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-06-20 20:33:19 -0400 |
commit | df1fabcb39fddbe0a26a0d3f2cefba541d78cb25 (patch) | |
tree | df894f1a57dd86894b7dbf949f4fd4cfa0f10164 /libio/oldfileops.c | |
parent | 8082d91e1c449e0cb137468b731004a5e605c8c6 (diff) | |
download | glibc-df1fabcb39fddbe0a26a0d3f2cefba541d78cb25.tar.gz |
Make error_t available on all supported hosts.
It occurred to me that by using a GCC 4.5 feature (pragma push_macro)
we could make error_t available on all supported hosts, without having
to stop using asm/errno.h on Linux. bits/errno-enum.h is a generated
file that constructs the error_t enumeration from the macros. This is
not possible without pragma push_macro, so errno.h falls back to using
'int' for error_t when the compiler feature is unavailable. You
probably don't want to read the generated bits/errno-enum.h.
We could conceivably change __errno_location to return an error_t,
which would mean 'p errno' in GDB would print symbolic values without
needing to cast it, but I hesitate to make the apparent type of errno
not be 'int'.
* scripts/make-errno-enum.sh: New script.
* Makeconfig: Generate bits/errno-enum.h in before-compile phase.
* stdlib/Makefile: Install bits/errno-enum.h.
* stdlib/errno.h: Define error_t here, using bits/errno-enum.h when
possible.
* sysdeps/mach/hurd/errnos.awk: Do not define enum __errno_codes
nor error_t.
* sysdeps/mach/hurd/bits/errno.h: Regenerate.
Diffstat (limited to 'libio/oldfileops.c')
0 files changed, 0 insertions, 0 deletions