Prevent multiple definitions caused by MSVCRT headers.
diff --git a/include/tchar.h b/include/tchar.h
index 4bd2826..475a564 100644
--- a/include/tchar.h
+++ b/include/tchar.h
@@ -7,68 +7,6 @@
extern "C" {
#endif
-/* FIXME: this should be in direct.h but since it's a standard C library include (on some systems)... */
-#define _chdir chdir
-#define _rmdir rmdir
-
-/* FIXME: this should be in io.h but I believe it's a standard include on some systems... */
-/* would need unistd.h */
-#define _access access
-/* would need sys/stat.h */
-#define _chmod chmod
-/* would need fcntl.h */
-#define _creat creat
-#define _open open
-/* FIXME: we need _S_IWRITE, _O_CREAT ... */
-/* FIXME: _fsopen is not implemented */
-#define sopen _sopen
-/* FIXME: _sopen is not implemented */
-
-/* FIXME: this should be in stdio.h but since it's a standard C library include... */
-#define fgetchar getchar
-#define fputchar putchar
-#define _popen popen
-#define _tempnam tempnam
-#define _vsnprintf vsnprintf
-
-/* FIXME: this should be in stdlib.h but since it's a standard C library include... */
-/* FIXME: itoa and ltoa are missing */
-/* FIXME: _makepath is not implemented */
-/* FIXME: _searchenv is not implemented */
-/* FIXME: _splitpath is not implemented */
-
-/* FIXME: this should be in string.h but since it's a standard C library include... */
-#define _stricmp strcasecmp
-#define _strcmpi strcasecmp
-#define strcmpi strcasecmp
-#define _strnicmp strncasecmp
-#define strnicmp strncasecmp
-#define _strdup strdup
-/* FIXME: stricoll is not implemented but strcasecmp is probably close enough in most cases */
-#define _stricoll strcasecmp
-#define stricoll _stricoll
-#define strlwr _strlwr
-#define strnset _strnset
-/* FIXME: _strnset is not implemented */
-#define strrev CRTDLL__strrev
-char *CRTDLL__strrev(char *string);
-#define strset _strset
-/* FIXME: _strset is not implemented */
-#define strupr _strupr
-#define ultoa _ultoa
-/* FIXME: _ultoa is not implemented */
-
-/* FIXME: this should be in sys/stat.h but since it's a standard C library include... */
-#define _stat stat
-
-/* FIXME: this should be in time.h but since it's a standard C library include... */
-/* FIXME: _strdate is not implemented */
-/* FIXME: _strtime is not implemented */
-
-/* FIXME: this should be in utime.h but since it's a standard C library include... */
-#define _utime utime
-
-
/*****************************************************************************
* tchar routines
*/
diff --git a/include/windef.h b/include/windef.h
index 7de33ea..23b2880 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -151,12 +151,16 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
-#define _MAX_PATH 260
-#define MAX_PATH 260
-#define _MAX_DRIVE 3
-#define _MAX_DIR 256
-#define _MAX_FNAME 255
-#define _MAX_EXT 256
+#ifndef _MAX_PATH
+/* FIXME: These are supposed to be in stdlib.h only */
+#define _MAX_DRIVE 3
+#define _MAX_FNAME 256
+#define _MAX_DIR _MAX_FNAME
+#define _MAX_EXT _MAX_FNAME
+#define _MAX_PATH 260
+#endif
+#define MAX_PATH _MAX_PATH
+
#define HFILE_ERROR ((HFILE)-1)
diff --git a/include/winnt.h b/include/winnt.h
index fb430e1..44459a3 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -12,6 +12,7 @@
#ifndef RC_INVOKED
#include <ctype.h>
#include <stddef.h>
+#include <string.h>
#endif
@@ -250,11 +251,14 @@
typedef long LONG, *PLONG, *LPLONG;
/* Some systems might have wchar_t, but we really need 16 bit characters */
+#ifndef WINE_WCHAR_DEFINED
#ifdef WINE_UNICODE_NATIVE
typedef wchar_t WCHAR, *PWCHAR;
#else
typedef unsigned short WCHAR, *PWCHAR;
#endif
+#define WINE_WCHAR_DEFINED
+#endif
/* 'Extended/Wide' numerical types */
#ifndef _ULONGLONG_