Since we don't export _yp_dobind() anymore, we should stop declaring it in
the public headers and instead declare it as hidden in the internal
headers, without the extra jockeying of PROTO_NORMAL/DEF_WEAK.
While here, mark the __ypexclude_* as hidden.
The best part here is the comment in yp_prot.h: how many years has it
been, Theo?
ok?
Philip Guenther
Index: include/rpcsvc/yp_prot.h
===================================================================
RCS file: /data/src/openbsd/src/include/rpcsvc/yp_prot.h,v
retrieving revision 1.9
diff -u -p -r1.9 yp_prot.h
--- include/rpcsvc/yp_prot.h 28 Sep 2015 20:49:24 -0000 1.9
+++ include/rpcsvc/yp_prot.h 29 May 2016 23:48:18 -0000
@@ -190,29 +190,6 @@ struct ypresp_maplist {
#define YP_VERS ((unsigned long)-8) /* YP server version
mismatch */
/*
- * Sun's header file says:
- * "Domain binding data structure, used by ypclnt package and ypserv modules.
- * Users of the ypclnt package (or of this protocol) don't HAVE to know about
- * it, but it must be available to users because _yp_dobind is a public
- * interface."
- *
- * This is totally bogus! Nowhere else does Sun state that _yp_dobind() is
- * a public interface, and I don't know any reason anyone would want to call
- * it. But, just in case anyone does actually expect it to be available..
- * we provide this.. exactly as Sun wants it.
- */
-struct dom_binding {
- struct dom_binding *dom_pnext;
- char dom_domain[YPMAXDOMAIN + 1];
- struct sockaddr_in dom_server_addr;
- unsigned short dom_server_port;
- int dom_socket;
- CLIENT *dom_client;
- unsigned short dom_local_port;
- long dom_vers;
-};
-
-/*
* YPBIND PROTOCOL:
*
* ypbind supports the following procedures:
Index: include/rpcsvc/ypclnt.h
===================================================================
RCS file: /data/src/openbsd/src/include/rpcsvc/ypclnt.h,v
retrieving revision 1.9
diff -u -p -r1.9 ypclnt.h
--- include/rpcsvc/ypclnt.h 22 Jan 2004 21:48:02 -0000 1.9
+++ include/rpcsvc/ypclnt.h 29 May 2016 23:48:24 -0000
@@ -63,8 +63,6 @@ struct ypall_callback {
__BEGIN_DECLS
int yp_bind(const char *);
-struct dom_binding;
-int _yp_dobind(const char *, struct dom_binding **);
void yp_unbind(const char *);
int yp_get_default_domain(char **);
int yp_match(const char *, const char *, const char *, int , char **,
Index: lib/libc/hidden/rpcsvc/ypclnt.h
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/hidden/rpcsvc/ypclnt.h,v
retrieving revision 1.1
diff -u -p -r1.1 ypclnt.h
--- lib/libc/hidden/rpcsvc/ypclnt.h 13 Sep 2015 20:57:28 -0000 1.1
+++ lib/libc/hidden/rpcsvc/ypclnt.h 29 May 2016 23:52:58 -0000
@@ -20,7 +20,11 @@
#include_next <rpcsvc/ypclnt.h>
-PROTO_NORMAL(_yp_dobind);
+__BEGIN_HIDDEN_DECLS
+struct dom_binding;
+int _yp_dobind(const char *, struct dom_binding **);
+__END_HIDDEN_DECLS
+
PROTO_DEPRECATED(yp_all);
PROTO_NORMAL(yp_bind);
PROTO_NORMAL(yp_first);
Index: lib/libc/yp/yp_bind.c
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/yp/yp_bind.c,v
retrieving revision 1.27
diff -u -p -r1.27 yp_bind.c
--- lib/libc/yp/yp_bind.c 29 May 2016 22:42:24 -0000 1.27
+++ lib/libc/yp/yp_bind.c 29 May 2016 23:53:16 -0000
@@ -248,7 +248,6 @@ gotdata:
*ypdb = ysd;
return 0;
}
-DEF_WEAK(_yp_dobind);
void
_yp_unbind(struct dom_binding *ypb)
Index: lib/libc/yp/ypexclude.h
===================================================================
RCS file: /data/src/openbsd/src/lib/libc/yp/ypexclude.h,v
retrieving revision 1.1
diff -u -p -r1.1 ypexclude.h
--- lib/libc/yp/ypexclude.h 3 Jun 2009 16:02:44 -0000 1.1
+++ lib/libc/yp/ypexclude.h 29 May 2016 23:42:53 -0000
@@ -36,6 +36,8 @@ struct _ypexclude {
struct _ypexclude *next;
};
+__BEGIN_HIDDEN_DECLS
int __ypexclude_add(struct _ypexclude **, const char *);
int __ypexclude_is(struct _ypexclude **, const char *);
void __ypexclude_free(struct _ypexclude **);
+__END_HIDDEN_DECLS