Page History
- 2008-Jan-13 09:09 anonymous
- 2007-Dec-27 19:37 anonymous
- 2007-Dec-27 19:36 anonymous
- 2007-Nov-25 06:56 anonymous
- 2007-Nov-24 15:49 anonymous
- 2007-Jul-01 07:35 anonymous
- 2007-Apr-22 12:36 anonymous
- 2007-Apr-07 14:30 drh
- 2007-Apr-07 14:29 drh
- 2007-Apr-01 12:05 drh
- 2007-Mar-31 22:58 drh
- 2007-Mar-28 21:28 anonymous
- 2006-Dec-28 19:12 anonymous
- 2006-Oct-16 15:16 anonymous
- 2006-Sep-08 16:29 anonymous
- 2006-Aug-06 11:58 anonymous
- 2005-Dec-24 10:26 anonymous
- 2005-Aug-18 13:43 anonymous
- 2005-Aug-18 12:35 anonymous
- 2005-Jul-18 17:45 anonymous
- 2005-Jul-16 05:19 anonymous
- 2005-Jul-16 05:10 anonymous
- 2005-Jul-16 05:07 anonymous
- 2005-May-07 17:09 anonymous
- 2005-Apr-15 13:56 anonymous
- 2005-Feb-16 13:31 anonymous
- 2005-Feb-16 13:30 anonymous
- 2005-Jan-24 07:21 anonymous
- 2005-Jan-21 09:18 anonymous
- 2005-Jan-04 10:55 anonymous
- 2004-Sep-29 10:25 anonymous
- 2004-Sep-28 16:55 anonymous
- 2004-Sep-28 11:48 anonymous
- 2004-Sep-13 07:56 anonymous
- 2004-Aug-05 14:53 anonymous
- 2004-Jul-29 15:19 anonymous
- 2004-Jul-26 10:11 anonymous
- 2004-May-28 21:20 anonymous
- 2004-May-28 21:18 anonymous
- 2004-May-28 20:53 anonymous
- 2004-May-28 20:52 anonymous
- 2004-May-26 15:56 anonymous
- 2004-May-26 15:35 anonymous
- 2004-May-03 11:31 anonymous
- 2004-May-02 14:59 anonymous
- 2004-Apr-30 20:40 anonymous
- 2004-Apr-30 14:27 anonymous
- 2004-Apr-29 00:01 anonymous
- 2004-Apr-20 01:03 anonymous
- 2003-Dec-19 02:41 anonymous
- 2003-Dec-17 16:04 anonymous
- 2003-Dec-17 16:03 anonymous
- 2003-Dec-15 13:23 anonymous
- 2003-Dec-15 13:15 anonymous
- 2003-Dec-05 11:34 anonymous
- 2003-Dec-05 01:24 anonymous
- 2003-Oct-03 14:38 anonymous
- 2003-Oct-03 08:41 anonymous
- 2003-Aug-19 20:40 drh
- 2003-Aug-19 18:13 anonymous
- 2003-Jul-29 08:14 anonymous
- 2003-May-29 16:48 anonymous
- 2003-May-05 08:56 anonymous
- 2003-Mar-04 23:19 anonymous
- 2003-Feb-26 15:40 anonymous
- 2003-Jan-24 15:04 drh
- 2003-Jan-24 14:44 anonymous
- 2003-Jan-16 06:37 anonymous
- 2003-Jan-16 06:37 anonymous
- 2003-Jan-16 06:35 anonymous
- 2002-Dec-24 17:41 anonymous
- 2002-Oct-21 13:32 anonymous
Note that the files "shell.c" and "tclsqlite.c" are special and do not belong in the SQLite library proper. "shell.c" is used to build the "sqlite" shell program and "tclsqlite.c" is the TCL bindings for SQLite. You may want to omit both of these files when you build the library.
For example, I was able to compile SQLite for HPUX as follows:
unzip sqlite_source.zip rm tclsqlite.c for i in *.c; do c89 -O -c $i; done rm shell.o ar cr libsqlite.a *.o ranlib libsqlite.a c89 -o sqlite shell.c libsqlite.a
To get it compiling on DJGPP (DOS) you need to patch src/os.c with the following (unified diff):
--- ../temp/sqlite/src/os.c 2002-10-20 20:16:50.000000000 +0000 +++ src/os.c 2002-12-24 18:31:16.000000000 +0000 @@ -27,6 +27,10 @@ # include <winbase.h> #endif
+#if (!defined __DJGPP__) && (!defined O_BINARY) +#define O_BINARY 0 +#endif + /* ** Macros for performance tracing. Normally turned off */ @@ -232,9 +236,9 @@ int *pReadonly ){ #if OS_UNIX - id->fd = open(zFilename, O_RDWR|O_CREAT, 0644); + id->fd = open(zFilename, O_RDWR|O_CREAT|O_BINARY, 0644); if( id->fd<0 ){ - id->fd = open(zFilename, O_RDONLY); + id->fd = open(zFilename, O_RDONLY|O_BINARY); if( id->fd<0 ){ return SQLITE_CANTOPEN; } @@ -306,7 +310,7 @@ #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif - id->fd = open(zFilename, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600); + id->fd = open(zFilename, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_BINARY, 0600); if( id->fd<0 ){ return SQLITE_CANTOPEN; } @@ -359,7 +363,7 @@ */ int sqliteOsOpenReadOnly(const char *zFilename, OsFile *id){ #if OS_UNIX - id->fd = open(zFilename, O_RDONLY); + id->fd = open(zFilename, O_RDONLY|O_BINARY); if( id->fd<0 ){ return SQLITE_CANTOPEN; } @@ -682,9 +686,13 @@ lock.l_type = F_RDLCK; 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; @@ -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