Add the #goo to allow use in C++.
Silence a few more warnings.
Strip down the mkfiles more.
Fix bug in X11 mouse handling, note groups.
diff --git a/src/cmd/idiff.c b/src/cmd/idiff.c
index c3f207f..1dc49cf 100644
--- a/src/cmd/idiff.c
+++ b/src/cmd/idiff.c
@@ -82,11 +82,14 @@
 opentemp(char *template, int mode, long perm)
 {
 	int fd;
+	Dir d;
 
 	fd = mkstemp(template);
 	if(fd < 0)
 		sysfatal("could not create temporary file");
-	fchmod(fd, perm);
+	nulldir(&d);
+	d.mode = perm;
+	dirfwstat(fd, &d);
 
 	return fd;
 }