patch-tirpc_rpc_svc_soc_h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --- libtirpc-0.2.3.orig/tirpc/rpc/svc_soc.h 2013-02-13 16:13:59.000000000 +0100
  2. +++ libtirpc-0.2.3/tirpc/rpc/svc_soc.h 2014-03-22 13:20:52.000000000 +0100
  3. @@ -38,7 +38,6 @@
  4. #ifndef _RPC_SVC_SOC_H
  5. #define _RPC_SVC_SOC_H
  6. -#include <sys/cdefs.h>
  7. /* #pragma ident "@(#)svc_soc.h 1.11 94/04/25 SMI" */
  8. /* svc_soc.h 1.8 89/05/01 SMI */
  9. @@ -64,10 +63,14 @@
  10. * void (*dispatch)();
  11. * int protocol; like TCP or UDP, zero means do not register
  12. */
  13. -__BEGIN_DECLS
  14. +#ifdef __cplusplus
  15. +extern "C" {
  16. +#endif
  17. extern bool_t svc_register(SVCXPRT *, u_long, u_long,
  18. void (*)(struct svc_req *, SVCXPRT *), int);
  19. -__END_DECLS
  20. +#ifdef __cplusplus
  21. +}
  22. +#endif
  23. /*
  24. * Service un-registration
  25. @@ -76,44 +79,64 @@ __END_DECLS
  26. * u_long prog;
  27. * u_long vers;
  28. */
  29. -__BEGIN_DECLS
  30. +#ifdef __cplusplus
  31. +extern "C" {
  32. +#endif
  33. extern void svc_unregister(u_long, u_long);
  34. -__END_DECLS
  35. +#ifdef __cplusplus
  36. +}
  37. +#endif
  38. /*
  39. * Memory based rpc for testing and timing.
  40. */
  41. -__BEGIN_DECLS
  42. +#ifdef __cplusplus
  43. +extern "C" {
  44. +#endif
  45. extern SVCXPRT *svcraw_create(void);
  46. -__END_DECLS
  47. +#ifdef __cplusplus
  48. +}
  49. +#endif
  50. /*
  51. * Udp based rpc.
  52. */
  53. -__BEGIN_DECLS
  54. +#ifdef __cplusplus
  55. +extern "C" {
  56. +#endif
  57. extern SVCXPRT *svcudp_create(int);
  58. extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
  59. extern int svcudp_enablecache(SVCXPRT *, u_long);
  60. extern SVCXPRT *svcudp6_create(int);
  61. extern SVCXPRT *svcudp6_bufcreate(int, u_int, u_int);
  62. -__END_DECLS
  63. +#ifdef __cplusplus
  64. +}
  65. +#endif
  66. /*
  67. * Tcp based rpc.
  68. */
  69. -__BEGIN_DECLS
  70. +#ifdef __cplusplus
  71. +extern "C" {
  72. +#endif
  73. extern SVCXPRT *svctcp_create(int, u_int, u_int);
  74. extern SVCXPRT *svctcp6_create(int, u_int, u_int);
  75. -__END_DECLS
  76. +#ifdef __cplusplus
  77. +}
  78. +#endif
  79. /*
  80. * Fd based rpc.
  81. */
  82. -__BEGIN_DECLS
  83. +#ifdef __cplusplus
  84. +extern "C" {
  85. +#endif
  86. extern SVCXPRT *svcfd_create(int, u_int, u_int);
  87. -__END_DECLS
  88. +#ifdef __cplusplus
  89. +}
  90. +#endif
  91. #endif /* !_RPC_SVC_SOC_H */