From: Alan Cox Date: Sun, 8 Feb 2015 00:35:47 +0000 (+0000) Subject: z80: fix if/endifs for non SDCC case X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9de74ab1dab113cc72024de7328df1e27dd0d1c9;p=FUZIX.git z80: fix if/endifs for non SDCC case --- diff --git a/Kernel/cpu-z80/cpu.h b/Kernel/cpu-z80/cpu.h index 2d41d264..aa91ccf5 100644 --- a/Kernel/cpu-z80/cpu.h +++ b/Kernel/cpu-z80/cpu.h @@ -32,6 +32,14 @@ extern void irqrestore(irqflags_t f); #define strncpy(dst, src, n) __builtin_strncpy(dst, src, n) #define strchr(s, c) __builtin_strchr(s, c) #define memset(dst, c, n) __builtin_memset(dst, c, n) +#else +typedef uint16_t size_t; +extern void *memcpy(void *dest, const void *src, size_t n); +extern char *strcpy(char *dest, const char *src); +extern char *strncpy(char *dest, const char *src, size_t n); +extern char *strchr(const char *s, int c); +extern void *memset(void *dest, int c, size_t n); +#endif extern int16_t strlen(const char *p); @@ -73,4 +81,3 @@ typedef union { /* this structure is endian dependent */ /* Do not use COMMON_MEMORY except for __asm code blocks. The SDCC helpers are not loaded into common */ #define COMMON_MEMORY static void COMMONSEG(void) __naked { __asm .area _COMMONMEM __endasm; } -#endif