From 12c879f8bf002fdeeb0f598fe1909e495dbb7901 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 22 Mar 2005 09:14:36 +0000 Subject: * sunrpc/xdr_stdio.c (xdrstdio_getlong, xdrstdio_putlong): Convert correctly between long/int on 64bit big-endian. --- ChangeLog | 5 +++++ localedata/ChangeLog | 4 ++++ localedata/charmaps/WINDOWS-31J | 2 +- sunrpc/xdr_stdio.c | 12 ++++++------ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9f2f46..92e4872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-21 Thorsten Kukuk + + * sunrpc/xdr_stdio.c (xdrstdio_getlong, xdrstdio_putlong): + Convert correctly between long/int on 64bit big-endian. + 2005-03-21 David Mosberger * sysdeps/ia64/_mcount.S: Newer kernels don't like register-frames diff --git a/localedata/ChangeLog b/localedata/ChangeLog index e67b24a..e454cd0 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,7 @@ +2005-03-21 Jakub Jelinek + + * charmaps/WINDOWS-31J: Add % before alias keyword. + 2005-02-27 Denis Barbier [BZ #38] diff --git a/localedata/charmaps/WINDOWS-31J b/localedata/charmaps/WINDOWS-31J index 76316c5..d5ab12a 100644 --- a/localedata/charmaps/WINDOWS-31J +++ b/localedata/charmaps/WINDOWS-31J @@ -8,7 +8,7 @@ % MORIYAMA Masayuki , 2003. % Last changed: 2003-07-18 -alias CP932 +% alias CP932 CHARMAP /x00 NULL diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c index 4daa062..e73c5a5 100644 --- a/sunrpc/xdr_stdio.c +++ b/sunrpc/xdr_stdio.c @@ -108,20 +108,20 @@ xdrstdio_destroy (XDR *xdrs) static bool_t xdrstdio_getlong (XDR *xdrs, long *lp) { - int32_t mycopy; + u_int32_t mycopy; - if (fread ((caddr_t) & mycopy, 4, 1, (FILE *) xdrs->x_private) != 1) + if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1) return FALSE; - *lp = (int32_t) ntohl (mycopy); + *lp = (long) ntohl (mycopy); return TRUE; } static bool_t xdrstdio_putlong (XDR *xdrs, const long *lp) { - long mycopy = htonl (*lp); - lp = &mycopy; - if (fwrite ((caddr_t) lp, 4, 1, (FILE *) xdrs->x_private) != 1) + int32_t mycopy = htonl ((u_int32_t) *lp); + + if (fwrite ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1) return FALSE; return TRUE; } -- cgit v1.1