From 17ce9037b16a38c792396fb02d9567ff0abd3e74 Mon Sep 17 00:00:00 2001 From: gevaerts Date: Fri, 27 Feb 2009 19:07:38 +0000 Subject: [PATCH] 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(+) diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index 17098d2b0..ffe428885 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) { -- 2.11.4.GIT