summaryrefslogtreecommitdiffstats
path: root/sys/rpc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2012-09-02 21:04:40 +0000
committerpfg <pfg@FreeBSD.org>2012-09-02 21:04:40 +0000
commit97adc861835d3d63fcfabaf559955e91c3bdd543 (patch)
tree15afb466c1616ef4f4e63a7ec1b8cc2128b9438c /sys/rpc
parent70630d664ef4716dd247b13bdb90a3e2c77aef78 (diff)
downloadFreeBSD-src-97adc861835d3d63fcfabaf559955e91c3bdd543.zip
FreeBSD-src-97adc861835d3d63fcfabaf559955e91c3bdd543.tar.gz
Fix RPC headers for C++
C++ mangling will cause trouble with variables like __rpc_xdr in xdr.h so rename this to XDR. While here add proper C++ guards to RPC headers. PR: 137443 MFC after: 2 weeks
Diffstat (limited to 'sys/rpc')
-rw-r--r--sys/rpc/rpc_com.h4
-rw-r--r--sys/rpc/xdr.h20
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/rpc/rpc_com.h b/sys/rpc/rpc_com.h
index 290a289..6685132 100644
--- a/sys/rpc/rpc_com.h
+++ b/sys/rpc/rpc_com.h
@@ -114,8 +114,8 @@ extern int __rpc_sockisbound(struct socket*);
extern int bindresvport(struct socket *so, struct sockaddr *sa);
struct xucred;
-struct __rpc_xdr;
-bool_t xdr_authunix_parms(struct __rpc_xdr *xdrs, uint32_t *time, struct xucred *cred);
+struct XDR;
+bool_t xdr_authunix_parms(struct XDR *xdrs, uint32_t *time, struct xucred *cred);
#endif
__END_DECLS
diff --git a/sys/rpc/xdr.h b/sys/rpc/xdr.h
index d57dd6b..92af230 100644
--- a/sys/rpc/xdr.h
+++ b/sys/rpc/xdr.h
@@ -97,26 +97,26 @@ enum xdr_op {
* an operations vector for the particular implementation (e.g. see xdr_mem.c),
* and two private fields for the use of the particular implementation.
*/
-typedef struct __rpc_xdr {
+typedef struct XDR {
enum xdr_op x_op; /* operation; fast additional param */
const struct xdr_ops {
/* get a long from underlying stream */
- bool_t (*x_getlong)(struct __rpc_xdr *, long *);
+ bool_t (*x_getlong)(struct XDR *, long *);
/* put a long to " */
- bool_t (*x_putlong)(struct __rpc_xdr *, const long *);
+ bool_t (*x_putlong)(struct XDR *, const long *);
/* get some bytes from " */
- bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int);
+ bool_t (*x_getbytes)(struct XDR *, char *, u_int);
/* put some bytes to " */
- bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int);
+ bool_t (*x_putbytes)(struct XDR *, const char *, u_int);
/* returns bytes off from beginning */
- u_int (*x_getpostn)(struct __rpc_xdr *);
+ u_int (*x_getpostn)(struct XDR *);
/* lets you reposition the stream */
- bool_t (*x_setpostn)(struct __rpc_xdr *, u_int);
+ bool_t (*x_setpostn)(struct XDR *, u_int);
/* buf quick ptr to buffered data */
- int32_t *(*x_inline)(struct __rpc_xdr *, u_int);
+ int32_t *(*x_inline)(struct XDR *, u_int);
/* free privates of this xdr_stream */
- void (*x_destroy)(struct __rpc_xdr *);
- bool_t (*x_control)(struct __rpc_xdr *, int, void *);
+ void (*x_destroy)(struct XDR *);
+ bool_t (*x_control)(struct XDR *, int, void *);
} *x_ops;
char * x_public; /* users' data */
void * x_private; /* pointer to private data */
OpenPOWER on IntegriCloud