Patchwork [08/10] introduce leul_to_cpu

login
register
mail settings
Submitter Marcelo Tosatti
Date April 26, 2010, 5:59 p.m.
Message ID <ca4e9529552a54134f614d076adc7b6fed43746b.1272304746.git.mtosatti@redhat.com>
Download mbox | patch
Permalink /patch/50990/
State New
Headers show

Comments

Marcelo Tosatti - April 26, 2010, 5:59 p.m.
To be used by next patch.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
 bswap.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/bswap.h b/bswap.h
index aace9b7..956f3fa 100644
--- a/bswap.h
+++ b/bswap.h
@@ -205,8 +205,10 @@  static inline void cpu_to_be32wu(uint32_t *p, uint32_t v)
 
 #ifdef HOST_WORDS_BIGENDIAN
 #define cpu_to_32wu cpu_to_be32wu
+#define leul_to_cpu(v) le ## HOST_LONG_BITS ## _to_cpu(v)
 #else
 #define cpu_to_32wu cpu_to_le32wu
+#define leul_to_cpu(v) (v)
 #endif
 
 #undef le_bswap