diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 |
commit | bada6666c70977a058755ccf232e7d67b24adeed (patch) | |
tree | 1e92d50cebce96abaf9bce19e36026c47f77b9ba /xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx | |
parent | eaf34adcbd8095bc6d1f3371b1227f654c7b19fc (diff) |
New upstream release
Diffstat (limited to 'xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx')
-rw-r--r-- | xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx b/xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx index 012c1e4..d64825b 100644 --- a/xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx +++ b/xsd/libxsd/xsd/cxx/tree/xdr-stream-extraction.hxx @@ -1,6 +1,5 @@ // file : xsd/cxx/tree/xdr-stream-extraction.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_TREE_XDR_STREAM_EXTRACTION_HXX @@ -9,6 +8,19 @@ #include <rpc/types.h> #include <rpc/xdr.h> +// Of course BSD has to be different and name its functions u_intXX +// instead of uintXX. Plus it does not have XX == 8. +// +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) +# if !defined(XSD_CXX_TREE_ASSUME_SUN_XDR) && !defined(xdr_int8_t) +# define xdr_int8_t(x, y) xdr_char(x, reinterpret_cast<char*> (y)) +# define xdr_uint8_t(x, y) xdr_u_char(x, reinterpret_cast<unsigned char*> (y)) +# define xdr_uint16_t xdr_u_int16_t +# define xdr_uint32_t xdr_u_int32_t +# define xdr_uint64_t xdr_u_int64_t +# endif +#endif + #include <string> #include <xsd/cxx/tree/buffer.hxx> @@ -249,7 +261,7 @@ namespace xsd // Dangerous but fast. // x.clear (); - + if (n != 0) { x.resize (n); |