Fixes GO-2026-6629 (golang.org/x/text precis panic). Bumps bun and bun/dialect/pgdialect together to v1.3.0; go directive now 1.26.0.
37 lines
1.2 KiB
Go
37 lines
1.2 KiB
Go
// Code generated by modernc.org/undup from the per-target sqlite_*.go files; DO NOT EDIT.
|
|
|
|
//go:build (darwin && amd64) || (darwin && arm64) || (freebsd && 386) || (netbsd && amd64)
|
|
|
|
package sqlite3
|
|
|
|
import (
|
|
"modernc.org/libc"
|
|
)
|
|
|
|
const _POSIX_VERSION = 200112
|
|
|
|
// C documentation
|
|
//
|
|
// /*
|
|
// ** Find the current time (in Universal Coordinated Time). Write into *piNow
|
|
// ** the current time and date as a Julian Day number times 86_400_000. In
|
|
// ** other words, write into *piNow the number of milliseconds since the Julian
|
|
// ** epoch of noon in Greenwich on November 24, 4714 B.C according to the
|
|
// ** proleptic Gregorian calendar.
|
|
// **
|
|
// ** On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date
|
|
// ** cannot be found.
|
|
// */
|
|
func _unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) (r int32) {
|
|
bp := tls.Alloc(16)
|
|
defer tls.Free(16)
|
|
var rc int32
|
|
var _ /* sNow at bp+0 */ Ttimeval
|
|
_ = rc
|
|
rc = SQLITE_OK
|
|
libc.Xgettimeofday(tls, bp, uintptr(0)) /* Cannot fail given valid arguments */
|
|
**(**Tsqlite3_int64)(__ccgo_up(piNow)) = _unixEpoch + int64(1000)*int64((**(**Ttimeval)(__ccgo_up(bp))).Ftv_sec) + int64((**(**Ttimeval)(__ccgo_up(bp))).Ftv_usec/int32(1000))
|
|
_ = NotUsed
|
|
return rc
|
|
}
|