From e9733d43d29bb74fd4431aef1b18fe885a5df4cd Mon Sep 17 00:00:00 2001 From: CaS Date: Tue, 15 Apr 2003 07:39:30 +0000 Subject: [PATCH] Tweak git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16474 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSData.m | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) 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"];