patch-tirpc_rpc_clnt_h 3.0 KB

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