patch-include_rpcsecgss_rpc_svc_h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. --- librpcsecgss-0.19.orig/include/rpcsecgss/rpc/svc.h 2009-07-29 18:24:50.000000000 +0200
  2. +++ librpcsecgss-0.19/include/rpcsecgss/rpc/svc.h 2014-05-19 15:39:27.314306687 +0200
  3. @@ -40,7 +40,6 @@
  4. #ifndef _RPC_SVC_H
  5. #define _RPC_SVC_H
  6. -#include <sys/cdefs.h>
  7. #include <rpc/svc_auth.h>
  8. /*
  9. @@ -79,21 +78,21 @@ typedef struct __rpc_svcxprt {
  10. u_short xp_port; /* associated port number */
  11. struct xp_ops {
  12. /* receive incomming requests */
  13. - bool_t (*xp_recv) __P((struct __rpc_svcxprt *,
  14. - struct rpc_msg *));
  15. + bool_t (*xp_recv) (struct __rpc_svcxprt *,
  16. + struct rpc_msg *);
  17. /* get transport status */
  18. - enum xprt_stat (*xp_stat) __P((struct __rpc_svcxprt *));
  19. + enum xprt_stat (*xp_stat) (struct __rpc_svcxprt *);
  20. /* get arguments */
  21. - bool_t (*xp_getargs) __P((struct __rpc_svcxprt *, xdrproc_t,
  22. - caddr_t));
  23. + bool_t (*xp_getargs) (struct __rpc_svcxprt *, xdrproc_t,
  24. + caddr_t);
  25. /* send reply */
  26. - bool_t (*xp_reply) __P((struct __rpc_svcxprt *,
  27. - struct rpc_msg *));
  28. + bool_t (*xp_reply) (struct __rpc_svcxprt *,
  29. + struct rpc_msg *);
  30. /* free mem allocated for args */
  31. - bool_t (*xp_freeargs) __P((struct __rpc_svcxprt *, xdrproc_t,
  32. - caddr_t));
  33. + bool_t (*xp_freeargs) (struct __rpc_svcxprt *, xdrproc_t,
  34. + caddr_t);
  35. /* destroy this struct */
  36. - void (*xp_destroy) __P((struct __rpc_svcxprt *));
  37. + void (*xp_destroy) (struct __rpc_svcxprt *);
  38. } *xp_ops;
  39. int xp_addrlen; /* length of remote address */
  40. struct sockaddr_in xp_raddr; /* remote address */
  41. @@ -179,10 +178,14 @@ struct svc_req {
  42. * void (*dispatch)();
  43. * int protocol; like TCP or UDP, zero means do not register
  44. */
  45. -__BEGIN_DECLS
  46. -extern bool_t svc_register __P((SVCXPRT *, u_long, u_long,
  47. - void (*) __P((struct svc_req *, SVCXPRT *)), int));
  48. -__END_DECLS
  49. +#ifdef __cplusplus
  50. +extern "C" {
  51. +#endif
  52. +extern bool_t svc_register (SVCXPRT *, u_long, u_long,
  53. + void (*) (struct svc_req *, SVCXPRT *), int);
  54. +#ifdef __cplusplus
  55. +}
  56. +#endif
  57. /*
  58. * Service un-registration
  59. @@ -191,9 +194,13 @@ __END_DECLS
  60. * u_long prog;
  61. * u_long vers;
  62. */
  63. -__BEGIN_DECLS
  64. -extern void svc_unregister __P((u_long, u_long));
  65. -__END_DECLS
  66. +#ifdef __cplusplus
  67. +extern "C" {
  68. +#endif
  69. +extern void svc_unregister (u_long, u_long);
  70. +#ifdef __cplusplus
  71. +}
  72. +#endif
  73. /*
  74. * Transport registration.
  75. @@ -201,9 +208,13 @@ __END_DECLS
  76. * xprt_register(xprt)
  77. * SVCXPRT *xprt;
  78. */
  79. -__BEGIN_DECLS
  80. -extern void xprt_register __P((SVCXPRT *));
  81. -__END_DECLS
  82. +#ifdef __cplusplus
  83. +extern "C" {
  84. +#endif
  85. +extern void xprt_register (SVCXPRT *);
  86. +#ifdef __cplusplus
  87. +}
  88. +#endif
  89. /*
  90. * Transport un-register
  91. @@ -211,9 +222,13 @@ __END_DECLS
  92. * xprt_unregister(xprt)
  93. * SVCXPRT *xprt;
  94. */
  95. -__BEGIN_DECLS
  96. -extern void xprt_unregister __P((SVCXPRT *));
  97. -__END_DECLS
  98. +#ifdef __cplusplus
  99. +extern "C" {
  100. +#endif
  101. +extern void xprt_unregister (SVCXPRT *);
  102. +#ifdef __cplusplus
  103. +}
  104. +#endif
  105. @@ -244,16 +259,20 @@ __END_DECLS
  106. * deadlock the caller and server processes!
  107. */
  108. -__BEGIN_DECLS
  109. -extern bool_t svc_sendreply __P((SVCXPRT *, xdrproc_t, char *));
  110. -extern void svcerr_decode __P((SVCXPRT *));
  111. -extern void svcerr_weakauth __P((SVCXPRT *));
  112. -extern void svcerr_noproc __P((SVCXPRT *));
  113. -extern void svcerr_progvers __P((SVCXPRT *, u_long, u_long));
  114. -extern void svcerr_auth __P((SVCXPRT *, enum auth_stat));
  115. -extern void svcerr_noprog __P((SVCXPRT *));
  116. -extern void svcerr_systemerr __P((SVCXPRT *));
  117. -__END_DECLS
  118. +#ifdef __cplusplus
  119. +extern "C" {
  120. +#endif
  121. +extern bool_t svc_sendreply (SVCXPRT *, xdrproc_t, char *);
  122. +extern void svcerr_decode (SVCXPRT *);
  123. +extern void svcerr_weakauth (SVCXPRT *);
  124. +extern void svcerr_noproc (SVCXPRT *);
  125. +extern void svcerr_progvers (SVCXPRT *, u_long, u_long);
  126. +extern void svcerr_auth (SVCXPRT *, enum auth_stat);
  127. +extern void svcerr_noprog (SVCXPRT *);
  128. +extern void svcerr_systemerr (SVCXPRT *);
  129. +#ifdef __cplusplus
  130. +}
  131. +#endif
  132. /*
  133. * Lowest level dispatching -OR- who owns this process anyway.
  134. @@ -278,12 +297,16 @@ extern fd_set svc_fdset;
  135. extern int svc_fds;
  136. #endif /* def FD_SETSIZE */
  137. -__BEGIN_DECLS
  138. -extern void svc_getreq __P((int));
  139. -extern void svc_getreqset __P((fd_set *));
  140. -extern void svc_getreqset2 __P((fd_set *, int));
  141. -extern void svc_run __P((void));
  142. -__END_DECLS
  143. +#ifdef __cplusplus
  144. +extern "C" {
  145. +#endif
  146. +extern void svc_getreq (int);
  147. +extern void svc_getreqset (fd_set *);
  148. +extern void svc_getreqset2 (fd_set *, int);
  149. +extern void svc_run (void);
  150. +#ifdef __cplusplus
  151. +}
  152. +#endif
  153. /*
  154. * Socket to use on svcxxx_create call to get default socket
  155. @@ -297,32 +320,48 @@ __END_DECLS
  156. /*
  157. * Memory based rpc for testing and timing.
  158. */
  159. -__BEGIN_DECLS
  160. -extern SVCXPRT *svcraw_create __P((void));
  161. -__END_DECLS
  162. +#ifdef __cplusplus
  163. +extern "C" {
  164. +#endif
  165. +extern SVCXPRT *svcraw_create (void);
  166. +#ifdef __cplusplus
  167. +}
  168. +#endif
  169. /*
  170. * Udp based rpc.
  171. */
  172. -__BEGIN_DECLS
  173. -extern SVCXPRT *svcudp_create __P((int));
  174. -extern SVCXPRT *svcudp_bufcreate __P((int, u_int, u_int));
  175. -__END_DECLS
  176. +#ifdef __cplusplus
  177. +extern "C" {
  178. +#endif
  179. +extern SVCXPRT *svcudp_create (int);
  180. +extern SVCXPRT *svcudp_bufcreate (int, u_int, u_int);
  181. +#ifdef __cplusplus
  182. +}
  183. +#endif
  184. /*
  185. * Tcp based rpc.
  186. */
  187. -__BEGIN_DECLS
  188. -extern SVCXPRT *svctcp_create __P((int, u_int, u_int));
  189. -__END_DECLS
  190. +#ifdef __cplusplus
  191. +extern "C" {
  192. +#endif
  193. +extern SVCXPRT *svctcp_create (int, u_int, u_int);
  194. +#ifdef __cplusplus
  195. +}
  196. +#endif
  197. /*
  198. * Fd based rpc.
  199. */
  200. -__BEGIN_DECLS
  201. -extern SVCXPRT *svcfd_create __P((int, u_int, u_int));
  202. -__END_DECLS
  203. +#ifdef __cplusplus
  204. +extern "C" {
  205. +#endif
  206. +extern SVCXPRT *svcfd_create (int, u_int, u_int);
  207. +#ifdef __cplusplus
  208. +}
  209. +#endif
  210. #endif /* !_RPC_SVC_H */