$NetBSD$

Include limits.h if the system has it.

--- include/misc.h.orig	2011-12-02 14:53:04.000000000 +0000
+++ include/misc.h
@@ -36,6 +36,9 @@
 
 #include <stdio.h>
 #include <sys/types.h>
+#ifdef HAVE_LIMITS_H
+#  include <limits.h>
+#endif
 
 #include "compat.h"
 
