* sunrpc/xdr.c (xdr_int): test for sizeof(int)==4 to determine
whether xdr_long or xdr_short should be used to encode an int.
Notice that an xdr_long is 4 bytes independent of the architecture
(otherwise no Alpha could interoperate with existing NFS servers,
for example). Ditto for enums.
(void) (xdr_short(xdrs, (short *)ip));
return (xdr_long(xdrs, (long *)ip));
#else
(void) (xdr_short(xdrs, (short *)ip));
return (xdr_long(xdrs, (long *)ip));
#else
- if (sizeof (int) == sizeof (long)) {
+ if (sizeof (int) == 4) {
return (xdr_long(xdrs, (long *)ip));
} else {
return (xdr_short(xdrs, (short *)ip));
return (xdr_long(xdrs, (long *)ip));
} else {
return (xdr_short(xdrs, (short *)ip));
(void) (xdr_short(xdrs, (short *)up));
return (xdr_u_long(xdrs, (u_long *)up));
#else
(void) (xdr_short(xdrs, (short *)up));
return (xdr_u_long(xdrs, (u_long *)up));
#else
- if (sizeof (u_int) == sizeof (u_long)) {
+ if (sizeof (u_int) == 4) {
return (xdr_u_long(xdrs, (u_long *)up));
} else {
return (xdr_short(xdrs, (short *)up));
return (xdr_u_long(xdrs, (u_long *)up));
} else {
return (xdr_short(xdrs, (short *)up));
/*
* enums are treated as ints
*/
/*
* enums are treated as ints
*/
- if (sizeof (enum sizecheck) == sizeof (long)) {
+ if (sizeof (enum sizecheck) == 4) {
return (xdr_long(xdrs, (long *)ep));
} else if (sizeof (enum sizecheck) == sizeof (short)) {
return (xdr_short(xdrs, (short *)ep));
return (xdr_long(xdrs, (long *)ep));
} else if (sizeof (enum sizecheck) == sizeof (short)) {
return (xdr_short(xdrs, (short *)ep));