Commit 662df781 authored by Sandrine Avakian's avatar Sandrine Avakian

Windows build fix.

parent 7483daa6
......@@ -437,7 +437,7 @@ LpConfig *lp_config_new_with_factory(const char *config_filename, const char *fa
#ifdef RENAME_REQUIRES_NONEXISTENT_NEW_PATH
if (fd == -1){
pFile = bctbx_file_open(lpconfig->g_bctbx_vfs,lpconfig->tmpfilename, "r+");
pFile = bctbx_filecreate_and_open(lpconfig->g_bctbx_vfs,lpconfig->tmpfilename, "r+");
if (fd){
ms_warning("Could not open %s but %s works, app may have crashed during last sync.",lpconfig->filename,lpconfig->tmpfilename);
}
......
......@@ -19,9 +19,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "sqlite3_bctbx_vfs.h"
#include <errno.h>
#include <sqlite3.h>
#ifndef _WIN32_WCE
#include <errno.h>
#endif /*_WIN32_WCE*/
/**
* Closes the file whose file descriptor is stored in the file handle p.
......@@ -248,7 +252,7 @@ static int sqlite3bctbx_Open(sqlite3_vfs *pVfs, const char *fName, sqlite3_file
}
/* Set flags to open the file with */
if( flags&SQLITE_OPEN_EXCLUSIVE ) openFlags |= (O_EXCL|O_NOFOLLOW);
if( flags&SQLITE_OPEN_EXCLUSIVE ) openFlags |= O_EXCL;
if( flags&SQLITE_OPEN_CREATE ) openFlags |= O_CREAT;
if( flags&SQLITE_OPEN_READONLY ) openFlags |= O_RDONLY;
if( flags&SQLITE_OPEN_READWRITE ) openFlags |= O_RDWR;
......
......@@ -21,14 +21,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <stdbool.h>
#include <sys/stat.h>
#include "sqlite3.h"
#include <bctoolbox/bc_vfs.h>
/*
** The maximum pathname length supported by this VFS.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment