git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37757 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2014-03-19 08:26:48 +00:00
parent 88d1b8fd99
commit 5244db9446
4 changed files with 14 additions and 7 deletions

View file

@ -2,6 +2,10 @@
* Tools/gdomap.c: Don't open syslog connection until after we have * Tools/gdomap.c: Don't open syslog connection until after we have
forked and closed old descriptors .. fix for bug #41751 forked and closed old descriptors .. fix for bug #41751
* Headers/Foundation/NSData.h:
* Source/NSData.m:
* Source/NSString.m:
Fix for bug #41626
2014-03-11 Richard Frith-Macdonald <rfm@gnu.org> 2014-03-11 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -46,8 +46,11 @@ enum {
}; };
enum { enum {
NSAtomicWrite = 1 NSDataWritingAtomic = 1
}; };
/* The original name for this was NSAtomicWrite ... need for backward comapat
*/
#define NSAtomicWrite NSDataWritingAtomic
#endif #endif
@interface NSData : NSObject <NSCoding, NSCopying, NSMutableCopying> @interface NSData : NSObject <NSCoding, NSCopying, NSMutableCopying>
@ -144,7 +147,7 @@ enum {
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) #if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST)
/** /**
* <p>Writes a copy of the data encapsulated by the receiver to a file * <p>Writes a copy of the data encapsulated by the receiver to a file
* at path. If the NSAtomicWrite option is set, this writes to a * at path. If the NSDataWritingAtomic option is set, this writes to a
* temporary file and then renames that to the file at path, thus * temporary file and then renames that to the file at path, thus
* ensuring that path exists and does not contain partially written * ensuring that path exists and does not contain partially written
* data at any point. * data at any point.

View file

@ -877,7 +877,7 @@ failure:
{ {
if (useAuxiliaryFile) if (useAuxiliaryFile)
{ {
return [self writeToFile: path options: NSAtomicWrite error: 0]; return [self writeToFile: path options: NSDataWritingAtomic error: 0];
} }
else else
{ {
@ -889,7 +889,7 @@ failure:
{ {
if (flag) if (flag)
{ {
return [self writeToURL: anURL options: NSAtomicWrite error: 0]; return [self writeToURL: anURL options: NSDataWritingAtomic error: 0];
} }
else else
{ {
@ -1328,7 +1328,7 @@ failure:
BOOL useAuxiliaryFile = NO; BOOL useAuxiliaryFile = NO;
BOOL error_BadPath = YES; BOOL error_BadPath = YES;
if (writeOptionsMask & NSAtomicWrite) if (writeOptionsMask & NSDataWritingAtomic)
{ {
useAuxiliaryFile = YES; useAuxiliaryFile = YES;
} }

View file

@ -5352,7 +5352,7 @@ static NSFileManager *fm = nil;
return NO; return NO;
} }
return [d writeToFile: path return [d writeToFile: path
options: atomically ? NSAtomicWrite : 0 options: atomically ? NSDataWritingAtomic : 0
error: error]; error: error];
} }
@ -5387,7 +5387,7 @@ static NSFileManager *fm = nil;
return NO; return NO;
} }
return [d writeToURL: url return [d writeToURL: url
options: atomically ? NSAtomicWrite : 0 options: atomically ? NSDataWritingAtomic : 0
error: error]; error: error];
} }