Index: trunk/src/kmk/electric.c
===================================================================
--- trunk/src/kmk/electric.c	(revision 2000)
+++ trunk/src/kmk/electric.c	(revision 2001)
@@ -54,5 +54,5 @@
   fprintf (stderr, "electric heap error: %s (errno=%d)\n", msg, errno);
   __asm__ ("int3"); /* not portable... */
-#endif 
+#endif
   abort ();
   exit (1);
@@ -188,4 +188,6 @@
 }
 
-#endif /* ELECTRIC_HEAP */
+#else /* !ELECTRIC_HEAP */
+extern void electric_heap_keep_ansi_c_quiet (void);
+#endif /* !ELECTRIC_HEAP */
 
Index: trunk/src/kmk/filedef.h
===================================================================
--- trunk/src/kmk/filedef.h	(revision 2000)
+++ trunk/src/kmk/filedef.h	(revision 2001)
@@ -210,6 +210,6 @@
 #define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
 #if FILE_TIMESTAMP_HI_RES == 0 /* bird: shut up annoying warnings!
-  ASSUMES: unsinged FILE_TIMESTAMP ++. */
-# define ORDINARY_MTIME_MAX  ( ~ (FILE_TIMESTAMP) 0 )
+  ASSUMES: unsigned FILE_TIMESTAMP ++. */
+# define ORDINARY_MTIME_MAX     ( ~ (FILE_TIMESTAMP) 0 )
 #else
 #define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
@@ -224,5 +224,9 @@
    targets, which need to be considered newer than anything that depends on
    them, even if said dependents' modtimes are in the future.  */
+#if 1 /* bird: ASSUME the type is unsigned and the wrath of a pedantic gcc.  */
+# define NEW_MTIME              ( ~ (FILE_TIMESTAMP) 0 )
+#else
 #define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
+#endif
 
 #define check_renamed(file) \
Index: trunk/src/kmk/glob/glob.c
===================================================================
--- trunk/src/kmk/glob/glob.c	(revision 2000)
+++ trunk/src/kmk/glob/glob.c	(revision 2001)
@@ -390,5 +390,5 @@
 	  /* Allocate working buffer large enough for our work.  Note that
 	    we have at least an opening and closing brace.  */
-	  int firstc;
+	  size_t firstc;
 	  char *alt_start;
 	  const char *p;
Index: trunk/src/kmk/implicit.c
===================================================================
--- trunk/src/kmk/implicit.c	(revision 2000)
+++ trunk/src/kmk/implicit.c	(revision 2001)
@@ -117,5 +117,9 @@
 
   if (c == '\0')
-    return 0;
+    {
+      if (length)   /* bird: shut up gcc. */
+        *length = 0;
+      return 0;
+    }
 
 
Index: trunk/src/kmk/job.c
===================================================================
--- trunk/src/kmk/job.c	(revision 2000)
+++ trunk/src/kmk/job.c	(revision 2001)
@@ -2103,5 +2103,5 @@
         {
           DB (DB_KMK, (_("not_parallel %d -> %d (file=%p `%s') [start_waiting_jobs]\n"),
-                       not_parallel, not_parallel - 1, job->file, job->file->name));
+                       not_parallel, not_parallel - 1, (void *) job->file, job->file->name));
           assert(not_parallel > 0);
           --not_parallel;
Index: trunk/src/kmk/kmkbuiltin/err.c
===================================================================
--- trunk/src/kmk/kmkbuiltin/err.c	(revision 2000)
+++ trunk/src/kmk/kmkbuiltin/err.c	(revision 2001)
@@ -75,5 +75,4 @@
 void warnx(const char *fmt, ...)
 {
-    int err = errno;
     va_list args;
     fprintf(stderr, "%s: ", g_progname);
Index: trunk/src/kmk/kmkbuiltin/kbuild_protection.c
===================================================================
--- trunk/src/kmk/kmkbuiltin/kbuild_protection.c	(revision 2000)
+++ trunk/src/kmk/kmkbuiltin/kbuild_protection.c	(revision 2001)
@@ -37,6 +37,9 @@
 # include <limits.h>
 # include <direct.h>
-#endif 
+#else
+# include <unistd.h>
+#endif
 #include "kbuild_protection.h"
+#include "err.h"
 
 
@@ -185,5 +188,5 @@
         }
     }
-#else
+#else  /* !WIN && !OS2 */
     if (!IS_SLASH(pszPath[0]))
     {
@@ -199,5 +202,5 @@
         cComponents = countSubPathComponents(szCwd, 0);
     }
-#endif
+#endif /* !WIN && !OS2 */
 
     /*
@@ -352,5 +355,5 @@
         if (cComponents < 0)
             return -1;
-        if (cComponents <= pThis->cProtectionDepth)
+        if ((unsigned int)cComponents <= pThis->cProtectionDepth)
         {
             errx(1, "%s: protected", pszPath);
Index: trunk/src/kmk/kmkbuiltin/kbuild_protection.h
===================================================================
--- trunk/src/kmk/kmkbuiltin/kbuild_protection.h	(revision 2000)
+++ trunk/src/kmk/kmkbuiltin/kbuild_protection.h	(revision 2001)
@@ -46,6 +46,6 @@
 typedef struct KBUILDPROTECTION
 {
-    unsigned        uMagic;
-    unsigned        cProtectionDepth;
+    unsigned int    uMagic;
+    unsigned int    cProtectionDepth;
     unsigned char   afTypes[KBUILDPROTECTIONTYPE_MAX];
 } KBUILDPROTECTION;
Index: trunk/src/kmk/kmkbuiltin/setmode.c
===================================================================
--- trunk/src/kmk/kmkbuiltin/setmode.c	(revision 2000)
+++ trunk/src/kmk/kmkbuiltin/setmode.c	(revision 2001)
@@ -396,5 +396,5 @@
 	case 'X':
 		set->cmd = op;
-		set->bits = (who ? who : mask) & oparg;
+		set->bits = (who ? (mode_t)who : mask) & oparg;
 		break;
 
Index: trunk/src/kmk/remake.c
===================================================================
--- trunk/src/kmk/remake.c	(revision 2000)
+++ trunk/src/kmk/remake.c	(revision 2001)
@@ -902,5 +902,5 @@
   int touched = 0;
   DB (DB_JOBS, (_("notice_finished_file - entering: file=%p `%s' update_status=%d command_state=%d\n"), /* bird */
-                  file, file->name, file->update_status, file->command_state));
+                  (void *) file, file->name, file->update_status, file->command_state));
 
   file->command_state = cs_finished;
@@ -925,5 +925,5 @@
     {
       DB (DB_KMK, (_("not_parallel %d -> %d (file=%p `%s') [notice_finished_file]\n"), not_parallel,
-                   not_parallel - 1, file, file->name));
+                   not_parallel - 1, (void *) file, file->name));
       assert(not_parallel >= 1);
       --not_parallel;
