about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--inet/getnetgrent_r.c38
-rw-r--r--inet/netgroup.h14
3 files changed, 39 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index b844d51ae6..6cb87f2eb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2012-08-16  Roland McGrath  <roland@hack.frob.com>
+
+	* inet/getnetgrent_r.c (internal_setnetgrent): Renamed to ...
+	(__internal_setnetgrent): ... this.  Add internal_function to
+	definition.  Add libc_hidden_def.
+	(setnetgrent): Update caller.
+	(internal_endnetgrent): Renamed to ...
+	(__internal_endnetgrent): ... this.  Add internal_function to
+	definition.  Add libc_hidden_def.
+	(endnetgrent): Update caller.
+	(internal_getnetgrent_r): Renamed to ...
+	(__internal_getnetgrent_r): ... this.  Add internal_function to
+	definition.  Add libc_hidden_def.
+	(__getnetgrent_r): Update caller.
+	* inet/netgroup.h: Update declarations.  Add libc_hidden_proto uses.
+
 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
 
 	* stdlib/longlong.h: Update from GCC.
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
index 70cc14cd02..c57e7de178 100644
--- a/inet/getnetgrent_r.c
+++ b/inet/getnetgrent_r.c
@@ -171,19 +171,16 @@ __internal_setnetgrent_reuse (const char *group, struct __netgrent *datap,
   return status == NSS_STATUS_SUCCESS;
 }
 
-int internal_setnetgrent (const char *group, struct __netgrent *datap);
-libc_hidden_proto (internal_setnetgrent)
-
 int
-internal_setnetgrent (const char *group, struct __netgrent *datap)
+internal_function
+__internal_setnetgrent (const char *group, struct __netgrent *datap)
 {
   /* Free list of all netgroup names from last run.  */
   free_memory (datap);
 
   return __internal_setnetgrent_reuse (group, datap, &errno);
 }
-libc_hidden_def (internal_setnetgrent)
-strong_alias (internal_setnetgrent, __internal_setnetgrent)
+libc_hidden_def (__internal_setnetgrent)
 
 int
 setnetgrent (const char *group)
@@ -204,7 +201,7 @@ setnetgrent (const char *group)
 	goto out;
     }
 
-  result = internal_setnetgrent (group, &dataset);
+  result = __internal_setnetgrent (group, &dataset);
 
  out:
   __libc_lock_unlock (lock);
@@ -212,18 +209,15 @@ setnetgrent (const char *group)
   return result;
 }
 
-void internal_endnetgrent (struct __netgrent *datap);
-libc_hidden_proto (internal_endnetgrent)
-
 void
-internal_endnetgrent (struct __netgrent *datap)
+internal_function
+__internal_endnetgrent (struct __netgrent *datap)
 {
   endnetgrent_hook (datap);
   /* Now free list of all netgroup names from last run.  */
   free_memory (datap);
 }
-libc_hidden_def (internal_endnetgrent)
-strong_alias (internal_endnetgrent, __internal_endnetgrent)
+libc_hidden_def (__internal_endnetgrent)
 
 
 void
@@ -231,18 +225,12 @@ endnetgrent (void)
 {
   __libc_lock_lock (lock);
 
-  internal_endnetgrent (&dataset);
+  __internal_endnetgrent (&dataset);
 
   __libc_lock_unlock (lock);
 }
 
 
-int internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
-			    struct __netgrent *datap,
-			    char *buffer, size_t buflen, int *errnop);
-libc_hidden_proto (internal_getnetgrent_r)
-
-
 static enum nss_status
 nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
 		  int *errnop)
@@ -263,7 +251,8 @@ nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
 
 
 int
-internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
+internal_function
+__internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
 			  struct __netgrent *datap,
 			  char *buffer, size_t buflen, int *errnop)
 {
@@ -361,8 +350,7 @@ internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
 
   return status == NSS_STATUS_SUCCESS ? 1 : 0;
 }
-libc_hidden_def (internal_getnetgrent_r)
-strong_alias (internal_getnetgrent_r, __internal_getnetgrent_r)
+libc_hidden_def (__internal_getnetgrent_r)
 
 /* The real entry point.  */
 int
@@ -373,8 +361,8 @@ __getnetgrent_r (char **hostp, char **userp, char **domainp,
 
   __libc_lock_lock (lock);
 
-  status = internal_getnetgrent_r (hostp, userp, domainp, &dataset,
-				   buffer, buflen, &errno);
+  status = __internal_getnetgrent_r (hostp, userp, domainp, &dataset,
+                                     buffer, buflen, &errno);
 
   __libc_lock_unlock (lock);
 
diff --git a/inet/netgroup.h b/inet/netgroup.h
index 2c0d1a4831..f3797a698d 100644
--- a/inet/netgroup.h
+++ b/inet/netgroup.h
@@ -1,5 +1,5 @@
 /* Internal header for netgroup related functions.
-   Copyright (C) 1996, 1997, 2004 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
@@ -70,10 +70,16 @@ struct __netgrent
 
 /* The internal netgroup handling functions might be called from outside.  */
 extern int __internal_setnetgrent (const char *group,
-				   struct __netgrent *datap);
-extern void __internal_endnetgrent (struct __netgrent *datap);
+				   struct __netgrent *datap)
+  internal_function;
+libc_hidden_proto (__internal_setnetgrent)
+extern void __internal_endnetgrent (struct __netgrent *datap)
+  internal_function;
+libc_hidden_proto (__internal_endnetgrent)
 extern int __internal_getnetgrent_r (char **hostp, char **userp,
 				     char **domainp, struct __netgrent *datap,
-				     char *buffer, size_t buflen, int *errnop);
+				     char *buffer, size_t buflen, int *errnop)
+  internal_function;
+libc_hidden_proto (__internal_getnetgrent_r)
 
 #endif /* netgroup.h */