mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Tidied win32 stuff
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4237 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e45bba803d
commit
a1aa99475c
16 changed files with 104 additions and 51 deletions
|
@ -124,7 +124,11 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len, NSZone* zone)
|
|||
NSLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
return NO;
|
||||
}
|
||||
#if defined(__WIN32__)
|
||||
theFile = fopen(thePath, "rb");
|
||||
#else
|
||||
theFile = fopen(thePath, "r");
|
||||
#endif
|
||||
|
||||
if (theFile == NULL) /* We failed to open the file. */
|
||||
{
|
||||
|
@ -522,7 +526,11 @@ failure:
|
|||
else
|
||||
{
|
||||
strcpy(thePath, theRealPath);
|
||||
#if defined(__WIN32__)
|
||||
theFile = fopen(thePath, "wb");
|
||||
#else
|
||||
theFile = fopen(thePath, "w");
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if (useAuxiliaryFile)
|
||||
|
@ -544,7 +552,11 @@ failure:
|
|||
}
|
||||
|
||||
/* Open the file (whether temp or real) for writing. */
|
||||
#if defined(__WIN32__)
|
||||
theFile = fopen(thePath, "wb");
|
||||
#else
|
||||
theFile = fopen(thePath, "w");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (theFile == NULL) /* Something went wrong; we weren't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue