From 7aafba228600b34601ab602f280e58496f3e2be8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Fri, 11 May 2018 13:06:40 +0200
Subject: [PATCH] I/O [NT]: Fixed a few warnings.

---
 src/fdlib.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/fdlib.c b/src/fdlib.c
index 08d2d395cd..f7cb658a1a 100644
--- a/src/fdlib.c
+++ b/src/fdlib.c
@@ -31,6 +31,9 @@
 #include <shlobj.h>
 #include <objbase.h>
 
+#include <wchar.h>
+#include <io.h>
+
 #include <time.h>
 
 /* Old versions of the headerfiles don't have this constant... */
@@ -199,11 +202,10 @@ static const unsigned long pike_doserrtab[][2] = {
 
 static inline void _dosmaperr(unsigned long err)
 {
-  int l = 0, h = NELEM(pike_doserrtab);
-  int m;
+  unsigned int l = 0, h = NELEM(pike_doserrtab);
   while (l < h) {
-    int m = (l+h)>>1;
-    int e = pike_doserrtab[m][0];
+    unsigned int m = (l+h)>>1;
+    unsigned long e = pike_doserrtab[m][0];
 
     if (e == err) {
       errno = pike_doserrtab[m][1];
-- 
GitLab