Removed some unnecessary definitions from file.h.
Got rid of drive.h.
diff --git a/dlls/kernel/ne_module.c b/dlls/kernel/ne_module.c
index e386904..21fd4fe 100644
--- a/dlls/kernel/ne_module.c
+++ b/dlls/kernel/ne_module.c
@@ -40,7 +40,6 @@
#include "wownt32.h"
#include "module.h"
#include "toolhelp.h"
-#include "file.h"
#include "builtin16.h"
#include "stackframe.h"
#include "excpt.h"
@@ -127,6 +126,34 @@
/***********************************************************************
+ * NE_strcasecmp
+ *
+ * locale-independent case conversion for module lookups
+ */
+static int NE_strcasecmp( const char *str1, const char *str2 )
+{
+ int ret = 0;
+ for ( ; ; str1++, str2++)
+ if ((ret = RtlUpperChar(*str1) - RtlUpperChar(*str2)) || !*str1) break;
+ return ret;
+}
+
+
+/***********************************************************************
+ * NE_strncasecmp
+ *
+ * locale-independent case conversion for module lookups
+ */
+static int NE_strncasecmp( const char *str1, const char *str2, int len )
+{
+ int ret = 0;
+ for ( ; len > 0; len--, str1++, str2++)
+ if ((ret = RtlUpperChar(*str1) - RtlUpperChar(*str2)) || !*str1) break;
+ return ret;
+}
+
+
+/***********************************************************************
* find_dll_descr
*
* Find a descriptor in the list
@@ -144,9 +171,9 @@
BYTE *name_table = (BYTE *)pModule + pModule->name_table;
/* check the dll file name */
- if (!FILE_strcasecmp( pOfs->szPathName, dllname )) return descr;
+ if (!NE_strcasecmp( pOfs->szPathName, dllname )) return descr;
/* check the dll module name (without extension) */
- if (!FILE_strncasecmp( dllname, name_table+1, *name_table ) &&
+ if (!NE_strncasecmp( dllname, name_table+1, *name_table ) &&
!strcmp( dllname + *name_table, ".dll" ))
return descr;
}
@@ -410,7 +437,7 @@
/* Now copy and uppercase the string */
strcpy( buffer, name );
- for (cpnt = buffer; *cpnt; cpnt++) *cpnt = FILE_toupper(*cpnt);
+ for (cpnt = buffer; *cpnt; cpnt++) *cpnt = RtlUpperChar(*cpnt);
len = cpnt - buffer;
/* First search the resident names */
@@ -1143,7 +1170,7 @@
strcpy( dllname, basename );
p = strrchr( dllname, '.' );
if (!p) strcat( dllname, ".dll" );
- for (p = dllname; *p; p++) *p = FILE_tolower(*p);
+ for (p = dllname; *p; p++) if (*p >= 'A' && *p <= 'Z') *p += 32;
if (!(descr = find_dll_descr( dllname )))
{
@@ -1577,7 +1604,7 @@
/* If uppercased 'name' matches exactly the module name of a module:
* Return its handle
*/
- for (s = tmpstr; *s; s++) *s = FILE_toupper(*s);
+ for (s = tmpstr; *s; s++) *s = RtlUpperChar(*s);
for (hModule = hFirstModule; hModule ; hModule = pModule->next)
{
@@ -1592,7 +1619,7 @@
* 'i' compare is just a quickfix until the loader handles that
* correctly. -MM 990705
*/
- if ((*name_table == len) && !FILE_strncasecmp(tmpstr, name_table+1, len))
+ if ((*name_table == len) && !NE_strncasecmp(tmpstr, name_table+1, len))
return hModule;
}
@@ -1631,7 +1658,7 @@
loadedfn--;
}
/* case insensitive compare ... */
- if (!FILE_strcasecmp(loadedfn, s))
+ if (!NE_strcasecmp(loadedfn, s))
return hModule;
}
return 0;
@@ -1943,7 +1970,7 @@
loadedfn--;
}
/* case insensitive compare ... */
- if (!FILE_strcasecmp(loadedfn, s))
+ if (!NE_strcasecmp(loadedfn, s))
return hModule;
}
/* If basename (without ext) matches the module name of a module:
@@ -1960,7 +1987,7 @@
if (pModule->flags & NE_FFLAGS_WIN32) continue;
name_table = (BYTE *)pModule + pModule->name_table;
- if ((*name_table == len) && !FILE_strncasecmp(s, name_table+1, len))
+ if ((*name_table == len) && !NE_strncasecmp(s, name_table+1, len))
return hModule;
}
diff --git a/dlls/kernel/ne_segment.c b/dlls/kernel/ne_segment.c
index aae639b..d1848d4 100644
--- a/dlls/kernel/ne_segment.c
+++ b/dlls/kernel/ne_segment.c
@@ -37,7 +37,6 @@
#include "wownt32.h"
#include "wine/library.h"
#include "kernel_private.h"
-#include "file.h"
#include "module.h"
#include "stackframe.h"
#include "builtin16.h"
diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c
index 475a3ad..75e12b1 100644
--- a/dlls/kernel/process.c
+++ b/dlls/kernel/process.c
@@ -27,12 +27,16 @@
#include <locale.h>
#include <signal.h>
#include <stdio.h>
+#include <time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <sys/types.h>
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "ntstatus.h"
#include "thread.h"
-#include "drive.h"
#include "file.h"
#include "module.h"
#include "options.h"
diff --git a/dlls/kernel/sync.c b/dlls/kernel/sync.c
index dc36eec..b3f1049 100644
--- a/dlls/kernel/sync.c
+++ b/dlls/kernel/sync.c
@@ -48,7 +48,6 @@
#include "wine/unicode.h"
#include "wine/winbase16.h"
#include "kernel_private.h"
-#include "file.h"
#include "wine/debug.h"
diff --git a/dlls/kernel/task.c b/dlls/kernel/task.c
index eff6b97..99599c8 100644
--- a/dlls/kernel/task.c
+++ b/dlls/kernel/task.c
@@ -37,7 +37,6 @@
#include "winuser.h"
#include "wine/winbase16.h"
-#include "drive.h"
#include "file.h"
#include "module.h"
#include "winternl.h"
diff --git a/dlls/kernel/time.c b/dlls/kernel/time.c
index 4b0028a..44170ba 100644
--- a/dlls/kernel/time.c
+++ b/dlls/kernel/time.c
@@ -24,7 +24,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#include <stdarg.h>
#include <stdlib.h>
+#include <time.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -34,8 +36,10 @@
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
#include "ntstatus.h"
-#include "file.h"
#include "winternl.h"
#include "winerror.h"
#include "winnls.h"