gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSData -writeToFile:options:error: on MinGW


From: Germán Arias
Subject: NSData -writeToFile:options:error: on MinGW
Date: Sat, 07 Feb 2015 01:16:25 -0600

After solve the problem with pthread and nanosleep (change the
parts/time.h header on MinGW and change config.h, in gnustep base, to
don't use nanosleep) I have other problem. The configure script now
defines HAVE_MKSTEMP to 1, used in -writeToFile:options:error: in
NSData. This part of code isn't mingw compatible, so I add some changes
(see attached patch). However a simple test fail. This program:

NSData *dat = [NSData dataWithContentsOfFile:
@"/MinGW/msys/home/German/src.txt"];

[dat writeToFile: @"c:/MinGW/msys/home/German/test.txt" atomically:
YES];

Always wrote the temporary file at current directory. So the NSData
object can't rename this later. What I'm doing wrong? Or is this a bug
on Base?

Thanks.
Germán

Attachment: change.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]