I just hate to be pushed around by some @#$%^& machine.
diff --git a/include/9p.h b/include/9p.h
index f83dce0..b6e959b 100644
--- a/include/9p.h
+++ b/include/9p.h
@@ -39,7 +39,7 @@
 struct Fid
 {
 	ulong	fid;
-	char		omode;	/* -1 = not open */
+	int		omode;	/* -1 = not open */
 	File*		file;
 	char*	uid;
 	Qid		qid;
diff --git a/include/mach.h b/include/mach.h
index 05b6337..e39d502 100644
--- a/include/mach.h
+++ b/include/mach.h
@@ -481,7 +481,7 @@
 			uint locals;
 			char *dir;
 			char *file;
-			char frameptr;
+			schar frameptr;
 			uint framesize;
 		} stabs;
 	} u;
diff --git a/src/cmd/calendar.c b/src/cmd/calendar.c
index ba86ab3..778c760 100644
--- a/src/cmd/calendar.c
+++ b/src/cmd/calendar.c
@@ -174,7 +174,7 @@
 upper2lower(char *to, char *from, int len)
 {
 	while(--len>0 && *from!='\0')
-		*to++ = tolower(*from++);
+		*to++ = tolower((uchar)*from++);
 	*to = 0;
 }
 
diff --git a/src/cmd/fmt.c b/src/cmd/fmt.c
index e43731e..59c1413 100644
--- a/src/cmd/fmt.c
+++ b/src/cmd/fmt.c
@@ -175,7 +175,7 @@
 	n = strlen(s);
 	if(n < 2)
 		return 1;
-	if(isupper(s[0]) && n < 4)
+	if(isupper((uchar)s[0]) && n < 4)
 		return 1;
 	if(strchr(".!?", s[n-1]) != nil)
 		return 2;
diff --git a/src/cmd/hget.c b/src/cmd/hget.c
index 8fa1432..1cd11ab 100644
--- a/src/cmd/hget.c
+++ b/src/cmd/hget.c
@@ -712,7 +712,7 @@
 			tm.mon = 5;
 	} else {
 		for(p = month; *p; p++)
-			*p = tolower(*p);
+			*p = tolower((uchar)*p);
 		for(i = 0; i < 12; i++)
 			if(strncmp(&monthchars[i*3], month, 3) == 0){
 				tm.mon = i;
@@ -732,7 +732,7 @@
 				tm.sec = strtoul(p, &p, 10);
 			}
 		}
-		if(tolower(*p) == 'p')
+		if(tolower((uchar)*p) == 'p')
 			tm.hour += 12;
 	}
 
@@ -1129,7 +1129,7 @@
 	p = strchr(msg, '(');
 	if(p == nil){
 		for(p = msg+3; *p; p++)
-			if(isdigit(*p))
+			if(isdigit((uchar)*p))
 				break;
 	} else
 		p++;
