From a6a4dace7d80a15bb86a12e4dc0a05a9beae9290 Mon Sep 17 00:00:00 2001 From: borutr Date: Wed, 7 Aug 2002 21:21:30 +0000 Subject: [PATCH] - function strcasecmp() is not defined in MSC (and probably also in BORLANDC), so it is replaced with STRCASECMP, which is defined as stricmp in case of MSC and BORLANDC - solved MSC error in function aopDump() git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2061 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/z80/gen.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/z80/gen.c b/src/z80/gen.c index 03e5a780..09e50849 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -87,6 +87,12 @@ #include #include +#if defined(__BORLANDC__) || defined(_MSC_VER) +#define STRCASECMP stricmp +#else +#define STRCASECMP strcasecmp +#endif + #ifdef HAVE_SYS_ISA_DEFS_H #include #endif @@ -469,7 +475,7 @@ _emit2 (const char *inst, const char *fmt,...) static void _emitMove(const char *to, const char *from) { - if (strcasecmp(to, from) != 0) + if (STRCASECMP(to, from) != 0) { emit2("ld %s,%s", to, from); } @@ -491,6 +497,7 @@ aopDump(const char *plabel, asmop *aop) break; default: /* No information. */ + break; } } -- 2.30.2