compiler: Added (u)intsize to map to size_t; Updated C prototypes to use it; Fixed...
[sdk] / ecere / src / sys / File.c
index 6128f3a..53136e2 100644 (file)
@@ -1,3 +1,4 @@
+#undef __BLOCKS__
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -50,7 +51,7 @@ char * __ecereNameSpace__ecere__sys__UTF16toUTF8(uint16 * source);
 
 #if defined(__WIN32__) || defined(__WATCOMC__)
 #include <direct.h>
-BOOL WINAPI GetVolumePathName(LPCTSTR lpszFileName,LPTSTR lpszVolumePathName,DWORD cchBufferLength);
+__declspec(dllimport) BOOL WINAPI GetVolumePathName(LPCTSTR lpszFileName,LPTSTR lpszVolumePathName,DWORD cchBufferLength);
 #else
 #include <dirent.h>
 #endif
@@ -209,7 +210,7 @@ bool FILE_Lock(FILE * input, FILE * output, FileLock type, uint64 start, uint64
 
 void FILE_set_buffered(FILE * input, FILE * output, bool value)
 {
-#if !defined(__WIN32__)
+#if !defined(__WIN32__) && !defined(ECERE_BOOTSTRAP)
    if(input)
       setvbuf(input, null, value ? _IOFBF : _IONBF, 0);
    if(output && output != input)
@@ -258,7 +259,7 @@ FileAttribs FILE_FileExists(char * fileName)
                {
                   if(returnCode == WN_SUCCESS)
                   {
-                     if(!wcscmpi(buffer->lpRemoteName, _wfileName))
+                     if(!_wcsicmp(buffer->lpRemoteName, _wfileName))
                         result = (FileAttribs)( isDirectory | isServer );
                   }
                   break;