X86-64: Define LO_HI_LONG to skip pos_h [BZ #20349]

Define LO_HI_LONG to skip pos_h since it is ignored by kernel:

static inline loff_t pos_from_hilo(unsigned long high, unsigned long low)
{
 #define HALF_LONG_BITS (BITS_PER_LONG / 2)
        return (((loff_t)high << HALF_LONG_BITS) << HALF_LONG_BITS) | low;
}

where size of loff_t == size of long.

	[BZ #20349]
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (LO_HI_LONG): New.
This commit is contained in:
H.J. Lu 2016-07-11 15:32:10 -07:00
parent c10f90dcef
commit cf1ad5b3ad
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-07-11 H.J. Lu <hongjiu.lu@intel.com>
[BZ #20349]
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (LO_HI_LONG): New.
2016-07-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
[BZ #18707]

View File

@ -385,4 +385,8 @@
# endif
#endif
/* How to pass the off{64}_t argument on p{readv,writev}{64}. */
#undef LO_HI_LONG
#define LO_HI_LONG(val) (val)
#endif /* linux/x86_64/sysdep.h */