diff --git a/src/cpp.c b/src/cpp.c
index 27ff3d07b72e81e0195ea5a990ebff08b6ebcd75..d2455504c31a589eec9746751652eef684f269e5 100644
--- a/src/cpp.c
+++ b/src/cpp.c
@@ -1154,7 +1154,7 @@ static INT32 low_cpp(struct cpp *this,
 	      if(GOBBLE('#'))
 	      {
 		extra=DEF_ARG_NOPRESPACE;
-		while(str.s.len && isspace(str.s.str[str.s.len-1]))
+		while(str.s.len && isspace(((unsigned char *)str.s.str)[str.s.len-1]))
 		  str.s.len--;
 		if(!str.s.len && sp-partbase>1)
 		{
@@ -1852,7 +1852,7 @@ static void check_constant(struct cpp *this,
   char *data=args[0].arg;
   int res,dlen,len=args[0].len;
 
-  while(len && isspace(data[0])) { data++; len--; }
+  while(len && isspace(((unsigned char *)data)[0])) { data++; len--; }
 
   if(!len)
     cpp_error(this,"#if constant() with empty argument.\n");
@@ -1884,7 +1884,7 @@ static void check_constant(struct cpp *this,
     data+=dlen;
     len-=dlen;
   
-    while(len && isspace(data[0])) { data++; len--; }
+    while(len && isspace(((unsigned char *)data)[0])) { data++; len--; }
 
     if(!len) break;
 
@@ -1893,7 +1893,7 @@ static void check_constant(struct cpp *this,
       data++;
       len--;
       
-      while(len && isspace(data[0])) { data++; len--; }
+      while(len && isspace(((unsigned char *)data)[0])) { data++; len--; }
 
       for(dlen=0;dlen<len;dlen++)
 	if(!isidchar(data[dlen]))
diff --git a/src/modules/Image/encodings/gif.c b/src/modules/Image/encodings/gif.c
index 9651a98eff176dde0e5641dfb89fff0a1def4535..d6443411c17a5df27a1bbf43a71be680a1e36d27 100644
--- a/src/modules/Image/encodings/gif.c
+++ b/src/modules/Image/encodings/gif.c
@@ -1,9 +1,9 @@
-/* $Id: gif.c,v 1.27 1998/01/18 22:15:33 mirar Exp $ */
+/* $Id: gif.c,v 1.28 1998/01/20 15:53:17 grubba Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: gif.c,v 1.27 1998/01/18 22:15:33 mirar Exp $
+**!	$Id: gif.c,v 1.28 1998/01/20 15:53:17 grubba Exp $
 **! submodule GIF
 **!
 **!	This submodule keep the GIF encode/decode capabilities
@@ -31,7 +31,7 @@
 
 #include "stralloc.h"
 #include "global.h"
-RCSID("$Id: gif.c,v 1.27 1998/01/18 22:15:33 mirar Exp $");
+RCSID("$Id: gif.c,v 1.28 1998/01/20 15:53:17 grubba Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -1755,7 +1755,7 @@ fprintf(stderr,"_gif_decode_lzw(%lx,%lu,%d,%lx,%lx,%lx,%lu,%d)\n",
 	 last=n;
 
 	 m++;
-	 if (m>=maxcode) 
+	 if (m>=maxcode) {
 	    if (m==MAX_GIF_CODE)
 	    {
 #ifdef GIF_DEBUG
@@ -1777,6 +1777,7 @@ fprintf(stderr,"_gif_decode_lzw(%lx,%lu,%d,%lx,%lx,%lx,%lu,%d)\n",
 		  break; /* error! too much codes */
 	       }
 	    }
+	 }
       }