musl/arch/x32/bits
Rich Felker 150747b41e reduce impact of REG_* namespace pollution in x86[_64] signal.h
when _GNU_SOURCE is defined, which is always the case when compiling
c++ with gcc, these macros for the the indices in gregset_t are
exposed and likely to clash with applications. by using enum constants
rather than macros defined with integer literals, we can make the
clash slightly less likely to break software. the macros are still
defined in case anything checks for them with #ifdef, but they're
defined to expand to themselves so that non-file-scope (e.g.
namespaced) identifiers by the same names still work.

for the sake of avoiding mistakes, the changes were generated with sed
via the command:

sed -i -e 's/#define  *\(REG_[A-Z_0-9]\{1,\}\)  *\([0-9]\{1,\}\)'\
'/enum { \1 = \2 };\n#define \1 \1/' \
arch/i386/bits/signal.h arch/x86_64/bits/signal.h arch/x32/bits/signal.h
2017-01-04 17:08:19 -05:00
..
alltypes.h.in align x32 pthread type sizes to be common with 32-bit archs 2015-03-12 14:43:36 -04:00
endian.h import vanilla x86_64 code as x32 2014-02-23 11:07:18 +01:00
fcntl.h move O_PATH definition back to arch bits 2015-04-01 19:31:06 -04:00
fenv.h import vanilla x86_64 code as x32 2014-02-23 11:07:18 +01:00
float.h fix FLT_ROUNDS to reflect the current rounding mode 2015-03-07 12:05:28 -05:00
io.h import vanilla x86_64 code as x32 2014-02-23 11:07:18 +01:00
ipc.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
limits.h x32 port (diff against vanilla x86_64) 2014-02-23 11:09:16 +01:00
mman.h deduplicate bits/mman.h 2016-03-18 22:40:28 -04:00
msg.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
posix.h import vanilla x86_64 code as x32 2014-02-23 11:07:18 +01:00
reg.h x32 port (diff against vanilla x86_64) 2014-02-23 11:09:16 +01:00
setjmp.h x32 port (diff against vanilla x86_64) 2014-02-23 11:09:16 +01:00
shm.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
signal.h reduce impact of REG_* namespace pollution in x86[_64] signal.h 2017-01-04 17:08:19 -05:00
socket.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
stat.h x32 port (diff against vanilla x86_64) 2014-02-23 11:09:16 +01:00
statfs.h x32: fix struct statfs 2014-03-17 22:34:55 +01:00
stdint.h x32 port (diff against vanilla x86_64) 2014-02-23 11:09:16 +01:00
syscall.h.in add pkey_{mprotect,alloc,free} syscalls from linux v4.9 2016-12-29 22:10:19 -05:00
user.h make brace placement in public header typedef'd structs consistent 2016-07-03 16:19:28 -04:00