]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Allow sys/auxv.h to be used from the testsuite on powerpc and sparc.
authorAdam Conrad <adconrad@0c3.net>
Fri, 21 Feb 2014 07:24:03 +0000 (00:24 -0700)
committerAdam Conrad <adconrad@0c3.net>
Fri, 21 Feb 2014 07:24:03 +0000 (00:24 -0700)
elf/tst-auxv.c includes misc/sys/auxv.h, which ends up not actually
being included due to the guard overlap, and getauxval becomes an
implicit declaration and implicit pointer conversion which means, at
best, the test isn't actually testing what it thinks it is and, at
worst, it'll crash and burn on platforms where implict pointer
conversion is a Very Bad Thing.

* sysdeps/powerpc/bits/hwcap.h: Allow _SYSDEPS_SYSDEP_H guard as a
synonym for _SYS_AUXV_H to allow direct inclusion.
* sysdeps/sparc/bits/hwcap.h: Likewise.
* sysdeps/powerpc/sysdep.h: Define _SYSDEPS_SYSDEP_H instead of
_SYS_AUXV_H so we can include sysdep.h and sys/auxv.h together.
* sysdeps/sparc/sysdep.h: Likewise.

ChangeLog
sysdeps/powerpc/bits/hwcap.h
sysdeps/powerpc/sysdep.h
sysdeps/sparc/bits/hwcap.h
sysdeps/sparc/sysdep.h

index ddd3247be374ce6dce26dc4271cd7b4bb9b67ee1..f7818fc4a8d93a28fe42d2a21da4e12c9eb2e4c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-02-21  Adam Conrad  <adconrad@0c3.net>
+
+       * sysdeps/powerpc/bits/hwcap.h: Allow _SYSDEPS_SYSDEP_H guard as a
+       synonym for _SYS_AUXV_H to allow direct inclusion.
+       * sysdeps/sparc/bits/hwcap.h: Likewise.
+       * sysdeps/powerpc/sysdep.h: Define _SYSDEPS_SYSDEP_H instead of
+       _SYS_AUXV_H so we can include sysdep.h and sys/auxv.h together.
+       * sysdeps/sparc/sysdep.h: Likewise.
+
 2014-02-21  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        * benchtests/bench-strrchr.c (do_test): Fix minor formatting.
index 1af8c82c90b185feaf9c5a909e909e08d6d095c1..7daec9151da0069bcd527e67f36f7264a596a88f 100644 (file)
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SYS_AUXV_H
+#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
 # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
 #endif
 
index 541b657db277f07820f8de148b061ed13ddb0f6d..e6627c071ffe3a87a5edec63b3c2bd1d8da61af1 100644 (file)
@@ -19,7 +19,7 @@
  * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP).
  * This entry is copied to _dl_hwcap or rtld_global._dl_hwcap during startup.
  */
-#define _SYS_AUXV_H 1
+#define _SYSDEPS_SYSDEP_H 1
 #include <bits/hwcap.h>
 
 #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
index cf7c3db6c0c7616df6f325b13c37ac17e3ef77ae..74e1d7fcea888ebc828284582ebf36d3eecf3309 100644 (file)
@@ -16,7 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _SYS_AUXV_H
+#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
 # error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
 #endif
 
index 1404cc1b6c06d2b762f9498a954487ee226a0f98..a566bd84d542a79f2cecbfb74487bcc1ac3ffbfc 100644 (file)
@@ -15,7 +15,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _SYS_AUXV_H 1
+#define _SYSDEPS_SYSDEP_H 1
 #include <bits/hwcap.h>
 
 #ifdef __ASSEMBLER__