diff --git a/ChangeLog b/ChangeLog index bc12dddf6..e6870c75e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * Tools/gdomap.c: Don't open syslog connection until after we have 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 diff --git a/Headers/Foundation/NSData.h b/Headers/Foundation/NSData.h index 1f7235abb..14f9bd78d 100644 --- a/Headers/Foundation/NSData.h +++ b/Headers/Foundation/NSData.h @@ -46,8 +46,11 @@ enum { }; enum { - NSAtomicWrite = 1 + NSDataWritingAtomic = 1 }; +/* The original name for this was NSAtomicWrite ... need for backward comapat + */ +#define NSAtomicWrite NSDataWritingAtomic #endif @interface NSData : NSObject @@ -144,7 +147,7 @@ enum { #if OS_API_VERSION(MAC_OS_X_VERSION_10_4,GS_API_LATEST) /** *

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 * ensuring that path exists and does not contain partially written * data at any point. diff --git a/Source/NSData.m b/Source/NSData.m index 463ac96b7..721d47dd8 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -877,7 +877,7 @@ failure: { if (useAuxiliaryFile) { - return [self writeToFile: path options: NSAtomicWrite error: 0]; + return [self writeToFile: path options: NSDataWritingAtomic error: 0]; } else { @@ -889,7 +889,7 @@ failure: { if (flag) { - return [self writeToURL: anURL options: NSAtomicWrite error: 0]; + return [self writeToURL: anURL options: NSDataWritingAtomic error: 0]; } else { @@ -1328,7 +1328,7 @@ failure: BOOL useAuxiliaryFile = NO; BOOL error_BadPath = YES; - if (writeOptionsMask & NSAtomicWrite) + if (writeOptionsMask & NSDataWritingAtomic) { useAuxiliaryFile = YES; } diff --git a/Source/NSString.m b/Source/NSString.m index 19528f8cd..9a9666159 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -5352,7 +5352,7 @@ static NSFileManager *fm = nil; return NO; } return [d writeToFile: path - options: atomically ? NSAtomicWrite : 0 + options: atomically ? NSDataWritingAtomic : 0 error: error]; } @@ -5387,7 +5387,7 @@ static NSFileManager *fm = nil; return NO; } return [d writeToURL: url - options: atomically ? NSAtomicWrite : 0 + options: atomically ? NSDataWritingAtomic : 0 error: error]; }