Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/rpc Skip Solaris ILP32 A...



details:   https://anonhg.NetBSD.org/src/rev/65ab9f0a0b2d
branches:  trunk
changeset: 807461:65ab9f0a0b2d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Apr 11 03:23:37 2015 +0000

description:
Skip Solaris ILP32 ABI compatibility shenanigans from upstream.

diffstat:

 external/cddl/osnet/dist/uts/common/rpc/xdr.h |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (71 lines):

diff -r 8402fa35e1cd -r 65ab9f0a0b2d external/cddl/osnet/dist/uts/common/rpc/xdr.h
--- a/external/cddl/osnet/dist/uts/common/rpc/xdr.h     Sat Apr 11 03:22:36 2015 +0000
+++ b/external/cddl/osnet/dist/uts/common/rpc/xdr.h     Sat Apr 11 03:23:37 2015 +0000
@@ -156,10 +156,13 @@
  * xdr_ops
  * Changes must be reviewed by Solaris File Sharing
  * Changes must be communicated to contract-2003-523%sun.com@localhost
+ *
+ * XXX We are not Solaris, we are NetBSD.  So no need for silly ABI
+ * compatibility with Solaris ILP32 gunk.
  */
 struct xdr_ops {
 #ifdef __STDC__
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(__NetBSD__)
                bool_t  (*x_getlong)(struct XDR *, long *);
                /* get a long from underlying stream */
                bool_t  (*x_putlong)(struct XDR *, long *);
@@ -178,14 +181,14 @@
                void    (*x_destroy)(struct XDR *);
                /* free privates of this xdr_stream */
                bool_t  (*x_control)(struct XDR *, int, void *);
-#if defined(_LP64) || defined(_KERNEL)
+#if defined(_LP64) || defined(_KERNEL) || defined(__NetBSD__)
                bool_t  (*x_getint32)(struct XDR *, int32_t *);
                /* get a int from underlying stream */
                bool_t  (*x_putint32)(struct XDR *, int32_t *);
                /* put an int to " */
 #endif /* _LP64 || _KERNEL */
 #else
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(__NetBSD__)
                bool_t  (*x_getlong)(); /* get a long from underlying stream */
                bool_t  (*x_putlong)(); /* put a long to " */
 #endif /* KERNEL */
@@ -197,7 +200,7 @@
                                /* buf quick ptr to buffered data */
                void    (*x_destroy)(); /* free privates of this xdr_stream */
                bool_t  (*x_control)();
-#if defined(_LP64) || defined(_KERNEL)
+#if defined(_LP64) || defined(_KERNEL) || defined(__NetBSD__)
                bool_t  (*x_getint32)();
                bool_t  (*x_putint32)();
 #endif /* _LP64 || defined(_KERNEL) */
@@ -213,7 +216,7 @@
  * uint_t       len;
  * uint_t       pos;
  */
-#if !defined(_KERNEL)
+#if !defined(_KERNEL) && !defined(__NetBSD__)
 #define        XDR_GETLONG(xdrs, longp)                        \
        (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
 #define        xdr_getlong(xdrs, longp)                        \
@@ -226,7 +229,7 @@
 #endif /* KERNEL */
 
 
-#if !defined(_LP64) && !defined(_KERNEL)
+#if !defined(_LP64) && !defined(_KERNEL) && !defined(__NetBSD__)
 
 /*
  * For binary compatability on ILP32 we do not change the shape
@@ -367,7 +370,7 @@
 #define        IXDR_GET_U_INT32(buf)           ((uint32_t)IXDR_GET_INT32(buf))
 #define        IXDR_PUT_U_INT32(buf, v)        IXDR_PUT_INT32((buf), ((int32_t)(v)))
 
-#if !defined(_KERNEL) && !defined(_LP64)
+#if !defined(_KERNEL) && !defined(_LP64) && !defined(__NetBSD__)
 
 #define        IXDR_GET_LONG(buf)              ((long)ntohl((ulong_t)*(buf)++))
 #define        IXDR_PUT_LONG(buf, v)           (*(buf)++ = (long)htonl((ulong_t)v))



Home | Main Index | Thread Index | Old Index