Correct some Linux/clang missing parts.
authorManoel Trapier <godzil@godzil.net>
Thu, 21 Mar 2013 09:25:29 +0000 (10:25 +0100)
committerManoël Trapier <godzil@MacBook-Pro.home>
Wed, 24 Jun 2015 22:41:48 +0000 (23:41 +0100)
mach/proto/as/comm0.h
mach/proto/as/comm5.c

index bda2d7b..acda1e6 100644 (file)
@@ -97,6 +97,7 @@ _include      <unistd.h>
 #ifdef ASLD
 #include       "arch.h"
 #endif
+#include       "missing_proto.h"
 #include       "object.h"
 #include       "out.h"
 
index 0e572a2..35d9457 100644 (file)
@@ -9,6 +9,9 @@
 #include       "comm1.h"
 #include       "y.tab.h"
 
+/* Since isascii is not standard, as c89 or C99, privide another method */
+#define IsAscii(_c) (((_c) & ~0x7f) == 0)
+
 extern YYSTYPE yylval;
 
 int yylex()
@@ -221,7 +224,7 @@ int nextchar()
 #endif
        if ((c = getc(input)) == EOF)
                return(0);
-       if (isascii(c) == 0)
+       if (IsAscii(c) == 0)
                fatal("non-ascii character");
 #ifdef LISTING
        if (listflag & 0440)