Hi,All Sqlite3 user,or experts I did need your help,please give me a hand,thanks! I am now porting sqlite3_6_11(amalgamation) to Vxworks( Version number is 5.5). status of porting is: Sqlite had been compiled successfully with Tornado2.22. But when I ran the test case on Vxworks, programm always emit error ,error case detailed as follows: 1.Open a database file successfully( database file located at CF card,file path like this "/ata0a/sqlitedb.dat") 2.Create the first table successfully.( make me happy) 3.Create the next table failed. Error message is "unable to open database file"
For me ,I think I had done a bad switcher(Macro definition) to SQLITE,what is for escaping fsyn,access,fcntl function,etc. The Macro I set as follows:( see the predefine between "#if SQLITE_OS_VXWORKS" and "#endif /*SQLITE_OS_VXWORKS*/"), In additional,I ran the test case on WINDOWS and LINUX,test case do a good job! #if SQLITE_OS_VXWORKS #ifdef SQLITE_OS_UNIX #undef SQLITE_OS_UNIX #define SQLITE_OS_UNIX 1 #endif #ifndef SQLITE_OS_UNIX #define SQLITE_OS_UNIX 1 #endif #include <semaphore.h> #include <sys/ioctl.h> #include <ioLib.h> #define SEM_FAILED ((sem_t *)0) /*Do use the Sem in vxworks*/ #define OS_VXWORKS 1 #define SQLITE_HOMEGROWN_RECURSIVE_MUTEX 1 #ifdef SQLITE_ENABLE_LOCKING_STYLE #undef SQLITE_ENABLE_LOCKING_STYLE /*Do lock file in vxworks*/ #endif /*SQLITE_ENABLE_LOCKING_STYLE*/ #define __DJGPP__ 1 /*escape fcntl,etc refered to file handling*/ #define SQLITE_THREADSAFE 0 /*Thread concurrent is not save*/ #define SQLITE_NO_SYNC 1 #define R_OK 4 /*Test for read permission*/ #define W_OK 2 /*Test for write permission*/ #define X_OK 1 /*Test for execute permission*/ #define F_OK 0 /*Test for existence*/ #define access(A,B) 0 /*escape access function*/ #define fsync( A) ioctl(A, FIOFLUSH, 0) /*escape fsync function*/ #ifdef HAVE_FDATASYNC #undef HAVE_FDATASYNC #endif #ifndef SQLITE_OMIT_LOAD_EXTENSION #define SQLITE_OMIT_LOAD_EXTENSION 1 #endif #define SQLITE_OMIT_AUTHORIZATION 1 #endif /*SQLITE_OS_VXWORKS*/ -- Best regard! David.Wen _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users