patch-tirpc_rpc_xdr_h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --- libtirpc-0.2.4.orig/tirpc/rpc/xdr.h 2013-12-09 21:59:51.000000000 +0100
  2. +++ libtirpc-0.2.4/tirpc/rpc/xdr.h 2014-05-10 17:56:08.818483343 +0200
  3. @@ -40,7 +40,6 @@
  4. #ifndef _TIRPC_XDR_H
  5. #define _TIRPC_XDR_H
  6. -#include <sys/cdefs.h>
  7. #include <stdio.h>
  8. #include <netinet/in.h>
  9. @@ -287,7 +286,9 @@ struct xdr_discrim {
  10. /*
  11. * These are the "generic" xdr routines.
  12. */
  13. -__BEGIN_DECLS
  14. +#ifdef __cplusplus
  15. +extern "C" {
  16. +#endif
  17. extern bool_t xdr_void(void);
  18. extern bool_t xdr_int(XDR *, int *);
  19. extern bool_t xdr_u_int(XDR *, u_int *);
  20. @@ -330,7 +331,9 @@ extern bool_t xdr_hyper(XDR *, quad_t *)
  21. extern bool_t xdr_u_hyper(XDR *, u_quad_t *);
  22. extern bool_t xdr_longlong_t(XDR *, quad_t *);
  23. extern bool_t xdr_u_longlong_t(XDR *, u_quad_t *);
  24. -__END_DECLS
  25. +#ifdef __cplusplus
  26. +}
  27. +#endif
  28. /*
  29. * Common opaque bytes objects used by many rpc protocols;
  30. @@ -348,7 +351,9 @@ extern bool_t xdr_netobj(XDR *, struct
  31. * These are the public routines for the various implementations of
  32. * xdr streams.
  33. */
  34. -__BEGIN_DECLS
  35. +#ifdef __cplusplus
  36. +extern "C" {
  37. +#endif
  38. /* XDR using memory buffers */
  39. extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op);
  40. @@ -369,6 +374,8 @@ extern bool_t xdrrec_skiprecord(XDR *);
  41. /* true if no more input */
  42. extern bool_t xdrrec_eof(XDR *);
  43. extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
  44. -__END_DECLS
  45. +#ifdef __cplusplus
  46. +}
  47. +#endif
  48. #endif /* !_TIRPC_XDR_H */