summaryrefslogtreecommitdiff
path: root/package/libtirpc/patches/patch-tirpc_rpc_clnt_h
blob: ddd1f73ae879bfc3ba2c1bf3ba007744056d8339 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
--- libtirpc-0.2.3.orig/tirpc/rpc/clnt.h	2013-02-13 16:13:59.000000000 +0100
+++ libtirpc-0.2.3/tirpc/rpc/clnt.h	2014-03-22 13:20:52.000000000 +0100
@@ -42,7 +42,6 @@
 #include <rpc/clnt_stat.h>
 #include <rpc/auth.h>
 
-#include <sys/cdefs.h>
 #include <netconfig.h>
 #include <sys/un.h>
 
@@ -267,7 +266,9 @@ struct rpc_timers {
  * Generic client creation routine. Supported protocols are those that
  * belong to the nettype namespace (/etc/netconfig).
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
 			   const char *);
 /*
@@ -414,32 +415,46 @@ extern CLIENT *clnt_dg_create(const int,
  */
 extern CLIENT *clnt_raw_create(rpcprog_t, rpcvers_t);
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
  * Print why creation failed
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void clnt_pcreateerror(const char *);			/* stderr */
 extern char *clnt_spcreateerror(const char *);			/* string */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Like clnt_perror(), but is more verbose in its output
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void clnt_perrno(enum clnt_stat);		/* stderr */
 extern char *clnt_sperrno(enum clnt_stat);		/* string */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Print an English error message, given the client error code
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void clnt_perror(CLIENT *, const char *);	 	/* stderr */
 extern char *clnt_sperror(CLIENT *, const char *);		/* string */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
@@ -450,9 +465,13 @@ struct rpc_createerr {
 	struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
 };
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern struct rpc_createerr	*__rpc_createerr(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 #define get_rpc_createerr()	(*(__rpc_createerr()))
 #define rpc_createerr		(*(__rpc_createerr()))
 
@@ -469,12 +488,16 @@ __END_DECLS
  *	char *out;
  *	const char *nettype;
  */
-__BEGIN_DECLS
+#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 *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * RPC broadcast interface
@@ -522,7 +545,9 @@ __END_DECLS
 
 typedef bool_t (*resultproc_t)(caddr_t, ...);
 
-__BEGIN_DECLS
+#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,
@@ -532,7 +557,9 @@ extern enum clnt_stat rpc_broadcast_exp(
 					caddr_t, const xdrproc_t, caddr_t,
 					const resultproc_t, const int,
 					const int, const char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /* For backward compatibility */
 #include <rpc/clnt_soc.h>