gitlab.com/CoiaPrant/sqlite3@v1.19.1/vfs/vfs_linux_386.go (about) 1 // Code generated by 'ccgo -o vfs_linux_386.go c/vfs.c -I../testdata/sqlite-amalgamation-3380500 -lgitlab.com/CoiaPrant/sqlite3/lib -pkgname vfs -nocapi -export-externs X -D SQLITE_OS_UNIX -hide=vfsFullPathname -hide=vfsOpen -hide=vfsRead -hide=vfsAccess -hide=vfsFileSize -hide=vfsClose', DO NOT EDIT. 2 3 package vfs 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 11 "modernc.org/libc" 12 "modernc.org/libc/sys/types" 13 "gitlab.com/CoiaPrant/sqlite3/lib" 14 ) 15 16 var _ = math.Pi 17 var _ reflect.Kind 18 var _ atomic.Value 19 var _ unsafe.Pointer 20 var _ *libc.TLS 21 var _ types.Size_t 22 23 const ( 24 _PC_LINK_MAX = 0 25 _PC_MAX_CANON = 1 26 _PC_MAX_INPUT = 2 27 _PC_NAME_MAX = 3 28 _PC_PATH_MAX = 4 29 _PC_PIPE_BUF = 5 30 _PC_CHOWN_RESTRICTED = 6 31 _PC_NO_TRUNC = 7 32 _PC_VDISABLE = 8 33 _PC_SYNC_IO = 9 34 _PC_ASYNC_IO = 10 35 _PC_PRIO_IO = 11 36 _PC_SOCK_MAXBUF = 12 37 _PC_FILESIZEBITS = 13 38 _PC_REC_INCR_XFER_SIZE = 14 39 _PC_REC_MAX_XFER_SIZE = 15 40 _PC_REC_MIN_XFER_SIZE = 16 41 _PC_REC_XFER_ALIGN = 17 42 _PC_ALLOC_SIZE_MIN = 18 43 _PC_SYMLINK_MAX = 19 44 _PC_2_SYMLINKS = 20 45 ) 46 47 const ( 48 _CS_PATH = 0 49 50 _CS_V6_WIDTH_RESTRICTED_ENVS = 1 51 52 _CS_GNU_LIBC_VERSION = 2 53 _CS_GNU_LIBPTHREAD_VERSION = 3 54 55 _CS_V5_WIDTH_RESTRICTED_ENVS = 4 56 57 _CS_V7_WIDTH_RESTRICTED_ENVS = 5 58 59 _CS_LFS_CFLAGS = 1000 60 _CS_LFS_LDFLAGS = 1001 61 _CS_LFS_LIBS = 1002 62 _CS_LFS_LINTFLAGS = 1003 63 _CS_LFS64_CFLAGS = 1004 64 _CS_LFS64_LDFLAGS = 1005 65 _CS_LFS64_LIBS = 1006 66 _CS_LFS64_LINTFLAGS = 1007 67 68 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100 69 _CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 70 _CS_XBS5_ILP32_OFF32_LIBS = 1102 71 _CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 72 _CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 73 _CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 74 _CS_XBS5_ILP32_OFFBIG_LIBS = 1106 75 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 76 _CS_XBS5_LP64_OFF64_CFLAGS = 1108 77 _CS_XBS5_LP64_OFF64_LDFLAGS = 1109 78 _CS_XBS5_LP64_OFF64_LIBS = 1110 79 _CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 80 _CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 81 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 82 _CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 83 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 84 85 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 86 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 87 _CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 88 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 89 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 90 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 91 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 92 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 93 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 94 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 95 _CS_POSIX_V6_LP64_OFF64_LIBS = 1126 96 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 97 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 98 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 99 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 100 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 101 102 _CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 103 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 104 _CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 105 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 106 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 107 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 108 _CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 109 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 110 _CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 111 _CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 112 _CS_POSIX_V7_LP64_OFF64_LIBS = 1142 113 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 114 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 115 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 116 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 117 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 118 119 _CS_V6_ENV = 1148 120 _CS_V7_ENV = 1149 121 ) 122 123 const ( 124 _SC_ARG_MAX = 0 125 _SC_CHILD_MAX = 1 126 _SC_CLK_TCK = 2 127 _SC_NGROUPS_MAX = 3 128 _SC_OPEN_MAX = 4 129 _SC_STREAM_MAX = 5 130 _SC_TZNAME_MAX = 6 131 _SC_JOB_CONTROL = 7 132 _SC_SAVED_IDS = 8 133 _SC_REALTIME_SIGNALS = 9 134 _SC_PRIORITY_SCHEDULING = 10 135 _SC_TIMERS = 11 136 _SC_ASYNCHRONOUS_IO = 12 137 _SC_PRIORITIZED_IO = 13 138 _SC_SYNCHRONIZED_IO = 14 139 _SC_FSYNC = 15 140 _SC_MAPPED_FILES = 16 141 _SC_MEMLOCK = 17 142 _SC_MEMLOCK_RANGE = 18 143 _SC_MEMORY_PROTECTION = 19 144 _SC_MESSAGE_PASSING = 20 145 _SC_SEMAPHORES = 21 146 _SC_SHARED_MEMORY_OBJECTS = 22 147 _SC_AIO_LISTIO_MAX = 23 148 _SC_AIO_MAX = 24 149 _SC_AIO_PRIO_DELTA_MAX = 25 150 _SC_DELAYTIMER_MAX = 26 151 _SC_MQ_OPEN_MAX = 27 152 _SC_MQ_PRIO_MAX = 28 153 _SC_VERSION = 29 154 _SC_PAGESIZE = 30 155 _SC_RTSIG_MAX = 31 156 _SC_SEM_NSEMS_MAX = 32 157 _SC_SEM_VALUE_MAX = 33 158 _SC_SIGQUEUE_MAX = 34 159 _SC_TIMER_MAX = 35 160 161 _SC_BC_BASE_MAX = 36 162 _SC_BC_DIM_MAX = 37 163 _SC_BC_SCALE_MAX = 38 164 _SC_BC_STRING_MAX = 39 165 _SC_COLL_WEIGHTS_MAX = 40 166 _SC_EQUIV_CLASS_MAX = 41 167 _SC_EXPR_NEST_MAX = 42 168 _SC_LINE_MAX = 43 169 _SC_RE_DUP_MAX = 44 170 _SC_CHARCLASS_NAME_MAX = 45 171 172 _SC_2_VERSION = 46 173 _SC_2_C_BIND = 47 174 _SC_2_C_DEV = 48 175 _SC_2_FORT_DEV = 49 176 _SC_2_FORT_RUN = 50 177 _SC_2_SW_DEV = 51 178 _SC_2_LOCALEDEF = 52 179 180 _SC_PII = 53 181 _SC_PII_XTI = 54 182 _SC_PII_SOCKET = 55 183 _SC_PII_INTERNET = 56 184 _SC_PII_OSI = 57 185 _SC_POLL = 58 186 _SC_SELECT = 59 187 _SC_UIO_MAXIOV = 60 188 _SC_IOV_MAX = 60 189 _SC_PII_INTERNET_STREAM = 61 190 _SC_PII_INTERNET_DGRAM = 62 191 _SC_PII_OSI_COTS = 63 192 _SC_PII_OSI_CLTS = 64 193 _SC_PII_OSI_M = 65 194 _SC_T_IOV_MAX = 66 195 196 _SC_THREADS = 67 197 _SC_THREAD_SAFE_FUNCTIONS = 68 198 _SC_GETGR_R_SIZE_MAX = 69 199 _SC_GETPW_R_SIZE_MAX = 70 200 _SC_LOGIN_NAME_MAX = 71 201 _SC_TTY_NAME_MAX = 72 202 _SC_THREAD_DESTRUCTOR_ITERATIONS = 73 203 _SC_THREAD_KEYS_MAX = 74 204 _SC_THREAD_STACK_MIN = 75 205 _SC_THREAD_THREADS_MAX = 76 206 _SC_THREAD_ATTR_STACKADDR = 77 207 _SC_THREAD_ATTR_STACKSIZE = 78 208 _SC_THREAD_PRIORITY_SCHEDULING = 79 209 _SC_THREAD_PRIO_INHERIT = 80 210 _SC_THREAD_PRIO_PROTECT = 81 211 _SC_THREAD_PROCESS_SHARED = 82 212 213 _SC_NPROCESSORS_CONF = 83 214 _SC_NPROCESSORS_ONLN = 84 215 _SC_PHYS_PAGES = 85 216 _SC_AVPHYS_PAGES = 86 217 _SC_ATEXIT_MAX = 87 218 _SC_PASS_MAX = 88 219 220 _SC_XOPEN_VERSION = 89 221 _SC_XOPEN_XCU_VERSION = 90 222 _SC_XOPEN_UNIX = 91 223 _SC_XOPEN_CRYPT = 92 224 _SC_XOPEN_ENH_I18N = 93 225 _SC_XOPEN_SHM = 94 226 227 _SC_2_CHAR_TERM = 95 228 _SC_2_C_VERSION = 96 229 _SC_2_UPE = 97 230 231 _SC_XOPEN_XPG2 = 98 232 _SC_XOPEN_XPG3 = 99 233 _SC_XOPEN_XPG4 = 100 234 235 _SC_CHAR_BIT = 101 236 _SC_CHAR_MAX = 102 237 _SC_CHAR_MIN = 103 238 _SC_INT_MAX = 104 239 _SC_INT_MIN = 105 240 _SC_LONG_BIT = 106 241 _SC_WORD_BIT = 107 242 _SC_MB_LEN_MAX = 108 243 _SC_NZERO = 109 244 _SC_SSIZE_MAX = 110 245 _SC_SCHAR_MAX = 111 246 _SC_SCHAR_MIN = 112 247 _SC_SHRT_MAX = 113 248 _SC_SHRT_MIN = 114 249 _SC_UCHAR_MAX = 115 250 _SC_UINT_MAX = 116 251 _SC_ULONG_MAX = 117 252 _SC_USHRT_MAX = 118 253 254 _SC_NL_ARGMAX = 119 255 _SC_NL_LANGMAX = 120 256 _SC_NL_MSGMAX = 121 257 _SC_NL_NMAX = 122 258 _SC_NL_SETMAX = 123 259 _SC_NL_TEXTMAX = 124 260 261 _SC_XBS5_ILP32_OFF32 = 125 262 _SC_XBS5_ILP32_OFFBIG = 126 263 _SC_XBS5_LP64_OFF64 = 127 264 _SC_XBS5_LPBIG_OFFBIG = 128 265 266 _SC_XOPEN_LEGACY = 129 267 _SC_XOPEN_REALTIME = 130 268 _SC_XOPEN_REALTIME_THREADS = 131 269 270 _SC_ADVISORY_INFO = 132 271 _SC_BARRIERS = 133 272 _SC_BASE = 134 273 _SC_C_LANG_SUPPORT = 135 274 _SC_C_LANG_SUPPORT_R = 136 275 _SC_CLOCK_SELECTION = 137 276 _SC_CPUTIME = 138 277 _SC_THREAD_CPUTIME = 139 278 _SC_DEVICE_IO = 140 279 _SC_DEVICE_SPECIFIC = 141 280 _SC_DEVICE_SPECIFIC_R = 142 281 _SC_FD_MGMT = 143 282 _SC_FIFO = 144 283 _SC_PIPE = 145 284 _SC_FILE_ATTRIBUTES = 146 285 _SC_FILE_LOCKING = 147 286 _SC_FILE_SYSTEM = 148 287 _SC_MONOTONIC_CLOCK = 149 288 _SC_MULTI_PROCESS = 150 289 _SC_SINGLE_PROCESS = 151 290 _SC_NETWORKING = 152 291 _SC_READER_WRITER_LOCKS = 153 292 _SC_SPIN_LOCKS = 154 293 _SC_REGEXP = 155 294 _SC_REGEX_VERSION = 156 295 _SC_SHELL = 157 296 _SC_SIGNALS = 158 297 _SC_SPAWN = 159 298 _SC_SPORADIC_SERVER = 160 299 _SC_THREAD_SPORADIC_SERVER = 161 300 _SC_SYSTEM_DATABASE = 162 301 _SC_SYSTEM_DATABASE_R = 163 302 _SC_TIMEOUTS = 164 303 _SC_TYPED_MEMORY_OBJECTS = 165 304 _SC_USER_GROUPS = 166 305 _SC_USER_GROUPS_R = 167 306 _SC_2_PBS = 168 307 _SC_2_PBS_ACCOUNTING = 169 308 _SC_2_PBS_LOCATE = 170 309 _SC_2_PBS_MESSAGE = 171 310 _SC_2_PBS_TRACK = 172 311 _SC_SYMLOOP_MAX = 173 312 _SC_STREAMS = 174 313 _SC_2_PBS_CHECKPOINT = 175 314 315 _SC_V6_ILP32_OFF32 = 176 316 _SC_V6_ILP32_OFFBIG = 177 317 _SC_V6_LP64_OFF64 = 178 318 _SC_V6_LPBIG_OFFBIG = 179 319 320 _SC_HOST_NAME_MAX = 180 321 _SC_TRACE = 181 322 _SC_TRACE_EVENT_FILTER = 182 323 _SC_TRACE_INHERIT = 183 324 _SC_TRACE_LOG = 184 325 326 _SC_LEVEL1_ICACHE_SIZE = 185 327 _SC_LEVEL1_ICACHE_ASSOC = 186 328 _SC_LEVEL1_ICACHE_LINESIZE = 187 329 _SC_LEVEL1_DCACHE_SIZE = 188 330 _SC_LEVEL1_DCACHE_ASSOC = 189 331 _SC_LEVEL1_DCACHE_LINESIZE = 190 332 _SC_LEVEL2_CACHE_SIZE = 191 333 _SC_LEVEL2_CACHE_ASSOC = 192 334 _SC_LEVEL2_CACHE_LINESIZE = 193 335 _SC_LEVEL3_CACHE_SIZE = 194 336 _SC_LEVEL3_CACHE_ASSOC = 195 337 _SC_LEVEL3_CACHE_LINESIZE = 196 338 _SC_LEVEL4_CACHE_SIZE = 197 339 _SC_LEVEL4_CACHE_ASSOC = 198 340 _SC_LEVEL4_CACHE_LINESIZE = 199 341 342 _SC_IPV6 = 235 343 _SC_RAW_SOCKETS = 236 344 345 _SC_V7_ILP32_OFF32 = 237 346 _SC_V7_ILP32_OFFBIG = 238 347 _SC_V7_LP64_OFF64 = 239 348 _SC_V7_LPBIG_OFFBIG = 240 349 350 _SC_SS_REPL_MAX = 241 351 352 _SC_TRACE_EVENT_NAME_MAX = 242 353 _SC_TRACE_NAME_MAX = 243 354 _SC_TRACE_SYS_MAX = 244 355 _SC_TRACE_USER_EVENT_MAX = 245 356 357 _SC_XOPEN_STREAMS = 246 358 359 _SC_THREAD_ROBUST_PRIO_INHERIT = 247 360 _SC_THREAD_ROBUST_PRIO_PROTECT = 248 361 ) 362 363 const ( 364 SIGEV_SIGNAL = 0 365 SIGEV_NONE = 1 366 SIGEV_THREAD = 2 367 368 SIGEV_THREAD_ID = 4 369 ) 370 371 const ( 372 SEGV_MAPERR = 1 373 SEGV_ACCERR = 2 374 SEGV_BNDERR = 3 375 SEGV_PKUERR = 4 376 SEGV_ACCADI = 5 377 SEGV_ADIDERR = 6 378 SEGV_ADIPERR = 7 379 ) 380 381 const ( 382 BUS_ADRALN = 1 383 BUS_ADRERR = 2 384 BUS_OBJERR = 3 385 BUS_MCEERR_AR = 4 386 BUS_MCEERR_AO = 5 387 ) 388 389 const ( 390 CLD_EXITED = 1 391 CLD_KILLED = 2 392 CLD_DUMPED = 3 393 CLD_TRAPPED = 4 394 CLD_STOPPED = 5 395 CLD_CONTINUED = 6 396 ) 397 398 const ( 399 POLL_IN = 1 400 POLL_OUT = 2 401 POLL_MSG = 3 402 POLL_ERR = 4 403 POLL_PRI = 5 404 POLL_HUP = 6 405 ) 406 407 const ( 408 SI_ASYNCNL = -60 409 SI_DETHREAD = -7 410 411 SI_TKILL = -6 412 SI_SIGIO = -5 413 SI_ASYNCIO = -4 414 SI_MESGQ = -3 415 SI_TIMER = -2 416 SI_QUEUE = -1 417 SI_USER = 0 418 SI_KERNEL = 128 419 ) 420 421 const ( 422 ILL_ILLOPC = 1 423 ILL_ILLOPN = 2 424 ILL_ILLADR = 3 425 ILL_ILLTRP = 4 426 ILL_PRVOPC = 5 427 ILL_PRVREG = 6 428 ILL_COPROC = 7 429 ILL_BADSTK = 8 430 ILL_BADIADDR = 9 431 ) 432 433 const ( 434 FPE_INTDIV = 1 435 FPE_INTOVF = 2 436 FPE_FLTDIV = 3 437 FPE_FLTOVF = 4 438 FPE_FLTUND = 5 439 FPE_FLTRES = 6 440 FPE_FLTINV = 7 441 FPE_FLTSUB = 8 442 FPE_FLTUNK = 14 443 FPE_CONDTRAP = 15 444 ) 445 446 const ( 447 SS_ONSTACK = 1 448 SS_DISABLE = 2 449 ) 450 451 type ptrdiff_t = int32 452 453 type size_t = uint32 454 455 type wchar_t = int32 456 457 type va_list = uintptr 458 459 type sqlite_int64 = int64 460 type sqlite_uint64 = uint64 461 type sqlite3_int64 = sqlite_int64 462 type sqlite3_uint64 = sqlite_uint64 463 464 type sqlite3_callback = uintptr 465 466 type sqlite3_file1 = struct{ pMethods uintptr } 467 468 type sqlite3_file = sqlite3_file1 469 type sqlite3_io_methods1 = struct { 470 iVersion int32 471 xClose uintptr 472 xRead uintptr 473 xWrite uintptr 474 xTruncate uintptr 475 xSync uintptr 476 xFileSize uintptr 477 xLock uintptr 478 xUnlock uintptr 479 xCheckReservedLock uintptr 480 xFileControl uintptr 481 xSectorSize uintptr 482 xDeviceCharacteristics uintptr 483 xShmMap uintptr 484 xShmLock uintptr 485 xShmBarrier uintptr 486 xShmUnmap uintptr 487 xFetch uintptr 488 xUnfetch uintptr 489 } 490 491 type sqlite3_io_methods = sqlite3_io_methods1 492 493 type sqlite3_vfs1 = struct { 494 iVersion int32 495 szOsFile int32 496 mxPathname int32 497 pNext uintptr 498 zName uintptr 499 pAppData uintptr 500 xOpen uintptr 501 xDelete uintptr 502 xAccess uintptr 503 xFullPathname uintptr 504 xDlOpen uintptr 505 xDlError uintptr 506 xDlSym uintptr 507 xDlClose uintptr 508 xRandomness uintptr 509 xSleep uintptr 510 xCurrentTime uintptr 511 xGetLastError uintptr 512 xCurrentTimeInt64 uintptr 513 xSetSystemCall uintptr 514 xGetSystemCall uintptr 515 xNextSystemCall uintptr 516 } 517 518 type sqlite3_vfs = sqlite3_vfs1 519 type sqlite3_syscall_ptr = uintptr 520 521 type sqlite3_mem_methods1 = struct { 522 xMalloc uintptr 523 xFree uintptr 524 xRealloc uintptr 525 xSize uintptr 526 xRoundup uintptr 527 xInit uintptr 528 xShutdown uintptr 529 pAppData uintptr 530 } 531 532 type sqlite3_mem_methods = sqlite3_mem_methods1 533 534 type sqlite3_destructor_type = uintptr 535 536 type sqlite3_vtab1 = struct { 537 pModule uintptr 538 nRef int32 539 zErrMsg uintptr 540 } 541 542 type sqlite3_vtab = sqlite3_vtab1 543 type sqlite3_index_info1 = struct { 544 nConstraint int32 545 aConstraint uintptr 546 nOrderBy int32 547 aOrderBy uintptr 548 aConstraintUsage uintptr 549 idxNum int32 550 idxStr uintptr 551 needToFreeIdxStr int32 552 orderByConsumed int32 553 estimatedCost float64 554 estimatedRows sqlite3_int64 555 idxFlags int32 556 colUsed sqlite3_uint64 557 } 558 559 type sqlite3_index_info = sqlite3_index_info1 560 type sqlite3_vtab_cursor1 = struct{ pVtab uintptr } 561 562 type sqlite3_vtab_cursor = sqlite3_vtab_cursor1 563 type sqlite3_module1 = struct { 564 iVersion int32 565 xCreate uintptr 566 xConnect uintptr 567 xBestIndex uintptr 568 xDisconnect uintptr 569 xDestroy uintptr 570 xOpen uintptr 571 xClose uintptr 572 xFilter uintptr 573 xNext uintptr 574 xEof uintptr 575 xColumn uintptr 576 xRowid uintptr 577 xUpdate uintptr 578 xBegin uintptr 579 xSync uintptr 580 xCommit uintptr 581 xRollback uintptr 582 xFindFunction uintptr 583 xRename uintptr 584 xSavepoint uintptr 585 xRelease uintptr 586 xRollbackTo uintptr 587 xShadowName uintptr 588 } 589 590 type sqlite3_module = sqlite3_module1 591 592 type sqlite3_index_constraint = struct { 593 iColumn int32 594 op uint8 595 usable uint8 596 _ [2]byte 597 iTermOffset int32 598 } 599 600 type sqlite3_index_orderby = struct { 601 iColumn int32 602 desc uint8 603 _ [3]byte 604 } 605 606 type sqlite3_index_constraint_usage = struct { 607 argvIndex int32 608 omit uint8 609 _ [3]byte 610 } 611 612 type sqlite3_mutex_methods1 = struct { 613 xMutexInit uintptr 614 xMutexEnd uintptr 615 xMutexAlloc uintptr 616 xMutexFree uintptr 617 xMutexEnter uintptr 618 xMutexTry uintptr 619 xMutexLeave uintptr 620 xMutexHeld uintptr 621 xMutexNotheld uintptr 622 } 623 624 type sqlite3_mutex_methods = sqlite3_mutex_methods1 625 626 type sqlite3_pcache_page1 = struct { 627 pBuf uintptr 628 pExtra uintptr 629 } 630 631 type sqlite3_pcache_page = sqlite3_pcache_page1 632 633 type sqlite3_pcache_methods21 = struct { 634 iVersion int32 635 pArg uintptr 636 xInit uintptr 637 xShutdown uintptr 638 xCreate uintptr 639 xCachesize uintptr 640 xPagecount uintptr 641 xFetch uintptr 642 xUnpin uintptr 643 xRekey uintptr 644 xTruncate uintptr 645 xDestroy uintptr 646 xShrink uintptr 647 } 648 649 type sqlite3_pcache_methods2 = sqlite3_pcache_methods21 650 651 type sqlite3_pcache_methods1 = struct { 652 pArg uintptr 653 xInit uintptr 654 xShutdown uintptr 655 xCreate uintptr 656 xCachesize uintptr 657 xPagecount uintptr 658 xFetch uintptr 659 xUnpin uintptr 660 xRekey uintptr 661 xTruncate uintptr 662 xDestroy uintptr 663 } 664 665 type sqlite3_pcache_methods = sqlite3_pcache_methods1 666 667 type sqlite3_snapshot1 = struct{ hidden [48]uint8 } 668 669 type sqlite3_snapshot = sqlite3_snapshot1 670 671 type sqlite3_rtree_geometry1 = struct { 672 pContext uintptr 673 nParam int32 674 aParam uintptr 675 pUser uintptr 676 xDelUser uintptr 677 } 678 679 type sqlite3_rtree_geometry = sqlite3_rtree_geometry1 680 type sqlite3_rtree_query_info1 = struct { 681 pContext uintptr 682 nParam int32 683 aParam uintptr 684 pUser uintptr 685 xDelUser uintptr 686 aCoord uintptr 687 anQueue uintptr 688 nCoord int32 689 iLevel int32 690 mxLevel int32 691 iRowid sqlite3_int64 692 rParentScore sqlite3_rtree_dbl 693 eParentWithin int32 694 eWithin int32 695 rScore sqlite3_rtree_dbl 696 apSqlParam uintptr 697 } 698 699 type sqlite3_rtree_query_info = sqlite3_rtree_query_info1 700 701 type sqlite3_rtree_dbl = float64 702 703 type Fts5ExtensionApi1 = struct { 704 iVersion int32 705 xUserData uintptr 706 xColumnCount uintptr 707 xRowCount uintptr 708 xColumnTotalSize uintptr 709 xTokenize uintptr 710 xPhraseCount uintptr 711 xPhraseSize uintptr 712 xInstCount uintptr 713 xInst uintptr 714 xRowid uintptr 715 xColumnText uintptr 716 xColumnSize uintptr 717 xQueryPhrase uintptr 718 xSetAuxdata uintptr 719 xGetAuxdata uintptr 720 xPhraseFirst uintptr 721 xPhraseNext uintptr 722 xPhraseFirstColumn uintptr 723 xPhraseNextColumn uintptr 724 } 725 726 type Fts5ExtensionApi = Fts5ExtensionApi1 727 type Fts5PhraseIter1 = struct { 728 a uintptr 729 b uintptr 730 } 731 732 type Fts5PhraseIter = Fts5PhraseIter1 733 734 type fts5_extension_function = uintptr 735 type fts5_tokenizer1 = struct { 736 xCreate uintptr 737 xDelete uintptr 738 xTokenize uintptr 739 } 740 741 type fts5_tokenizer = fts5_tokenizer1 742 743 type fts5_api1 = struct { 744 iVersion int32 745 xCreateTokenizer uintptr 746 xFindTokenizer uintptr 747 xCreateFunction uintptr 748 } 749 750 type fts5_api = fts5_api1 751 752 type __locale_struct = struct { 753 __locales [13]uintptr 754 __ctype_b uintptr 755 __ctype_tolower uintptr 756 __ctype_toupper uintptr 757 __names [13]uintptr 758 } 759 760 type locale_t = uintptr 761 762 type u_char = uint8 763 type u_short = uint16 764 type u_int = uint32 765 type u_long = uint32 766 type quad_t = int64 767 type u_quad_t = uint64 768 type fsid_t = struct{ __val [2]int32 } 769 type loff_t = int64 770 771 type ino_t = uint64 772 773 type dev_t = uint64 774 775 type gid_t = uint32 776 777 type mode_t = uint32 778 779 type nlink_t = uint32 780 781 type uid_t = uint32 782 783 type off_t = int64 784 785 type pid_t = int32 786 787 type id_t = uint32 788 789 type ssize_t = int32 790 791 type daddr_t = int32 792 type caddr_t = uintptr 793 794 type key_t = int32 795 796 type clock_t = int32 797 798 type clockid_t = int32 799 800 type time_t = int32 801 802 type timer_t = uintptr 803 804 type ulong = uint32 805 type ushort = uint16 806 type uint = uint32 807 808 type int8_t = int8 809 type int16_t = int16 810 type int32_t = int32 811 type int64_t = int64 812 813 type u_int8_t = uint8 814 type u_int16_t = uint16 815 type u_int32_t = uint32 816 type u_int64_t = uint64 817 818 type register_t = int32 819 820 type sigset_t = struct{ __val [32]uint32 } 821 822 type timeval = struct { 823 tv_sec int32 824 tv_usec int32 825 } 826 827 type timespec = struct { 828 tv_sec int32 829 tv_nsec int32 830 } 831 832 type suseconds_t = int32 833 834 type fd_set = struct{ __fds_bits [32]int32 } 835 836 type fd_mask = int32 837 838 type blksize_t = int32 839 840 type blkcnt_t = int64 841 type fsblkcnt_t = uint64 842 type fsfilcnt_t = uint64 843 844 type __pthread_internal_list = struct { 845 __prev uintptr 846 __next uintptr 847 } 848 849 type __pthread_internal_slist = struct{ __next uintptr } 850 851 type __pthread_mutex_s = struct { 852 __lock int32 853 __count uint32 854 __owner int32 855 __kind int32 856 __nusers uint32 857 __20 struct { 858 _ [0]uint32 859 __elision_data struct { 860 __espins int16 861 __eelision int16 862 } 863 } 864 } 865 866 type __pthread_rwlock_arch_t = struct { 867 __readers uint32 868 __writers uint32 869 __wrphase_futex uint32 870 __writers_futex uint32 871 __pad3 uint32 872 __pad4 uint32 873 __flags uint8 874 __shared uint8 875 __rwelision int8 876 __pad2 uint8 877 __cur_writer int32 878 } 879 880 type __pthread_cond_s = struct { 881 __0 struct{ __wseq uint64 } 882 __8 struct{ __g1_start uint64 } 883 __g_refs [2]uint32 884 __g_size [2]uint32 885 __g1_orig_size uint32 886 __wrefs uint32 887 __g_signals [2]uint32 888 } 889 890 type pthread_t = uint32 891 892 type pthread_mutexattr_t = struct { 893 _ [0]uint32 894 __size [4]int8 895 } 896 897 type pthread_condattr_t = struct { 898 _ [0]uint32 899 __size [4]int8 900 } 901 902 type pthread_key_t = uint32 903 904 type pthread_once_t = int32 905 906 type pthread_attr_t1 = struct { 907 _ [0]uint32 908 __size [36]int8 909 } 910 911 type pthread_attr_t = pthread_attr_t1 912 913 type pthread_mutex_t = struct{ __data __pthread_mutex_s } 914 915 type pthread_cond_t = struct{ __data __pthread_cond_s } 916 917 type pthread_rwlock_t = struct{ __data __pthread_rwlock_arch_t } 918 919 type pthread_rwlockattr_t = struct { 920 _ [0]uint32 921 __size [8]int8 922 } 923 924 type pthread_spinlock_t = int32 925 926 type pthread_barrier_t = struct { 927 _ [0]uint32 928 __size [20]int8 929 } 930 931 type pthread_barrierattr_t = struct { 932 _ [0]uint32 933 __size [4]int8 934 } 935 936 type stat = struct { 937 st_dev uint64 938 __pad1 uint16 939 _ [2]byte 940 __st_ino uint32 941 st_mode uint32 942 st_nlink uint32 943 st_uid uint32 944 st_gid uint32 945 st_rdev uint64 946 __pad2 uint16 947 _ [2]byte 948 st_size int64 949 st_blksize int32 950 st_blocks int64 951 st_atim struct { 952 tv_sec int32 953 tv_nsec int32 954 } 955 st_mtim struct { 956 tv_sec int32 957 tv_nsec int32 958 } 959 st_ctim struct { 960 tv_sec int32 961 tv_nsec int32 962 } 963 st_ino uint64 964 } 965 966 type flock = struct { 967 l_type int16 968 l_whence int16 969 l_start int64 970 l_len int64 971 l_pid int32 972 } 973 974 type sig_atomic_t = int32 975 976 type sigval = struct{ sival_int int32 } 977 978 type siginfo_t = struct { 979 si_signo int32 980 si_errno int32 981 si_code int32 982 _sifields struct{ _pad [29]int32 } 983 } 984 985 type sigval_t = sigval 986 987 type sigevent = struct { 988 sigev_value struct{ sival_int int32 } 989 sigev_signo int32 990 sigev_notify int32 991 _sigev_un struct{ _pad [13]int32 } 992 } 993 994 type sigevent_t = sigevent 995 996 type sig_t = uintptr 997 998 type sigaction = struct { 999 __sigaction_handler struct{ sa_handler uintptr } 1000 sa_mask struct{ __val [32]uint32 } 1001 sa_flags int32 1002 sa_restorer uintptr 1003 } 1004 1005 type _fpx_sw_bytes = struct { 1006 magic1 uint32 1007 extended_size uint32 1008 xstate_bv uint64 1009 xstate_size uint32 1010 __glibc_reserved1 [7]uint32 1011 } 1012 1013 type _fpreg = struct { 1014 significand [4]uint16 1015 exponent uint16 1016 } 1017 1018 type _fpxreg = struct { 1019 significand [4]uint16 1020 exponent uint16 1021 __glibc_reserved1 [3]uint16 1022 } 1023 1024 type _xmmreg = struct{ element [4]uint32 } 1025 1026 type _fpstate = struct { 1027 cw uint32 1028 sw uint32 1029 tag uint32 1030 ipoff uint32 1031 cssel uint32 1032 dataoff uint32 1033 datasel uint32 1034 _st [8]struct { 1035 significand [4]uint16 1036 exponent uint16 1037 } 1038 status uint16 1039 magic uint16 1040 _fxsr_env [6]uint32 1041 mxcsr uint32 1042 __glibc_reserved1 uint32 1043 _fxsr_st [8]struct { 1044 significand [4]uint16 1045 exponent uint16 1046 __glibc_reserved1 [3]uint16 1047 } 1048 _xmm [8]struct{ element [4]uint32 } 1049 __glibc_reserved2 [56]uint32 1050 } 1051 1052 type sigcontext = struct { 1053 gs uint16 1054 __gsh uint16 1055 fs uint16 1056 __fsh uint16 1057 es uint16 1058 __esh uint16 1059 ds uint16 1060 __dsh uint16 1061 edi uint32 1062 esi uint32 1063 ebp uint32 1064 esp uint32 1065 ebx uint32 1066 edx uint32 1067 ecx uint32 1068 eax uint32 1069 trapno uint32 1070 err uint32 1071 eip uint32 1072 cs uint16 1073 __csh uint16 1074 eflags uint32 1075 esp_at_signal uint32 1076 ss uint16 1077 __ssh uint16 1078 fpstate uintptr 1079 oldmask uint32 1080 cr2 uint32 1081 } 1082 1083 type _xsave_hdr = struct { 1084 xstate_bv uint64 1085 __glibc_reserved1 [2]uint64 1086 __glibc_reserved2 [5]uint64 1087 } 1088 1089 type _ymmh_state = struct{ ymmh_space [64]uint32 } 1090 1091 type _xstate = struct { 1092 fpstate struct { 1093 cw uint32 1094 sw uint32 1095 tag uint32 1096 ipoff uint32 1097 cssel uint32 1098 dataoff uint32 1099 datasel uint32 1100 _st [8]struct { 1101 significand [4]uint16 1102 exponent uint16 1103 } 1104 status uint16 1105 magic uint16 1106 _fxsr_env [6]uint32 1107 mxcsr uint32 1108 __glibc_reserved1 uint32 1109 _fxsr_st [8]struct { 1110 significand [4]uint16 1111 exponent uint16 1112 __glibc_reserved1 [3]uint16 1113 } 1114 _xmm [8]struct{ element [4]uint32 } 1115 __glibc_reserved2 [56]uint32 1116 } 1117 xstate_hdr struct { 1118 xstate_bv uint64 1119 __glibc_reserved1 [2]uint64 1120 __glibc_reserved2 [5]uint64 1121 } 1122 ymmh struct{ ymmh_space [64]uint32 } 1123 } 1124 1125 type stack_t = struct { 1126 ss_sp uintptr 1127 ss_flags int32 1128 ss_size size_t 1129 } 1130 1131 type greg_t = int32 1132 1133 type gregset_t = [19]greg_t 1134 1135 type _libc_fpreg = struct { 1136 significand [4]uint16 1137 exponent uint16 1138 } 1139 1140 type _libc_fpstate = struct { 1141 cw uint32 1142 sw uint32 1143 tag uint32 1144 ipoff uint32 1145 cssel uint32 1146 dataoff uint32 1147 datasel uint32 1148 _st [8]struct { 1149 significand [4]uint16 1150 exponent uint16 1151 } 1152 status uint32 1153 } 1154 1155 type fpregset_t = uintptr 1156 1157 type mcontext_t = struct { 1158 gregs gregset_t 1159 fpregs fpregset_t 1160 oldmask uint32 1161 cr2 uint32 1162 } 1163 1164 type ucontext_t1 = struct { 1165 uc_flags uint32 1166 uc_link uintptr 1167 uc_stack stack_t 1168 uc_mcontext mcontext_t 1169 uc_sigmask sigset_t 1170 __fpregs_mem struct { 1171 cw uint32 1172 sw uint32 1173 tag uint32 1174 ipoff uint32 1175 cssel uint32 1176 dataoff uint32 1177 datasel uint32 1178 _st [8]struct { 1179 significand [4]uint16 1180 exponent uint16 1181 } 1182 status uint32 1183 } 1184 __ssp [4]uint32 1185 } 1186 1187 type ucontext_t = ucontext_t1 1188 1189 type sigstack = struct { 1190 ss_sp uintptr 1191 ss_onstack int32 1192 } 1193 1194 type useconds_t = uint32 1195 1196 type intptr_t = int32 1197 1198 type socklen_t = uint32 1199 1200 type tm = struct { 1201 tm_sec int32 1202 tm_min int32 1203 tm_hour int32 1204 tm_mday int32 1205 tm_mon int32 1206 tm_year int32 1207 tm_wday int32 1208 tm_yday int32 1209 tm_isdst int32 1210 tm_gmtoff int32 1211 tm_zone uintptr 1212 } 1213 1214 type itimerspec = struct { 1215 it_interval struct { 1216 tv_sec int32 1217 tv_nsec int32 1218 } 1219 it_value struct { 1220 tv_sec int32 1221 tv_nsec int32 1222 } 1223 } 1224 1225 type VFSFile1 = struct { 1226 base sqlite3_file 1227 fsFile uintptr 1228 fd int32 1229 aBuffer uintptr 1230 nBuffer int32 1231 iBufferOfst sqlite3_int64 1232 } 1233 1234 type VFSFile = VFSFile1 1235 1236 func vfsDirectWrite(tls *libc.TLS, p uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { 1237 bp := tls.Alloc(16) 1238 defer tls.Free(16) 1239 1240 var ofst off_t 1241 var nWrite size_t 1242 1243 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__)), 178)) 1244 libc.X__builtin_abort(tls) 1245 ofst = libc.Xlseek(tls, (*VFSFile)(unsafe.Pointer(p)).fd, iOfst, 0) 1246 if ofst != iOfst { 1247 return 10 | int32(3)<<8 1248 } 1249 1250 nWrite = size_t(libc.Xwrite(tls, (*VFSFile)(unsafe.Pointer(p)).fd, zBuf, uint32(iAmt))) 1251 if nWrite != size_t(iAmt) { 1252 return 10 | int32(3)<<8 1253 } 1254 1255 return 0 1256 } 1257 1258 var __func__ = *(*[15]int8)(unsafe.Pointer(ts + 13)) 1259 1260 func vfsFlushBuffer(tls *libc.TLS, p uintptr) int32 { 1261 bp := tls.Alloc(16) 1262 defer tls.Free(16) 1263 1264 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__1)), 198)) 1265 libc.X__builtin_abort(tls) 1266 var rc int32 = 0 1267 if (*VFSFile)(unsafe.Pointer(p)).nBuffer != 0 { 1268 rc = vfsDirectWrite(tls, p, (*VFSFile)(unsafe.Pointer(p)).aBuffer, (*VFSFile)(unsafe.Pointer(p)).nBuffer, (*VFSFile)(unsafe.Pointer(p)).iBufferOfst) 1269 (*VFSFile)(unsafe.Pointer(p)).nBuffer = 0 1270 } 1271 return rc 1272 } 1273 1274 var __func__1 = *(*[15]int8)(unsafe.Pointer(ts + 28)) 1275 1276 func vfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { 1277 bp := tls.Alloc(16) 1278 defer tls.Free(16) 1279 1280 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__4)), 273)) 1281 libc.X__builtin_abort(tls) 1282 var p uintptr = pFile 1283 1284 if (*VFSFile)(unsafe.Pointer(p)).aBuffer != 0 { 1285 var z uintptr = zBuf 1286 var n int32 = iAmt 1287 var i sqlite3_int64 = iOfst 1288 1289 for n > 0 { 1290 var nCopy int32 1291 1292 if (*VFSFile)(unsafe.Pointer(p)).nBuffer == 8192 || (*VFSFile)(unsafe.Pointer(p)).iBufferOfst+sqlite3_int64((*VFSFile)(unsafe.Pointer(p)).nBuffer) != i { 1293 var rc int32 = vfsFlushBuffer(tls, p) 1294 if rc != 0 { 1295 return rc 1296 } 1297 } 1298 if (*VFSFile)(unsafe.Pointer(p)).nBuffer == 0 || (*VFSFile)(unsafe.Pointer(p)).iBufferOfst+sqlite3_int64((*VFSFile)(unsafe.Pointer(p)).nBuffer) == i { 1299 } else { 1300 libc.X__assert_fail(tls, ts+43, ts+89, uint32(294), uintptr(unsafe.Pointer(&__func__4))) 1301 } 1302 (*VFSFile)(unsafe.Pointer(p)).iBufferOfst = i - sqlite3_int64((*VFSFile)(unsafe.Pointer(p)).nBuffer) 1303 1304 nCopy = 8192 - (*VFSFile)(unsafe.Pointer(p)).nBuffer 1305 if nCopy > n { 1306 nCopy = n 1307 } 1308 libc.Xmemcpy(tls, (*VFSFile)(unsafe.Pointer(p)).aBuffer+uintptr((*VFSFile)(unsafe.Pointer(p)).nBuffer), z, uint32(nCopy)) 1309 *(*int32)(unsafe.Pointer(p + 16)) += nCopy 1310 1311 n = n - nCopy 1312 i = i + sqlite3_int64(nCopy) 1313 z += uintptr(nCopy) 1314 } 1315 } else { 1316 return vfsDirectWrite(tls, p, zBuf, iAmt, iOfst) 1317 } 1318 1319 return 0 1320 } 1321 1322 var __func__4 = *(*[9]int8)(unsafe.Pointer(ts + 97)) 1323 1324 func vfsTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { 1325 return 0 1326 } 1327 1328 func vfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { 1329 bp := tls.Alloc(16) 1330 defer tls.Free(16) 1331 1332 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__5)), 331)) 1333 libc.X__builtin_abort(tls) 1334 var p uintptr = pFile 1335 var rc int32 1336 1337 rc = vfsFlushBuffer(tls, p) 1338 if rc != 0 { 1339 return rc 1340 } 1341 1342 rc = libc.Xfsync(tls, (*VFSFile)(unsafe.Pointer(p)).fd) 1343 return func() int32 { 1344 if rc == 0 { 1345 return 0 1346 } 1347 return 10 | int32(4)<<8 1348 }() 1349 } 1350 1351 var __func__5 = *(*[8]int8)(unsafe.Pointer(ts + 106)) 1352 1353 func vfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 1354 return 0 1355 } 1356 1357 func vfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 1358 return 0 1359 } 1360 1361 func vfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { 1362 *(*int32)(unsafe.Pointer(pResOut)) = 0 1363 return 0 1364 } 1365 1366 func vfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { 1367 return 12 1368 } 1369 1370 func vfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { 1371 return 0 1372 } 1373 1374 func vfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { 1375 return 0 1376 } 1377 1378 func vfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { 1379 bp := tls.Alloc(4129) 1380 defer tls.Free(4129) 1381 1382 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__8)), 473)) 1383 libc.X__builtin_abort(tls) 1384 var rc int32 1385 1386 rc = libc.Xunlink(tls, zPath) 1387 if rc != 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == 2 { 1388 return 0 1389 } 1390 1391 if rc == 0 && dirSync != 0 { 1392 var dfd int32 1393 var i int32 1394 1395 sqlite3.Xsqlite3_snprintf(tls, 4096, bp+32, ts+114, libc.VaList(bp+16, zPath)) 1396 *(*int8)(unsafe.Pointer(bp + 32 + 4096)) = int8(0) 1397 for i = int32(libc.Xstrlen(tls, bp+32)); i > 1 && int32(*(*int8)(unsafe.Pointer(bp + 32 + uintptr(i)))) != '/'; i++ { 1398 } 1399 *(*int8)(unsafe.Pointer(bp + 32 + uintptr(i))) = int8(0) 1400 1401 dfd = libc.Xopen(tls, bp+32, 00, libc.VaList(bp+24, 0)) 1402 if dfd < 0 { 1403 rc = -1 1404 } else { 1405 rc = libc.Xfsync(tls, dfd) 1406 libc.Xclose(tls, dfd) 1407 } 1408 } 1409 return func() int32 { 1410 if rc == 0 { 1411 return 0 1412 } 1413 return 10 | int32(10)<<8 1414 }() 1415 } 1416 1417 var __func__8 = *(*[10]int8)(unsafe.Pointer(ts + 117)) 1418 1419 func vfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { 1420 return uintptr(0) 1421 } 1422 1423 func vfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { 1424 sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+127, 0) 1425 *(*int8)(unsafe.Pointer(zErrMsg + uintptr(nByte-1))) = int8(0) 1426 } 1427 1428 func vfsDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { 1429 return uintptr(0) 1430 } 1431 1432 func vfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { 1433 return 1434 } 1435 1436 func vfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zByte uintptr) int32 { 1437 return 0 1438 } 1439 1440 func vfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { 1441 libc.Xsleep(tls, uint32(nMicro/1000000)) 1442 libc.Xusleep(tls, uint32(nMicro%1000000)) 1443 return nMicro 1444 } 1445 1446 func vfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTime uintptr) int32 { 1447 var t time_t = libc.Xtime(tls, uintptr(0)) 1448 *(*float64)(unsafe.Pointer(pTime)) = float64(t)/86400.0 + 2440587.5 1449 return 0 1450 } 1451 1452 func Xsqlite3_fsFS(tls *libc.TLS, zName uintptr, pAppData uintptr) uintptr { 1453 var p uintptr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vfs{}))) 1454 if !(p != 0) { 1455 return uintptr(0) 1456 } 1457 1458 *(*sqlite3_vfs)(unsafe.Pointer(p)) = sqlite3_vfs{ 1459 iVersion: 1, 1460 szOsFile: int32(unsafe.Sizeof(VFSFile{})), 1461 mxPathname: 4096, 1462 zName: zName, 1463 pAppData: pAppData, 1464 xOpen: *(*uintptr)(unsafe.Pointer(&struct { 1465 f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 1466 }{vfsOpen})), 1467 xDelete: *(*uintptr)(unsafe.Pointer(&struct { 1468 f func(*libc.TLS, uintptr, uintptr, int32) int32 1469 }{vfsDelete})), 1470 xAccess: *(*uintptr)(unsafe.Pointer(&struct { 1471 f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 1472 }{vfsAccess})), 1473 xFullPathname: *(*uintptr)(unsafe.Pointer(&struct { 1474 f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 1475 }{vfsFullPathname})), 1476 xDlOpen: *(*uintptr)(unsafe.Pointer(&struct { 1477 f func(*libc.TLS, uintptr, uintptr) uintptr 1478 }{vfsDlOpen})), 1479 xDlError: *(*uintptr)(unsafe.Pointer(&struct { 1480 f func(*libc.TLS, uintptr, int32, uintptr) 1481 }{vfsDlError})), 1482 xDlSym: *(*uintptr)(unsafe.Pointer(&struct { 1483 f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr 1484 }{vfsDlSym})), 1485 xDlClose: *(*uintptr)(unsafe.Pointer(&struct { 1486 f func(*libc.TLS, uintptr, uintptr) 1487 }{vfsDlClose})), 1488 xRandomness: *(*uintptr)(unsafe.Pointer(&struct { 1489 f func(*libc.TLS, uintptr, int32, uintptr) int32 1490 }{vfsRandomness})), 1491 xSleep: *(*uintptr)(unsafe.Pointer(&struct { 1492 f func(*libc.TLS, uintptr, int32) int32 1493 }{vfsSleep})), 1494 xCurrentTime: *(*uintptr)(unsafe.Pointer(&struct { 1495 f func(*libc.TLS, uintptr, uintptr) int32 1496 }{vfsCurrentTime}))} 1497 return p 1498 } 1499 1500 var ts1 = "TODO %s:%i:\n\x00vfsDirectWrite\x00vfsFlushBuffer\x00p->nBuffer==0 || p->iBufferOfst+p->nBuffer==i\x00c/vfs.c\x00vfsWrite\x00vfsSync\x00%s\x00vfsDelete\x00Loadable extensions are not supported\x00" 1501 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data