mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 20:37:06 +00:00
Revert r240060: (Partial)
__BEGIN_DECLS and __END_DECLS in cdefs.h take care of the __cplusplus mangling issues so most of the definitions were redundant. In the few places where they were not redundant we should use BSD style instead of the guards used upstream. Reported by: Yuri Pankov
This commit is contained in:
parent
370c6ad8ce
commit
46f442e58a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240062
|
@ -51,10 +51,6 @@
|
|||
#include <sys/cdefs.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAX_AUTH_BYTES 400
|
||||
#define MAXNETNAMELEN 255 /* maximum length of network user's name */
|
||||
|
||||
|
@ -370,8 +366,4 @@ __END_DECLS
|
|||
#define RPCSEC_GSS_KRB5I 390004
|
||||
#define RPCSEC_GSS_KRB5P 390005
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_AUTH_H */
|
||||
|
|
|
@ -48,10 +48,6 @@
|
|||
#define _RPC_AUTH_UNIX_H
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The machine name is part of a credential; it may not exceed 255 bytes */
|
||||
#define MAX_MACHINE_NAME 255
|
||||
|
||||
|
@ -85,8 +81,4 @@ struct short_hand_verf {
|
|||
struct opaque_auth new_cred;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_AUTH_UNIX_H */
|
||||
|
|
|
@ -64,10 +64,6 @@
|
|||
#include <netconfig.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Well-known IPV6 RPC broadcast address.
|
||||
*/
|
||||
|
@ -555,10 +551,6 @@ extern enum clnt_stat rpc_broadcast_exp(const rpcprog_t, const rpcvers_t,
|
|||
const int, const char *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For backward compatibility */
|
||||
#include <rpc/clnt_soc.h>
|
||||
|
||||
|
|
|
@ -49,10 +49,6 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
|
||||
|
||||
/*
|
||||
|
@ -107,8 +103,4 @@ extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
|
|||
struct timeval, int *, u_int, u_int);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _RPC_CLNT_SOC_H */
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
#include <sys/cdefs.h>
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DES_MAXDATA 8192 /* max bytes encrypted in one call */
|
||||
#define DES_DIRMASK (1 << 0)
|
||||
#define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */
|
||||
|
@ -107,8 +103,4 @@ __BEGIN_DECLS
|
|||
void des_setparity( char *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DES_DES_CRYPT_H */
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
|
||||
#include <netconfig.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _RPC_NONE 0
|
||||
#define _RPC_NETPATH 1
|
||||
#define _RPC_VISIBLE 2
|
||||
|
@ -65,8 +61,4 @@ extern struct netconfig *__rpc_getconf(void *);
|
|||
extern struct netconfig *__rpc_getconfip(const char *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_NETTYPE_H */
|
||||
|
|
|
@ -66,10 +66,6 @@
|
|||
#define _RPC_PMAP_CLNT_H_
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern bool_t pmap_set(u_long, u_long, int, int);
|
||||
extern bool_t pmap_unset(u_long, u_long);
|
||||
|
@ -87,8 +83,4 @@ extern u_short pmap_getport(struct sockaddr_in *,
|
|||
u_long, u_long, u_int);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_PMAP_CLNT_H_ */
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
#define _RPC_PMAP_RMT_H
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct rmtcallargs {
|
||||
u_long prog, vers, proc, arglen;
|
||||
caddr_t args_ptr;
|
||||
|
@ -66,8 +62,4 @@ extern bool_t xdr_rmtcall_args(XDR *, struct rmtcallargs *);
|
|||
extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_PMAP_RMT_H */
|
||||
|
|
|
@ -42,13 +42,9 @@
|
|||
#ifndef _RPC_RPCCOM_H
|
||||
#define _RPC_RPCCOM_H
|
||||
|
||||
/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
|
||||
|
||||
/*
|
||||
* The max size of the transport, if the size cannot be determined
|
||||
|
@ -84,8 +80,4 @@ char *_get_next_token(char *, int);
|
|||
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _RPC_RPCCOM_H */
|
||||
|
|
|
@ -43,10 +43,6 @@
|
|||
#ifndef _RPC_RPC_MSG_H
|
||||
#define _RPC_RPC_MSG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RPC_MSG_VERSION ((u_int32_t) 2)
|
||||
#define RPC_SERVICE_PORT ((u_short) 2048)
|
||||
|
||||
|
@ -215,8 +211,4 @@ extern bool_t xdr_rejected_reply(XDR *, struct rejected_reply *);
|
|||
extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_RPC_MSG_H */
|
||||
|
|
|
@ -61,10 +61,6 @@
|
|||
#include <rpc/types.h>
|
||||
#include <rpc/rpcb_prot.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
|
||||
const struct netconfig *, const struct netbuf *);
|
||||
|
@ -86,8 +82,4 @@ extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *);
|
|||
extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_RPCB_CLNT_H */
|
||||
|
|
|
@ -45,9 +45,6 @@
|
|||
/* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */
|
||||
/* @(#)rpcent.h 1.1 88/12/06 SMI */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct rpcent {
|
||||
char *r_name; /* name of server for this rpc program */
|
||||
|
@ -67,8 +64,4 @@ extern void setrpcent(int);
|
|||
extern void endrpcent(void);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_CENT_H */
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
#ifndef _RPCSEC_GSS_H
|
||||
#define _RPCSEC_GSS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <gssapi/gssapi.h>
|
||||
|
||||
#ifndef MAX_GSS_MECH
|
||||
|
@ -180,8 +176,4 @@ bool_t __rpc_gss_set_error(int rpc_gss_error, int system_error);
|
|||
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPCSEC_GSS_H */
|
||||
|
|
|
@ -65,10 +65,6 @@
|
|||
* parameters, struct svc_req * and SVCXPRT *, defined below.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Service control requests
|
||||
*/
|
||||
|
@ -471,9 +467,6 @@ int __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
|
|||
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* for backward compatibility */
|
||||
#include <rpc/svc_soc.h>
|
||||
|
|
|
@ -49,10 +49,6 @@
|
|||
* with TS-RPC
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Approved way of getting address of caller
|
||||
*/
|
||||
|
@ -117,8 +113,4 @@ __BEGIN_DECLS
|
|||
extern SVCXPRT *svcfd_create(int, u_int, u_int);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_SVC_SOC_H */
|
||||
|
|
|
@ -43,10 +43,6 @@
|
|||
#define _RPC_XDR_H
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XDR provides a conventional way for converting between C data
|
||||
* types and an external bit-string representation. Library supplied
|
||||
|
@ -370,8 +366,4 @@ extern bool_t xdrrec_eof(XDR *);
|
|||
extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_RPC_XDR_H */
|
||||
|
|
Loading…
Reference in a new issue