replace static functions by macros, because otherwise every unused function

would warn. Bad thing for all -Werror folks out there.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3521 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi 2008-08-19 17:46:02 +00:00 committed by Stefan Reinauer
parent 59fb9a2bfa
commit 0e4671e305
1 changed files with 6 additions and 11 deletions

View File

@ -30,17 +30,12 @@
#ifndef _ARCH_ENDIAN_H #ifndef _ARCH_ENDIAN_H
#define _ARCH_ENDIAN_H #define _ARCH_ENDIAN_H
static u32 ntohl(u32 in) #include <arch/types.h>
{
return ((in & 0xFF) << 24) | ((in & 0xFF00) << 8) |
((in & 0xFF0000) >> 8) | ((in & 0xFF000000) >> 24);
}
static u64 ntohll(u64 in) #define ntohw(in) ((( (in) & 0xFF) << 8) | (( (in) & 0xFF00) >> 8))
{
u32 h = in >> 32;
u32 l = in & 0xFFFFFFFF;
return (((u64) ntohl(l) << 32) | ((u64) ntohl(h))); #define ntohl(in) ((( (in) & 0xFF) << 24) | (( (in) & 0xFF00) << 8) | \
} (( (in) & 0xFF0000) >> 8) | (( (in) & 0xFF000000) >> 24))
#define ntohll(in) (((u64) ntohl( (in) & 0xFFFFFFFF) << 32) | ((u64) ntohl( (in) >> 32)))
#endif #endif