summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-06 21:10:50 +0000
committerRoland McGrath <roland@gnu.org>2002-08-06 21:10:50 +0000
commite78f615d52703ec18f773e3778d0dbfc6aa3be35 (patch)
tree23805eaedbb7027869acf401a80fd534162e44a3
parent1ab62b326e22ee3c9ab8b8b4144953698bc82cff (diff)
downloadglibc-e78f615d52703ec18f773e3778d0dbfc6aa3be35.tar.gz
glibc-e78f615d52703ec18f773e3778d0dbfc6aa3be35.tar.xz
glibc-e78f615d52703ec18f773e3778d0dbfc6aa3be35.zip
* include/getopt.h: But private decls inside [_GETOPT_H].
	Use libc_hidden_proto for getopt_long, getopt_long_only.
	* posix/getopt1.c [_LIBC]: Include <getopt.h> instead of "getopt.h".
	Add libc_hidden_def.

	* sysdeps/generic/unwind-dw2-fde-glibc.c [_LIBC] (dl_iterate_phdr):
	Define as a macro for __dl_iterate_phdr.

	* inet/getnetgrent_r.c (internal_setnetgrent): Renamed from __ name,
	made static.  Add __ name as a strong alias.
	(internal_endnetgrent): Likewise.
	(internal_getnetgrent_r): Likewise.
-rw-r--r--ChangeLog13
-rw-r--r--include/getopt.h7
-rw-r--r--inet/getnetgrent_r.c17
-rw-r--r--posix/getopt1.c10
-rw-r--r--sysdeps/generic/unwind-dw2-fde-glibc.c8
5 files changed, 45 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 07d83a180c..ae69ec5a3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2002-08-06  Roland McGrath  <roland@redhat.com>
 
+	* include/getopt.h: But private decls inside [_GETOPT_H].
+	Use libc_hidden_proto for getopt_long, getopt_long_only.
+	* posix/getopt1.c [_LIBC]: Include <getopt.h> instead of "getopt.h".
+	Add libc_hidden_def.
+
+	* sysdeps/generic/unwind-dw2-fde-glibc.c [_LIBC] (dl_iterate_phdr):
+	Define as a macro for __dl_iterate_phdr.
+
+	* inet/getnetgrent_r.c (internal_setnetgrent): Renamed from __ name,
+	made static.  Add __ name as a strong alias.
+	(internal_endnetgrent): Likewise.
+	(internal_getnetgrent_r): Likewise.
+
 	* locale/Versions (libc: GLIBC_2.3): Add all the *_l functions
 	with no __ prefix.
 	* locale/langinfo.h [__USE_GNU]: Declare nl_langinfo_l.
diff --git a/include/getopt.h b/include/getopt.h
index 7a35c8a20b..70e790b396 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -2,7 +2,14 @@
 
 #include <posix/getopt.h>
 
+# ifdef _GETOPT_H
+
+libc_hidden_proto (getopt_long)
+libc_hidden_proto (getopt_long_only)
+
 /* Now define the internal interfaces.  */
 extern void __getopt_clean_environment (char **__env);
 
+# endif
+
 #endif
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
index cab2feb4a0..92a8b30101 100644
--- a/inet/getnetgrent_r.c
+++ b/inet/getnetgrent_r.c
@@ -129,14 +129,15 @@ __internal_setnetgrent_reuse (const char *group, struct __netgrent *datap,
   return status == NSS_STATUS_SUCCESS;
 }
 
-int
-__internal_setnetgrent (const char *group, struct __netgrent *datap)
+static int
+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);
 }
+strong_alias (internal_setnetgrent, __internal_setnetgrent)
 
 int
 setnetgrent (const char *group)
@@ -145,7 +146,7 @@ setnetgrent (const char *group)
 
   __libc_lock_lock (lock);
 
-  result = __internal_setnetgrent (group, &dataset);
+  result = internal_setnetgrent (group, &dataset);
 
   __libc_lock_unlock (lock);
 
@@ -153,8 +154,8 @@ setnetgrent (const char *group)
 }
 
 
-void
-__internal_endnetgrent (struct __netgrent *datap)
+static void
+internal_endnetgrent (struct __netgrent *datap)
 {
   service_user *old_nip;
   enum nss_status (*fct) (struct __netgrent *);
@@ -177,6 +178,7 @@ __internal_endnetgrent (struct __netgrent *datap)
   /* Now free list of all netgroup names from last run.  */
   free_memory (datap);
 }
+strong_alias (internal_endnetgrent, __internal_endnetgrent)
 
 
 void
@@ -190,8 +192,8 @@ endnetgrent (void)
 }
 
 
-int
-__internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
+static int
+internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
 			  struct __netgrent *datap,
 			  char *buffer, size_t buflen, int *errnop)
 {
@@ -272,6 +274,7 @@ __internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
 
   return status == NSS_STATUS_SUCCESS ? 1 : 0;
 }
+strong_alias (internal_getnetgrent_r, __internal_getnetgrent_r)
 
 /* The real entry point.  */
 int
diff --git a/posix/getopt1.c b/posix/getopt1.c
index 22a7efbdd1..ad06cc7f9e 100644
--- a/posix/getopt1.c
+++ b/posix/getopt1.c
@@ -22,7 +22,11 @@
 #include <config.h>
 #endif
 
-#include "getopt.h"
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include "getopt.h"
+#endif
 
 #if !defined __STDC__ || !__STDC__
 /* This is a separate conditional since some stdc systems
@@ -90,6 +94,10 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
   return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
 }
 
+# ifdef _LIBC
+libc_hidden_def (getopt_long)
+libc_hidden_def (getopt_long_only)
+# endif
 
 #endif	/* Not ELIDE_CODE.  */
 
diff --git a/sysdeps/generic/unwind-dw2-fde-glibc.c b/sysdeps/generic/unwind-dw2-fde-glibc.c
index 2f7517441c..746e26b99a 100644
--- a/sysdeps/generic/unwind-dw2-fde-glibc.c
+++ b/sysdeps/generic/unwind-dw2-fde-glibc.c
@@ -67,7 +67,7 @@ struct unw_eh_frame_hdr
 
 /* Like base_of_encoded_value, but take the base from a struct object
    instead of an _Unwind_Context.  */
-   
+
 static _Unwind_Ptr
 base_from_cb_data (unsigned char encoding, struct unw_eh_callback_data *data)
 {
@@ -80,7 +80,7 @@ base_from_cb_data (unsigned char encoding, struct unw_eh_callback_data *data)
     case DW_EH_PE_pcrel:
     case DW_EH_PE_aligned:
       return 0;
-                                 
+
     case DW_EH_PE_textrel:
       return (_Unwind_Ptr) data->tbase;
     case DW_EH_PE_datarel:
@@ -250,6 +250,10 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
   return 1;
 }
 
+# ifdef _LIBC
+# define dl_iterate_phdr __dl_iterate_phdr
+# endif
+
 fde *
 _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
 {