Use headers defined in the C[++] standards:
[fw/sdcc] / as / z80 / assym.c
index 3285265f813665a52cde841150f9795cb5e3ee4b..dadce441f877dc1f2c63538fbbd4f8355910222f 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#include <stdlib.h>
+#if defined(__APPLE__) && defined(__MACH__)
+#include <sys/types.h>
+#include <sys/malloc.h>
+#else
 #include <malloc.h>
-
-//#if defined(_MSC_VER)
-//#include <malloc.h>
-//#else
-//#include <alloc.h>
-//#endif
-
+#endif
 #include "asm.h"
 
 /*)Module      assym.c
@@ -360,7 +359,7 @@ register char *p1, *p2;
                if (*p1++ != *p2++)
                        return (0);
 #else
-               if (ccase[*p1++] != ccase[*p2++])
+               if (ccase[(unsigned char)(*p1++)] != ccase[(unsigned char)(*p2++)])
                        return (0);
 #endif
 
@@ -403,7 +402,7 @@ register char *p;
 #if    CASE_SENSITIVE
                h += *p++;
 #else
-               h += ccase[*p++];
+               h += ccase[(unsigned char)(*p++)];
 #endif
 
        } while (--n);