Deduplicate extern "C" blocks
Subsystems (2)
PATCH 7/7 Deduplicate extern "C" blocks
Signed-off-by Felix Janda <[email protected]>
--- tirpc/rpc/auth.h | 62 +++++++-------------------------------------------- tirpc/rpc/auth_des.h | 14 +++++------- tirpc/rpc/clnt.h | 50 +++++++---------------------------------- tirpc/rpc/clnt_soc.h | 27 +++++----------------- tirpc/rpc/des_crypt.h | 20 +++++------------ tirpc/rpc/rpc.h | 14 +++++------- tirpc/rpc/svc.h | 55 ++++++--------------------------------------- tirpc/rpc/svc_soc.h | 38 +++++-------------------------- tirpc/rpc/xdr.h | 15 +++++-------- 9 files changed, 54 insertions(+), 241 deletions(-)
tirpc/rpc/auth.h +8 -54
@@ -46,6 +46,10 @@ #ifndef _TIRPC_AUTH_H #define _TIRPC_AUTH_H +#ifdef __cplusplus +extern "C" { +#endif + #include <rpc/xdr.h> #include <rpc/clnt_stat.h> #include <sys/socket.h>
@@ -148,13 +152,7 @@ union des_block {char c[8 ]; };typedef union des_block des_block ; -#ifdef __cplusplus -extern "C" { -#endif extern bool_t xdr_des_block (XDR *,des_block *); -#ifdef __cplusplus -} -#endif /* * Authentication info. Opaque to client.
@@ -241,13 +239,7 @@ typedef struct __auth { xfunc, xwhere)) -#ifdef __cplusplus -extern "C" { -#endif extern struct opaque_auth _null_auth; -#ifdef __cplusplus -} -#endif /* * Any style authentication. These routines can be used by any
@@ -268,15 +260,9 @@ int authany_wrap(void), authany_unwrap(void);* int len; * int *aup_gids; */ -#ifdef __cplusplus -extern "C" { -#endif extern AUTH *authunix_create (char *,uid_t ,uid_t ,int ,uid_t *);extern AUTH *authunix_create_default (void );/* takes no parameters */ extern AUTH *authnone_create (void );/* takes no parameters */ -#ifdef __cplusplus -} -#endif /* * DES style authentication * AUTH *authsecdes_create(servername, window, timehost, ckey)
@@ -285,25 +271,13 @@ extern AUTH *authnone_create(void); /* takes no parameters */* const char *timehost; - optional hostname to sync with * des_block *ckey; - optional conversation key to use */ -#ifdef __cplusplus -extern "C" { -#endifextern AUTH *authdes_create (char *,u_int ,struct sockaddr *,des_block *);extern AUTH *authdes_pk_create (char *,netobj *,u_int ,struct sockaddr *,des_block *);extern AUTH *authdes_seccreate (const char *,const u_int ,const char *,const des_block *); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endifextern bool_t xdr_opaque_auth (XDR *,struct opaque_auth *); -#ifdef __cplusplus -} -#endif#define authsys_create (c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))#define authsys_create_default () authunix_create_default()
@@ -311,61 +285,37 @@ extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);/* * Netname manipulation routines. */ -#ifdef __cplusplus -extern "C" { -#endifextern int getnetname (char *);extern int host2netname (char *,const char *,const char *);extern int user2netname (char *,const uid_t ,const char *);extern int netname2user (char *,uid_t *,gid_t *,int *,gid_t *);extern int netname2host (char *,char *,const int );extern void passwd2des (char *,char * ); -#ifdef __cplusplus -} -#endif/* * * These routines interface to the keyserv daemon * */ -#ifdef __cplusplus -extern "C" { -#endifextern int key_decryptsession (const char *,des_block *);extern int key_encryptsession (const char *,des_block *);extern int key_gendes (des_block *);extern int key_setsecret (const char *);extern int key_secretkey_is_set (void ); -#ifdef __cplusplus -} -#endif/* * Publickey routines. */ -#ifdef __cplusplus -extern "C" { -#endifextern int getpublickey (const char *,char *);extern int getpublicandprivatekey (char *,char *);extern int getsecretkey (char *,char *,char *); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endifstruct svc_req ;struct rpc_msg ;enum auth_stat _svcauth_none (struct svc_req *,struct rpc_msg *);enum auth_stat _svcauth_short (struct svc_req *,struct rpc_msg *);enum auth_stat _svcauth_unix (struct svc_req *,struct rpc_msg *);enum auth_stat _svcauth_gss (struct svc_req *,struct rpc_msg *,bool_t *); -#ifdef __cplusplus -} -#endif#define AUTH_NONE 0/* no authentication */ #define AUTH_NULL 0/* backward compatibility */
@@ -377,4 +327,8 @@ enum auth_stat _svcauth_gss (struct svc_req *, struct rpc_msg *, bool_t *);#define AUTH_KERB 4/* kerberos style */ #define RPCSEC_GSS 6/* RPCSEC_GSS */ +#ifdef __cplusplus +} +#endif +#endif /* !_TIRPC_AUTH_H */
tirpc/rpc/auth_des.h +5 -9
@@ -42,6 +42,10 @@ #ifndef _TI_AUTH_DES_ #define _TI_AUTH_DES_ +#ifdef __cplusplus +extern "C" { +#endif + #include <rpc/auth.h> /*
@@ -114,23 +118,15 @@ struct authdes_verf {* Map a des credential into a unix cred. * */ -#ifdef __cplusplus -extern "C" { -#endifextern int authdes_getucred (struct authdes_cred *,uid_t *,gid_t *,int *,gid_t * ); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endifextern bool_t xdr_authdes_cred (XDR *,struct authdes_cred *);extern bool_t xdr_authdes_verf (XDR *,struct authdes_verf *);extern int rtime (struct sockaddr_in *,struct timeval *,struct timeval *);extern void kgetnetname (char *);extern enum auth_stat _svcauth_des (struct svc_req *,struct rpc_msg *); + #ifdef __cplusplus }#endif
tirpc/rpc/clnt.h +8 -42
118 lines not on this page · raw message
tirpc/rpc/clnt_soc.h +5 -22
@@ -39,6 +39,10 @@ #ifndef _RPC_CLNT_SOC_H #define _RPC_CLNT_SOC_H +#ifdef __cplusplus +extern "C" { +#endif + /* derived from clnt_soc.h 1.3 88/12/17 SMI */ /*
@@ -60,39 +64,21 @@* u_int sendsz; * u_int recvsz; */ -#ifdef __cplusplus -extern "C" { -#endifextern CLIENT *clnttcp_create (struct sockaddr_in *,u_long ,u_long ,int *,u_int ,u_int ); -#ifdef __cplusplus -} -#endif/* * Raw (memory) rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern CLIENT *clntraw_create (u_long ,u_long ); -#ifdef __cplusplus -} -#endif/* IPv6 socket version */ #ifdef INET6 -#ifdef __cplusplus -extern "C" { -#endifextern CLIENT *clnttcp6_create (struct sockaddr_in6 *,u_long ,u_long ,int *,u_int ,u_int ); -#ifdef __cplusplus -} -#endif#endif /*
@@ -116,9 +102,6 @@ extern CLIENT *clnttcp6_create(struct sockaddr_in6 *, u_long, u_long, int *,* u_int sendsz; * u_int recvsz; */ -#ifdef __cplusplus -extern "C" { -#endif extern CLIENT *clntudp_create (struct sockaddr_in *,u_long ,u_long ,struct timeval ,int *); extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
@@ -129,9 +112,9 @@ extern CLIENT *clntudp6_create(struct sockaddr_in6 *, u_long, u_long,extern CLIENT *clntudp6_bufcreate (struct sockaddr_in6 *,u_long ,u_long ,struct timeval ,int *,u_int ,u_int );#endif +#ifdef __cplusplus }#endif -#endif /* _RPC_CLNT_SOC_H */
tirpc/rpc/des_crypt.h +5 -15
@@ -43,6 +43,10 @@ #ifndef _DES_DES_CRYPT_H #define _DES_DES_CRYPT_H +#ifdef __cplusplus +extern "C" { +#endif + #include <rpc/rpc.h> #define DES_MAXDATA 8192 /* max bytes encrypted in one call */
@@ -82,33 +86,19 @@/* * Cipher Block Chaining mode */ -#ifdef __cplusplus -extern "C" { -#endifint cbc_crypt (char *,char *,unsigned int ,unsigned int ,char *); -#ifdef __cplusplus -} -#endif/* * Electronic Code Book mode */ -#ifdef __cplusplus -extern "C" { -#endifint ecb_crypt (char *,char *,unsigned int ,unsigned int ); -#ifdef __cplusplus -} -#endif/* * Set des parity for a key. * DES parity is odd and in the low bit of each byte */ -#ifdef __cplusplus -extern "C" { -#endifvoid des_setparity (char *); + #ifdef __cplusplus }#endif
tirpc/rpc/rpc.h +5 -9
@@ -35,6 +35,10 @@ #ifndef _TIRPC_RPC_H #define _TIRPC_RPC_H +#ifdef __cplusplus +extern "C" { +#endif + #include <rpc/types.h> /* some typedefs */ #include <sys/socket.h> #include <netinet/in.h>
@@ -76,9 +80,6 @@#define UDPMSGSIZE 8800#endif -#ifdef __cplusplus -extern "C" { -#endif extern int get_myaddress (struct sockaddr_in *);extern int bindresvport (int ,struct sockaddr_in *); extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
@@ -92,22 +93,17 @@ struct netbuf *uaddr2taddr(const struct netconfig *, const char *);struct sockaddr ;extern int bindresvport_sa (int ,struct sockaddr *); -#ifdef __cplusplus -} -#endif /* * The following are not exported interfaces, they are for internal library * and rpcbind use only. Do not use, they may change without notice. */ -#ifdef __cplusplus -extern "C" { -#endif int __rpc_nconf2fd (const struct netconfig *);int __rpc_nconf2fd_flags (const struct netconfig *,int );int __rpc_nconf2sockinfo (const struct netconfig *,struct __rpc_sockinfo *);int __rpc_fd2sockinfo (int ,struct __rpc_sockinfo *);u_int __rpc_get_t_size (int ,int ,int ); + #ifdef __cplusplus }#endif
tirpc/rpc/svc.h +7 -48
134 lines not on this page · raw message
tirpc/rpc/svc_soc.h +5 -33
@@ -39,6 +39,10 @@ #ifndef _RPC_SVC_SOC_H #define _RPC_SVC_SOC_H +#ifdef __cplusplus +extern "C" { +#endif + /* #pragma ident "@(#)svc_soc.h 1.11 94/04/25 SMI" */ /* svc_soc.h 1.8 89/05/01 SMI */
@@ -63,14 +67,8 @@* void (*dispatch)(); * int protocol; like TCP or UDP, zero means do not register */ -#ifdef __cplusplus -extern "C" { -#endif extern bool_t svc_register (SVCXPRT *,u_long ,u_long ,void (*)(struct svc_req *,SVCXPRT *),int ); -#ifdef __cplusplus -} -#endif /* * Service un-registration
@@ -79,62 +77,36 @@ extern bool_t svc_register(SVCXPRT *, u_long, u_long,* u_long prog; * u_long vers; */ -#ifdef __cplusplus -extern "C" { -#endifextern void svc_unregister (u_long ,u_long ); -#ifdef __cplusplus -} -#endif/* * Memory based rpc for testing and timing. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svcraw_create (void ); -#ifdef __cplusplus -} -#endif/* * Udp based rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svcudp_create (int );extern SVCXPRT *svcudp_bufcreate (int ,u_int ,u_int );extern int svcudp_enablecache (SVCXPRT *,u_long );extern SVCXPRT *svcudp6_create (int );extern SVCXPRT *svcudp6_bufcreate (int ,u_int ,u_int ); -#ifdef __cplusplus -} -#endif/* * Tcp based rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svctcp_create (int ,u_int ,u_int );extern SVCXPRT *svctcp6_create (int ,u_int ,u_int ); -#ifdef __cplusplus -} -#endif/* * Fd based rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svcfd_create (int ,u_int ,u_int ); + #ifdef __cplusplus }#endif
tirpc/rpc/xdr.h +6 -9
@@ -40,6 +40,11 @@ #ifndef _TIRPC_XDR_H #define _TIRPC_XDR_H + +#ifdef __cplusplus +extern "C" { +#endif + #include <stdio.h> #include <netinet/in.h>
@@ -282,9 +287,6 @@ struct xdr_discrim {/* * These are the "generic" xdr routines. */ -#ifdef __cplusplus -extern "C" { -#endif extern bool_t xdr_void (void );extern bool_t xdr_int (XDR *,int *);extern bool_t xdr_u_int (XDR *,u_int *);
@@ -328,9 +330,6 @@ extern bool_t xdr_u_hyper(XDR *, u_quad_t *);extern bool_t xdr_longlong_t (XDR *,quad_t *);extern bool_t xdr_u_longlong_t (XDR *,u_quad_t *);extern u_long xdr_sizeof (xdrproc_t ,void *); -#ifdef __cplusplus -} -#endif /* * Common opaque bytes objects used by many rpc protocols;
@@ -348,9 +347,6 @@ extern bool_t xdr_netobj(XDR *, struct netobj *);* These are the public routines for the various implementations of * xdr streams. */ -#ifdef __cplusplus -extern "C" { -#endif /* XDR using memory buffers */ extern void xdrmem_create (XDR *,char *,u_int ,enum xdr_op );
@@ -371,6 +367,7 @@ extern bool_t xdrrec_skiprecord(XDR *);/* true if no more input */ extern bool_t xdrrec_eof (XDR *);extern u_int xdrrec_readbytes (XDR *,caddr_t ,u_int ); + #ifdef __cplusplus }#endif
Signature · 1 line
2.7.3
Quoted 18 lines · Felix Janda
Signed-off-by Felix Janda <[email protected]>--- tirpc/rpc/auth.h | 62 +++++++-------------------------------------------- tirpc/rpc/auth_des.h | 14 +++++------- tirpc/rpc/clnt.h | 50 +++++++---------------------------------- tirpc/rpc/clnt_soc.h | 27 +++++----------------- tirpc/rpc/des_crypt.h | 20 +++++------------ tirpc/rpc/rpc.h | 14 +++++------- tirpc/rpc/svc.h | 55 ++++++--------------------------------------- tirpc/rpc/svc_soc.h | 38 +++++-------------------------- tirpc/rpc/xdr.h | 15 +++++-------- 9 files changed, 54 insertions(+), 241 deletions(-)tirpc/rpc/auth.h +0
-0
tirpc/rpc/auth.h line 55
Quoted 10 lines
tirpc/rpc/auth.h +4
-0@@ -46,6 +46,10 @@ #ifndef _TIRPC_AUTH_H #define _TIRPC_AUTH_H +#ifdef __cplusplus +extern "C" { +#endif + #include <rpc/xdr.h> #include <rpc/clnt_stat.h> #include <sys/socket.h>
it isn't normal to wrap includes in extern C. header files should only be wrapping their own local content.
-mike
PATCH v2 1/1 Deduplicate extern "C" blocks
Signed-off-by Felix Janda <[email protected]>
---
v2: Leave start of first block and end of last block as they are
Quoted 3 lines · Mike Frysinger
it isn't normal to wrap includes in extern C. header files should only be wrapping their own local content.
-mike
Ok, thanks.
--- tirpc/rpc/auth.h | 48 ------------------------------------------------ tirpc/rpc/auth_des.h | 6 ------ tirpc/rpc/clnt.h | 36 ------------------------------------ tirpc/rpc/clnt_soc.h | 18 ------------------ tirpc/rpc/des_crypt.h | 12 ------------ tirpc/rpc/rpc.h | 6 ------ tirpc/rpc/svc.h | 42 ------------------------------------------ tirpc/rpc/svc_soc.h | 30 ------------------------------ tirpc/rpc/xdr.h | 6 ------ 9 files changed, 204 deletions(-)
tirpc/rpc/auth.h +0 -48
@@ -152,9 +152,6 @@ typedef union des_block des_block;extern "C" {#endif extern bool_t xdr_des_block (XDR *,des_block *); -#ifdef __cplusplus -} -#endif /* * Authentication info. Opaque to client.
@@ -241,13 +238,7 @@ typedef struct __auth { xfunc, xwhere)) -#ifdef __cplusplus -extern "C" { -#endif extern struct opaque_auth _null_auth; -#ifdef __cplusplus -} -#endif /* * Any style authentication. These routines can be used by any
@@ -268,15 +259,9 @@ int authany_wrap(void), authany_unwrap(void);* int len; * int *aup_gids; */ -#ifdef __cplusplus -extern "C" { -#endif extern AUTH *authunix_create (char *,uid_t ,uid_t ,int ,uid_t *);extern AUTH *authunix_create_default (void );/* takes no parameters */ extern AUTH *authnone_create (void );/* takes no parameters */ -#ifdef __cplusplus -} -#endif /* * DES style authentication * AUTH *authsecdes_create(servername, window, timehost, ckey)
@@ -285,25 +270,13 @@ extern AUTH *authnone_create(void); /* takes no parameters */* const char *timehost; - optional hostname to sync with * des_block *ckey; - optional conversation key to use */ -#ifdef __cplusplus -extern "C" { -#endifextern AUTH *authdes_create (char *,u_int ,struct sockaddr *,des_block *);extern AUTH *authdes_pk_create (char *,netobj *,u_int ,struct sockaddr *,des_block *);extern AUTH *authdes_seccreate (const char *,const u_int ,const char *,const des_block *); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endifextern bool_t xdr_opaque_auth (XDR *,struct opaque_auth *); -#ifdef __cplusplus -} -#endif#define authsys_create (c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))#define authsys_create_default () authunix_create_default()
@@ -311,52 +284,31 @@ extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);/* * Netname manipulation routines. */ -#ifdef __cplusplus -extern "C" { -#endifextern int getnetname (char *);extern int host2netname (char *,const char *,const char *);extern int user2netname (char *,const uid_t ,const char *);extern int netname2user (char *,uid_t *,gid_t *,int *,gid_t *);extern int netname2host (char *,char *,const int );extern void passwd2des (char *,char * ); -#ifdef __cplusplus -} -#endif/* * * These routines interface to the keyserv daemon * */ -#ifdef __cplusplus -extern "C" { -#endifextern int key_decryptsession (const char *,des_block *);extern int key_encryptsession (const char *,des_block *);extern int key_gendes (des_block *);extern int key_setsecret (const char *);extern int key_secretkey_is_set (void ); -#ifdef __cplusplus -} -#endif/* * Publickey routines. */ -#ifdef __cplusplus -extern "C" { -#endifextern int getpublickey (const char *,char *);extern int getpublicandprivatekey (char *,char *);extern int getsecretkey (char *,char *,char *); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endifstruct svc_req ;struct rpc_msg ;enum auth_stat _svcauth_none (struct svc_req *,struct rpc_msg *);
tirpc/rpc/auth_des.h +0 -6
@@ -118,13 +118,7 @@ struct authdes_verf {extern "C" {#endif extern int authdes_getucred (struct authdes_cred *,uid_t *,gid_t *,int *,gid_t * ); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus -extern "C" { -#endifextern bool_t xdr_authdes_cred (XDR *,struct authdes_cred *);extern bool_t xdr_authdes_verf (XDR *,struct authdes_verf *); extern int rtime(struct sockaddr_in *, struct timeval *,
tirpc/rpc/clnt.h +0 -36
@@ -415,46 +415,25 @@ extern CLIENT *clnt_dg_create(const int, const struct netbuf *,*/ extern CLIENT *clnt_raw_create (rpcprog_t ,rpcvers_t ); -#ifdef __cplusplus -} -#endif/* * Print why creation failed */ -#ifdef __cplusplus -extern "C" { -#endifextern void clnt_pcreateerror (const char *);/* stderr */ extern char *clnt_spcreateerror (const char *);/* string */ -#ifdef __cplusplus -} -#endif/* * Like clnt_perror(), but is more verbose in its output */ -#ifdef __cplusplus -extern "C" { -#endifextern void clnt_perrno (enum clnt_stat );/* stderr */ extern char *clnt_sperrno (enum clnt_stat );/* string */ -#ifdef __cplusplus -} -#endif/* * Print an English error message, given the client error code */ -#ifdef __cplusplus -extern "C" { -#endifextern void clnt_perror (CLIENT *,const char *);/* stderr */ extern char *clnt_sperror (CLIENT *,const char *);/* string */ -#ifdef __cplusplus -} -#endif/*
@@ -465,13 +444,7 @@ struct rpc_createerr {struct rpc_err cf_error;/* useful when cf_stat == RPC_PMAPFAILURE */ }; -#ifdef __cplusplus -extern "C" { -#endif extern struct rpc_createerr *__rpc_createerr (void ); -#ifdef __cplusplus -} -#endif #define get_rpc_createerr () (*(__rpc_createerr()))#define rpc_createerr (*(__rpc_createerr()))
@@ -488,16 +461,10 @@ extern struct rpc_createerr *__rpc_createerr(void);* char *out; * const char *nettype; */ -#ifdef __cplusplus -extern "C" { -#endif extern enum clnt_stat rpc_call (const char *,const rpcprog_t ,const rpcvers_t ,const rpcproc_t ,const xdrproc_t ,const char *,const xdrproc_t ,char *,const char *); -#ifdef __cplusplus -} -#endif /* * RPC broadcast interface
@@ -545,9 +512,6 @@ extern enum clnt_stat rpc_call(const char *, const rpcprog_t,typedef bool_t (*resultproc_t )(caddr_t , ...); -#ifdef __cplusplus -extern "C" { -#endif extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t, const rpcproc_t, const xdrproc_t, caddr_t, const xdrproc_t, caddr_t,
tirpc/rpc/clnt_soc.h +0 -18
@@ -65,34 +65,19 @@ extern "C" {#endif extern CLIENT *clnttcp_create (struct sockaddr_in *,u_long ,u_long ,int *,u_int ,u_int ); -#ifdef __cplusplus -} -#endif /* * Raw (memory) rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern CLIENT *clntraw_create (u_long ,u_long ); -#ifdef __cplusplus -} -#endif/* IPv6 socket version */ #ifdef INET6 -#ifdef __cplusplus -extern "C" { -#endifextern CLIENT *clnttcp6_create (struct sockaddr_in6 *,u_long ,u_long ,int *,u_int ,u_int ); -#ifdef __cplusplus -} -#endif#endif /*
@@ -116,9 +101,6 @@ extern CLIENT *clnttcp6_create(struct sockaddr_in6 *, u_long, u_long, int *,* u_int sendsz; * u_int recvsz; */ -#ifdef __cplusplus -extern "C" { -#endif extern CLIENT *clntudp_create (struct sockaddr_in *,u_long ,u_long ,struct timeval ,int *); extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
tirpc/rpc/des_crypt.h +0 -12
@@ -86,28 +86,16 @@extern "C" {#endif int cbc_crypt (char *,char *,unsigned int ,unsigned int ,char *); -#ifdef __cplusplus -} -#endif/* * Electronic Code Book mode */ -#ifdef __cplusplus -extern "C" { -#endifint ecb_crypt (char *,char *,unsigned int ,unsigned int ); -#ifdef __cplusplus -} -#endif/* * Set des parity for a key. * DES parity is odd and in the low bit of each byte */ -#ifdef __cplusplus -extern "C" { -#endifvoid des_setparity (char *); #ifdef __cplusplus }
tirpc/rpc/rpc.h +0 -6
@@ -92,17 +92,11 @@ struct netbuf *uaddr2taddr(const struct netconfig *, const char *);struct sockaddr ;extern int bindresvport_sa (int ,struct sockaddr *); -#ifdef __cplusplus -} -#endif /* * The following are not exported interfaces, they are for internal library * and rpcbind use only. Do not use, they may change without notice. */ -#ifdef __cplusplus -extern "C" { -#endif int __rpc_nconf2fd (const struct netconfig *);int __rpc_nconf2fd_flags (const struct netconfig *,int );int __rpc_nconf2sockinfo (const struct netconfig *,struct __rpc_sockinfo *);
tirpc/rpc/svc.h +0 -42
101 lines not on this page · raw message
tirpc/rpc/svc_soc.h +0 -30
@@ -68,9 +68,6 @@ extern "C" {#endif extern bool_t svc_register (SVCXPRT *,u_long ,u_long ,void (*)(struct svc_req *,SVCXPRT *),int ); -#ifdef __cplusplus -} -#endif /* * Service un-registration
@@ -79,61 +76,34 @@ extern bool_t svc_register(SVCXPRT *, u_long, u_long,* u_long prog; * u_long vers; */ -#ifdef __cplusplus -extern "C" { -#endifextern void svc_unregister (u_long ,u_long ); -#ifdef __cplusplus -} -#endif/* * Memory based rpc for testing and timing. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svcraw_create (void ); -#ifdef __cplusplus -} -#endif/* * Udp based rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svcudp_create (int );extern SVCXPRT *svcudp_bufcreate (int ,u_int ,u_int );extern int svcudp_enablecache (SVCXPRT *,u_long );extern SVCXPRT *svcudp6_create (int );extern SVCXPRT *svcudp6_bufcreate (int ,u_int ,u_int ); -#ifdef __cplusplus -} -#endif/* * Tcp based rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svctcp_create (int ,u_int ,u_int );extern SVCXPRT *svctcp6_create (int ,u_int ,u_int ); -#ifdef __cplusplus -} -#endif/* * Fd based rpc. */ -#ifdef __cplusplus -extern "C" { -#endifextern SVCXPRT *svcfd_create (int ,u_int ,u_int ); #ifdef __cplusplus }
tirpc/rpc/xdr.h +0 -6
@@ -328,9 +328,6 @@ extern bool_t xdr_u_hyper(XDR *, u_quad_t *);extern bool_t xdr_longlong_t (XDR *,quad_t *);extern bool_t xdr_u_longlong_t (XDR *,u_quad_t *);extern u_long xdr_sizeof (xdrproc_t ,void *); -#ifdef __cplusplus -} -#endif /* * Common opaque bytes objects used by many rpc protocols;
@@ -348,9 +345,6 @@ extern bool_t xdr_netobj(XDR *, struct netobj *);* These are the public routines for the various implementations of * xdr streams. */ -#ifdef __cplusplus -extern "C" { -#endif /* XDR using memory buffers */ extern void xdrmem_create (XDR *,char *,u_int ,enum xdr_op );
Signature · 1 line
2.7.3