1
0

patch-tirpc_rpc_svc_h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. --- libtirpc-0.2.3.orig/tirpc/rpc/svc.h 2013-02-13 16:13:59.000000000 +0100
  2. +++ libtirpc-0.2.3/tirpc/rpc/svc.h 2014-03-22 13:20:52.000000000 +0100
  3. @@ -40,7 +40,6 @@
  4. #ifndef _TIRPC_SVC_H
  5. #define _TIRPC_SVC_H
  6. -#include <sys/cdefs.h>
  7. /*
  8. * This interface must manage two items concerning remote procedure calling:
  9. @@ -200,11 +199,15 @@ struct svc_req {
  10. * const struct netconfig *nconf;
  11. */
  12. -__BEGIN_DECLS
  13. +#ifdef __cplusplus
  14. +extern "C" {
  15. +#endif
  16. extern bool_t svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t,
  17. void (*)(struct svc_req *, SVCXPRT *),
  18. const struct netconfig *);
  19. -__END_DECLS
  20. +#ifdef __cplusplus
  21. +}
  22. +#endif
  23. /*
  24. * Service un-registration
  25. @@ -214,9 +217,13 @@ __END_DECLS
  26. * const rpcvers_t vers;
  27. */
  28. -__BEGIN_DECLS
  29. +#ifdef __cplusplus
  30. +extern "C" {
  31. +#endif
  32. extern void svc_unreg(const rpcprog_t, const rpcvers_t);
  33. -__END_DECLS
  34. +#ifdef __cplusplus
  35. +}
  36. +#endif
  37. /*
  38. * Transport registration.
  39. @@ -224,9 +231,13 @@ __END_DECLS
  40. * xprt_register(xprt)
  41. * SVCXPRT *xprt;
  42. */
  43. -__BEGIN_DECLS
  44. +#ifdef __cplusplus
  45. +extern "C" {
  46. +#endif
  47. extern void xprt_register(SVCXPRT *);
  48. -__END_DECLS
  49. +#ifdef __cplusplus
  50. +}
  51. +#endif
  52. /*
  53. * Transport un-register
  54. @@ -234,9 +245,13 @@ __END_DECLS
  55. * xprt_unregister(xprt)
  56. * SVCXPRT *xprt;
  57. */
  58. -__BEGIN_DECLS
  59. +#ifdef __cplusplus
  60. +extern "C" {
  61. +#endif
  62. extern void xprt_unregister(SVCXPRT *);
  63. -__END_DECLS
  64. +#ifdef __cplusplus
  65. +}
  66. +#endif
  67. /*
  68. @@ -265,7 +280,9 @@ __END_DECLS
  69. * deadlock the caller and server processes!
  70. */
  71. -__BEGIN_DECLS
  72. +#ifdef __cplusplus
  73. +extern "C" {
  74. +#endif
  75. extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, void *);
  76. extern void svcerr_decode(SVCXPRT *);
  77. extern void svcerr_weakauth(SVCXPRT *);
  78. @@ -277,7 +294,9 @@ extern void svcerr_systemerr(SVCXPRT *);
  79. extern int rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t,
  80. char *(*)(char *), xdrproc_t, xdrproc_t,
  81. char *);
  82. -__END_DECLS
  83. +#ifdef __cplusplus
  84. +}
  85. +#endif
  86. /*
  87. * Lowest level dispatching -OR- who owns this process anyway.
  88. @@ -306,11 +325,17 @@ extern int svc_fds;
  89. * a small program implemented by the svc_rpc implementation itself;
  90. * also see clnt.h for protocol numbers.
  91. */
  92. -__BEGIN_DECLS
  93. +#ifdef __cplusplus
  94. +extern "C" {
  95. +#endif
  96. extern void rpctest_service(void);
  97. -__END_DECLS
  98. +#ifdef __cplusplus
  99. +}
  100. +#endif
  101. -__BEGIN_DECLS
  102. +#ifdef __cplusplus
  103. +extern "C" {
  104. +#endif
  105. extern void svc_getreq(int);
  106. extern void svc_getreqset(fd_set *);
  107. extern void svc_getreq_common(int);
  108. @@ -319,7 +344,9 @@ extern void svc_getreq_poll(struct pollf
  109. extern void svc_run(void);
  110. extern void svc_exit(void);
  111. -__END_DECLS
  112. +#ifdef __cplusplus
  113. +}
  114. +#endif
  115. /*
  116. * Socket to use on svcxxx_create call to get default socket
  117. @@ -331,7 +358,9 @@ __END_DECLS
  118. * These are the existing service side transport implementations
  119. */
  120. -__BEGIN_DECLS
  121. +#ifdef __cplusplus
  122. +extern "C" {
  123. +#endif
  124. /*
  125. * Transport independent svc_create routine.
  126. */
  127. @@ -427,7 +456,9 @@ int svc_dg_enablecache(SVCXPRT *, const
  128. int __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
  129. -__END_DECLS
  130. +#ifdef __cplusplus
  131. +}
  132. +#endif
  133. /* for backward compatibility */