portability and constant expression in toSQLiteValue(const char* val) 

#2, #3