Browse Source

Correct some Linux/clang missing parts.

Manoel Trapier 11 years ago
parent
commit
ca57bb617b
2 changed files with 5 additions and 1 deletions
  1. 1 0
      mach/proto/as/comm0.h
  2. 4 1
      mach/proto/as/comm5.c

+ 1 - 0
mach/proto/as/comm0.h

@@ -97,6 +97,7 @@ _include	<unistd.h>
 #ifdef ASLD
 #include	"arch.h"
 #endif
+#include	"missing_proto.h"
 #include	"object.h"
 #include	"out.h"
 

+ 4 - 1
mach/proto/as/comm5.c

@@ -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)