musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/misc
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017年01月04日 17:08:19 -0500
committerRich Felker <dalias@aerifal.cx>2017年01月04日 17:08:19 -0500
commit150747b41e1ecefe82aa45d68c84b9e957b03e29 (patch)
tree90ac2d2b54a61343c926b02d1bce8f5ca84d2c3e /src/misc
parent769f53598e781ffc89191520f3f8a93cb58db91f (diff)
downloadmusl-150747b41e1ecefe82aa45d68c84b9e957b03e29.tar.gz
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
Diffstat (limited to 'src/misc')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月06日 15:53:04 +0000

AltStyle によって変換されたページ (->オリジナル) /