Eliminate 19 warnings in libc (at level WARNS=2) of the

`implicit declaration of function' variety.
This commit is contained in:
Jacques Vidrine 2003-02-27 13:40:01 +00:00
parent 20902bd3e1
commit 2bbd7cf820
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111618
15 changed files with 38 additions and 5 deletions

View File

@ -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 *);

View File

@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
#include <rpcsvc/ypclnt.h>
#endif
#include "un-namespace.h"
#include "libc_private.h"
#include "pw_scan.h"

View File

@ -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>

View File

@ -106,6 +106,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().

View File

@ -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 *);

View File

@ -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

View File

@ -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'

View File

@ -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"

View File

@ -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",

View File

@ -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)
{

View File

@ -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

View File

@ -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"

View File

@ -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;

View File

@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include "un-namespace.h"
#include <rpc/rpc.h>
#include "rpc_com.h"
void
svc_run()

View File

@ -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 *);