diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 21:14:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-07 21:14:57 -0400 |
commit | b6420ebd4a541455a75f9802f58cfa3ba0ea5390 (patch) | |
tree | 0abbd397c009a696bc8f33d36666aa95752caae8 /tools | |
parent | d29010694c7e78dadc0e3862b29481e0c4b48f04 (diff) | |
parent | 0415447aa3b4decc2c05dfc45a0aa34a5eb4fc54 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/doc
Pull documentation updates from Jiri Kosina:
"Updates to kernel documentation.
I took this over (hopefully temporarily) from Randy who was not
willing to maintain it any longer. This pile mostly is a relay of
queue that Randy already had in his tree"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/doc:
Documentation: fix broken v4l-utils URL
Documentation: update include path for mpssd
Documentation: correct parameter error for dma_mapping_error
MAINTAINERS: update location of linux-doc tree
Documentation: remove networking/.gitignore
tools: add more endian.h macros
Make Documenation depend on headers_install
Docs: this_cpu_ops: remove redundant add forms
Documentation: disable vdso_test to avoid breakage with old glibc
Documentation: update vDSO makefile to build portable examples
Documentation: update .gitignore files
Documentation: support glibc versions without htole macros
v4l2-pci-skeleton: Only build if PCI is available
Documentation: fix misc. warnings
Documentation: make functions static to avoid prototype warnings
Documentation: add makefiles for more targets
Documentation: use subdir-y to avoid unnecessary built-in.o files
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/tools/endian.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tools/include/tools/endian.h b/tools/include/tools/endian.h new file mode 100644 index 000000000000..8001194008da --- /dev/null +++ b/tools/include/tools/endian.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #ifndef _TOOLS_ENDIAN_H | ||
2 | #define _TOOLS_ENDIAN_H | ||
3 | |||
4 | #include <byteswap.h> | ||
5 | |||
6 | #if __BYTE_ORDER == __LITTLE_ENDIAN | ||
7 | |||
8 | #ifndef htole16 | ||
9 | #define htole16(x) (x) | ||
10 | #endif | ||
11 | #ifndef htole32 | ||
12 | #define htole32(x) (x) | ||
13 | #endif | ||
14 | #ifndef htole64 | ||
15 | #define htole64(x) (x) | ||
16 | #endif | ||
17 | |||
18 | #ifndef le16toh | ||
19 | #define le16toh(x) (x) | ||
20 | #endif | ||
21 | |||
22 | #ifndef le32toh | ||
23 | #define le32toh(x) (x) | ||
24 | #endif | ||
25 | |||
26 | #ifndef le64toh | ||
27 | #define le64toh(x) (x) | ||
28 | #endif | ||
29 | |||
30 | #else /* __BYTE_ORDER */ | ||
31 | |||
32 | #ifndef htole16 | ||
33 | #define htole16(x) __bswap_16(x) | ||
34 | #endif | ||
35 | #ifndef htole32 | ||
36 | #define htole32(x) __bswap_32(x) | ||
37 | #endif | ||
38 | #ifndef htole64 | ||
39 | #define htole64(x) __bswap_64(x) | ||
40 | #endif | ||
41 | |||
42 | #ifndef le16toh | ||
43 | #define le16toh(x) __bswap_16(x) | ||
44 | #endif | ||
45 | |||
46 | #ifndef le32toh | ||
47 | #define le32toh(x) __bswap_32(x) | ||
48 | #endif | ||
49 | |||
50 | #ifndef le64toh | ||
51 | #define le64toh(x) __bswap_64(x) | ||
52 | #endif | ||
53 | |||
54 | #endif | ||
55 | |||
56 | #endif /* _TOOLS_ENDIAN_H */ | ||