about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-07-31 09:42:06 -0700
committerRoland McGrath <roland@hack.frob.com>2012-07-31 09:42:06 -0700
commit40ce302d37b7252b71c6d193abc17e6fe82d214d (patch)
tree0ebc5099211e3f35de13723e4ac77acbe10086de
parent7ecdb005618e9cc351615bb78967387b12b8ed99 (diff)
downloadglibc-40ce302d37b7252b71c6d193abc17e6fe82d214d.tar.gz
glibc-40ce302d37b7252b71c6d193abc17e6fe82d214d.tar.xz
glibc-40ce302d37b7252b71c6d193abc17e6fe82d214d.zip
Conditionalize use of PTR_MANGLE.
-rw-r--r--ChangeLog4
-rw-r--r--inet/getnetgrent_r.c7
-rw-r--r--nss/getXXbyYY_r.c12
3 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bf1ee3ecf9..ecdb46b8f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-07-31  Roland McGrath  <roland@hack.frob.com>
 
+	* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)): Conditionalize
+	use of PTR_MANGLE.
+	* inet/getnetgrent_r.c (setup): Likewise.
+
 	* sysdeps/generic/siglist.h: Put SIGWINCH under #ifdef.
 
 2012-07-31  David S. Miller  <davem@davemloft.net>
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
index 2e280e7e6e..70cc14cd02 100644
--- a/inet/getnetgrent_r.c
+++ b/inet/getnetgrent_r.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2002,2004,2005,2007,2011
-	Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -57,14 +56,18 @@ setup (void **fctp, service_user **nipp)
 	 same result every time.  So we need no locking.  */
       no_more = __nss_netgroup_lookup (nipp, "setnetgrent", fctp);
       startp = no_more ? (service_user *) -1 : *nipp;
+#ifdef PTR_MANGLE
       PTR_MANGLE (startp);
+#endif
       atomic_write_barrier ();
       startp_initialized = true;
     }
   else
     {
       service_user *nip = startp;
+#ifdef PTR_DEMANGLE
       PTR_DEMANGLE (nip);
+#endif
       if (nip == (service_user *) -1)
 	/* No services at all.  */
 	return 1;
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index d197c9be17..8ba1e99387 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -204,7 +204,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
       if (no_more)
 	{
 	  void *tmp_ptr = (service_user *) -1l;
+#ifdef PTR_MANGLE
 	  PTR_MANGLE (tmp_ptr);
+#endif
 	  startp = tmp_ptr;
 	}
       else
@@ -225,10 +227,14 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
 #endif /* need _res_hconf */
 
 	  void *tmp_ptr = fct.l;
+#ifdef PTR_MANGLE
 	  PTR_MANGLE (tmp_ptr);
+#endif
 	  start_fct = tmp_ptr;
 	  tmp_ptr = nip;
+#ifdef PTR_MANGLE
 	  PTR_MANGLE (tmp_ptr);
+#endif
 	  startp = tmp_ptr;
 	}
 
@@ -240,9 +246,11 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
   else
     {
       fct.l = start_fct;
-      PTR_DEMANGLE (fct.l);
       nip = startp;
+#ifdef PTR_DEMANGLE
+      PTR_DEMANGLE (fct.l);
       PTR_DEMANGLE (nip);
+#endif
       no_more = nip == (service_user *) -1l;
     }