From 3923126b85f9e8a77cab9a41b5a62125acd5b4cd Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 19 Feb 2002 19:39:42 +0000 Subject: We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft. --- usr.sbin/ypserv/yppush/yppush.h | 60 +++++++++---------------------------- usr.sbin/ypserv/yppush/yppush_svc.c | 8 ++--- 2 files changed, 16 insertions(+), 52 deletions(-) (limited to 'usr.sbin/ypserv/yppush') diff --git a/usr.sbin/ypserv/yppush/yppush.h b/usr.sbin/ypserv/yppush/yppush.h index 9414d8073a4..5114d0f403b 100644 --- a/usr.sbin/ypserv/yppush/yppush.h +++ b/usr.sbin/ypserv/yppush/yppush.h @@ -1,4 +1,4 @@ -/* $OpenBSD: yppush.h,v 1.4 2000/10/12 09:47:27 deraadt Exp $ */ +/* $OpenBSD: yppush.h,v 1.5 2002/02/19 19:39:41 millert Exp $ */ /* * Copyright (c) 1996 Mats O Jansson @@ -36,7 +36,6 @@ #include - enum yppush_status { YPPUSH_SUCC = 1, YPPUSH_AGE = 2, @@ -56,57 +55,26 @@ enum yppush_status { YPPUSH_REFUSED = -14, }; typedef enum yppush_status yppush_status; -#ifdef __cplusplus -extern "C" bool_t xdr_yppush_status(XDR *, yppush_status*); -#elif defined(__STDC__) -extern bool_t xdr_yppush_status(XDR *, yppush_status*); -#else /* Old Style C */ -bool_t xdr_yppush_status(); -#endif /* Old Style C */ - struct yppushresp_xfr { u_int transid; yppush_status status; }; typedef struct yppushresp_xfr yppushresp_xfr; -#ifdef __cplusplus -extern "C" bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*); -#elif defined(__STDC__) -extern bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*); -#else /* Old Style C */ -bool_t xdr_yppushresp_xfr(); -#endif /* Old Style C */ - - -#define YPPUSH_XFRRESPPROG ((u_long)0x40000000) -#define YPPUSH_XFRRESPVERS ((u_long)1) - -#ifdef __cplusplus -#define YPPUSHPROC_NULL ((u_long)0) -extern "C" void * yppushproc_null_1(void *, CLIENT *); -extern "C" void * yppushproc_null_1_svc(void *, struct svc_req *); -#define YPPUSHPROC_XFRRESP ((u_long)1) -extern "C" void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *); -extern "C" void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *); - -#elif defined(__STDC__) -#define YPPUSHPROC_NULL ((u_long)0) -extern void * yppushproc_null_1(void *, CLIENT *); -extern void * yppushproc_null_1_svc(void *, struct svc_req *); -#define YPPUSHPROC_XFRRESP ((u_long)1) -extern void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *); -extern void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *); -#else /* Old Style C */ -#define YPPUSHPROC_NULL ((u_long)0) -extern void * yppushproc_null_1(); -extern void * yppushproc_null_1_svc(); -#define YPPUSHPROC_XFRRESP ((u_long)1) -extern void * yppushproc_xfrresp_1(); -extern void * yppushproc_xfrresp_1_svc(); -#endif /* Old Style C */ +#define YPPUSH_XFRRESPPROG ((u_long)0x40000000) +#define YPPUSH_XFRRESPVERS ((u_long)1) +#define YPPUSHPROC_NULL ((u_long)0) +#define YPPUSHPROC_XFRRESP ((u_long)1) -char * yppush_err_string(enum yppush_status y); +__BEGIN_DECLS +bool_t xdr_yppush_status(XDR *, yppush_status*); +bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*); +void * yppushproc_null_1(void *, CLIENT *); +void * yppushproc_null_1_svc(void *, struct svc_req *); +void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *); +void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *); +char * yppush_err_string(enum yppush_status y); +__END_DECLS #endif /* !_YPPUSH_H_RPCGEN */ diff --git a/usr.sbin/ypserv/yppush/yppush_svc.c b/usr.sbin/ypserv/yppush/yppush_svc.c index d0b9a9deef2..58dee344ac1 100644 --- a/usr.sbin/ypserv/yppush/yppush_svc.c +++ b/usr.sbin/ypserv/yppush/yppush_svc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yppush_svc.c,v 1.5 2001/11/19 04:21:41 deraadt Exp $ */ +/* $OpenBSD: yppush_svc.c,v 1.6 2002/02/19 19:39:41 millert Exp $ */ /* * Copyright (c) 1996 Mats O Jansson @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: yppush_svc.c,v 1.5 2001/11/19 04:21:41 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: yppush_svc.c,v 1.6 2002/02/19 19:39:41 millert Exp $"; #endif /* not lint */ #include "yppush.h" @@ -47,10 +47,6 @@ static char rcsid[] = "$OpenBSD: yppush_svc.c,v 1.5 2001/11/19 04:21:41 deraadt #include #include -#ifdef __STDC__ -#define SIG_PF void(*)(int) -#endif - #ifdef DEBUG #define RPC_SVC_FG #endif -- cgit v1.2.3