tools/include: Add byteshift headers for endian access
authorMatt Fleming <matt.fleming@intel.com>
Tue, 28 Feb 2012 13:37:20 +0000 (13:37 +0000)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 28 Feb 2012 18:22:51 +0000 (10:22 -0800)
commita07f7672d7cf0ff0d6e548a9feb6e0bd016d9c6c
tree656594c3fb97e31ed6a207d8ba9a5dda026aa04f
parent6b21d18ed50c7d145220b0724ea7f2613abf0f95
tools/include: Add byteshift headers for endian access

There are various hostprogs in the kernel that are rolling their own
implementations of {get,put}_unaligned_le*(). Copy the byteshift
headers from include/linux/unaligned so that they can all use a single
implementation.

This requires changing some of the data types to the userspace
exported ones (u32 -> __u32, etc).

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-2-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
tools/include/tools/be_byteshift.h [new file with mode: 0644]
tools/include/tools/le_byteshift.h [new file with mode: 0644]