summaryrefslogtreecommitdiffstats
path: root/freebsd
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-09 11:48:16 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-10 14:10:26 +0200
commita037da67c614f7fb5549725c511a1cc0bfeb24a9 (patch)
tree929576cc443cab1d89c4e1c4c5d437faf421c964 /freebsd
parentXDR(3): Import from FreeBSD (diff)
downloadrtems-libbsd-a037da67c614f7fb5549725c511a1cc0bfeb24a9.tar.bz2
XDR(3): Port to RTEMS
Diffstat (limited to 'freebsd')
-rw-r--r--freebsd/lib/libc/xdr/rpc_com.h1
-rw-r--r--freebsd/lib/libc/xdr/xdr.c8
-rw-r--r--freebsd/lib/libc/xdr/xdr_float.c3
-rw-r--r--freebsd/lib/libc/xdr/xdr_rec.c2
4 files changed, 8 insertions, 6 deletions
diff --git a/freebsd/lib/libc/xdr/rpc_com.h b/freebsd/lib/libc/xdr/rpc_com.h
new file mode 100644
index 00000000..7f6b4bf0
--- /dev/null
+++ b/freebsd/lib/libc/xdr/rpc_com.h
@@ -0,0 +1 @@
+#include "../rpc/rpc_com.h"
diff --git a/freebsd/lib/libc/xdr/xdr.c b/freebsd/lib/libc/xdr/xdr.c
index ccb8d107..561f179b 100644
--- a/freebsd/lib/libc/xdr/xdr.c
+++ b/freebsd/lib/libc/xdr/xdr.c
@@ -522,16 +522,14 @@ xdr_enum(xdrs, ep)
XDR *xdrs;
enum_t *ep;
{
- enum sizecheck { SIZEVAL }; /* used to find the size of an enum */
-
/*
* enums are treated as ints
*/
- /* LINTED */ if (sizeof (enum sizecheck) == sizeof (long)) {
+ /* LINTED */ if (sizeof (enum_t) == sizeof (long)) {
return (xdr_long(xdrs, (long *)(void *)ep));
- } else /* LINTED */ if (sizeof (enum sizecheck) == sizeof (int)) {
+ } else /* LINTED */ if (sizeof (enum_t) == sizeof (int)) {
return (xdr_int(xdrs, (int *)(void *)ep));
- } else /* LINTED */ if (sizeof (enum sizecheck) == sizeof (short)) {
+ } else /* LINTED */ if (sizeof (enum_t) == sizeof (short)) {
return (xdr_short(xdrs, (short *)(void *)ep));
} else {
return (FALSE);
diff --git a/freebsd/lib/libc/xdr/xdr_float.c b/freebsd/lib/libc/xdr/xdr_float.c
index e1db120d..4ff153b3 100644
--- a/freebsd/lib/libc/xdr/xdr_float.c
+++ b/freebsd/lib/libc/xdr/xdr_float.c
@@ -69,6 +69,9 @@ __FBSDID("$FreeBSD$");
defined(__arm26__) || defined(__sparc64__) || defined(__amd64__)
#include <machine/endian.h>
#define IEEEFP
+#else /* __rtems__ */
+#include <machine/endian.h>
+#define IEEEFP
#endif
#if defined(__vax__)
diff --git a/freebsd/lib/libc/xdr/xdr_rec.c b/freebsd/lib/libc/xdr/xdr_rec.c
index 03d19925..a204b44b 100644
--- a/freebsd/lib/libc/xdr/xdr_rec.c
+++ b/freebsd/lib/libc/xdr/xdr_rec.c
@@ -513,7 +513,7 @@ xdrrec_eof(xdrs)
bool_t
xdrrec_endofrecord(xdrs, sendnow)
XDR *xdrs;
- bool_t sendnow;
+ int sendnow;
{
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
u_long len; /* fragment length */