Bug 21053: sh: Reduce namespace pollution from sys/ucontext.h
commit3e1b518550634792de13332edaab0ad722322c2b
authorJames Clarke <jrtc27@jrtc27.com>
Tue, 24 Jan 2017 11:20:06 +0000 (24 09:20 -0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 24 Jan 2017 11:20:06 +0000 (24 09:20 -0200)
tree0c1473d4c07e4d7178ae16354199ed30492a971f
parentf3bef6a748097d02d196df247f7b292c7b83744c
Bug 21053: sh: Reduce namespace pollution from sys/ucontext.h

The problem is basically that sys/ucontext.h is defining R0..R15
which happens to conflict with some packages like Firefox when
trying to build on SH.

The very same problem existed on arm back then [1] and it was fixed by
renaming R0..R15 to REG_R0..REG_R15.  This patch imploy a similar
strategy for SH.

Checked on sh4-linux-gnu with run-built-tests=no and I also got reports
that it fixes Firefox build on Debian sh4.

* sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym: Use new REG_R*
constants instead of the old R* ones.
* sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym: Likewise.
* sysdeps/unix/sysv/linux/sh/sys/ucontext.h (NGPREG): Rename...
(NGREG): ... to this, to fit in with other architectures.
(gpregset_t): Use new NGREG macro.
[__USE_GNU]: Remove condition; all architectures other than tile
are unconditional.
(R*): Rename to REG_R*.
ChangeLog
sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym
sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym
sysdeps/unix/sysv/linux/sh/sys/ucontext.h