Patrick Mézard
2006-May-09 10:58 UTC
[Xapian-devel] xapian-compact fails to rename iamflint.tmp for win32/cygwin builds
Hello, Any call to xapian-compact compiled for Win32/Cygwin ultimately fails when it tries to rename/replace iamflint.tmp with the final version. The reason is you cannot rename an opened file with Win32/Cygwin libc. To correct this, just close the output ofstream (xapian-compact.cc(534)) like: """ ofstream output(dest.c_str()); if (!output.write(buf, input.gcount())) { cerr << argv[0] << ": error writing '" << dest << "': " << strerror(errno) << endl; exit(1); } output.close(); //Added """ Regards, -- Patrick M?zard
Olly Betts
2006-May-09 15:26 UTC
[Xapian-devel] xapian-compact fails to rename iamflint.tmp for win32/cygwin builds
On Tue, May 09, 2006 at 11:58:16AM +0200, Patrick M?zard wrote:> To correct this, just close the output ofstream (xapian-compact.cc(534)) > like:Thanks, I'll commit that once I've checked it builds. Cheers, Olly
Apparently Analagous Threads
- Problem using ofstream in C++ class in package for MacOS X
- [LLVMdev] Get LLVM assembler for a function.
- [LLVMdev] std::cout << *MyModule does not work anymore
- Buildling with/without AddressSanitizer causes divergent execution behaviour
- [LLVMdev] Inserting a function call into bitcode