From e1d80522cfbd5c523a176a6b1bdadc01a15f446c Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Fri, 27 Feb 2009 19:07:38 +0000 Subject: Newer glibc has letoh16 and friends, so use them if available git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20128 a1c6a512-1295-4272-9138-f99709370657 --- tools/checkwps/checkwps.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/checkwps/checkwps.c') diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 17098d2b06..ffe428885d 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c @@ -43,6 +43,8 @@ const int nb_settings = 0; (((unsigned long)(x) & 0xff0000ul) >> 8) | \ (((unsigned long)(x) & 0xff00ul) << 8) | \ ((unsigned long)(x) << 24))) + +#ifndef letoh16 unsigned short letoh16(unsigned short x) { unsigned short n = 0x1234; @@ -56,7 +58,9 @@ unsigned short letoh16(unsigned short x) return SWAP_16(x); } } +#endif +#ifndef letoh32 unsigned short letoh32(unsigned short x) { unsigned short n = 0x1234; @@ -70,7 +74,9 @@ unsigned short letoh32(unsigned short x) return SWAP_32(x); } } +#endif +#ifndef htole32 unsigned int htole32(unsigned int x) { unsigned short n = 0x1234; @@ -84,6 +90,7 @@ unsigned int htole32(unsigned int x) return SWAP_32(x); } } +#endif int read_line(int fd, char* buffer, int buffer_size) { -- cgit