summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-02-27 13:40:01 +0000
committernectar <nectar@FreeBSD.org>2003-02-27 13:40:01 +0000
commit0d65b541d4b09e3c91112b5b2ffe0efa9a390a55 (patch)
tree205498ba7f9a56de737c44c088026af3e03556ca
parentae8811433e5eff867ac6b45eb3e972f8b0c6310c (diff)
downloadFreeBSD-src-0d65b541d4b09e3c91112b5b2ffe0efa9a390a55.zip
FreeBSD-src-0d65b541d4b09e3c91112b5b2ffe0efa9a390a55.tar.gz
Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
-rw-r--r--include/resolv.h5
-rw-r--r--lib/libc/gen/getpwent.c1
-rw-r--r--lib/libc/gen/nlist.c1
-rw-r--r--lib/libc/include/libc_private.h8
-rw-r--r--lib/libc/net/getaddrinfo.c2
-rw-r--r--lib/libc/net/getservent.c3
-rw-r--r--lib/libc/net/nsdispatch.c2
-rw-r--r--lib/libc/net/nslexer.l2
-rw-r--r--lib/libc/net/rcmdsh.c4
-rw-r--r--lib/libc/posix1e/mac_set.c5
-rw-r--r--lib/libc/rpc/Makefile.inc1
-rw-r--r--lib/libc/rpc/getrpcent.c2
-rw-r--r--lib/libc/rpc/rpc_com.h5
-rw-r--r--lib/libc/rpc/svc_run.c1
-rw-r--r--lib/libc/xdr/xdr_rec.c1
15 files changed, 38 insertions, 5 deletions
diff --git a/include/resolv.h b/include/resolv.h
index 6b57961..12d14b4 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -307,6 +307,11 @@ int res_queriesmatch(const u_char *, const u_char *,
void res_close(void);
int res_opt(int, u_char *, int, int);
const char * p_section(int, int);
+/* XXX These must be exported for BIND4 compatibility. */
+void __putlong(u_int32_t, u_char *);
+void __putshort(u_int16_t, u_char *);
+u_int32_t _getlong(const u_char *);
+u_int16_t _getshort(const u_char *);
/* XXX The following depend on the ns_updrec typedef in arpa/nameser.h */
#ifdef _ARPA_NAMESER_H_
int res_update(ns_updrec *);
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index cf7c644..63cec21 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
#include <rpcsvc/ypclnt.h>
#endif
#include "un-namespace.h"
+#include "libc_private.h"
#include "pw_scan.h"
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
index 6125762..b52d7c2 100644
--- a/lib/libc/gen/nlist.c
+++ b/lib/libc/gen/nlist.c
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/file.h>
+#include <arpa/inet.h>
#include <errno.h>
#include <a.out.h>
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
index 3736c56..f369cc7 100644
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -107,6 +107,14 @@ typedef pthread_func_t pthread_func_entry_t[2];
extern pthread_func_entry_t __thr_jtable[];
/*
+ * yplib internal interfaces
+ */
+#ifdef YP
+int _yp_check(char **);
+#endif
+
+
+/*
* This is a pointer in the C run-time startup code. It is used
* by getprogname() and setprogname().
*/
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index cbfa5cd..37e680c 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$");
#include <stdarg.h>
#include <nsswitch.h>
#include "un-namespace.h"
+#include "libc_private.h"
#if defined(__KAME__) && defined(INET6)
# define FAITH
@@ -230,7 +231,6 @@ static int _files_getaddrinfo(void *, void *, va_list);
#ifdef YP
static struct addrinfo *_yphostent(char *, const struct addrinfo *);
static int _yp_getaddrinfo(void *, void *, va_list);
-extern int _yp_check(char **);
#endif
static int res_queryN(const char *, struct res_target *);
diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c
index 8397bfc..a89bc51 100644
--- a/lib/libc/net/getservent.c
+++ b/lib/libc/net/getservent.c
@@ -49,9 +49,8 @@ __FBSDID("$FreeBSD$");
#include <rpcsvc/yp_prot.h>
#include <rpcsvc/ypclnt.h>
static int serv_stepping_yp = 0;
-extern int _yp_check( char ** );
#endif
-
+#include "libc_private.h"
#define MAXALIASES 35
diff --git a/lib/libc/net/nsdispatch.c b/lib/libc/net/nsdispatch.c
index 25da107..b7c59ff 100644
--- a/lib/libc/net/nsdispatch.c
+++ b/lib/libc/net/nsdispatch.c
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/stat.h>
+#include "namespace.h"
#include <err.h>
#include <fcntl.h>
#define _NS_PRIVATE
@@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "un-namespace.h"
/*
* default sourcelist: `files'
diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l
index 5fa159e..ea21072 100644
--- a/lib/libc/net/nslexer.l
+++ b/lib/libc/net/nslexer.l
@@ -43,11 +43,13 @@ static char *rcsid =
"$FreeBSD$";
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <ctype.h>
#include <err.h>
#define _NS_PRIVATE
#include <nsswitch.h>
#include <string.h>
+#include "un-namespace.h"
#include "nsparser.h"
diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c
index 7972e34..bc4e87a 100644
--- a/lib/libc/net/rcmdsh.c
+++ b/lib/libc/net/rcmdsh.c
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
@@ -86,7 +87,8 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog)
hints.ai_flags = AI_CANONNAME;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- (void)snprintf(num, sizeof(num), "%d", ntohs(rport));
+ (void)snprintf(num, sizeof(num), "%u",
+ (unsigned int)ntohs(rport));
error = getaddrinfo(*ahost, num, &hints, &res);
if (error) {
fprintf(stderr, "rcmdsh: getaddrinfo: %s\n",
diff --git a/lib/libc/posix1e/mac_set.c b/lib/libc/posix1e/mac_set.c
index 4e09576..4353ee6 100644
--- a/lib/libc/posix1e/mac_set.c
+++ b/lib/libc/posix1e/mac_set.c
@@ -34,6 +34,11 @@
#include <sys/types.h>
#include <sys/mac.h>
+extern int __mac_set_fd(int fd, struct mac *mac_p);
+extern int __mac_set_file(const char *path_p, struct mac *mac_p);
+extern int __mac_set_link(const char *path_p, struct mac *mac_p);
+extern int __mac_set_proc(struct mac *mac_p);
+
int
mac_set_fd(int fd, struct mac *label)
{
diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc
index c349d5a..2ea731a 100644
--- a/lib/libc/rpc/Makefile.inc
+++ b/lib/libc/rpc/Makefile.inc
@@ -30,6 +30,7 @@ SRCS+= rtime.c
SRCS+= crypt_clnt.c crypt_xdr.c crypt.h
CFLAGS+= -DBROKEN_DES -DPORTMAP -DDES_BUILTIN
+CFLAGS+= -I${.CURDIR}/rpc
CLEANFILES+= crypt_clnt.c crypt_xdr.c crypt.h
diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c
index 9e305d2..b20d80d 100644
--- a/lib/libc/rpc/getrpcent.c
+++ b/lib/libc/rpc/getrpcent.c
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
#include <rpcsvc/ypclnt.h>
#endif
#include "un-namespace.h"
+#include "libc_private.h"
/*
* Internet version.
@@ -80,7 +81,6 @@ static struct rpcent *interpret(char *val, size_t len);
#ifdef YP
static int __yp_nomap = 0;
-extern int _yp_check(char **);
#endif /* YP */
#define RPCDB "/etc/rpc"
diff --git a/lib/libc/rpc/rpc_com.h b/lib/libc/rpc/rpc_com.h
index 1f1fd9e..a7cfd97 100644
--- a/lib/libc/rpc/rpc_com.h
+++ b/lib/libc/rpc/rpc_com.h
@@ -84,6 +84,11 @@ bool_t __rpc_control(int,void *);
char *_get_next_token(char *, int);
+bool_t __svc_clean_idle(fd_set *, int, bool_t);
+bool_t __xdrrec_setnonblock(XDR *, int);
+bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t);
+void __xprt_unregister_unlocked(SVCXPRT *);
+
SVCXPRT **__svc_xports;
int __svc_maxrec;
diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c
index adacadb..8b65475 100644
--- a/lib/libc/rpc/svc_run.c
+++ b/lib/libc/rpc/svc_run.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include "un-namespace.h"
#include <rpc/rpc.h>
+#include "rpc_com.h"
void
svc_run()
diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c
index e899ebb..340febd 100644
--- a/lib/libc/xdr/xdr_rec.c
+++ b/lib/libc/xdr/xdr_rec.c
@@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/clnt.h>
#include <sys/stddef.h>
#include "un-namespace.h"
+#include "rpc_com.h"
static bool_t xdrrec_getlong(XDR *, long *);
static bool_t xdrrec_putlong(XDR *, const long *);
OpenPOWER on IntegriCloud