bug-coreutils
[Top][All Lists]
Advanced

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

Re: current coreutils on MacOS X


From: Andreas Schwab
Subject: Re: current coreutils on MacOS X
Date: Fri, 01 Sep 2006 14:24:44 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> --- 404,422 ----
>   
>       case 'i':
>         {
> !     uintmax_t fsid;
> !     /* On many BSD systems, fsd.f_fsid is of type fsid_t which is a
> !        struct type:
> !           struct { int32_t val[2]; }
> !        or struct { int32_t __val[2]; }
> !        or struct { int32_t __fsid_val[2]; }.  */
> !     memcpy ((char *) &fsid, &statfsbuf->f_fsid,
> !             sizeof (statfsbuf->f_fsid) < sizeof (fsid)
> !             ? sizeof (statfsbuf->f_fsid)
> !             : sizeof (fsid));
> !     if (sizeof (statfsbuf->f_fsid) < sizeof (fsid))
> !       memset ((char *) &fsid + sizeof (statfsbuf->f_fsid), 0,
> !               sizeof (fsid) - sizeof (statfsbuf->f_fsid));

This does not handle endianess correctly if sizeof fsid != sizeof f_fsid.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]