diff --git a/ChangeLog b/ChangeLog index bdb423b52..5f8176127 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-04-15 Richard Frith-Macdonald + + * Source/NSData.m: Experimantal disable ReadFile and WriteFile on MINGW + 2003-04-14 Richard Frith-Macdonald * Source/NSObjCRuntime.m: NSClassFromString(), NSSelectorFromString() diff --git a/Source/NSData.m b/Source/NSData.m index 5a19b8e5f..e1d15a77d 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -84,6 +84,8 @@ #include /* SEEK_* on SunOS 4 */ #endif +#define USE_WINDOWS_IO 0 + #ifdef HAVE_MMAP #include #include @@ -132,7 +134,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone) FILE *theFile = 0; void *tmp = 0; int c; -#if defined(__MINGW__) +#if USE_WINDOWS_IO && defined(__MINGW__) HANDLE fh; DWORD fileLength; DWORD high; @@ -152,7 +154,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone) return NO; } -#if defined(__MINGW__) +#if USE_WINDOWS_IO && defined(__MINGW__) fh = CreateFile(thePath, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (fh == INVALID_HANDLE_VALUE) @@ -847,7 +849,7 @@ static unsigned gsu32Align; char thePath[BUFSIZ*2+8]; char theRealPath[BUFSIZ*2]; int c; -#if defined(__MINGW__) +#if USE_WINDOWS_IO && defined(__MINGW__) NSString *tmppath = path; HANDLE fh; DWORD wroteBytes; @@ -863,7 +865,7 @@ static unsigned gsu32Align; return NO; } -#if defined(__MINGW__) +#if USE_WINDOWS_IO && defined(__MINGW__) if (useAuxiliaryFile) { tmppath = [path stringByAppendingPathExtension: @"tmp"];