libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT

The reason truncate64 takes 4 args on some arches is that their ABI
requires 64bit values to be aligned on register pair boundaries.
Since this alignment affects more than just truncate64, rename the
define to properly document its purpose.  This also allows us to
expand it to the other impacted syscalls (which will be done in a
follow up commit).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
mips: only define SYSCALL_ALIGN_64BIT for O32 ABIs

The 64bit register alignment issue only affects the O32 ABI, so wrap
the define accordingly.  We don't want this being used for N32 ABIs.

This doesn't directly affect the N64 ABI since these files wouldn't
even be compiled for those targets (no need for the 32bit/64bit shim).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
linux: use OFF64_HI_LO rather than __LONG_LONG_PAIR

This macro takes care of the shift/mask split for us, so no need
to open code this ourselves and then use __LONG_LONG_PAIR.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
linux: posix_fadvise: use new SYSCALL_ALIGN_64BIT

Now that we have a new SYSCALL_ALIGN_64BIT define for tracking the
64bit register shift behavior, use it.  This allows us to delete
duplicated arm/xtensa files, as well as drop a few arch ifdefs from
common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
linux: readahead: convert to SYSCALL_ALIGN_64BIT

The readahead syscall has the 64bit register align issue for all
arches.  Only mips was handling this though.

Clean up the common readahead.c to use the SYSCALL_ALIGN_64BIT
define so that we can throw away the mips version and make this
work correctly on arm/ppc/xtensa.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
linux: pread/write: convert to SYSCALL_ALIGN_64BIT

The pread64/write64 syscalls have the 64bit register align issue for
all arches.  Use this new define so we can merge the powerc/xtensa
versions back into the common code.

SuperH is funky and also allows us to do this.

We should be able to merge the mips version too, but that'll require
someone to take a closer look as the current stuff doesn't look quite
right.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>