From 05e75260d6952308d7c865ff67c0e3678b7ba935 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 26 Jan 2006 22:04:19 +0000 Subject: Get rid of missing prototype warnings --- libc/inet/ntohl.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'libc/inet/ntohl.c') 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 #include +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); } -- cgit v1.2.3