gitlab.com/CoiaPrant/sqlite3@v1.19.1/vfs/vfs_linux_arm64.go (about) 1 // Code generated by 'ccgo -o vfs_linux_arm64.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 _SC_MINSIGSTKSZ = 249 363 364 _SC_SIGSTKSZ = 250 365 ) 366 367 const ( 368 SIGEV_SIGNAL = 0 369 SIGEV_NONE = 1 370 SIGEV_THREAD = 2 371 372 SIGEV_THREAD_ID = 4 373 ) 374 375 const ( 376 SEGV_MAPERR = 1 377 SEGV_ACCERR = 2 378 SEGV_BNDERR = 3 379 SEGV_PKUERR = 4 380 SEGV_ACCADI = 5 381 SEGV_ADIDERR = 6 382 SEGV_ADIPERR = 7 383 SEGV_MTEAERR = 8 384 SEGV_MTESERR = 9 385 ) 386 387 const ( 388 BUS_ADRALN = 1 389 BUS_ADRERR = 2 390 BUS_OBJERR = 3 391 BUS_MCEERR_AR = 4 392 BUS_MCEERR_AO = 5 393 ) 394 395 const ( 396 CLD_EXITED = 1 397 CLD_KILLED = 2 398 CLD_DUMPED = 3 399 CLD_TRAPPED = 4 400 CLD_STOPPED = 5 401 CLD_CONTINUED = 6 402 ) 403 404 const ( 405 POLL_IN = 1 406 POLL_OUT = 2 407 POLL_MSG = 3 408 POLL_ERR = 4 409 POLL_PRI = 5 410 POLL_HUP = 6 411 ) 412 413 const ( 414 SI_ASYNCNL = -60 415 SI_DETHREAD = -7 416 417 SI_TKILL = -6 418 SI_SIGIO = -5 419 SI_ASYNCIO = -4 420 SI_MESGQ = -3 421 SI_TIMER = -2 422 SI_QUEUE = -1 423 SI_USER = 0 424 SI_KERNEL = 128 425 ) 426 427 const ( 428 ILL_ILLOPC = 1 429 ILL_ILLOPN = 2 430 ILL_ILLADR = 3 431 ILL_ILLTRP = 4 432 ILL_PRVOPC = 5 433 ILL_PRVREG = 6 434 ILL_COPROC = 7 435 ILL_BADSTK = 8 436 ILL_BADIADDR = 9 437 ) 438 439 const ( 440 FPE_INTDIV = 1 441 FPE_INTOVF = 2 442 FPE_FLTDIV = 3 443 FPE_FLTOVF = 4 444 FPE_FLTUND = 5 445 FPE_FLTRES = 6 446 FPE_FLTINV = 7 447 FPE_FLTSUB = 8 448 FPE_FLTUNK = 14 449 FPE_CONDTRAP = 15 450 ) 451 452 const ( 453 SS_ONSTACK = 1 454 SS_DISABLE = 2 455 ) 456 457 const ( 458 ITIMER_REAL = 0 459 460 ITIMER_VIRTUAL = 1 461 462 ITIMER_PROF = 2 463 ) 464 465 type ptrdiff_t = int64 466 467 type size_t = uint64 468 469 type wchar_t = uint32 470 471 type va_list = uintptr 472 473 type sqlite_int64 = int64 474 type sqlite_uint64 = uint64 475 type sqlite3_int64 = sqlite_int64 476 type sqlite3_uint64 = sqlite_uint64 477 478 type sqlite3_callback = uintptr 479 480 type sqlite3_file1 = struct{ pMethods uintptr } 481 482 type sqlite3_file = sqlite3_file1 483 type sqlite3_io_methods1 = struct { 484 iVersion int32 485 _ [4]byte 486 xClose uintptr 487 xRead uintptr 488 xWrite uintptr 489 xTruncate uintptr 490 xSync uintptr 491 xFileSize uintptr 492 xLock uintptr 493 xUnlock uintptr 494 xCheckReservedLock uintptr 495 xFileControl uintptr 496 xSectorSize uintptr 497 xDeviceCharacteristics uintptr 498 xShmMap uintptr 499 xShmLock uintptr 500 xShmBarrier uintptr 501 xShmUnmap uintptr 502 xFetch uintptr 503 xUnfetch uintptr 504 } 505 506 type sqlite3_io_methods = sqlite3_io_methods1 507 508 type sqlite3_vfs1 = struct { 509 iVersion int32 510 szOsFile int32 511 mxPathname int32 512 _ [4]byte 513 pNext uintptr 514 zName uintptr 515 pAppData uintptr 516 xOpen uintptr 517 xDelete uintptr 518 xAccess uintptr 519 xFullPathname uintptr 520 xDlOpen uintptr 521 xDlError uintptr 522 xDlSym uintptr 523 xDlClose uintptr 524 xRandomness uintptr 525 xSleep uintptr 526 xCurrentTime uintptr 527 xGetLastError uintptr 528 xCurrentTimeInt64 uintptr 529 xSetSystemCall uintptr 530 xGetSystemCall uintptr 531 xNextSystemCall uintptr 532 } 533 534 type sqlite3_vfs = sqlite3_vfs1 535 type sqlite3_syscall_ptr = uintptr 536 537 type sqlite3_mem_methods1 = struct { 538 xMalloc uintptr 539 xFree uintptr 540 xRealloc uintptr 541 xSize uintptr 542 xRoundup uintptr 543 xInit uintptr 544 xShutdown uintptr 545 pAppData uintptr 546 } 547 548 type sqlite3_mem_methods = sqlite3_mem_methods1 549 550 type sqlite3_destructor_type = uintptr 551 552 type sqlite3_vtab1 = struct { 553 pModule uintptr 554 nRef int32 555 _ [4]byte 556 zErrMsg uintptr 557 } 558 559 type sqlite3_vtab = sqlite3_vtab1 560 type sqlite3_index_info1 = struct { 561 nConstraint int32 562 _ [4]byte 563 aConstraint uintptr 564 nOrderBy int32 565 _ [4]byte 566 aOrderBy uintptr 567 aConstraintUsage uintptr 568 idxNum int32 569 _ [4]byte 570 idxStr uintptr 571 needToFreeIdxStr int32 572 orderByConsumed int32 573 estimatedCost float64 574 estimatedRows sqlite3_int64 575 idxFlags int32 576 _ [4]byte 577 colUsed sqlite3_uint64 578 } 579 580 type sqlite3_index_info = sqlite3_index_info1 581 type sqlite3_vtab_cursor1 = struct{ pVtab uintptr } 582 583 type sqlite3_vtab_cursor = sqlite3_vtab_cursor1 584 type sqlite3_module1 = struct { 585 iVersion int32 586 _ [4]byte 587 xCreate uintptr 588 xConnect uintptr 589 xBestIndex uintptr 590 xDisconnect uintptr 591 xDestroy uintptr 592 xOpen uintptr 593 xClose uintptr 594 xFilter uintptr 595 xNext uintptr 596 xEof uintptr 597 xColumn uintptr 598 xRowid uintptr 599 xUpdate uintptr 600 xBegin uintptr 601 xSync uintptr 602 xCommit uintptr 603 xRollback uintptr 604 xFindFunction uintptr 605 xRename uintptr 606 xSavepoint uintptr 607 xRelease uintptr 608 xRollbackTo uintptr 609 xShadowName uintptr 610 } 611 612 type sqlite3_module = sqlite3_module1 613 614 type sqlite3_index_constraint = struct { 615 iColumn int32 616 op uint8 617 usable uint8 618 _ [2]byte 619 iTermOffset int32 620 } 621 622 type sqlite3_index_orderby = struct { 623 iColumn int32 624 desc uint8 625 _ [3]byte 626 } 627 628 type sqlite3_index_constraint_usage = struct { 629 argvIndex int32 630 omit uint8 631 _ [3]byte 632 } 633 634 type sqlite3_mutex_methods1 = struct { 635 xMutexInit uintptr 636 xMutexEnd uintptr 637 xMutexAlloc uintptr 638 xMutexFree uintptr 639 xMutexEnter uintptr 640 xMutexTry uintptr 641 xMutexLeave uintptr 642 xMutexHeld uintptr 643 xMutexNotheld uintptr 644 } 645 646 type sqlite3_mutex_methods = sqlite3_mutex_methods1 647 648 type sqlite3_pcache_page1 = struct { 649 pBuf uintptr 650 pExtra uintptr 651 } 652 653 type sqlite3_pcache_page = sqlite3_pcache_page1 654 655 type sqlite3_pcache_methods21 = struct { 656 iVersion int32 657 _ [4]byte 658 pArg uintptr 659 xInit uintptr 660 xShutdown uintptr 661 xCreate uintptr 662 xCachesize uintptr 663 xPagecount uintptr 664 xFetch uintptr 665 xUnpin uintptr 666 xRekey uintptr 667 xTruncate uintptr 668 xDestroy uintptr 669 xShrink uintptr 670 } 671 672 type sqlite3_pcache_methods2 = sqlite3_pcache_methods21 673 674 type sqlite3_pcache_methods1 = struct { 675 pArg uintptr 676 xInit uintptr 677 xShutdown uintptr 678 xCreate uintptr 679 xCachesize uintptr 680 xPagecount uintptr 681 xFetch uintptr 682 xUnpin uintptr 683 xRekey uintptr 684 xTruncate uintptr 685 xDestroy uintptr 686 } 687 688 type sqlite3_pcache_methods = sqlite3_pcache_methods1 689 690 type sqlite3_snapshot1 = struct{ hidden [48]uint8 } 691 692 type sqlite3_snapshot = sqlite3_snapshot1 693 694 type sqlite3_rtree_geometry1 = struct { 695 pContext uintptr 696 nParam int32 697 _ [4]byte 698 aParam uintptr 699 pUser uintptr 700 xDelUser uintptr 701 } 702 703 type sqlite3_rtree_geometry = sqlite3_rtree_geometry1 704 type sqlite3_rtree_query_info1 = struct { 705 pContext uintptr 706 nParam int32 707 _ [4]byte 708 aParam uintptr 709 pUser uintptr 710 xDelUser uintptr 711 aCoord uintptr 712 anQueue uintptr 713 nCoord int32 714 iLevel int32 715 mxLevel int32 716 _ [4]byte 717 iRowid sqlite3_int64 718 rParentScore sqlite3_rtree_dbl 719 eParentWithin int32 720 eWithin int32 721 rScore sqlite3_rtree_dbl 722 apSqlParam uintptr 723 } 724 725 type sqlite3_rtree_query_info = sqlite3_rtree_query_info1 726 727 type sqlite3_rtree_dbl = float64 728 729 type Fts5ExtensionApi1 = struct { 730 iVersion int32 731 _ [4]byte 732 xUserData uintptr 733 xColumnCount uintptr 734 xRowCount uintptr 735 xColumnTotalSize uintptr 736 xTokenize uintptr 737 xPhraseCount uintptr 738 xPhraseSize uintptr 739 xInstCount uintptr 740 xInst uintptr 741 xRowid uintptr 742 xColumnText uintptr 743 xColumnSize uintptr 744 xQueryPhrase uintptr 745 xSetAuxdata uintptr 746 xGetAuxdata uintptr 747 xPhraseFirst uintptr 748 xPhraseNext uintptr 749 xPhraseFirstColumn uintptr 750 xPhraseNextColumn uintptr 751 } 752 753 type Fts5ExtensionApi = Fts5ExtensionApi1 754 type Fts5PhraseIter1 = struct { 755 a uintptr 756 b uintptr 757 } 758 759 type Fts5PhraseIter = Fts5PhraseIter1 760 761 type fts5_extension_function = uintptr 762 type fts5_tokenizer1 = struct { 763 xCreate uintptr 764 xDelete uintptr 765 xTokenize uintptr 766 } 767 768 type fts5_tokenizer = fts5_tokenizer1 769 770 type fts5_api1 = struct { 771 iVersion int32 772 _ [4]byte 773 xCreateTokenizer uintptr 774 xFindTokenizer uintptr 775 xCreateFunction uintptr 776 } 777 778 type fts5_api = fts5_api1 779 780 type __locale_struct = struct { 781 __locales [13]uintptr 782 __ctype_b uintptr 783 __ctype_tolower uintptr 784 __ctype_toupper uintptr 785 __names [13]uintptr 786 } 787 788 type locale_t = uintptr 789 790 type u_char = uint8 791 type u_short = uint16 792 type u_int = uint32 793 type u_long = uint64 794 type quad_t = int64 795 type u_quad_t = uint64 796 type fsid_t = struct{ __val [2]int32 } 797 type loff_t = int64 798 799 type ino_t = uint64 800 801 type dev_t = uint64 802 803 type gid_t = uint32 804 805 type mode_t = uint32 806 807 type nlink_t = uint32 808 809 type uid_t = uint32 810 811 type off_t = int64 812 813 type pid_t = int32 814 815 type id_t = uint32 816 817 type ssize_t = int64 818 819 type daddr_t = int32 820 type caddr_t = uintptr 821 822 type key_t = int32 823 824 type clock_t = int64 825 826 type clockid_t = int32 827 828 type time_t = int64 829 830 type timer_t = uintptr 831 832 type ulong = uint64 833 type ushort = uint16 834 type uint = uint32 835 836 type int8_t = int8 837 type int16_t = int16 838 type int32_t = int32 839 type int64_t = int64 840 841 type u_int8_t = uint8 842 type u_int16_t = uint16 843 type u_int32_t = uint32 844 type u_int64_t = uint64 845 846 type register_t = int32 847 848 type sigset_t = struct{ __val [16]uint64 } 849 850 type timeval = struct { 851 tv_sec int64 852 tv_usec int64 853 } 854 855 type timespec = struct { 856 tv_sec int64 857 tv_nsec int64 858 } 859 860 type suseconds_t = int64 861 862 type fd_set = struct{ __fds_bits [16]int64 } 863 864 type fd_mask = int64 865 866 type blksize_t = int32 867 868 type blkcnt_t = int64 869 type fsblkcnt_t = uint64 870 type fsfilcnt_t = uint64 871 872 type __pthread_internal_list = struct { 873 __prev uintptr 874 __next uintptr 875 } 876 877 type __pthread_internal_slist = struct{ __next uintptr } 878 879 type __pthread_mutex_s = struct { 880 __lock int32 881 __count uint32 882 __owner int32 883 __nusers uint32 884 __kind int32 885 __spins int32 886 __list struct { 887 __prev uintptr 888 __next uintptr 889 } 890 } 891 892 type __pthread_rwlock_arch_t = struct { 893 __readers uint32 894 __writers uint32 895 __wrphase_futex uint32 896 __writers_futex uint32 897 __pad3 uint32 898 __pad4 uint32 899 __cur_writer int32 900 __shared int32 901 __pad1 uint64 902 __pad2 uint64 903 __flags uint32 904 _ [4]byte 905 } 906 907 type __pthread_cond_s = struct { 908 __0 struct{ __wseq uint64 } 909 __8 struct{ __g1_start uint64 } 910 __g_refs [2]uint32 911 __g_size [2]uint32 912 __g1_orig_size uint32 913 __wrefs uint32 914 __g_signals [2]uint32 915 } 916 917 type pthread_t = uint64 918 919 type pthread_mutexattr_t = struct { 920 _ [0]uint32 921 __size [8]uint8 922 } 923 924 type pthread_condattr_t = struct { 925 _ [0]uint32 926 __size [8]uint8 927 } 928 929 type pthread_key_t = uint32 930 931 type pthread_once_t = int32 932 933 type pthread_attr_t1 = struct { 934 _ [0]uint64 935 __size [64]uint8 936 } 937 938 type pthread_attr_t = pthread_attr_t1 939 940 type pthread_mutex_t = struct { 941 __data __pthread_mutex_s 942 _ [8]byte 943 } 944 945 type pthread_cond_t = struct{ __data __pthread_cond_s } 946 947 type pthread_rwlock_t = struct{ __data __pthread_rwlock_arch_t } 948 949 type pthread_rwlockattr_t = struct { 950 _ [0]uint64 951 __size [8]uint8 952 } 953 954 type pthread_spinlock_t = int32 955 956 type pthread_barrier_t = struct { 957 _ [0]uint64 958 __size [32]uint8 959 } 960 961 type pthread_barrierattr_t = struct { 962 _ [0]uint32 963 __size [8]uint8 964 } 965 966 type stat = struct { 967 st_dev uint64 968 st_ino uint64 969 st_mode uint32 970 st_nlink uint32 971 st_uid uint32 972 st_gid uint32 973 st_rdev uint64 974 __pad1 uint64 975 st_size int64 976 st_blksize int32 977 __pad2 int32 978 st_blocks int64 979 st_atim struct { 980 tv_sec int64 981 tv_nsec int64 982 } 983 st_mtim struct { 984 tv_sec int64 985 tv_nsec int64 986 } 987 st_ctim struct { 988 tv_sec int64 989 tv_nsec int64 990 } 991 __glibc_reserved [2]int32 992 } 993 994 type flock = struct { 995 l_type int16 996 l_whence int16 997 _ [4]byte 998 l_start int64 999 l_len int64 1000 l_pid int32 1001 _ [4]byte 1002 } 1003 1004 type sig_atomic_t = int32 1005 1006 type sigval = struct { 1007 _ [0]uint64 1008 sival_int int32 1009 _ [4]byte 1010 } 1011 1012 type siginfo_t = struct { 1013 si_signo int32 1014 si_errno int32 1015 si_code int32 1016 __pad0 int32 1017 _sifields struct { 1018 _ [0]uint64 1019 _pad [28]int32 1020 } 1021 } 1022 1023 type sigval_t = sigval 1024 1025 type sigevent = struct { 1026 sigev_value struct { 1027 _ [0]uint64 1028 sival_int int32 1029 _ [4]byte 1030 } 1031 sigev_signo int32 1032 sigev_notify int32 1033 _sigev_un struct { 1034 _ [0]uint64 1035 _pad [12]int32 1036 } 1037 } 1038 1039 type sigevent_t = sigevent 1040 1041 type sig_t = uintptr 1042 1043 type sigaction = struct { 1044 __sigaction_handler struct{ sa_handler uintptr } 1045 sa_mask struct{ __val [16]uint64 } 1046 sa_flags int32 1047 _ [4]byte 1048 sa_restorer uintptr 1049 } 1050 1051 type sigcontext = struct { 1052 fault_address uint64 1053 regs [31]uint64 1054 sp uint64 1055 pc uint64 1056 pstate uint64 1057 __reserved [4096]uint8 1058 } 1059 1060 type _aarch64_ctx = struct { 1061 magic uint32 1062 size uint32 1063 } 1064 1065 type fpsimd_context = struct { 1066 head struct { 1067 magic uint32 1068 size uint32 1069 } 1070 fpsr uint32 1071 fpcr uint32 1072 vregs [32]struct { 1073 lo uint64 1074 hi uint64 1075 } 1076 } 1077 1078 type esr_context = struct { 1079 head struct { 1080 magic uint32 1081 size uint32 1082 } 1083 esr uint64 1084 } 1085 1086 type extra_context = struct { 1087 head struct { 1088 magic uint32 1089 size uint32 1090 } 1091 datap uint64 1092 size uint32 1093 __reserved [3]uint32 1094 } 1095 1096 type sve_context = struct { 1097 head struct { 1098 magic uint32 1099 size uint32 1100 } 1101 vl uint16 1102 __reserved [3]uint16 1103 } 1104 1105 type stack_t = struct { 1106 ss_sp uintptr 1107 ss_flags int32 1108 _ [4]byte 1109 ss_size size_t 1110 } 1111 1112 type timezone = struct { 1113 tz_minuteswest int32 1114 tz_dsttime int32 1115 } 1116 1117 type itimerval = struct { 1118 it_interval struct { 1119 tv_sec int64 1120 tv_usec int64 1121 } 1122 it_value struct { 1123 tv_sec int64 1124 tv_usec int64 1125 } 1126 } 1127 1128 type user_regs_struct = struct { 1129 regs [31]uint64 1130 sp uint64 1131 pc uint64 1132 pstate uint64 1133 } 1134 1135 type user_fpsimd_struct = struct { 1136 vregs [32]struct { 1137 lo uint64 1138 hi uint64 1139 } 1140 fpsr uint32 1141 fpcr uint32 1142 } 1143 1144 type elf_greg_t = uint64 1145 1146 type elf_gregset_t = [34]elf_greg_t 1147 1148 type elf_fpregset_t = user_fpsimd_struct 1149 1150 type elf_siginfo = struct { 1151 si_signo int32 1152 si_code int32 1153 si_errno int32 1154 } 1155 1156 type elf_prstatus = struct { 1157 pr_info struct { 1158 si_signo int32 1159 si_code int32 1160 si_errno int32 1161 } 1162 pr_cursig int16 1163 _ [2]byte 1164 pr_sigpend uint64 1165 pr_sighold uint64 1166 pr_pid int32 1167 pr_ppid int32 1168 pr_pgrp int32 1169 pr_sid int32 1170 pr_utime struct { 1171 tv_sec int64 1172 tv_usec int64 1173 } 1174 pr_stime struct { 1175 tv_sec int64 1176 tv_usec int64 1177 } 1178 pr_cutime struct { 1179 tv_sec int64 1180 tv_usec int64 1181 } 1182 pr_cstime struct { 1183 tv_sec int64 1184 tv_usec int64 1185 } 1186 pr_reg elf_gregset_t 1187 pr_fpvalid int32 1188 _ [4]byte 1189 } 1190 1191 type elf_prpsinfo = struct { 1192 pr_state uint8 1193 pr_sname uint8 1194 pr_zomb uint8 1195 pr_nice uint8 1196 _ [4]byte 1197 pr_flag uint64 1198 pr_uid uint32 1199 pr_gid uint32 1200 pr_pid int32 1201 pr_ppid int32 1202 pr_pgrp int32 1203 pr_sid int32 1204 pr_fname [16]uint8 1205 pr_psargs [80]uint8 1206 } 1207 1208 type psaddr_t = uintptr 1209 1210 type prgregset_t = [34]elf_greg_t 1211 type prfpregset_t = user_fpsimd_struct 1212 1213 type lwpid_t = int32 1214 1215 type prstatus_t = elf_prstatus 1216 type prpsinfo_t = elf_prpsinfo 1217 1218 type greg_t = elf_greg_t 1219 1220 type gregset_t = elf_gregset_t 1221 1222 type fpregset_t = elf_fpregset_t 1223 1224 type mcontext_t = struct { 1225 fault_address uint64 1226 regs [31]uint64 1227 sp uint64 1228 pc uint64 1229 pstate uint64 1230 __reserved [4096]uint8 1231 } 1232 1233 type ucontext_t1 = struct { 1234 uc_flags uint64 1235 uc_link uintptr 1236 uc_stack stack_t 1237 uc_sigmask sigset_t 1238 uc_mcontext mcontext_t 1239 } 1240 1241 type ucontext_t = ucontext_t1 1242 1243 type sigstack = struct { 1244 ss_sp uintptr 1245 ss_onstack int32 1246 _ [4]byte 1247 } 1248 1249 type useconds_t = uint32 1250 1251 type intptr_t = int64 1252 1253 type socklen_t = uint32 1254 1255 type tm = struct { 1256 tm_sec int32 1257 tm_min int32 1258 tm_hour int32 1259 tm_mday int32 1260 tm_mon int32 1261 tm_year int32 1262 tm_wday int32 1263 tm_yday int32 1264 tm_isdst int32 1265 _ [4]byte 1266 tm_gmtoff int64 1267 tm_zone uintptr 1268 } 1269 1270 type itimerspec = struct { 1271 it_interval struct { 1272 tv_sec int64 1273 tv_nsec int64 1274 } 1275 it_value struct { 1276 tv_sec int64 1277 tv_nsec int64 1278 } 1279 } 1280 1281 type VFSFile1 = struct { 1282 base sqlite3_file 1283 fsFile uintptr 1284 fd int32 1285 _ [4]byte 1286 aBuffer uintptr 1287 nBuffer int32 1288 _ [4]byte 1289 iBufferOfst sqlite3_int64 1290 } 1291 1292 type VFSFile = VFSFile1 1293 1294 func vfsDirectWrite(tls *libc.TLS, p uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { 1295 bp := tls.Alloc(16) 1296 defer tls.Free(16) 1297 1298 var ofst off_t 1299 var nWrite size_t 1300 1301 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__)), 178)) 1302 libc.X__builtin_abort(tls) 1303 ofst = libc.Xlseek(tls, (*VFSFile)(unsafe.Pointer(p)).fd, iOfst, 0) 1304 if ofst != iOfst { 1305 return 10 | int32(3)<<8 1306 } 1307 1308 nWrite = size_t(libc.Xwrite(tls, (*VFSFile)(unsafe.Pointer(p)).fd, zBuf, uint64(iAmt))) 1309 if nWrite != size_t(iAmt) { 1310 return 10 | int32(3)<<8 1311 } 1312 1313 return 0 1314 } 1315 1316 var __func__ = *(*[15]uint8)(unsafe.Pointer(ts + 13)) 1317 1318 func vfsFlushBuffer(tls *libc.TLS, p uintptr) int32 { 1319 bp := tls.Alloc(16) 1320 defer tls.Free(16) 1321 1322 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__1)), 198)) 1323 libc.X__builtin_abort(tls) 1324 var rc int32 = 0 1325 if (*VFSFile)(unsafe.Pointer(p)).nBuffer != 0 { 1326 rc = vfsDirectWrite(tls, p, (*VFSFile)(unsafe.Pointer(p)).aBuffer, (*VFSFile)(unsafe.Pointer(p)).nBuffer, (*VFSFile)(unsafe.Pointer(p)).iBufferOfst) 1327 (*VFSFile)(unsafe.Pointer(p)).nBuffer = 0 1328 } 1329 return rc 1330 } 1331 1332 var __func__1 = *(*[15]uint8)(unsafe.Pointer(ts + 28)) 1333 1334 func vfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { 1335 bp := tls.Alloc(16) 1336 defer tls.Free(16) 1337 1338 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__4)), 273)) 1339 libc.X__builtin_abort(tls) 1340 var p uintptr = pFile 1341 1342 if (*VFSFile)(unsafe.Pointer(p)).aBuffer != 0 { 1343 var z uintptr = zBuf 1344 var n int32 = iAmt 1345 var i sqlite3_int64 = iOfst 1346 1347 for n > 0 { 1348 var nCopy int32 1349 1350 if (*VFSFile)(unsafe.Pointer(p)).nBuffer == 8192 || (*VFSFile)(unsafe.Pointer(p)).iBufferOfst+sqlite3_int64((*VFSFile)(unsafe.Pointer(p)).nBuffer) != i { 1351 var rc int32 = vfsFlushBuffer(tls, p) 1352 if rc != 0 { 1353 return rc 1354 } 1355 } 1356 if (*VFSFile)(unsafe.Pointer(p)).nBuffer == 0 || (*VFSFile)(unsafe.Pointer(p)).iBufferOfst+sqlite3_int64((*VFSFile)(unsafe.Pointer(p)).nBuffer) == i { 1357 } else { 1358 libc.X__assert_fail(tls, ts+43, ts+89, uint32(294), uintptr(unsafe.Pointer(&__func__4))) 1359 } 1360 (*VFSFile)(unsafe.Pointer(p)).iBufferOfst = i - sqlite3_int64((*VFSFile)(unsafe.Pointer(p)).nBuffer) 1361 1362 nCopy = 8192 - (*VFSFile)(unsafe.Pointer(p)).nBuffer 1363 if nCopy > n { 1364 nCopy = n 1365 } 1366 libc.Xmemcpy(tls, (*VFSFile)(unsafe.Pointer(p)).aBuffer+uintptr((*VFSFile)(unsafe.Pointer(p)).nBuffer), z, uint64(nCopy)) 1367 *(*int32)(unsafe.Pointer(p + 32)) += nCopy 1368 1369 n = n - nCopy 1370 i = i + sqlite3_int64(nCopy) 1371 z += uintptr(nCopy) 1372 } 1373 } else { 1374 return vfsDirectWrite(tls, p, zBuf, iAmt, iOfst) 1375 } 1376 1377 return 0 1378 } 1379 1380 var __func__4 = *(*[9]uint8)(unsafe.Pointer(ts + 97)) 1381 1382 func vfsTruncate(tls *libc.TLS, pFile uintptr, size sqlite_int64) int32 { 1383 return 0 1384 } 1385 1386 func vfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { 1387 bp := tls.Alloc(16) 1388 defer tls.Free(16) 1389 1390 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__5)), 331)) 1391 libc.X__builtin_abort(tls) 1392 var p uintptr = pFile 1393 var rc int32 1394 1395 rc = vfsFlushBuffer(tls, p) 1396 if rc != 0 { 1397 return rc 1398 } 1399 1400 rc = libc.Xfsync(tls, (*VFSFile)(unsafe.Pointer(p)).fd) 1401 return func() int32 { 1402 if rc == 0 { 1403 return 0 1404 } 1405 return 10 | int32(4)<<8 1406 }() 1407 } 1408 1409 var __func__5 = *(*[8]uint8)(unsafe.Pointer(ts + 106)) 1410 1411 func vfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 1412 return 0 1413 } 1414 1415 func vfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 1416 return 0 1417 } 1418 1419 func vfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { 1420 *(*int32)(unsafe.Pointer(pResOut)) = 0 1421 return 0 1422 } 1423 1424 func vfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { 1425 return 12 1426 } 1427 1428 func vfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { 1429 return 0 1430 } 1431 1432 func vfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { 1433 return 0 1434 } 1435 1436 func vfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { 1437 bp := tls.Alloc(4129) 1438 defer tls.Free(4129) 1439 1440 libc.X__builtin_printf(tls, ts, libc.VaList(bp, uintptr(unsafe.Pointer(&__func__8)), 473)) 1441 libc.X__builtin_abort(tls) 1442 var rc int32 1443 1444 rc = libc.Xunlink(tls, zPath) 1445 if rc != 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == 2 { 1446 return 0 1447 } 1448 1449 if rc == 0 && dirSync != 0 { 1450 var dfd int32 1451 var i int32 1452 1453 sqlite3.Xsqlite3_snprintf(tls, 4096, bp+32, ts+114, libc.VaList(bp+16, zPath)) 1454 *(*uint8)(unsafe.Pointer(bp + 32 + 4096)) = uint8(0) 1455 for i = int32(libc.Xstrlen(tls, bp+32)); i > 1 && int32(*(*uint8)(unsafe.Pointer(bp + 32 + uintptr(i)))) != '/'; i++ { 1456 } 1457 *(*uint8)(unsafe.Pointer(bp + 32 + uintptr(i))) = uint8(0) 1458 1459 dfd = libc.Xopen(tls, bp+32, 00, libc.VaList(bp+24, 0)) 1460 if dfd < 0 { 1461 rc = -1 1462 } else { 1463 rc = libc.Xfsync(tls, dfd) 1464 libc.Xclose(tls, dfd) 1465 } 1466 } 1467 return func() int32 { 1468 if rc == 0 { 1469 return 0 1470 } 1471 return 10 | int32(10)<<8 1472 }() 1473 } 1474 1475 var __func__8 = *(*[10]uint8)(unsafe.Pointer(ts + 117)) 1476 1477 func vfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { 1478 return uintptr(0) 1479 } 1480 1481 func vfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { 1482 sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+127, 0) 1483 *(*uint8)(unsafe.Pointer(zErrMsg + uintptr(nByte-1))) = uint8(0) 1484 } 1485 1486 func vfsDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { 1487 return uintptr(0) 1488 } 1489 1490 func vfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { 1491 return 1492 } 1493 1494 func vfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zByte uintptr) int32 { 1495 return 0 1496 } 1497 1498 func vfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { 1499 libc.Xsleep(tls, uint32(nMicro/1000000)) 1500 libc.Xusleep(tls, uint32(nMicro%1000000)) 1501 return nMicro 1502 } 1503 1504 func vfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTime uintptr) int32 { 1505 var t time_t = libc.Xtime(tls, uintptr(0)) 1506 *(*float64)(unsafe.Pointer(pTime)) = float64(t)/86400.0 + 2440587.5 1507 return 0 1508 } 1509 1510 func Xsqlite3_fsFS(tls *libc.TLS, zName uintptr, pAppData uintptr) uintptr { 1511 var p uintptr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vfs{}))) 1512 if !(p != 0) { 1513 return uintptr(0) 1514 } 1515 1516 *(*sqlite3_vfs)(unsafe.Pointer(p)) = sqlite3_vfs{ 1517 iVersion: 1, 1518 szOsFile: int32(unsafe.Sizeof(VFSFile{})), 1519 mxPathname: 4096, 1520 zName: zName, 1521 pAppData: pAppData, 1522 xOpen: *(*uintptr)(unsafe.Pointer(&struct { 1523 f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 1524 }{vfsOpen})), 1525 xDelete: *(*uintptr)(unsafe.Pointer(&struct { 1526 f func(*libc.TLS, uintptr, uintptr, int32) int32 1527 }{vfsDelete})), 1528 xAccess: *(*uintptr)(unsafe.Pointer(&struct { 1529 f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 1530 }{vfsAccess})), 1531 xFullPathname: *(*uintptr)(unsafe.Pointer(&struct { 1532 f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 1533 }{vfsFullPathname})), 1534 xDlOpen: *(*uintptr)(unsafe.Pointer(&struct { 1535 f func(*libc.TLS, uintptr, uintptr) uintptr 1536 }{vfsDlOpen})), 1537 xDlError: *(*uintptr)(unsafe.Pointer(&struct { 1538 f func(*libc.TLS, uintptr, int32, uintptr) 1539 }{vfsDlError})), 1540 xDlSym: *(*uintptr)(unsafe.Pointer(&struct { 1541 f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr 1542 }{vfsDlSym})), 1543 xDlClose: *(*uintptr)(unsafe.Pointer(&struct { 1544 f func(*libc.TLS, uintptr, uintptr) 1545 }{vfsDlClose})), 1546 xRandomness: *(*uintptr)(unsafe.Pointer(&struct { 1547 f func(*libc.TLS, uintptr, int32, uintptr) int32 1548 }{vfsRandomness})), 1549 xSleep: *(*uintptr)(unsafe.Pointer(&struct { 1550 f func(*libc.TLS, uintptr, int32) int32 1551 }{vfsSleep})), 1552 xCurrentTime: *(*uintptr)(unsafe.Pointer(&struct { 1553 f func(*libc.TLS, uintptr, uintptr) int32 1554 }{vfsCurrentTime}))} 1555 return p 1556 } 1557 1558 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" 1559 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data