This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: eliminate some endian #ifs


On Thu, Jul 06, 2000 at 02:43:20PM -0700, Greg McGary wrote:
> Thanks.  Here's the revised def'n:
> 
> 
> /* This macro intended to break apart a off64_t into two 32-bit off_t
>    halves, presented as a comma-separated pair for subsequent passing
>    as separate arguments to INLINE_SYSCALL, in an order determined by
>    __BYTE_ORDER.  Note that we cast LL to unsigned types.  off_t and
>    off64_t are signed, but pread and pwrite internally convert
>    negative 32-bit quantities to unsigned 64-bit.  */
> 
> #define __LONG_LONG_SPLIT(LL) \
>   __LONG_LONG_PAIR ((uint32_t) (((uint64_t) (LL)) >> 32), \
> 		    (uint64_t) ((LL) & 0xffffffff))
			 ^^
			 32

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]