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

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