summaryrefslogtreecommitdiff
path: root/libc/inet/ntohl.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-26 22:04:19 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-26 22:04:19 +0000
commit05e75260d6952308d7c865ff67c0e3678b7ba935 (patch)
treeac1a5d0ab7904783917b52ffa5489e8367743ff7 /libc/inet/ntohl.c
parent2fec342738cefe71910e8e8ab8636accfc5867bc (diff)
Get rid of missing prototype warnings
Diffstat (limited to 'libc/inet/ntohl.c')
-rw-r--r--libc/inet/ntohl.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/libc/inet/ntohl.c b/libc/inet/ntohl.c
index 4fbdf7096..87a034bf0 100644
--- a/libc/inet/ntohl.c
+++ b/libc/inet/ntohl.c
@@ -22,43 +22,48 @@
#include <endian.h>
#include <byteswap.h>
+uint32_t ntohl (uint32_t x);
+uint16_t ntohs (uint16_t x);
+uint32_t htonl (uint32_t x);
+uint16_t htons (uint16_t x);
+
#if __BYTE_ORDER == __BIG_ENDIAN
-extern uint32_t ntohl (uint32_t x)
+uint32_t ntohl (uint32_t x)
{
return x;
}
-extern uint16_t ntohs (uint16_t x)
+uint16_t ntohs (uint16_t x)
{
return x;
}
-extern uint32_t htonl (uint32_t x)
+uint32_t htonl (uint32_t x)
{
return x;
}
-extern uint16_t htons (uint16_t x)
+uint16_t htons (uint16_t x)
{
return x;
}
#elif __BYTE_ORDER == __LITTLE_ENDIAN
-extern uint32_t ntohl (uint32_t x)
+uint32_t ntohl (uint32_t x)
{
return __bswap_32(x);
}
-extern uint16_t ntohs (uint16_t x)
+uint16_t ntohs (uint16_t x)
{
return __bswap_16(x);
}
-extern uint32_t htonl (uint32_t x)
+uint32_t htonl (uint32_t x)
{
return __bswap_32(x);
}
-extern uint16_t htons (uint16_t x)
+uint16_t htons (uint16_t x)
{
return __bswap_16(x);
}