De-__P(), ANSIfy the one function that wasn't, and unifdef __STDC__.

This commit is contained in:
wiz 2002-07-06 00:18:48 +00:00
parent 44e6549da3
commit ce6c985b9d
4 changed files with 42 additions and 48 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ypserv.c,v 1.15 2001/10/16 01:51:27 itojun Exp $ */
/* $NetBSD: ypserv.c,v 1.16 2002/07/06 00:18:48 wiz Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ypserv.c,v 1.15 2001/10/16 01:51:27 itojun Exp $");
__RCSID("$NetBSD: ypserv.c,v 1.16 2002/07/06 00:18:48 wiz Exp $");
#endif
#include <sys/types.h>
@ -70,9 +70,7 @@ const char *clientstr;
const char *svcname;
#endif /* LIBWRAP */
#ifdef __STDC__
#define SIG_PF void(*)(int)
#endif
int usedns;
#ifdef DEBUG
@ -85,10 +83,10 @@ int foreground;
int lflag;
#endif
int main __P((int, char *[]));
void usage __P((void));
int main(int, char *[]);
void usage(void);
void sighandler __P((int));
void sighandler(int);
static
@ -117,7 +115,7 @@ ypprog_2(struct svc_req *rqstp, SVCXPRT *transp)
} argument;
char *result;
xdrproc_t xdr_argument, xdr_result;
void *(*local) __P((void *, struct svc_req *));
void *(*local)(void *, struct svc_req *);
#ifdef LIBWRAP
struct request_info req;
struct sockaddr *caller;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ypserv.h,v 1.4 1999/01/22 02:36:13 thorpej Exp $ */
/* $NetBSD: ypserv.h,v 1.5 2002/07/06 00:18:48 wiz Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -43,35 +43,34 @@ struct ypresp_all {
} ypresp_all_u;
};
extern int _yp_invalid_domain __P((const char *)); /* from libc */
int _yp_invalid_map __P((const char *));
extern int _yp_invalid_domain(const char *); /* from libc */
int _yp_invalid_map(const char *);
void *ypproc_null_2_svc __P((void *, struct svc_req *));
void *ypproc_domain_2_svc __P((void *, struct svc_req *));
void *ypproc_domain_nonack_2_svc __P((void *, struct svc_req *));
void *ypproc_match_2_svc __P((void *, struct svc_req *));
void *ypproc_first_2_svc __P((void *, struct svc_req *));
void *ypproc_next_2_svc __P((void *, struct svc_req *));
void *ypproc_xfr_2_svc __P((void *, struct svc_req *));
void *ypproc_clear_2_svc __P((void *, struct svc_req *));
void *ypproc_all_2_svc __P((void *, struct svc_req *));
void *ypproc_master_2_svc __P((void *, struct svc_req *));
void *ypproc_order_2_svc __P((void *, struct svc_req *));
void *ypproc_maplist_2_svc __P((void *, struct svc_req *));
void *ypproc_null_2_svc(void *, struct svc_req *);
void *ypproc_domain_2_svc(void *, struct svc_req *);
void *ypproc_domain_nonack_2_svc(void *, struct svc_req *);
void *ypproc_match_2_svc(void *, struct svc_req *);
void *ypproc_first_2_svc(void *, struct svc_req *);
void *ypproc_next_2_svc(void *, struct svc_req *);
void *ypproc_xfr_2_svc(void *, struct svc_req *);
void *ypproc_clear_2_svc(void *, struct svc_req *);
void *ypproc_all_2_svc(void *, struct svc_req *);
void *ypproc_master_2_svc(void *, struct svc_req *);
void *ypproc_order_2_svc(void *, struct svc_req *);
void *ypproc_maplist_2_svc(void *, struct svc_req *);
bool_t xdr_ypresp_all __P((XDR *, struct ypresp_all *));
bool_t xdr_ypresp_all(XDR *, struct ypresp_all *);
struct ypresp_val ypdb_get_record __P((const char *, const char *, datum, int));
struct ypresp_key_val ypdb_get_first __P((const char *, const char *, int));
struct ypresp_key_val ypdb_get_next __P((const char *, const char *,
datum, int));
struct ypresp_order ypdb_get_order __P((const char *, const char *));
struct ypresp_master ypdb_get_master __P((const char *, const char *));
struct ypresp_val ypdb_get_record(const char *, const char *, datum, int);
struct ypresp_key_val ypdb_get_first(const char *, const char *, int);
struct ypresp_key_val ypdb_get_next(const char *, const char *, datum, int);
struct ypresp_order ypdb_get_order(const char *, const char *);
struct ypresp_master ypdb_get_master(const char *, const char *);
void ypdb_close_all __P((void));
void ypdb_init __P((void));
int ypdb_secure __P((const char *, const char *));
bool_t ypdb_xdr_get_all __P((XDR *, struct ypreq_nokey *));
void ypdb_close_all(void);
void ypdb_init(void);
int ypdb_secure(const char *, const char *);
bool_t ypdb_xdr_get_all(XDR *, struct ypreq_nokey *);
#ifdef LIBWRAP
/* from ypserv.c */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ypserv_db.c,v 1.12 2002/06/18 02:57:53 thorpej Exp $ */
/* $NetBSD: ypserv_db.c,v 1.13 2002/07/06 00:18:48 wiz Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ypserv_db.c,v 1.12 2002/06/18 02:57:53 thorpej Exp $");
__RCSID("$NetBSD: ypserv_db.c,v 1.13 2002/07/06 00:18:48 wiz Exp $");
#endif
/*
@ -99,13 +99,12 @@ struct mapq maps; /* global queue of maps (LRU) */
extern int usedns;
int yp_private __P((datum, int));
void ypdb_close_db __P((DBM *));
void ypdb_close_last __P((void));
void ypdb_close_map __P((struct opt_map *));
DBM *ypdb_open_db __P((const char *, const char *, int *,
struct opt_map **));
int lookup_host __P((int, int, DBM *, char *, struct ypresp_val *));
int yp_private(datum, int);
void ypdb_close_db(DBM *);
void ypdb_close_last(void);
void ypdb_close_map(struct opt_map *);
DBM *ypdb_open_db(const char *, const char *, int *, struct opt_map **);
int lookup_host(int, int, DBM *, char *, struct ypresp_val *);
/*
* ypdb_init: init the queues and lists

View File

@ -1,4 +1,4 @@
/* $NetBSD: ypserv_xdr.c,v 1.2 1997/10/15 05:01:52 lukem Exp $ */
/* $NetBSD: ypserv_xdr.c,v 1.3 2002/07/06 00:18:48 wiz Exp $ */
/*
* This file was originally generated with rpcgen, then modified
@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ypserv_xdr.c,v 1.2 1997/10/15 05:01:52 lukem Exp $");
__RCSID("$NetBSD: ypserv_xdr.c,v 1.3 2002/07/06 00:18:48 wiz Exp $");
#endif
#include <sys/types.h>
@ -19,9 +19,7 @@ __RCSID("$NetBSD: ypserv_xdr.c,v 1.2 1997/10/15 05:01:52 lukem Exp $");
#include "ypserv.h"
bool_t
xdr_ypresp_all(xdrs, objp)
XDR *xdrs;
struct ypresp_all *objp;
xdr_ypresp_all(XDR *xdrs, struct ypresp_all *objp)
{
if (!xdr_bool(xdrs, &objp->more))