diff -d -u -r libsmi-0.4.3/tools/dump-sizes.c libsmi-0.4.3-win/tools/dump-sizes.c
--- libsmi-0.4.3/tools/dump-sizes.c	Wed Aug 18 11:50:59 2004
+++ libsmi-0.4.3-win/tools/dump-sizes.c	Thu Oct  7 16:24:57 2004
@@ -15,12 +15,19 @@
 
 #include <stdio.h>
 #include <string.h>
+#ifdef HAVE_WIN_H
+#include "win.h"
+#endif
 
 #include "smi.h"
 #include "smidump.h"
 
 static int silent = 0;
 
+/*
+ * help functions
+ */
+#define m_abs(a)	((a) < 0 ? -(a) : (a))
 
 static SmiInteger32
 getAbsMinEnum(SmiType *smiType)
@@ -155,7 +162,7 @@
 {
      SmiType *parent;
      SmiRange *range;
-     SmiInteger64 min = 9223372036854775808ULL;
+     SmiInteger64 min = LIBSMI_INT64_MAX;
 
      range = smiGetFirstRange(smiType);
      if (! range) {
@@ -164,8 +171,8 @@
      }
 
      for (; range; range = smiGetNextRange(range)) {
-	  if (abs(range->minValue.value.integer64) < min) {
-	       min = abs(range->minValue.value.integer64);
+	  if (m_abs(range->minValue.value.integer64) < min) {
+	       min = m_abs(range->minValue.value.integer64);
 	  }
      }
      return min;
@@ -187,8 +194,8 @@
      }
 
      for (; range; range = smiGetNextRange(range)) {
-	  if (abs(range->maxValue.value.integer64) > max) {
-	       max = abs(range->maxValue.value.integer64);
+	  if (m_abs(range->maxValue.value.integer64) > max) {
+	       max = m_abs(range->maxValue.value.integer64);
 	  }
      }
      return max;
diff -d -u -r libsmi-0.4.3/tools/dump-xsd.c libsmi-0.4.3-win/tools/dump-xsd.c
--- libsmi-0.4.3/tools/dump-xsd.c	Wed Aug 18 11:50:59 2004
+++ libsmi-0.4.3-win/tools/dump-xsd.c	Thu Oct  7 16:24:57 2004
@@ -21,6 +21,9 @@
 #include <string.h>
 #include <ctype.h>
 #include <time.h>
+#ifdef HAVE_WIN_H
+#include "win.h"
+#endif
 
 #include "smi.h"
 #include "smidump.h"
@@ -1024,7 +1027,7 @@
 	SmiUnsigned64 min, max;
 
 	min = 0;
-	max = 18446744073709551615ULL;
+	max = LIBSMI_UINT64_MAX;
 
 	fprintStdRestHead( f, smiType );
 	
@@ -1261,7 +1264,7 @@
 	SmiUnsigned64 min, max;
 
 	min = 0;
-	max = 18446744073709551615ULL;
+	max = LIBSMI_UINT64_MAX;
 
 	if( smiRange->minValue.value.unsigned64 < min ) {
 	    min = smiRange->minValue.value.unsigned64;
diff -d -u -r libsmi-0.4.3/win/win.h libsmi-0.4.3-win/win/win.h
--- libsmi-0.4.3/win/win.h	Wed Aug 18 11:50:58 2004
+++ libsmi-0.4.3-win/win/win.h	Thu Oct  7 16:30:53 2004
@@ -16,6 +16,7 @@
 #define _WIN_H
 
 #include <ctype.h>
+#include <limits.h>
 #include <io.h>
 
 /*
@@ -58,5 +59,11 @@
 #define isascii(_c)   ( (unsigned)(_c) < 0x80 )
 #endif
 #endif
+
+/*
+ * the flex generated scanner file within libsmi 0.4.3 distribution
+ * has a ``#include <unistd.h>'' we have to override:
+ */
+#define YY_NO_UNISTD_H 1
 
 #endif /* _WIN_H */

