]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/nfs/xdr_subs.h
xnu-1456.1.26.tar.gz
[apple/xnu.git] / bsd / nfs / xdr_subs.h
index be5c6444c81699a1be0d2fb94c587e8736b21118..9a399db194b20d6d0f31a578679ef19e395d7be3 100644 (file)
  * but we cannot count on their alignment anyway.
  */
 
-#define        fxdr_unsigned(t, v)     ((t)ntohl((long)(v)))
-#define        txdr_unsigned(v)        (htonl((long)(v)))
+#define        fxdr_unsigned(t, v)     ((t)ntohl((uint32_t)(v)))
+#define        txdr_unsigned(v)        (htonl((uint32_t)(v)))
 
 #define        fxdr_hyper(f, t) { \
-       ((long *)(t))[_QUAD_HIGHWORD] = ntohl(((long *)(f))[0]); \
-       ((long *)(t))[_QUAD_LOWWORD] = ntohl(((long *)(f))[1]); \
+       ((uint32_t *)(t))[_QUAD_HIGHWORD] = ntohl(((uint32_t *)(f))[0]); \
+       ((uint32_t *)(t))[_QUAD_LOWWORD] = ntohl(((uint32_t *)(f))[1]); \
 }
 #define        txdr_hyper(f, t) { \
-       ((long *)(t))[0] = htonl(((long *)(f))[_QUAD_HIGHWORD]); \
-       ((long *)(t))[1] = htonl(((long *)(f))[_QUAD_LOWWORD]); \
+       ((uint32_t *)(t))[0] = htonl(((uint32_t *)(f))[_QUAD_HIGHWORD]); \
+       ((uint32_t *)(t))[1] = htonl(((uint32_t *)(f))[_QUAD_LOWWORD]); \
 }
 
 #endif /* __APPLE_API_PRIVATE */