summaryrefslogtreecommitdiff
path: root/tools/checkwps/checkwps.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-02-27 19:07:38 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-02-27 19:07:38 +0000
commite1d80522cfbd5c523a176a6b1bdadc01a15f446c (patch)
tree33165ec6fa6f9dcea710d1d4cadfda110a87b535 /tools/checkwps/checkwps.c
parent79967c7a4998657f10ae72595f5c56a46d8dc128 (diff)
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
Diffstat (limited to 'tools/checkwps/checkwps.c')
-rw-r--r--tools/checkwps/checkwps.c7
1 files changed, 7 insertions, 0 deletions
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)
{