mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 19:29:21 +08:00
XDR(3): Port to RTEMS
This commit is contained in:
parent
f41a394f91
commit
a037da67c6
1
freebsd/lib/libc/xdr/rpc_com.h
Normal file
1
freebsd/lib/libc/xdr/rpc_com.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "../rpc/rpc_com.h"
|
@ -522,16 +522,14 @@ xdr_enum(xdrs, ep)
|
|||||||
XDR *xdrs;
|
XDR *xdrs;
|
||||||
enum_t *ep;
|
enum_t *ep;
|
||||||
{
|
{
|
||||||
enum sizecheck { SIZEVAL }; /* used to find the size of an enum */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* enums are treated as ints
|
* 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));
|
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));
|
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));
|
return (xdr_short(xdrs, (short *)(void *)ep));
|
||||||
} else {
|
} else {
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
@ -69,6 +69,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
defined(__arm26__) || defined(__sparc64__) || defined(__amd64__)
|
defined(__arm26__) || defined(__sparc64__) || defined(__amd64__)
|
||||||
#include <machine/endian.h>
|
#include <machine/endian.h>
|
||||||
#define IEEEFP
|
#define IEEEFP
|
||||||
|
#else /* __rtems__ */
|
||||||
|
#include <machine/endian.h>
|
||||||
|
#define IEEEFP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__vax__)
|
#if defined(__vax__)
|
||||||
|
@ -513,7 +513,7 @@ xdrrec_eof(xdrs)
|
|||||||
bool_t
|
bool_t
|
||||||
xdrrec_endofrecord(xdrs, sendnow)
|
xdrrec_endofrecord(xdrs, sendnow)
|
||||||
XDR *xdrs;
|
XDR *xdrs;
|
||||||
bool_t sendnow;
|
int sendnow;
|
||||||
{
|
{
|
||||||
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
|
RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
|
||||||
u_long len; /* fragment length */
|
u_long len; /* fragment length */
|
||||||
|
@ -2033,6 +2033,14 @@ def user_space(mm):
|
|||||||
'lib/libc/stdlib/strtonum.c',
|
'lib/libc/stdlib/strtonum.c',
|
||||||
'lib/libc/stdlib/strtoumax.c',
|
'lib/libc/stdlib/strtoumax.c',
|
||||||
'lib/libc/string/strsep.c',
|
'lib/libc/string/strsep.c',
|
||||||
|
'lib/libc/xdr/xdr_array.c',
|
||||||
|
'lib/libc/xdr/xdr.c',
|
||||||
|
'lib/libc/xdr/xdr_float.c',
|
||||||
|
'lib/libc/xdr/xdr_mem.c',
|
||||||
|
'lib/libc/xdr/xdr_rec.c',
|
||||||
|
'lib/libc/xdr/xdr_reference.c',
|
||||||
|
'lib/libc/xdr/xdr_sizeof.c',
|
||||||
|
'lib/libc/xdr/xdr_stdio.c',
|
||||||
'lib/libipsec/ipsec_dump_policy.c',
|
'lib/libipsec/ipsec_dump_policy.c',
|
||||||
'lib/libipsec/ipsec_get_policylen.c',
|
'lib/libipsec/ipsec_get_policylen.c',
|
||||||
'lib/libipsec/ipsec_strerror.c',
|
'lib/libipsec/ipsec_strerror.c',
|
||||||
|
@ -342,6 +342,14 @@ def build(bld):
|
|||||||
'freebsd/lib/libc/stdlib/strtonum.c',
|
'freebsd/lib/libc/stdlib/strtonum.c',
|
||||||
'freebsd/lib/libc/stdlib/strtoumax.c',
|
'freebsd/lib/libc/stdlib/strtoumax.c',
|
||||||
'freebsd/lib/libc/string/strsep.c',
|
'freebsd/lib/libc/string/strsep.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_array.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_float.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_mem.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_rec.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_reference.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_sizeof.c',
|
||||||
|
'freebsd/lib/libc/xdr/xdr_stdio.c',
|
||||||
'freebsd/lib/libipsec/ipsec_dump_policy.c',
|
'freebsd/lib/libipsec/ipsec_dump_policy.c',
|
||||||
'freebsd/lib/libipsec/ipsec_get_policylen.c',
|
'freebsd/lib/libipsec/ipsec_get_policylen.c',
|
||||||
'freebsd/lib/libipsec/ipsec_strerror.c',
|
'freebsd/lib/libipsec/ipsec_strerror.c',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user