mirror of git://git.musl-libc.org/musl
150747b41e
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 |
||
---|---|---|
.. | ||
alltypes.h.in | ||
endian.h | ||
fcntl.h | ||
fenv.h | ||
float.h | ||
io.h | ||
ipc.h | ||
limits.h | ||
mman.h | ||
msg.h | ||
posix.h | ||
reg.h | ||
setjmp.h | ||
shm.h | ||
signal.h | ||
socket.h | ||
stat.h | ||
statfs.h | ||
stdint.h | ||
syscall.h.in | ||
user.h |