Index: lib/stdfns.c
--- lib/stdfns.c.orig	2008-12-08 00:29:11 +0100
+++ lib/stdfns.c	2009-03-27 12:01:14 +0100
@@ -24,6 +24,7 @@
  */
 
 #include "libdefs.h"
+#include <limits.h>
 
 /**
  * Some of these are wrappers. The idea is to eventually produce an extremely
@@ -360,11 +361,11 @@
 		{
 			return(0);
 		}
-		return(-MAXINT);
+		return(-INT_MAX);
 	}
 	if (s2 == NULL)
 	{
-		return(MAXINT);
+		return(INT_MAX);
 	}
 
 	return(memcmp(s1, s2, n));
@@ -491,11 +492,11 @@
 		{
 			return(0);
 		}
-		return(-MAXINT);
+		return(-INT_MAX);
 	}
 	if (src2 == NULL)
 	{
-		return(MAXINT);
+		return(INT_MAX);
 	}
 	return(strcmp((char *) src1, (char *) src2));
 }
@@ -514,11 +515,11 @@
 		{
 			return(0);
 		}
-		return(-MAXINT);
+		return(-INT_MAX);
 	}
 	if (src2 == NULL)
 	{
-		return(MAXINT);
+		return(INT_MAX);
 	}
 	return(strncmp((char *) src1, (char *) src2, n));
 }
