*** 34,39 **** --- 34,40 ---- my patch applies to sqlite version 2.8.6, and i didn't check any other version. + to avoid overload of this page, i have attached the diff to a development ticket: http://www.sqlite.org/cvstrac/tktview?tn=524 . it will also do no harm to incorporate it in the main sqlite distribution. To get it compiling on DJGPP (DOS) you need to patch src/os.c with the following (unified diff): *************** *** 91,97 **** rc = SQLITE_BUSY; }else{ +#endif ! terface adding patch-sets, bug tracking, and Wiki to CVS. http://www.hwaci.com/sw/cvstrac/. *: SQL Relay: A persistent database connection pooling, proxying and load --- 92,197 ---- rc = SQLITE_BUSY; }else{ +#endif ! rc = SQLITE_OK; ! id->pLock->cnt = 1; ! id->locked = 1; ! @@ -736,9 +744,13 @@ ! lock.l_type = F_WRLCK; ! lock.l_whence = SEEK_SET; ! lock.l_start = lock.l_len = 0L; ! +#ifdef __DJGPP__ ! + { ! +#else ! if( fcntl(id->fd, F_SETLK, &lock)!=0 ){ ! rc = SQLITE_BUSY; ! }else{ ! +#endif ! rc = SQLITE_OK; ! id->pLock->cnt = -1; ! id->locked = 1; ! @@ -798,9 +810,13 @@ ! lock.l_type = F_UNLCK; ! lock.l_whence = SEEK_SET; ! lock.l_start = lock.l_len = 0L; ! +#ifdef __DJGPP__ ! + { ! +#else ! if( fcntl(id->fd, F_SETLK, &lock)!=0 ){ ! rc = SQLITE_BUSY; ! }else{ ! +#endif ! rc = SQLITE_OK; ! id->pLock->cnt = 0; ! } ! ! This is needed, because files need to be explicitely opened in binary mode and the check for locking always fails in DJGPP. ! ! DJGPP: http://www.delorie.com/djgpp ! ! ==== ! ! *Microsoft Visual Studio.NET* ! ! See HowToCompileWithVsNet. ! ! ==== ! ! *MSVC and SQLite DLL* ! ! Creation of an import library from the sqlitedll.zip ! (http://www.sqlite.org/sqlitedll.zip) for MS Visual C++ ! is achieved by the following command: ! ! LIB /DEF:sqlite.def ! ! This makes the files sqlite.lib and sqlite.exp files. ! The sqlite.lib can then be used to link your programs ! against the SQLite DLL. ! ! ! ! ===== ! ! *Crosscompile linux x86 -> linux arm* ! ! 1. Install skiff toolchain or similar, make shure you have arm-linux-gcc in your PATH. ! ! 2. Unpack sqlite sources and create a directory _sqlite-arm_ in the same dir. ! ! 3. Edit _configure_ script in the sqlite dir and comment following lines out as shown - have fun finding them ;-) ! ! if test "$cross_compiling" = "yes"; then ! { { echo "$as_me:12710: error: unable to find a compiler for building build tools" >&5 ! echo "$as_me: error: unable to find a compiler for building build tools" >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! . . . ! ! else ! test "$cross_compiling" = yes && ! { { echo "$as_me:13264: error: cannot check for file existence when cross compiling" >&5 ! echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} ! { (exit 1); exit 1; }; } ! ! . . . ! ! else ! test "$cross_compiling" = yes && ! { { echo "$as_me:13464: error: cannot check for file existence when cross compiling" >&5 ! echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} ! { (exit 1); exit 1; }; } ! ! . . . ! ! else ! test "$cross_compiling" = yes && ! { { echo "$as_me:13490: error: cannot check for file existence when cross compiling" >&5 ! echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} ! { (exit 1); exit 1; }; } ! ! ! 4. Save the configure script, change into the build directory you created and call the edited configure script from the sqlite directorterface adding patch-sets, bug tracking, and Wiki to CVS. http://www.hwaci.com/sw/cvstrac/. *: SQL Relay: A persistent database connection pooling, proxying and load