コード例 #1
0
ファイル: test_config_c.cs プロジェクト: ekicyou/pasta
        /*
        ** This routine sets entries in the global ::sqlite_options() array variable
        ** according to the compile-time configuration of the database.  Test
        ** procedures use this to determine when tests should be omitted.
        */
        static void set_options(Tcl_Interp interp)
        {
            TCL.Tcl_SetVar2(interp, "sqlite_options", "malloc", "0", TCL.TCL_GLOBAL_ONLY);

#if SQLITE_32BIT_ROWID
            TCL.Tcl_SetVar2(interp, "sqlite_options", "rowid32", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "rowid32", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_CASE_SENSITIVE_LIKE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "casesensitivelike", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "casesensitivelike", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_DEBUG
            TCL.Tcl_SetVar2(interp, "sqlite_options", "debug", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "debug", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_DISABLE_DIRSYNC
            TCL.Tcl_SetVar2(interp, "sqlite_options", "dirsync", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "dirsync", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_DISABLE_LFS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "lfs", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "lfs", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if FALSE // /* def SQLITE_MEMDEBUG */
            TCL.Tcl_SetVar2(interp, "sqlite_options", "memdebug", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "memdebug", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_8_3_NAMES
            TCL.Tcl_SetVar2(interp, "sqlite_options", "8_3_names", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "8_3_names", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_MEMSYS3
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mem3", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mem3", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_MEMSYS5
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mem5", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mem5", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_MUTEX_OMIT
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mutex", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mutex", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_MUTEX_NOOP
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mutex_noop", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "mutex_noop", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_ALTERTABLE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "altertable", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "altertable", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_ANALYZE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "analyze", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "analyze", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_ATOMIC_WRITE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "atomicwrite", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "atomicwrite", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_ATTACH
            TCL.Tcl_SetVar2(interp, "sqlite_options", "attach", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "attach", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_AUTHORIZATION
            TCL.Tcl_SetVar2(interp, "sqlite_options", "auth", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "auth", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_AUTOINCREMENT
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autoinc", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autoinc", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_AUTOMATIC_INDEX
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autoindex", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autoindex", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_AUTORESET
            Tcl_SetVar2(interp, "sqlite_options", "autoreset", "0", TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autoreset", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_AUTOVACUUM
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autovacuum", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "autovacuum", "1", TCL.TCL_GLOBAL_ONLY);
#endif // * SQLITE_OMIT_AUTOVACUUM */
#if  !SQLITE_DEFAULT_AUTOVACUUM
            TCL.Tcl_SetVar2(interp, "sqlite_options", "default_autovacuum", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "default_autovacuum",
                            STRINGVALUE(SQLITE_DEFAULT_AUTOVACUUM), TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_BETWEEN_OPTIMIZATION
            TCL.Tcl_SetVar2(interp, "sqlite_options", "between_opt", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "between_opt", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_BUILTIN_TEST
            TCL.Tcl_SetVar2(interp, "sqlite_options", "builtin_test", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "builtin_test", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_BLOB_LITERAL
            TCL.Tcl_SetVar2(interp, "sqlite_options", "bloblit", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "bloblit", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_CAST
            TCL.Tcl_SetVar2(interp, "sqlite_options", "cast", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "cast", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_CHECK
            TCL.Tcl_SetVar2(interp, "sqlite_options", "check", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "check", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_COLUMN_METADATA
            TCL.Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_OVERSIZE_CELL_CHECK
            TCL.Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "1",
                            TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "0",
                            TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_COMPILEOPTION_DIAGS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "compileoption_diags", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "compileoption_diags", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_COMPLETE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "complete", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "complete", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_COMPOUND_SELECT
            TCL.Tcl_SetVar2(interp, "sqlite_options", "compound", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "compound", "1", TCL.TCL_GLOBAL_ONLY);
#endif

            TCL.Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL.TCL_GLOBAL_ONLY);

#if  SQLITE_OS_UNIX
            TCL.Tcl_SetVar2(interp, "sqlite_options", "crashtest", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "crashtest", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_DATETIME_FUNCS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "datetime", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_DECLTYPE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "decltype", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_DEPRECATED
            TCL.Tcl_SetVar2(interp, "sqlite_options", "deprecated", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "deprecated", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_DISKIO
            TCL.Tcl_SetVar2(interp, "sqlite_options", "diskio", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "diskio", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_EXPLAIN
            TCL.Tcl_SetVar2(interp, "sqlite_options", "explain", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "explain", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_FLOATING_POINT
            TCL.Tcl_SetVar2(interp, "sqlite_options", "floatingpoint", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "floatingpoint", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_FOREIGN_KEY
            TCL.Tcl_SetVar2(interp, "sqlite_options", "foreignkey", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "foreignkey", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_FTS1
            TCL.Tcl_SetVar2(interp, "sqlite_options", "fts1", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "fts1", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_FTS2
            TCL.Tcl_SetVar2(interp, "sqlite_options", "fts2", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "fts2", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_FTS3
            TCL.Tcl_SetVar2(interp, "sqlite_options", "fts3", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_GET_TABLE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "gettable", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "gettable", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_ICU
            TCL.Tcl_SetVar2(interp, "sqlite_options", "icu", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "icu", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_INCRBLOB
            TCL.Tcl_SetVar2(interp, "sqlite_options", "incrblob", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "incrblob", "1", TCL.TCL_GLOBAL_ONLY);
#endif // * SQLITE_OMIT_AUTOVACUUM */

#if SQLITE_OMIT_INTEGRITY_CHECK
            TCL.Tcl_SetVar2(interp, "sqlite_options", "integrityck", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "integrityck", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if  !SQLITE_DEFAULT_FILE_FORMAT //SQLITE_DEFAULT_FILE_FORMAT && SQLITE_DEFAULT_FILE_FORMAT==1
            TCL.Tcl_SetVar2(interp, "sqlite_options", "legacyformat", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "legacyformat", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_LIKE_OPTIMIZATION
            TCL.Tcl_SetVar2(interp, "sqlite_options", "like_opt", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "like_opt", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_LOAD_EXTENSION
            TCL.Tcl_SetVar2(interp, "sqlite_options", "load_ext", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "load_ext", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_LOCALTIME
            TCL.Tcl_SetVar2(interp, "sqlite_options", "localtime", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "localtime", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_LOOKASIDE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "lookaside", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "lookaside", "1", TCL.TCL_GLOBAL_ONLY);
#endif

            TCL.Tcl_SetVar2(interp, "sqlite_options", "long_double", "0", TCL.TCL_GLOBAL_ONLY);
            //sizeof(LONGDOUBLE_TYPE)>sizeof(double) ? "1" : "0",
            //TCL.TCL_GLOBAL_ONLY);

#if SQLITE_OMIT_MEMORYDB
            TCL.Tcl_SetVar2(interp, "sqlite_options", "memorydb", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "memorydb", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_MEMORY_MANAGEMENT
            TCL.Tcl_SetVar2(interp, "sqlite_options", "memorymanage", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "memorymanage", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_OR_OPTIMIZATION
            TCL.Tcl_SetVar2(interp, "sqlite_options", "or_opt", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "or_opt", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_PAGER_PRAGMAS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if  SQLITE_OMIT_PRAGMA || SQLITE_OMIT_FLAG_PRAGMAS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "pragma", "0", TCL.TCL_GLOBAL_ONLY);
            TCL.Tcl_SetVar2(interp, "sqlite_options", "integrityck", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "pragma", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_PROGRESS_CALLBACK
            TCL.Tcl_SetVar2(interp, "sqlite_options", "progress", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_REINDEX
            TCL.Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "reindex", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_RTREE
            TCL.Tcl_SetVar2(interp, "sqlite_options", "rtree", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "rtree", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_SCHEMA_PRAGMAS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
            TCL.Tcl_SetVar2(interp, "sqlite_options", "schema_version", "0", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "schema_version", "1", TCL.TCL_GLOBAL_ONLY);
#endif

#if SQLITE_ENABLE_STAT2
            TCL.Tcl_SetVar2(interp, "sqlite_options", "stat2", "1", TCL.TCL_GLOBAL_ONLY);
#else
            TCL.Tcl_SetVar2(interp, "sqlite_options", "stat2", "0", TCL.TCL_GLOBAL_ONLY);
#endif

#if !(SQLITE_ENABLE_LOCKING_STYLE)
#  if (__APPLE__)
//#    define SQLITE_ENABLE_LOCKING_STYLE 1
#  else
            //#    define SQLITE_ENABLE_LOCKING_STYLE 0
#  endif