@@ -1253,7 +1253,7 @@
 cistrncmp(char *a, char *b, int n)
 {
 	while(n-- > 0){
-		if(tolower(*a++) != tolower(*b++))
+		if(tolower((uchar)*a++) != tolower((uchar)*b++))
 			return -1;
 	}
 	return 0;
diff --git a/src/cmd/join.c b/src/cmd/join.c
index 1739ef5..9ce127f 100644
--- a/src/cmd/join.c
+++ b/src/cmd/join.c
@@ -355,7 +355,7 @@
 			break;
 		case '1':
 		case '2':
-			if(s[1] == '.' && isdigit(s[2])) {
+			if(s[1] == '.' && isdigit((uchar)s[2])) {
 				olistf[no] = *s=='1'? F1: F2;
 				olist[no] = atoi(s += 2);
 				break;
diff --git a/src/cmd/split.c b/src/cmd/split.c
index c4025e2..e758786 100644
--- a/src/cmd/split.c
+++ b/src/cmd/split.c
@@ -166,7 +166,7 @@
 		fline = realloc(fline,n+1);
 		linesize = n+1;
 	}
-	for(t=fline; *t++ = tolower(*s++); )
+	for(t=fline; *t++ = tolower((uchar)*s++); )
 		continue;
 		/* we assume the 'A'-'Z' only appear as themselves
 		 * in a utf encoding.
diff --git a/src/cmd/tail.c b/src/cmd/tail.c
index db29986..b40552b 100644
--- a/src/cmd/tail.c
+++ b/src/cmd/tail.c
@@ -331,7 +331,7 @@
 {
 	if(*s=='-' || *s=='+')
 		s++;
-	if(!isdigit(*s))
+	if(!isdigit((uchar)*s))
 		return 0;
 	if(s[-1] == '+')
 		origin = BEG;
@@ -340,7 +340,7 @@
 	count = atol(s);
 
 	/* check range of count */
-	if(count < 0 ||	(int)count != count)
+	if(count < 0 || (int)count != count)
 		fatal("too big");
 	return 1;
 }	
diff --git a/src/cmd/uniq.c b/src/cmd/uniq.c
index 122fb5e..88fb928 100644
--- a/src/cmd/uniq.c
+++ b/src/cmd/uniq.c
@@ -34,7 +34,7 @@
 	f = 0;
 	while(argc > 1) {
 		if(*argv[1] == '-') {
-			if(isdigit(argv[1][1]))
+			if(isdigit((uchar)argv[1][1]))
 				fields = atoi(&argv[1][1]);
 			else
 				mode = argv[1][1];
diff --git a/src/lib9/encodefmt.c b/src/lib9/encodefmt.c
index 7c4a589..9445809 100644
--- a/src/lib9/encodefmt.c
+++ b/src/lib9/encodefmt.c
@@ -57,7 +57,7 @@
 		rv = enc16(out, len, b, ilen);
 		if(rv >= 0 && (f->flags & FmtLong))
 			for(p = buf; *p; p++)
-				*p = tolower(*p);
+				*p = tolower((uchar)*p);
 		break;
 	default:
 		rv = -1;
diff --git a/src/libString/s_tolower.c b/src/libString/s_tolower.c
index 737fff1..895f14c 100644
--- a/src/libString/s_tolower.c
+++ b/src/libString/s_tolower.c
@@ -11,5 +11,5 @@
 	char *cp;
 
 	for(cp=sp->ptr; *cp; cp++)
-		*cp = tolower(*cp);
+		*cp = tolower((uchar)*cp);
 }
diff --git a/src/libdraw/chan.c b/src/libdraw/chan.c
index 1677c5b..5e94b01 100644
--- a/src/libdraw/chan.c
+++ b/src/libdraw/chan.c
@@ -38,10 +38,10 @@
 
 	c = 0;
 	p=s;
-	while(*p && isspace(*p))
+	while(*p && isspace((uchar)*p))
 		p++;
 
-	while(*p && !isspace(*p)){
+	while(*p && !isspace((uchar)*p)){
 		if((q = strchr(channames, p[0])) == nil) 
 			return 0;
 		t = q-channames;
diff --git a/src/libdraw/x11-init.c b/src/libdraw/x11-init.c
index 741d367..537920d 100644
--- a/src/libdraw/x11-init.c
+++ b/src/libdraw/x11-init.c
@@ -880,7 +880,7 @@
 	i = strtol(s, &s, 0);
 	if(*s == 'x'){
 		s++;
-		if(!isdigit(*s))
+		if(!isdigit((uchar)*s))
 			goto oops;
 		j = strtol(s, &s, 0);
 		r->max.x = i;
@@ -891,13 +891,13 @@
 			goto oops;
 
 		s++;
-		if(!isdigit(*s))
+		if(!isdigit((uchar)*s))
 			goto oops;
 		i = strtol(s, &s, 0);
 		if(*s != ',' && *s != ' ')
 			goto oops;
 		s++;
-		if(!isdigit(*s))
+		if(!isdigit((uchar)*s))
 			goto oops;
 		j = strtol(s, &s, 0);
 		if(*s != 0)
@@ -911,19 +911,19 @@
 	if(c != ' ' && c != ',')
 		goto oops;
 	s++;
-	if(!isdigit(*s))
+	if(!isdigit((uchar)*s))
 		goto oops;
 	j = strtol(s, &s, 0);
 	if(*s != c)
 		goto oops;
 	s++;
-	if(!isdigit(*s))
+	if(!isdigit((uchar)*s))
 		goto oops;
 	k = strtol(s, &s, 0);
 	if(*s != c)
 		goto oops;
 	s++;
-	if(!isdigit(*s))
+	if(!isdigit((uchar)*s))
 		goto oops;
 	l = strtol(s, &s, 0);
 	if(*s != 0)
diff --git a/src/libmach/mach386.c b/src/libmach/mach386.c
index b47fcd5..1fffaae 100644
--- a/src/libmach/mach386.c
+++ b/src/libmach/mach386.c
@@ -327,9 +327,9 @@
 	char	asize;		/* address size 'W' or 'L' */
 	uchar	mod;		/* bits 6-7 of mod r/m field */
 	uchar	reg;		/* bits 3-5 of mod r/m field */
-	char	ss;		/* bits 6-7 of SIB */
-	char	index;		/* bits 3-5 of SIB */
-	char	base;		/* bits 0-2 of SIB */
+	schar	ss;		/* bits 6-7 of SIB */
+	schar	index;		/* bits 3-5 of SIB */
+	schar	base;		/* bits 0-2 of SIB */
 	short	seg;		/* segment of far address */
 	ulong	disp;		/* displacement */
 	ulong 	imm;		/* immediate */
diff --git a/src/libndb/ipattr.c b/src/libndb/ipattr.c
index d23d5ee..70f3873 100644
--- a/src/libndb/ipattr.c
+++ b/src/libndb/ipattr.c
@@ -15,11 +15,11 @@
 
 	for(p = name; *p; p++){
 		c = *p;
-		if(isdigit(c))
+		if(isdigit((uchar)c))
 			continue;
-		if(isxdigit(c))
+		if(isxdigit((uchar)c))
 			hex = 1;
-		else if(isalpha(c) || c == '-')
+		else if(isalpha((uchar)c) || c == '-')
 			alpha = 1;
 		else if(c == '.')
 			dot = 1;