Blame SOURCES/glibc-rh1505492-undef-38.patch

c6d234
commit 82374e65d745c3c94258ad81c38f8af34b9f9113
c6d234
Author: Will Newton <will.newton@linaro.org>
c6d234
Date:   Mon Jul 7 15:14:26 2014 +0100
c6d234
c6d234
    Fix -Wundef warnings for SHARED
c6d234
    
c6d234
    The definition of SHARED is tested with #ifdef pretty much everywhere
c6d234
    apart from these few places. The tlsdesc.c code seems to be copy and
c6d234
    pasted to a few architectures and there is one instance in the hppa
c6d234
    startup code.
c6d234
    
c6d234
    ChangeLog:
c6d234
    
c6d234
    2014-07-09  Will Newton  <will.newton@linaro.org>
c6d234
    
c6d234
            * sysdeps/aarch64/tlsdesc.c (_dl_unmap): Test SHARED with #ifdef.
c6d234
            * sysdeps/arm/tlsdesc.c (_dl_unmap): Likewise.
c6d234
            * sysdeps/i386/tlsdesc.c (_dl_unmap): Likewise.
c6d234
            * sysdeps/x86_64/tlsdesc.c (_dl_unmap): Likewise.
c6d234
            * sysdeps/hppa/start.S (_start): Likewise.
c6d234
c6d234
diff --git a/sysdeps/aarch64/tlsdesc.c b/sysdeps/aarch64/tlsdesc.c
c6d234
index 606ce797c66ce84d..1543064999964dd9 100644
c6d234
--- a/sysdeps/aarch64/tlsdesc.c
c6d234
+++ b/sysdeps/aarch64/tlsdesc.c
c6d234
@@ -147,7 +147,7 @@ _dl_unmap (struct link_map *map)
c6d234
   __munmap ((void *) (map)->l_map_start,
c6d234
 	    (map)->l_map_end - (map)->l_map_start);
c6d234
 
c6d234
-#if SHARED
c6d234
+#ifdef SHARED
c6d234
   if (map->l_mach.tlsdesc_table)
c6d234
     htab_delete (map->l_mach.tlsdesc_table);
c6d234
 #endif
c6d234
diff --git a/sysdeps/arm/tlsdesc.c b/sysdeps/arm/tlsdesc.c
c6d234
index c5e69a8755147361..dd8d340d740876d9 100644
c6d234
--- a/sysdeps/arm/tlsdesc.c
c6d234
+++ b/sysdeps/arm/tlsdesc.c
c6d234
@@ -149,7 +149,7 @@ _dl_unmap (struct link_map *map)
c6d234
   __munmap ((void *) (map)->l_map_start,
c6d234
 	    (map)->l_map_end - (map)->l_map_start);
c6d234
 
c6d234
-#if SHARED
c6d234
+#ifdef SHARED
c6d234
   /* _dl_unmap is only called for dlopen()ed libraries, for which
c6d234
      calling free() is safe, or before we've completed the initial
c6d234
      relocation, in which case calling free() is probably pointless,
c6d234
diff --git a/sysdeps/hppa/start.S b/sysdeps/hppa/start.S
c6d234
index 97196bd52df23391..08b13ee4f4a0937c 100644
c6d234
--- a/sysdeps/hppa/start.S
c6d234
+++ b/sysdeps/hppa/start.S
c6d234
@@ -93,7 +93,7 @@ _start:
c6d234
 	stw	%r23, -56(%sp)
c6d234
 	/* Need to setup 1, 4, 5, and 7th arguments */
c6d234
 
c6d234
-#if SHARED
c6d234
+#ifdef SHARED
c6d234
 	/* load main (1st argument) */
c6d234
 	addil	LT'.Lpmain, %r19
c6d234
 	ldw	RT'.Lpmain(%r1), %r26
c6d234
diff --git a/sysdeps/i386/tlsdesc.c b/sysdeps/i386/tlsdesc.c
c6d234
index 2d55c63cdb976d79..cfde1a684850e04c 100644
c6d234
--- a/sysdeps/i386/tlsdesc.c
c6d234
+++ b/sysdeps/i386/tlsdesc.c
c6d234
@@ -261,7 +261,7 @@ _dl_unmap (struct link_map *map)
c6d234
   __munmap ((void *) (map)->l_map_start,
c6d234
 	    (map)->l_map_end - (map)->l_map_start);
c6d234
 
c6d234
-#if SHARED
c6d234
+#ifdef SHARED
c6d234
   if (map->l_mach.tlsdesc_table)
c6d234
     htab_delete (map->l_mach.tlsdesc_table);
c6d234
 #endif
c6d234
diff --git a/sysdeps/x86_64/tlsdesc.c b/sysdeps/x86_64/tlsdesc.c
c6d234
index 19d55a7c91992439..8def142e87c298be 100644
c6d234
--- a/sysdeps/x86_64/tlsdesc.c
c6d234
+++ b/sysdeps/x86_64/tlsdesc.c
c6d234
@@ -139,7 +139,7 @@ _dl_unmap (struct link_map *map)
c6d234
   __munmap ((void *) (map)->l_map_start,
c6d234
 	    (map)->l_map_end - (map)->l_map_start);
c6d234
 
c6d234
-#if SHARED
c6d234
+#ifdef SHARED
c6d234
   /* _dl_unmap is only called for dlopen()ed libraries, for which
c6d234
      calling free() is safe, or before we've completed the initial
c6d234
      relocation, in which case calling free() is probably pointless,