mirror of
git://git.musl-libc.org/musl
synced 2024-12-30 19:02:48 +00:00
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 |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
generic/bits | ||
i386 | ||
microblaze | ||
mips | ||
mips64 | ||
mipsn32 | ||
or1k | ||
powerpc | ||
powerpc64 | ||
s390x | ||
sh | ||
x32 | ||
x86_64 |