diff --git a/src/modules/files/file.c b/src/modules/files/file.c
index bd95bdbd414f8c98a024cb04264e0bd33d60e61b..d354ae178eacb20c7ca146630a96e5d644881f0c 100644
--- a/src/modules/files/file.c
+++ b/src/modules/files/file.c
@@ -6,7 +6,7 @@
 /**/
 #define NO_PIKE_SHORTHAND
 #include "global.h"
-RCSID("$Id: file.c,v 1.184 2000/08/09 21:21:02 grubba Exp $");
+RCSID("$Id: file.c,v 1.185 2000/08/11 11:01:04 grubba Exp $");
 #include "fdlib.h"
 #include "interpret.h"
 #include "svalue.h"
@@ -989,7 +989,7 @@ static void file_write(INT32 args)
 	    break;
 
 	  while(i) {
-	    if (iov->iov_len <= i) {
+	    if ((ptrdiff_t)iov->iov_len <= i) {
 	      i -= iov->iov_len;
 	      iov++;
 	      iovcnt--;
diff --git a/src/post_modules/GL/auto.c.in b/src/post_modules/GL/auto.c.in
index 82dcdd5c545dccafb99985061811d3a2ce705f11..6d4a09505fd1fdb9b5062b260690e4a17aaf9213 100644
--- a/src/post_modules/GL/auto.c.in
+++ b/src/post_modules/GL/auto.c.in
@@ -1,5 +1,6 @@
-/*
- * $Id: auto.c.in,v 1.14 2000/07/28 07:16:09 hubbe Exp $
+/* -*- C -*-
+ *
+ * $Id: auto.c.in,v 1.15 2000/08/11 11:05:41 grubba Exp $
  *
  */
 
@@ -7,7 +8,7 @@
 
 #include "config.h"
 
-RCSID("$Id: auto.c.in,v 1.14 2000/07/28 07:16:09 hubbe Exp $");
+RCSID("$Id: auto.c.in,v 1.15 2000/08/11 11:05:41 grubba Exp $");
 #include "stralloc.h"
 #include "pike_macros.h"
 #include "object.h"
@@ -168,27 +169,30 @@ static void check_img_arg(struct svalue *a, struct zimage *img,
   img->alloc = 0;
   if(a->type == T_MAPPING) {
     struct svalue *v;
-    if((v=simple_mapping_string_lookup(a->u.mapping, "rgb")))
+    if((v=simple_mapping_string_lookup(a->u.mapping, "rgb"))) {
       if(v->type == T_OBJECT &&
 	 (rgbstor = (void *)get_storage(v->u.object, image_program)) != NULL &&
 	 rgbstor->img != NULL)
 	;
       else
 	error("Bad argument %d to %s.\n", arg, func);
-    if((v=simple_mapping_string_lookup(a->u.mapping, "luminance")))
+    }
+    if((v=simple_mapping_string_lookup(a->u.mapping, "luminance"))) {
       if(v->type == T_OBJECT &&
 	 (lumstor = (void *)get_storage(v->u.object, image_program)) != NULL &&
 	 lumstor->img != NULL)
 	;
       else
 	error("Bad argument %d to %s.\n", arg, func);
-    if((v=simple_mapping_string_lookup(a->u.mapping, "alpha")))
+    }
+    if((v=simple_mapping_string_lookup(a->u.mapping, "alpha"))) {
       if(v->type == T_OBJECT &&
 	 (astor = (void *)get_storage(v->u.object, image_program)) != NULL &&
 	 astor->img != NULL)
 	;
       else
-	error("Bad argument %d to %s.\n", arg, func);    
+	error("Bad argument %d to %s.\n", arg, func);
+    }
   } else if(a->type == T_OBJECT &&
 	    (rgbstor = (void *)get_storage(a->u.object, image_program)) !=
 	    NULL && rgbstor->img != NULL)
diff --git a/src/threads.c b/src/threads.c
index 5858d41d9ffb7d80005576e7721e720b3b752fc0..e5d8a81ab2d169d3d71e167ef8f032f06596219d 100644
--- a/src/threads.c
+++ b/src/threads.c
@@ -1,5 +1,5 @@
 #include "global.h"
-RCSID("$Id: threads.c,v 1.135 2000/08/10 18:25:17 grubba Exp $");
+RCSID("$Id: threads.c,v 1.136 2000/08/11 11:02:36 grubba Exp $");
 
 PMOD_EXPORT int num_threads = 1;
 PMOD_EXPORT int threads_disabled = 0;
@@ -1055,7 +1055,7 @@ void f_thread_id__sprintf (INT32 args)
 {
   pop_n_elems (args);
   push_constant_text ("Thread.Thread(");
-  push_int (THIS_THREAD->id);
+  push_int64((ptrdiff_t)THIS_THREAD->id);
   push_constant_text (")");
   f_add (3);
 }