From b64e62d57182e247117707cfe6e93e5e62c237bf Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 13 Jan 2016 18:39:55 +0000 Subject: [PATCH] cpu-z80: add ntohl --- Kernel/cpu-z80/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/cpu-z80/cpu.h b/Kernel/cpu-z80/cpu.h index 9e5fe12a..6c18da17 100644 --- a/Kernel/cpu-z80/cpu.h +++ b/Kernel/cpu-z80/cpu.h @@ -82,3 +82,5 @@ typedef union { /* this structure is endian dependent */ #define COMMON_MEMORY static void COMMONSEG(void) __naked { __asm .area _COMMONMEM __endasm; } #define ntohs(x) ((((x) & 0xFF) << 8) | (((x) & 0xFF00) >> 8)) +#define ntohl(x) ((((x) & 0xFF) << 24) | (((x) & 0xFF00) << 8) | \ + (((x) & 0xFF0000) >> 8) | (((x >> 24) & 0xFF))) -- 2.34.1