work-around system header namespace pollution

Message ID ormu96l7k3.fsf@livre.home
State New
Headers show
Series
  • work-around system header namespace pollution
Related show

Commit Message

Alexandre Oliva Feb. 25, 2020, 8:45 p.m.
Including limits.h on vxworks pollutes the global namespace with SH
and many other platform names; work around it.

Tested on the affected platform.  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.target/aarch64/vect-mull.x (SH): Undefine.
---
 gcc/testsuite/gcc.target/aarch64/vect-mull.x |    1 +
 1 file changed, 1 insertion(+)


-- 
Alexandre Oliva, freedom fighter    he/him    https://FSFLA.org/blogs/lxo/
Free Software Evangelist              Stallman was right, but he's left :(
GNU Toolchain Engineer   The darkest places in hell are reserved for those
who maintain their neutrality in times of moral crisis. -- Dante Alighieri

Comments

Jeff Law Feb. 26, 2020, 9:52 p.m. | #1
On Tue, 2020-02-25 at 17:45 -0300, Alexandre Oliva wrote:
> Including limits.h on vxworks pollutes the global namespace with SH

> and many other platform names; work around it.

> 

> Tested on the affected platform.  Ok to install?

> 

> 

> for  gcc/testsuite/ChangeLog

> 

> 	* gcc.target/aarch64/vect-mull.x (SH): Undefine.

OK
jeff

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/vect-mull.x b/gcc/testsuite/gcc.target/aarch64/vect-mull.x
index 39ec43d..930e703 100644
--- a/gcc/testsuite/gcc.target/aarch64/vect-mull.x
+++ b/gcc/testsuite/gcc.target/aarch64/vect-mull.x
@@ -9,6 +9,7 @@  typedef unsigned short *__restrict__ pRUINT16;
 typedef unsigned int *__restrict__ pRUINT32;
 typedef unsigned long long *__restrict__ pRUINT64;
 
+#undef SH /* Including limits.h on vxworks defines this.  */
 typedef signed short SH;
 typedef unsigned short UH;
 typedef signed int SS;