1 From: "Peter S. Mazinger" <ps.m@gmx.net>
2 Date: Thu, 21 Apr 2011 21:20:55 +0200
3 Subject: [PATCH] endian.h: add some handy macros to be used in syscalls
5 Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
6 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
10 +++ b/include/endian.h
12 # define __LONG_LONG_PAIR(HI, LO) HI, LO
16 +# ifndef __ASSEMBLER__
18 +# define OFF_HI(offset) (offset >> 31)
19 +# define OFF_LO(offset) (offset)
20 +# define OFF64_HI(offset) (uint32_t)(offset >> 32)
21 +# define OFF64_LO(offset) (uint32_t)(offset & 0xffffffff)
22 +# define OFF_HI_LO(offset) __LONG_LONG_PAIR(OFF_HI(offset), OFF_LO(offset))
23 +# define OFF64_HI_LO(offset) __LONG_LONG_PAIR(OFF64_HI(offset), OFF64_LO(offset))
28 /* Conversion interfaces. */