This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] libnsl: Turn remaining symbols into compat symbols [BZ #22701]
- From: fweimer at redhat dot com (Florian Weimer)
- To: libc-alpha at sourceware dot org
- Date: Thu, 11 Jan 2018 16:04:50 +0100
- Subject: [PATCH] libnsl: Turn remaining symbols into compat symbols [BZ #22701]
- Authentication-results: sourceware.org; auth=none
2018-01-11 Florian Weimer <fweimer@redhat.com>
[BZ #22701]
* include/rpcsvc/nislib.h (__nis_default_ttl): Add
libnsl_hidden_proto.
* include/rpcsvc/yp.h (yp_xdrall): Declare with
libnsl_hidden_proto.
* include/rpcsvc/ypclnt.h (yp_maplist): Likewise.
* nis/Makefile (libnsl-routines): Add nss-default only for
build-obsolete-nsl.
* nis/nis_defaults.c (__nis_default_ttl): Add
libnsl_hidden_nolink_def.
* nis/rpcsvc/ypclnt.h (yp_maplist): Remove #ifdef'ed-out
declaration.
* nis/yp_xdr.c (xdr_ypall): Add libnsl_hidden_nolink_def.
* nis/ypclnt.c (yp_maplist): Likewise.
diff --git a/include/rpcsvc/nislib.h b/include/rpcsvc/nislib.h
index 91dab1d171..ad4d499911 100644
--- a/include/rpcsvc/nislib.h
+++ b/include/rpcsvc/nislib.h
@@ -42,6 +42,7 @@ libnsl_hidden_proto (nis_remove)
libnsl_hidden_proto (nis_add)
libnsl_hidden_proto (__nis_default_owner)
libnsl_hidden_proto (__nis_default_group)
+libnsl_hidden_proto (__nis_default_ttl)
libnsl_hidden_proto (__nis_default_access)
libnsl_hidden_proto (nis_clone_object)
libnsl_hidden_proto (nis_clone_result)
diff --git a/include/rpcsvc/yp.h b/include/rpcsvc/yp.h
index 9078854d40..87cd3827a7 100644
--- a/include/rpcsvc/yp.h
+++ b/include/rpcsvc/yp.h
@@ -3,6 +3,9 @@
# ifndef _ISOMAC
+struct ypall_callback;
+bool_t xdr_ypall (XDR *, struct ypall_callback *);
+
libnsl_hidden_proto (xdr_ypstat)
libnsl_hidden_proto (xdr_ypxfrstat)
libnsl_hidden_proto (xdr_domainname)
@@ -28,6 +31,7 @@ libnsl_hidden_proto (xdr_ypreq_xfr)
libnsl_hidden_proto (xdr_ypresp_xfr)
libnsl_hidden_proto (xdr_yppushresp_xfr)
libnsl_hidden_proto (xdr_ypbind_setdom)
+libnsl_hidden_proto (xdr_ypall)
# endif /* !_ISOMAC */
#endif
diff --git a/include/rpcsvc/ypclnt.h b/include/rpcsvc/ypclnt.h
index df2a03d9c5..c6a724814c 100644
--- a/include/rpcsvc/ypclnt.h
+++ b/include/rpcsvc/ypclnt.h
@@ -3,6 +3,9 @@
# ifndef _ISOMAC
+struct ypmaplist;
+int yp_maplist (const char *, struct ypmaplist **) __THROW;
+
libnsl_hidden_proto (ypbinderr_string)
libnsl_hidden_proto (yp_bind)
libnsl_hidden_proto (yp_get_default_domain)
@@ -17,6 +20,7 @@ libnsl_hidden_proto (yp_next)
libnsl_hidden_proto (yp_match)
libnsl_hidden_proto (yp_all)
libnsl_hidden_proto (__yp_check)
+libnsl_hidden_proto (yp_maplist)
# endif /* !_ISOMAC */
#endif
diff --git a/nis/Makefile b/nis/Makefile
index fae30d5da1..b828c5ec4d 100644
--- a/nis/Makefile
+++ b/nis/Makefile
@@ -58,9 +58,10 @@ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
nis_print_group_entry nis_domain_of nis_domain_of_r\
nis_modify nis_remove nis_add nis_defaults\
nis_findserv nis_callback nis_clone_dir nis_clone_obj\
- nis_clone_res nss-default
+ nis_clone_res
ifeq ($(build-obsolete-nsl),yes)
+libnsl-routines += nss-default
libnss_nis-routines := $(addprefix nis-,$(databases)) nis-initgroups \
nss-nis
libnss_nis-inhibit-o = $(filter-out .os,$(object-suffixes))
diff --git a/nis/nis_defaults.c b/nis/nis_defaults.c
index 58e64a8e98..0be47aa65c 100644
--- a/nis/nis_defaults.c
+++ b/nis/nis_defaults.c
@@ -428,6 +428,7 @@ __nis_default_ttl (char *defaults)
return searchttl (cptr);
}
+libnsl_hidden_nolink_def (__nis_default_ttl, GLIBC_2_1)
/* Default access rights are ----rmcdr---r---, but we could change
this with the NIS_DEFAULTS variable. */
diff --git a/nis/rpcsvc/ypclnt.h b/nis/rpcsvc/ypclnt.h
index b96cb3b40e..af904fccb2 100644
--- a/nis/rpcsvc/ypclnt.h
+++ b/nis/rpcsvc/ypclnt.h
@@ -76,9 +76,6 @@ extern const char *ypbinderr_string (const int) __THROW;
extern int ypprot_err (const int) __THROW;
extern int yp_update (char *, char *, unsigned int, char *,
int, char *, int) __THROW;
-#if 0
-extern int yp_maplist (const char *, struct ypmaplist **) __THROW;
-#endif
/* This functions exists only under BSD and Linux systems. */
extern int __yp_check (char **) __THROW;
diff --git a/nis/yp_xdr.c b/nis/yp_xdr.c
index 0081b4c926..3b576731da 100644
--- a/nis/yp_xdr.c
+++ b/nis/yp_xdr.c
@@ -327,4 +327,4 @@ xdr_ypall(XDR *xdrs, struct ypall_callback *incallback)
return FALSE;
}
}
-/* XXX libnsl_hidden_nolink_def(xdr_ypall, GLIBC_2_2) */
+libnsl_hidden_nolink_def (xdr_ypall, GLIBC_2_2)
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index 95215e2f67..11a17db98d 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -813,6 +813,7 @@ yp_maplist (const char *indomain, struct ypmaplist **outmaplist)
return result;
}
+libnsl_hidden_nolink_def (yp_maplist, GLIBC_2_0)
const char *
yperr_string (const int error)