repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram_vec.go
vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram_vec.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package prometheusextension import ( "github.com/prometheus/client_golang/prometheus" ) // WeightedObserverVec is a bunch of WeightedObservers that have the same // Desc and are distinguished by the values for their variable labels. type WeightedObserverVec interface { GetMetricWith(prometheus.Labels) (WeightedObserver, error) GetMetricWithLabelValues(lvs ...string) (WeightedObserver, error) With(prometheus.Labels) WeightedObserver WithLabelValues(...string) WeightedObserver CurryWith(prometheus.Labels) (WeightedObserverVec, error) MustCurryWith(prometheus.Labels) WeightedObserverVec } // WeightedHistogramVec implements WeightedObserverVec type WeightedHistogramVec struct { *prometheus.MetricVec } var _ WeightedObserverVec = &WeightedHistogramVec{} var _ prometheus.Collector = &WeightedHistogramVec{} func NewWeightedHistogramVec(opts WeightedHistogramOpts, labelNames ...string) *WeightedHistogramVec { desc := prometheus.NewDesc( prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), wrapWeightedHelp(opts.Help), labelNames, opts.ConstLabels, ) return &WeightedHistogramVec{ MetricVec: prometheus.NewMetricVec(desc, func(lvs ...string) prometheus.Metric { metric, err := newWeightedHistogram(desc, opts, lvs...) if err != nil { panic(err) // like in prometheus.newHistogram } return metric }), } } func (hv *WeightedHistogramVec) GetMetricWith(labels prometheus.Labels) (WeightedObserver, error) { metric, err := hv.MetricVec.GetMetricWith(labels) if metric != nil { return metric.(WeightedObserver), err } return nil, err } func (hv *WeightedHistogramVec) GetMetricWithLabelValues(lvs ...string) (WeightedObserver, error) { metric, err := hv.MetricVec.GetMetricWithLabelValues(lvs...) if metric != nil { return metric.(WeightedObserver), err } return nil, err } func (hv *WeightedHistogramVec) With(labels prometheus.Labels) WeightedObserver { h, err := hv.GetMetricWith(labels) if err != nil { panic(err) } return h } func (hv *WeightedHistogramVec) WithLabelValues(lvs ...string) WeightedObserver { h, err := hv.GetMetricWithLabelValues(lvs...) if err != nil { panic(err) } return h } func (hv *WeightedHistogramVec) CurryWith(labels prometheus.Labels) (WeightedObserverVec, error) { vec, err := hv.MetricVec.CurryWith(labels) if vec != nil { return &WeightedHistogramVec{MetricVec: vec}, err } return nil, err } func (hv *WeightedHistogramVec) MustCurryWith(labels prometheus.Labels) WeightedObserverVec { vec, err := hv.CurryWith(labels) if err != nil { panic(err) } return vec }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram.go
vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package prometheusextension import ( "fmt" "math" "sort" "sync" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" ) // WeightedHistogram generalizes Histogram: each observation has // an associated _weight_. For a given `x` and `N`, // `1` call on `ObserveWithWeight(x, N)` has the same meaning as // `N` calls on `ObserveWithWeight(x, 1)`. // The weighted sum might differ slightly due to the use of // floating point, although the implementation takes some steps // to mitigate that. // If every weight were 1, // this would be the same as the existing Histogram abstraction. type WeightedHistogram interface { prometheus.Metric prometheus.Collector WeightedObserver } // WeightedObserver generalizes the Observer interface. type WeightedObserver interface { // Set the variable to the given value with the given weight. ObserveWithWeight(value float64, weight uint64) } // WeightedHistogramOpts is the same as for an ordinary Histogram type WeightedHistogramOpts = prometheus.HistogramOpts // NewWeightedHistogram creates a new WeightedHistogram func NewWeightedHistogram(opts WeightedHistogramOpts) (WeightedHistogram, error) { desc := prometheus.NewDesc( prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), wrapWeightedHelp(opts.Help), nil, opts.ConstLabels, ) return newWeightedHistogram(desc, opts) } func wrapWeightedHelp(given string) string { return "EXPERIMENTAL: " + given } func newWeightedHistogram(desc *prometheus.Desc, opts WeightedHistogramOpts, variableLabelValues ...string) (*weightedHistogram, error) { if len(opts.Buckets) == 0 { opts.Buckets = prometheus.DefBuckets } for i, upperBound := range opts.Buckets { if i < len(opts.Buckets)-1 { if upperBound >= opts.Buckets[i+1] { return nil, fmt.Errorf( "histogram buckets must be in increasing order: %f >= %f", upperBound, opts.Buckets[i+1], ) } } else { if math.IsInf(upperBound, +1) { // The +Inf bucket is implicit. Remove it here. opts.Buckets = opts.Buckets[:i] } } } upperBounds := make([]float64, len(opts.Buckets)) copy(upperBounds, opts.Buckets) return &weightedHistogram{ desc: desc, variableLabelValues: variableLabelValues, upperBounds: upperBounds, buckets: make([]uint64, len(upperBounds)+1), hotCount: initialHotCount, }, nil } type weightedHistogram struct { desc *prometheus.Desc variableLabelValues []string upperBounds []float64 // exclusive of +Inf lock sync.Mutex // applies to all the following // buckets is longer by one than upperBounds. // For 0 <= idx < len(upperBounds), buckets[idx] holds the // accumulated time.Duration that value has been <= // upperBounds[idx] but not <= upperBounds[idx-1]. // buckets[len(upperBounds)] holds the accumulated // time.Duration when value fit in no other bucket. buckets []uint64 // sumHot + sumCold is the weighted sum of value. // Rather than risk loss of precision in one // float64, we do this sum hierarchically. Many successive // increments are added into sumHot; once in a while // the magnitude of sumHot is compared to the magnitude // of sumCold and, if the ratio is high enough, // sumHot is transferred into sumCold. sumHot float64 sumCold float64 transferThreshold float64 // = math.Abs(sumCold) / 2^26 (that's about half of the bits of precision in a float64) // hotCount is used to decide when to consider dumping sumHot into sumCold. // hotCount counts upward from initialHotCount to zero. hotCount int } // initialHotCount is the negative of the number of terms // that are summed into sumHot before considering whether // to transfer to sumCold. This only has to be big enough // to make the extra floating point operations occur in a // distinct minority of cases. const initialHotCount = -15 var _ WeightedHistogram = &weightedHistogram{} var _ prometheus.Metric = &weightedHistogram{} var _ prometheus.Collector = &weightedHistogram{} func (sh *weightedHistogram) ObserveWithWeight(value float64, weight uint64) { idx := sort.SearchFloat64s(sh.upperBounds, value) sh.lock.Lock() defer sh.lock.Unlock() sh.updateLocked(idx, value, weight) } func (sh *weightedHistogram) observeWithWeightLocked(value float64, weight uint64) { idx := sort.SearchFloat64s(sh.upperBounds, value) sh.updateLocked(idx, value, weight) } func (sh *weightedHistogram) updateLocked(idx int, value float64, weight uint64) { sh.buckets[idx] += weight newSumHot := sh.sumHot + float64(weight)*value sh.hotCount++ if sh.hotCount >= 0 { sh.hotCount = initialHotCount if math.Abs(newSumHot) > sh.transferThreshold { newSumCold := sh.sumCold + newSumHot sh.sumCold = newSumCold sh.transferThreshold = math.Abs(newSumCold / 67108864) sh.sumHot = 0 return } } sh.sumHot = newSumHot } func (sh *weightedHistogram) Desc() *prometheus.Desc { return sh.desc } func (sh *weightedHistogram) Write(dest *dto.Metric) error { count, sum, buckets := func() (uint64, float64, map[float64]uint64) { sh.lock.Lock() defer sh.lock.Unlock() nBounds := len(sh.upperBounds) buckets := make(map[float64]uint64, nBounds) var count uint64 for idx, upperBound := range sh.upperBounds { count += sh.buckets[idx] buckets[upperBound] = count } count += sh.buckets[nBounds] return count, sh.sumHot + sh.sumCold, buckets }() metric, err := prometheus.NewConstHistogram(sh.desc, count, sum, buckets, sh.variableLabelValues...) if err != nil { return err } return metric.Write(dest) } func (sh *weightedHistogram) Describe(ch chan<- *prometheus.Desc) { ch <- sh.desc } func (sh *weightedHistogram) Collect(ch chan<- prometheus.Metric) { ch <- sh }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram.go
vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package prometheusextension import ( "errors" "time" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" ) // GaugeOps is the part of `prometheus.Gauge` that is relevant to // instrumented code. // This factoring should be in prometheus, analogous to the way // it already factors out the Observer interface for histograms and summaries. type GaugeOps interface { // Set is the same as Gauge.Set Set(float64) // Inc is the same as Gauge.inc Inc() // Dec is the same as Gauge.Dec Dec() // Add is the same as Gauge.Add Add(float64) // Sub is the same as Gauge.Sub Sub(float64) // SetToCurrentTime the same as Gauge.SetToCurrentTime SetToCurrentTime() } // A TimingHistogram tracks how long a `float64` variable spends in // ranges defined by buckets. Time is counted in nanoseconds. The // histogram's sum is the integral over time (in nanoseconds, from // creation of the histogram) of the variable's value. type TimingHistogram interface { prometheus.Metric prometheus.Collector GaugeOps } // TimingHistogramOpts is the parameters of the TimingHistogram constructor type TimingHistogramOpts struct { Namespace string Subsystem string Name string Help string ConstLabels prometheus.Labels // Buckets defines the buckets into which observations are // accumulated. Each element in the slice is the upper // inclusive bound of a bucket. The values must be sorted in // strictly increasing order. There is no need to add a // highest bucket with +Inf bound. The default value is // prometheus.DefBuckets. Buckets []float64 // The initial value of the variable. InitialValue float64 } // NewTimingHistogram creates a new TimingHistogram func NewTimingHistogram(opts TimingHistogramOpts) (TimingHistogram, error) { return NewTestableTimingHistogram(time.Now, opts) } // NewTestableTimingHistogram creates a TimingHistogram that uses a mockable clock func NewTestableTimingHistogram(nowFunc func() time.Time, opts TimingHistogramOpts) (TimingHistogram, error) { desc := prometheus.NewDesc( prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), wrapTimingHelp(opts.Help), nil, opts.ConstLabels, ) return newTimingHistogram(nowFunc, desc, opts) } func wrapTimingHelp(given string) string { return "EXPERIMENTAL: " + given } func newTimingHistogram(nowFunc func() time.Time, desc *prometheus.Desc, opts TimingHistogramOpts, variableLabelValues ...string) (TimingHistogram, error) { allLabelsM := prometheus.Labels{} allLabelsS := prometheus.MakeLabelPairs(desc, variableLabelValues) for _, pair := range allLabelsS { if pair == nil || pair.Name == nil || pair.Value == nil { return nil, errors.New("prometheus.MakeLabelPairs returned a nil") } allLabelsM[*pair.Name] = *pair.Value } weighted, err := newWeightedHistogram(desc, WeightedHistogramOpts{ Namespace: opts.Namespace, Subsystem: opts.Subsystem, Name: opts.Name, Help: opts.Help, ConstLabels: allLabelsM, Buckets: opts.Buckets, }, variableLabelValues...) if err != nil { return nil, err } return &timingHistogram{ nowFunc: nowFunc, weighted: weighted, lastSetTime: nowFunc(), value: opts.InitialValue, }, nil } type timingHistogram struct { nowFunc func() time.Time weighted *weightedHistogram // The following fields must only be accessed with weighted's lock held lastSetTime time.Time // identifies when value was last set value float64 } var _ TimingHistogram = &timingHistogram{} func (th *timingHistogram) Set(newValue float64) { th.update(func(float64) float64 { return newValue }) } func (th *timingHistogram) Inc() { th.update(func(oldValue float64) float64 { return oldValue + 1 }) } func (th *timingHistogram) Dec() { th.update(func(oldValue float64) float64 { return oldValue - 1 }) } func (th *timingHistogram) Add(delta float64) { th.update(func(oldValue float64) float64 { return oldValue + delta }) } func (th *timingHistogram) Sub(delta float64) { th.update(func(oldValue float64) float64 { return oldValue - delta }) } func (th *timingHistogram) SetToCurrentTime() { th.update(func(oldValue float64) float64 { return th.nowFunc().Sub(time.Unix(0, 0)).Seconds() }) } func (th *timingHistogram) update(updateFn func(float64) float64) { th.weighted.lock.Lock() defer th.weighted.lock.Unlock() now := th.nowFunc() delta := now.Sub(th.lastSetTime) value := th.value if delta > 0 { th.weighted.observeWithWeightLocked(value, uint64(delta)) th.lastSetTime = now } th.value = updateFn(value) } func (th *timingHistogram) Desc() *prometheus.Desc { return th.weighted.Desc() } func (th *timingHistogram) Write(dest *dto.Metric) error { th.Add(0) // account for time since last update return th.weighted.Write(dest) } func (th *timingHistogram) Describe(ch chan<- *prometheus.Desc) { ch <- th.weighted.Desc() } func (th *timingHistogram) Collect(ch chan<- prometheus.Metric) { ch <- th }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram_vec.go
vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram_vec.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package prometheusextension import ( "time" "github.com/prometheus/client_golang/prometheus" ) // GaugeVecOps is a bunch of Gauge that have the same // Desc and are distinguished by the values for their variable labels. type GaugeVecOps interface { GetMetricWith(prometheus.Labels) (GaugeOps, error) GetMetricWithLabelValues(lvs ...string) (GaugeOps, error) With(prometheus.Labels) GaugeOps WithLabelValues(...string) GaugeOps CurryWith(prometheus.Labels) (GaugeVecOps, error) MustCurryWith(prometheus.Labels) GaugeVecOps } type TimingHistogramVec struct { *prometheus.MetricVec } var _ GaugeVecOps = &TimingHistogramVec{} var _ prometheus.Collector = &TimingHistogramVec{} func NewTimingHistogramVec(opts TimingHistogramOpts, labelNames ...string) *TimingHistogramVec { return NewTestableTimingHistogramVec(time.Now, opts, labelNames...) } func NewTestableTimingHistogramVec(nowFunc func() time.Time, opts TimingHistogramOpts, labelNames ...string) *TimingHistogramVec { desc := prometheus.NewDesc( prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), wrapTimingHelp(opts.Help), labelNames, opts.ConstLabels, ) return &TimingHistogramVec{ MetricVec: prometheus.NewMetricVec(desc, func(lvs ...string) prometheus.Metric { metric, err := newTimingHistogram(nowFunc, desc, opts, lvs...) if err != nil { panic(err) // like in prometheus.newHistogram } return metric }), } } func (hv *TimingHistogramVec) GetMetricWith(labels prometheus.Labels) (GaugeOps, error) { metric, err := hv.MetricVec.GetMetricWith(labels) if metric != nil { return metric.(GaugeOps), err } return nil, err } func (hv *TimingHistogramVec) GetMetricWithLabelValues(lvs ...string) (GaugeOps, error) { metric, err := hv.MetricVec.GetMetricWithLabelValues(lvs...) if metric != nil { return metric.(GaugeOps), err } return nil, err } func (hv *TimingHistogramVec) With(labels prometheus.Labels) GaugeOps { h, err := hv.GetMetricWith(labels) if err != nil { panic(err) } return h } func (hv *TimingHistogramVec) WithLabelValues(lvs ...string) GaugeOps { h, err := hv.GetMetricWithLabelValues(lvs...) if err != nil { panic(err) } return h } func (hv *TimingHistogramVec) CurryWith(labels prometheus.Labels) (GaugeVecOps, error) { vec, err := hv.MetricVec.CurryWith(labels) if vec != nil { return &TimingHistogramVec{MetricVec: vec}, err } return nil, err } func (hv *TimingHistogramVec) MustCurryWith(labels prometheus.Labels) GaugeVecOps { vec, err := hv.CurryWith(labels) if err != nil { panic(err) } return vec }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/gomodules.xyz/jsonpatch/v2/jsonpatch.go
vendor/gomodules.xyz/jsonpatch/v2/jsonpatch.go
package jsonpatch import ( "bytes" "encoding/json" "fmt" "reflect" "strings" ) var errBadJSONDoc = fmt.Errorf("invalid JSON Document") type JsonPatchOperation = Operation type Operation struct { Operation string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` } func (j *Operation) Json() string { b, _ := json.Marshal(j) return string(b) } func (j *Operation) MarshalJSON() ([]byte, error) { // Ensure for add and replace we emit `value: null` if j.Value == nil && (j.Operation == "replace" || j.Operation == "add") { return json.Marshal(struct { Operation string `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }{ Operation: j.Operation, Path: j.Path, }) } // otherwise just marshal normally. We cannot literally do json.Marshal(j) as it would be recursively // calling this function. return json.Marshal(struct { Operation string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }{ Operation: j.Operation, Path: j.Path, Value: j.Value, }) } type ByPath []Operation func (a ByPath) Len() int { return len(a) } func (a ByPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] } func (a ByPath) Less(i, j int) bool { return a[i].Path < a[j].Path } func NewOperation(op, path string, value interface{}) Operation { return Operation{Operation: op, Path: path, Value: value} } // CreatePatch creates a patch as specified in http://jsonpatch.com/ // // 'a' is original, 'b' is the modified document. Both are to be given as json encoded content. // The function will return an array of JsonPatchOperations // // An error will be returned if any of the two documents are invalid. func CreatePatch(a, b []byte) ([]Operation, error) { if bytes.Equal(a, b) { return []Operation{}, nil } var aI interface{} var bI interface{} err := json.Unmarshal(a, &aI) if err != nil { return nil, errBadJSONDoc } err = json.Unmarshal(b, &bI) if err != nil { return nil, errBadJSONDoc } return handleValues(aI, bI, "", []Operation{}) } // Returns true if the values matches (must be json types) // The types of the values must match, otherwise it will always return false // If two map[string]interface{} are given, all elements must match. func matchesValue(av, bv interface{}) bool { if reflect.TypeOf(av) != reflect.TypeOf(bv) { return false } switch at := av.(type) { case string: bt, ok := bv.(string) if ok && bt == at { return true } case float64: bt, ok := bv.(float64) if ok && bt == at { return true } case bool: bt, ok := bv.(bool) if ok && bt == at { return true } case map[string]interface{}: bt, ok := bv.(map[string]interface{}) if !ok { return false } for key := range at { if !matchesValue(at[key], bt[key]) { return false } } for key := range bt { if !matchesValue(at[key], bt[key]) { return false } } return true case []interface{}: bt, ok := bv.([]interface{}) if !ok { return false } if len(bt) != len(at) { return false } for key := range at { if !matchesValue(at[key], bt[key]) { return false } } for key := range bt { if !matchesValue(at[key], bt[key]) { return false } } return true } return false } // From http://tools.ietf.org/html/rfc6901#section-4 : // // Evaluation of each reference token begins by decoding any escaped // character sequence. This is performed by first transforming any // occurrence of the sequence '~1' to '/', and then transforming any // occurrence of the sequence '~0' to '~'. // TODO decode support: // var rfc6901Decoder = strings.NewReplacer("~1", "/", "~0", "~") var rfc6901Encoder = strings.NewReplacer("~", "~0", "/", "~1") func makePath(path string, newPart interface{}) string { key := rfc6901Encoder.Replace(fmt.Sprintf("%v", newPart)) if path == "" { return "/" + key } return path + "/" + key } // diff returns the (recursive) difference between a and b as an array of JsonPatchOperations. func diff(a, b map[string]interface{}, path string, patch []Operation) ([]Operation, error) { for key, bv := range b { p := makePath(path, key) av, ok := a[key] // value was added if !ok { patch = append(patch, NewOperation("add", p, bv)) continue } // Types are the same, compare values var err error patch, err = handleValues(av, bv, p, patch) if err != nil { return nil, err } } // Now add all deleted values as nil for key := range a { _, found := b[key] if !found { p := makePath(path, key) patch = append(patch, NewOperation("remove", p, nil)) } } return patch, nil } func handleValues(av, bv interface{}, p string, patch []Operation) ([]Operation, error) { { at := reflect.TypeOf(av) bt := reflect.TypeOf(bv) if at == nil && bt == nil { // do nothing return patch, nil } else if at != bt { // If types have changed, replace completely (preserves null in destination) return append(patch, NewOperation("replace", p, bv)), nil } } var err error switch at := av.(type) { case map[string]interface{}: bt := bv.(map[string]interface{}) patch, err = diff(at, bt, p, patch) if err != nil { return nil, err } case string, float64, bool: if !matchesValue(av, bv) { patch = append(patch, NewOperation("replace", p, bv)) } case []interface{}: bt := bv.([]interface{}) n := min(len(at), len(bt)) for i := len(at) - 1; i >= n; i-- { patch = append(patch, NewOperation("remove", makePath(p, i), nil)) } for i := n; i < len(bt); i++ { patch = append(patch, NewOperation("add", makePath(p, i), bt[i])) } for i := 0; i < n; i++ { var err error patch, err = handleValues(at[i], bt[i], makePath(p, i), patch) if err != nil { return nil, err } } default: panic(fmt.Sprintf("Unknown type:%T ", av)) } return patch, nil } func min(x int, y int) int { if y < x { return y } return x }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/dmesg.go
vendor/modernc.org/sqlite/dmesg.go
// Copyright 2023 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build sqlite.dmesg // +build sqlite.dmesg package sqlite // import "modernc.org/sqlite" import ( "fmt" "os" "path/filepath" "strings" "time" ) const dmesgs = true var ( pid = fmt.Sprintf("[%v %v] ", os.Getpid(), filepath.Base(os.Args[0])) logf *os.File ) func init() { t := time.Now() // 01/02 03:04:05PM '06 -0700 dn := t.Format("sqlite-dmesg-2006-01-02-03-150405") dn = filepath.Join(os.TempDir(), fmt.Sprintf("%s.%d", dn, os.Getpid())) if err := os.Mkdir(dn, 0770); err != nil { panic(err.Error()) } fn := filepath.Join(dn, "dmesg.log") var err error if logf, err = os.OpenFile(fn, os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_SYNC, 0644); err != nil { panic(err.Error()) } dmesg("%v", time.Now()) fmt.Fprintf(os.Stderr, "debug messages in %s\n", fn) } func dmesg(s string, args ...interface{}) { if s == "" { s = strings.Repeat("%v ", len(args)) } s = fmt.Sprintf(pid+s, args...) s += fmt.Sprintf(" (%v: %v:)", origin(3), origin(2)) switch { case len(s) != 0 && s[len(s)-1] == '\n': fmt.Fprint(logf, s) default: fmt.Fprintln(logf, s) } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/norlimit.go
vendor/modernc.org/sqlite/norlimit.go
// Copyright 2021 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows // +build windows package sqlite // import "modernc.org/sqlite" func setMaxOpenFiles(n int) error { return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/mutex.go
vendor/modernc.org/sqlite/mutex.go
// Copyright 2019 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sqlite // import "modernc.org/sqlite" import ( "sync" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) type mutex struct { sync.Mutex } func mutexAlloc(tls *libc.TLS) uintptr { return libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{}))) } func mutexFree(tls *libc.TLS, m uintptr) { libc.Xfree(tls, m) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/fcntl.go
vendor/modernc.org/sqlite/fcntl.go
// Copyright 2024 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sqlite // import "modernc.org/sqlite" import ( "runtime" "unsafe" "modernc.org/libc" sqlite3 "modernc.org/sqlite/lib" ) // Access to sqlite3_file_control type FileControl interface { // Set or query SQLITE_FCNTL_PERSIST_WAL, returns set mode or query result FileControlPersistWAL(dbName string, mode int) (int, error) } var _ FileControl = (*conn)(nil) func (c *conn) FileControlPersistWAL(dbName string, mode int) (int, error) { i32 := int32(mode) pi32 := &i32 var p runtime.Pinner p.Pin(pi32) defer p.Unpin() err := c.fileControl(dbName, sqlite3.SQLITE_FCNTL_PERSIST_WAL, (uintptr)(unsafe.Pointer(pi32))) return int(i32), err } func (c *conn) fileControl(dbName string, op int, pArg uintptr) error { zDbName, err := libc.CString(dbName) if err != nil { return err } defer c.free(zDbName) if rc := sqlite3.Xsqlite3_file_control(c.tls, c.db, zDbName, int32(op), pArg); rc != sqlite3.SQLITE_OK { return c.errstr(rc) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/rlimit.go
vendor/modernc.org/sqlite/rlimit.go
// Copyright 2021 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build freebsd // +build freebsd package sqlite // import "modernc.org/sqlite" import ( "golang.org/x/sys/unix" ) func setMaxOpenFiles(n int64) error { var rLimit unix.Rlimit rLimit.Max = n rLimit.Cur = n return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/sqlite.go
vendor/modernc.org/sqlite/sqlite.go
// Copyright 2017 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:generate go run generator.go -full-path-comments package sqlite // import "modernc.org/sqlite" import ( "context" "database/sql" "database/sql/driver" "errors" "fmt" "io" "math" "math/bits" "net/url" "reflect" "runtime" "sort" "strconv" "strings" "sync" "sync/atomic" "time" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" sqlite3 "modernc.org/sqlite/lib" ) var ( _ driver.Conn = (*conn)(nil) _ driver.Driver = (*Driver)(nil) //lint:ignore SA1019 TODO implement ExecerContext _ driver.Execer = (*conn)(nil) //lint:ignore SA1019 TODO implement QueryerContext _ driver.Queryer = (*conn)(nil) _ driver.Result = (*result)(nil) _ driver.Rows = (*rows)(nil) _ driver.RowsColumnTypeDatabaseTypeName = (*rows)(nil) _ driver.RowsColumnTypeLength = (*rows)(nil) _ driver.RowsColumnTypeNullable = (*rows)(nil) _ driver.RowsColumnTypePrecisionScale = (*rows)(nil) _ driver.RowsColumnTypeScanType = (*rows)(nil) _ driver.Stmt = (*stmt)(nil) _ driver.Tx = (*tx)(nil) _ error = (*Error)(nil) ) const ( driverName = "sqlite" ptrSize = unsafe.Sizeof(uintptr(0)) sqliteLockedSharedcache = sqlite3.SQLITE_LOCKED | (1 << 8) ) // https://gitlab.com/cznic/sqlite/-/issues/199 func init() { sqlite3.PatchIssue199() } // Error represents sqlite library error code. type Error struct { msg string code int } // Error implements error. func (e *Error) Error() string { return e.msg } // Code returns the sqlite result code for this error. func (e *Error) Code() int { return e.code } var ( // ErrorCodeString maps Error.Code() to its string representation. ErrorCodeString = map[int]string{ sqlite3.SQLITE_ABORT: "Callback routine requested an abort (SQLITE_ABORT)", sqlite3.SQLITE_AUTH: "Authorization denied (SQLITE_AUTH)", sqlite3.SQLITE_BUSY: "The database file is locked (SQLITE_BUSY)", sqlite3.SQLITE_CANTOPEN: "Unable to open the database file (SQLITE_CANTOPEN)", sqlite3.SQLITE_CONSTRAINT: "Abort due to constraint violation (SQLITE_CONSTRAINT)", sqlite3.SQLITE_CORRUPT: "The database disk image is malformed (SQLITE_CORRUPT)", sqlite3.SQLITE_DONE: "sqlite3_step() has finished executing (SQLITE_DONE)", sqlite3.SQLITE_EMPTY: "Internal use only (SQLITE_EMPTY)", sqlite3.SQLITE_ERROR: "Generic error (SQLITE_ERROR)", sqlite3.SQLITE_FORMAT: "Not used (SQLITE_FORMAT)", sqlite3.SQLITE_FULL: "Insertion failed because database is full (SQLITE_FULL)", sqlite3.SQLITE_INTERNAL: "Internal logic error in SQLite (SQLITE_INTERNAL)", sqlite3.SQLITE_INTERRUPT: "Operation terminated by sqlite3_interrupt()(SQLITE_INTERRUPT)", sqlite3.SQLITE_IOERR | (1 << 8): "(SQLITE_IOERR_READ)", sqlite3.SQLITE_IOERR | (10 << 8): "(SQLITE_IOERR_DELETE)", sqlite3.SQLITE_IOERR | (11 << 8): "(SQLITE_IOERR_BLOCKED)", sqlite3.SQLITE_IOERR | (12 << 8): "(SQLITE_IOERR_NOMEM)", sqlite3.SQLITE_IOERR | (13 << 8): "(SQLITE_IOERR_ACCESS)", sqlite3.SQLITE_IOERR | (14 << 8): "(SQLITE_IOERR_CHECKRESERVEDLOCK)", sqlite3.SQLITE_IOERR | (15 << 8): "(SQLITE_IOERR_LOCK)", sqlite3.SQLITE_IOERR | (16 << 8): "(SQLITE_IOERR_CLOSE)", sqlite3.SQLITE_IOERR | (17 << 8): "(SQLITE_IOERR_DIR_CLOSE)", sqlite3.SQLITE_IOERR | (2 << 8): "(SQLITE_IOERR_SHORT_READ)", sqlite3.SQLITE_IOERR | (3 << 8): "(SQLITE_IOERR_WRITE)", sqlite3.SQLITE_IOERR | (4 << 8): "(SQLITE_IOERR_FSYNC)", sqlite3.SQLITE_IOERR | (5 << 8): "(SQLITE_IOERR_DIR_FSYNC)", sqlite3.SQLITE_IOERR | (6 << 8): "(SQLITE_IOERR_TRUNCATE)", sqlite3.SQLITE_IOERR | (7 << 8): "(SQLITE_IOERR_FSTAT)", sqlite3.SQLITE_IOERR | (8 << 8): "(SQLITE_IOERR_UNLOCK)", sqlite3.SQLITE_IOERR | (9 << 8): "(SQLITE_IOERR_RDLOCK)", sqlite3.SQLITE_IOERR: "Some kind of disk I/O error occurred (SQLITE_IOERR)", sqlite3.SQLITE_LOCKED | (1 << 8): "(SQLITE_LOCKED_SHAREDCACHE)", sqlite3.SQLITE_LOCKED: "A table in the database is locked (SQLITE_LOCKED)", sqlite3.SQLITE_MISMATCH: "Data type mismatch (SQLITE_MISMATCH)", sqlite3.SQLITE_MISUSE: "Library used incorrectly (SQLITE_MISUSE)", sqlite3.SQLITE_NOLFS: "Uses OS features not supported on host (SQLITE_NOLFS)", sqlite3.SQLITE_NOMEM: "A malloc() failed (SQLITE_NOMEM)", sqlite3.SQLITE_NOTADB: "File opened that is not a database file (SQLITE_NOTADB)", sqlite3.SQLITE_NOTFOUND: "Unknown opcode in sqlite3_file_control() (SQLITE_NOTFOUND)", sqlite3.SQLITE_NOTICE: "Notifications from sqlite3_log() (SQLITE_NOTICE)", sqlite3.SQLITE_PERM: "Access permission denied (SQLITE_PERM)", sqlite3.SQLITE_PROTOCOL: "Database lock protocol error (SQLITE_PROTOCOL)", sqlite3.SQLITE_RANGE: "2nd parameter to sqlite3_bind out of range (SQLITE_RANGE)", sqlite3.SQLITE_READONLY: "Attempt to write a readonly database (SQLITE_READONLY)", sqlite3.SQLITE_ROW: "sqlite3_step() has another row ready (SQLITE_ROW)", sqlite3.SQLITE_SCHEMA: "The database schema changed (SQLITE_SCHEMA)", sqlite3.SQLITE_TOOBIG: "String or BLOB exceeds size limit (SQLITE_TOOBIG)", sqlite3.SQLITE_WARNING: "Warnings from sqlite3_log() (SQLITE_WARNING)", } ) func init() { sql.Register(driverName, newDriver()) } type result struct { lastInsertID int64 rowsAffected int } func newResult(c *conn) (_ *result, err error) { r := &result{} if r.rowsAffected, err = c.changes(); err != nil { return nil, err } if r.lastInsertID, err = c.lastInsertRowID(); err != nil { return nil, err } return r, nil } // LastInsertId returns the database's auto-generated ID after, for example, an // INSERT into a table with primary key. func (r *result) LastInsertId() (int64, error) { if r == nil { return 0, nil } return r.lastInsertID, nil } // RowsAffected returns the number of rows affected by the query. func (r *result) RowsAffected() (int64, error) { if r == nil { return 0, nil } return int64(r.rowsAffected), nil } type rows struct { allocs []uintptr c *conn columns []string pstmt uintptr doStep bool empty bool } func newRows(c *conn, pstmt uintptr, allocs []uintptr, empty bool) (r *rows, err error) { r = &rows{c: c, pstmt: pstmt, allocs: allocs, empty: empty} defer func() { if err != nil { r.Close() r = nil } }() n, err := c.columnCount(pstmt) if err != nil { return nil, err } r.columns = make([]string, n) for i := range r.columns { if r.columns[i], err = r.c.columnName(pstmt, i); err != nil { return nil, err } } return r, nil } // Close closes the rows iterator. func (r *rows) Close() (err error) { for _, v := range r.allocs { r.c.free(v) } r.allocs = nil return r.c.finalize(r.pstmt) } // Columns returns the names of the columns. The number of columns of the // result is inferred from the length of the slice. If a particular column name // isn't known, an empty string should be returned for that entry. func (r *rows) Columns() (c []string) { return r.columns } // Next is called to populate the next row of data into the provided slice. The // provided slice will be the same size as the Columns() are wide. // // Next should return io.EOF when there are no more rows. func (r *rows) Next(dest []driver.Value) (err error) { if r.empty { return io.EOF } rc := sqlite3.SQLITE_ROW if r.doStep { if rc, err = r.c.step(r.pstmt); err != nil { return err } } r.doStep = true switch rc { case sqlite3.SQLITE_ROW: if g, e := len(dest), len(r.columns); g != e { return fmt.Errorf("sqlite: Next: have %v destination values, expected %v", g, e) } for i := range dest { ct, err := r.c.columnType(r.pstmt, i) if err != nil { return err } switch ct { case sqlite3.SQLITE_INTEGER: v, err := r.c.columnInt64(r.pstmt, i) if err != nil { return err } if !r.c.intToTime { dest[i] = v } else { // Inspired by mattn/go-sqlite3: // https://github.com/mattn/go-sqlite3/blob/f76bae4b0044cbba8fb2c72b8e4559e8fbcffd86/sqlite3.go#L2254-L2262 // but we put make this compatibility optional behind a DSN // query parameter, because this changes API behavior, so an // opt-in is needed. switch r.ColumnTypeDatabaseTypeName(i) { case "DATE", "DATETIME", "TIMESTAMP": // Is it a seconds timestamp or a milliseconds // timestamp? if v > 1e12 || v < -1e12 { // time.Unix expects nanoseconds, but this is a // milliseconds timestamp, so convert ms->ns. v *= int64(time.Millisecond) dest[i] = time.Unix(0, v).UTC() } else { dest[i] = time.Unix(v, 0) } default: dest[i] = v } } case sqlite3.SQLITE_FLOAT: v, err := r.c.columnDouble(r.pstmt, i) if err != nil { return err } dest[i] = v case sqlite3.SQLITE_TEXT: v, err := r.c.columnText(r.pstmt, i) if err != nil { return err } switch r.ColumnTypeDatabaseTypeName(i) { case "DATE", "DATETIME", "TIMESTAMP": dest[i], _ = r.c.parseTime(v) default: dest[i] = v } case sqlite3.SQLITE_BLOB: v, err := r.c.columnBlob(r.pstmt, i) if err != nil { return err } dest[i] = v case sqlite3.SQLITE_NULL: dest[i] = nil default: return fmt.Errorf("internal error: rc %d", rc) } } return nil case sqlite3.SQLITE_DONE: return io.EOF default: return r.c.errstr(int32(rc)) } } // Inspired by mattn/go-sqlite3: https://github.com/mattn/go-sqlite3/blob/ab91e934/sqlite3.go#L210-L226 // // These time.Parse formats handle formats 1 through 7 listed at https://www.sqlite.org/lang_datefunc.html. var parseTimeFormats = []string{ "2006-01-02 15:04:05.999999999-07:00", "2006-01-02T15:04:05.999999999-07:00", "2006-01-02 15:04:05.999999999", "2006-01-02T15:04:05.999999999", "2006-01-02 15:04", "2006-01-02T15:04", "2006-01-02", } // Attempt to parse s as a time. Return (s, false) if s is not // recognized as a valid time encoding. func (c *conn) parseTime(s string) (interface{}, bool) { if v, ok := c.parseTimeString(s, strings.Index(s, "m=")); ok { return v, true } ts := strings.TrimSuffix(s, "Z") for _, f := range parseTimeFormats { t, err := time.Parse(f, ts) if err == nil { return t, true } } return s, false } // Attempt to parse s as a time string produced by t.String(). If x > 0 it's // the index of substring "m=" within s. Return (s, false) if s is // not recognized as a valid time encoding. func (c *conn) parseTimeString(s0 string, x int) (interface{}, bool) { s := s0 if x > 0 { s = s[:x] // "2006-01-02 15:04:05.999999999 -0700 MST m=+9999" -> "2006-01-02 15:04:05.999999999 -0700 MST " } s = strings.TrimSpace(s) if t, err := time.Parse("2006-01-02 15:04:05.999999999 -0700 MST", s); err == nil { return t, true } return s0, false } // writeTimeFormats are the names and formats supported // by the `_time_format` DSN query param. var writeTimeFormats = map[string]string{ "sqlite": parseTimeFormats[0], } func (c *conn) formatTime(t time.Time) string { // Before configurable write time formats were supported, // time.Time.String was used. Maintain that default to // keep existing driver users formatting times the same. if c.writeTimeFormat == "" { return t.String() } return t.Format(c.writeTimeFormat) } // RowsColumnTypeDatabaseTypeName may be implemented by Rows. It should return // the database system type name without the length. Type names should be // uppercase. Examples of returned types: "VARCHAR", "NVARCHAR", "VARCHAR2", // "CHAR", "TEXT", "DECIMAL", "SMALLINT", "INT", "BIGINT", "BOOL", "[]BIGINT", // "JSONB", "XML", "TIMESTAMP". func (r *rows) ColumnTypeDatabaseTypeName(index int) string { return strings.ToUpper(r.c.columnDeclType(r.pstmt, index)) } // RowsColumnTypeLength may be implemented by Rows. It should return the length // of the column type if the column is a variable length type. If the column is // not a variable length type ok should return false. If length is not limited // other than system limits, it should return math.MaxInt64. The following are // examples of returned values for various types: // // TEXT (math.MaxInt64, true) // varchar(10) (10, true) // nvarchar(10) (10, true) // decimal (0, false) // int (0, false) // bytea(30) (30, true) func (r *rows) ColumnTypeLength(index int) (length int64, ok bool) { t, err := r.c.columnType(r.pstmt, index) if err != nil { return 0, false } switch t { case sqlite3.SQLITE_INTEGER: return 0, false case sqlite3.SQLITE_FLOAT: return 0, false case sqlite3.SQLITE_TEXT: return math.MaxInt64, true case sqlite3.SQLITE_BLOB: return math.MaxInt64, true case sqlite3.SQLITE_NULL: return 0, false default: return 0, false } } // RowsColumnTypeNullable may be implemented by Rows. The nullable value should // be true if it is known the column may be null, or false if the column is // known to be not nullable. If the column nullability is unknown, ok should be // false. func (r *rows) ColumnTypeNullable(index int) (nullable, ok bool) { return true, true } // RowsColumnTypePrecisionScale may be implemented by Rows. It should return // the precision and scale for decimal types. If not applicable, ok should be // false. The following are examples of returned values for various types: // // decimal(38, 4) (38, 4, true) // int (0, 0, false) // decimal (math.MaxInt64, math.MaxInt64, true) func (r *rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) { return 0, 0, false } // RowsColumnTypeScanType may be implemented by Rows. It should return the // value type that can be used to scan types into. For example, the database // column type "bigint" this should return "reflect.TypeOf(int64(0))". func (r *rows) ColumnTypeScanType(index int) reflect.Type { t, err := r.c.columnType(r.pstmt, index) if err != nil { return reflect.TypeOf("") } switch t { case sqlite3.SQLITE_INTEGER: switch strings.ToLower(r.c.columnDeclType(r.pstmt, index)) { case "boolean": return reflect.TypeOf(false) case "date", "datetime", "time", "timestamp": return reflect.TypeOf(time.Time{}) default: return reflect.TypeOf(int64(0)) } case sqlite3.SQLITE_FLOAT: return reflect.TypeOf(float64(0)) case sqlite3.SQLITE_TEXT: return reflect.TypeOf("") case sqlite3.SQLITE_BLOB: return reflect.TypeOf([]byte(nil)) case sqlite3.SQLITE_NULL: return reflect.TypeOf(nil) default: return reflect.TypeOf("") } } type stmt struct { c *conn psql uintptr } func newStmt(c *conn, sql string) (*stmt, error) { p, err := libc.CString(sql) if err != nil { return nil, err } stm := stmt{c: c, psql: p} return &stm, nil } // Close closes the statement. // // As of Go 1.1, a Stmt will not be closed if it's in use by any queries. func (s *stmt) Close() (err error) { s.c.free(s.psql) s.psql = 0 return nil } // Exec executes a query that doesn't return rows, such as an INSERT or UPDATE. // // Deprecated: Drivers should implement StmtExecContext instead (or // additionally). func (s *stmt) Exec(args []driver.Value) (driver.Result, error) { //TODO StmtExecContext return s.exec(context.Background(), toNamedValues(args)) } // toNamedValues converts []driver.Value to []driver.NamedValue func toNamedValues(vals []driver.Value) (r []driver.NamedValue) { r = make([]driver.NamedValue, len(vals)) for i, val := range vals { r[i] = driver.NamedValue{Value: val, Ordinal: i + 1} } return r } func (s *stmt) exec(ctx context.Context, args []driver.NamedValue) (r driver.Result, err error) { var pstmt uintptr var done int32 if ctx != nil { if ctxDone := ctx.Done(); ctxDone != nil { select { case <-ctxDone: return nil, ctx.Err() default: } defer interruptOnDone(ctx, s.c, &done)() } } defer func() { if ctx != nil && atomic.LoadInt32(&done) != 0 { r, err = nil, ctx.Err() } if pstmt != 0 { // ensure stmt finalized. e := s.c.finalize(pstmt) if err == nil && e != nil { // prioritize original // returned error. err = e } } }() for psql := s.psql; *(*byte)(unsafe.Pointer(psql)) != 0 && atomic.LoadInt32(&done) == 0; { if pstmt, err = s.c.prepareV2(&psql); err != nil { return nil, err } if pstmt == 0 { continue } err = func() (err error) { n, err := s.c.bindParameterCount(pstmt) if err != nil { return err } if n != 0 { allocs, err := s.c.bind(pstmt, n, args) if err != nil { return err } if len(allocs) != 0 { defer func() { for _, v := range allocs { s.c.free(v) } }() } } rc, err := s.c.step(pstmt) if err != nil { return err } switch rc & 0xff { case sqlite3.SQLITE_DONE, sqlite3.SQLITE_ROW: r, err = newResult(s.c) default: return s.c.errstr(int32(rc)) } return nil }() e := s.c.finalize(pstmt) pstmt = 0 // done with if err == nil && e != nil { // prioritize original // returned error. err = e } if err != nil { return nil, err } } return r, err } // NumInput returns the number of placeholder parameters. // // If NumInput returns >= 0, the sql package will sanity check argument counts // from callers and return errors to the caller before the statement's Exec or // Query methods are called. // // NumInput may also return -1, if the driver doesn't know its number of // placeholders. In that case, the sql package will not sanity check Exec or // Query argument counts. func (s *stmt) NumInput() (n int) { return -1 } // Query executes a query that may return rows, such as a // SELECT. // // Deprecated: Drivers should implement StmtQueryContext instead (or // additionally). func (s *stmt) Query(args []driver.Value) (driver.Rows, error) { //TODO StmtQueryContext return s.query(context.Background(), toNamedValues(args)) } func (s *stmt) query(ctx context.Context, args []driver.NamedValue) (r driver.Rows, err error) { var pstmt uintptr var done int32 if ctx != nil { if ctxDone := ctx.Done(); ctxDone != nil { select { case <-ctxDone: return nil, ctx.Err() default: } defer interruptOnDone(ctx, s.c, &done)() } } var allocs []uintptr defer func() { if ctx != nil && atomic.LoadInt32(&done) != 0 { r, err = nil, ctx.Err() } else if r == nil && err == nil { r, err = newRows(s.c, pstmt, allocs, true) } if pstmt != 0 { // ensure stmt finalized. e := s.c.finalize(pstmt) if err == nil && e != nil { // prioritize original // returned error. err = e } } }() for psql := s.psql; *(*byte)(unsafe.Pointer(psql)) != 0 && atomic.LoadInt32(&done) == 0; { if pstmt, err = s.c.prepareV2(&psql); err != nil { return nil, err } if pstmt == 0 { continue } err = func() (err error) { n, err := s.c.bindParameterCount(pstmt) if err != nil { return err } if n != 0 { if allocs, err = s.c.bind(pstmt, n, args); err != nil { return err } } rc, err := s.c.step(pstmt) if err != nil { return err } switch rc & 0xff { case sqlite3.SQLITE_ROW: if r != nil { r.Close() } if r, err = newRows(s.c, pstmt, allocs, false); err != nil { return err } pstmt = 0 return nil case sqlite3.SQLITE_DONE: if r == nil { if r, err = newRows(s.c, pstmt, allocs, true); err != nil { return err } pstmt = 0 return nil } // nop default: return s.c.errstr(int32(rc)) } if *(*byte)(unsafe.Pointer(psql)) == 0 { if r != nil { r.Close() } if r, err = newRows(s.c, pstmt, allocs, true); err != nil { return err } pstmt = 0 } return nil }() e := s.c.finalize(pstmt) pstmt = 0 // done with if err == nil && e != nil { // prioritize original // returned error. err = e } if err != nil { return nil, err } } return r, err } type tx struct { c *conn } func newTx(ctx context.Context, c *conn, opts driver.TxOptions) (*tx, error) { r := &tx{c: c} sql := "begin" if !opts.ReadOnly && c.beginMode != "" { sql = "begin " + c.beginMode } if err := r.exec(ctx, sql); err != nil { return nil, err } return r, nil } // Commit implements driver.Tx. func (t *tx) Commit() (err error) { return t.exec(context.Background(), "commit") } // Rollback implements driver.Tx. func (t *tx) Rollback() (err error) { return t.exec(context.Background(), "rollback") } func (t *tx) exec(ctx context.Context, sql string) (err error) { psql, err := libc.CString(sql) if err != nil { return err } defer t.c.free(psql) //TODO use t.conn.ExecContext() instead if ctx != nil && ctx.Done() != nil { defer interruptOnDone(ctx, t.c, nil)() } if rc := sqlite3.Xsqlite3_exec(t.c.tls, t.c.db, psql, 0, 0, 0); rc != sqlite3.SQLITE_OK { return t.c.errstr(rc) } return nil } // interruptOnDone sets up a goroutine to interrupt the provided db when the // context is canceled, and returns a function the caller must defer so it // doesn't interrupt after the caller finishes. func interruptOnDone( ctx context.Context, c *conn, done *int32, ) func() { if done == nil { var d int32 done = &d } donech := make(chan struct{}) go func() { select { case <-ctx.Done(): // don't call interrupt if we were already done: it indicates that this // call to exec is no longer running and we would be interrupting // nothing, or even possibly an unrelated later call to exec. if atomic.AddInt32(done, 1) == 1 { c.interrupt(c.db) } case <-donech: } }() // the caller is expected to defer this function return func() { // set the done flag so that a context cancellation right after the caller // returns doesn't trigger a call to interrupt for some other statement. atomic.AddInt32(done, 1) close(donech) } } type conn struct { db uintptr // *sqlite3.Xsqlite3 tls *libc.TLS // Context handling can cause conn.Close and conn.interrupt to be invoked // concurrently. sync.Mutex writeTimeFormat string beginMode string intToTime bool integerTimeFormat string } func newConn(dsn string) (*conn, error) { var query, vfsName string // Parse the query parameters from the dsn and them from the dsn if not prefixed by file: // https://github.com/mattn/go-sqlite3/blob/3392062c729d77820afc1f5cae3427f0de39e954/sqlite3.go#L1046 // https://github.com/mattn/go-sqlite3/blob/3392062c729d77820afc1f5cae3427f0de39e954/sqlite3.go#L1383 pos := strings.IndexRune(dsn, '?') if pos >= 1 { query = dsn[pos+1:] var err error vfsName, err = getVFSName(query) if err != nil { return nil, err } if !strings.HasPrefix(dsn, "file:") { dsn = dsn[:pos] } } c := &conn{tls: libc.NewTLS()} db, err := c.openV2( dsn, vfsName, sqlite3.SQLITE_OPEN_READWRITE|sqlite3.SQLITE_OPEN_CREATE| sqlite3.SQLITE_OPEN_FULLMUTEX| sqlite3.SQLITE_OPEN_URI, ) if err != nil { return nil, err } c.db = db if err = c.extendedResultCodes(true); err != nil { c.Close() return nil, err } if err = applyQueryParams(c, query); err != nil { c.Close() return nil, err } return c, nil } func getVFSName(query string) (r string, err error) { q, err := url.ParseQuery(query) if err != nil { return "", err } for _, v := range q["vfs"] { if r != "" && r != v { return "", fmt.Errorf("conflicting vfs query parameters: %v", q["vfs"]) } r = v } return r, nil } func applyQueryParams(c *conn, query string) error { q, err := url.ParseQuery(query) if err != nil { return err } var a []string for _, v := range q["_pragma"] { a = append(a, v) } // Push 'busy_timeout' first, the rest in lexicographic order, case insenstive. // See https://gitlab.com/cznic/sqlite/-/issues/198#note_2233423463 for // discussion. sort.Slice(a, func(i, j int) bool { x, y := strings.TrimSpace(strings.ToLower(a[i])), strings.TrimSpace(strings.ToLower(a[j])) if strings.HasPrefix(x, "busy_timeout") { return true } if strings.HasPrefix(y, "busy_timeout") { return false } return x < y }) for _, v := range a { cmd := "pragma " + v _, err := c.exec(context.Background(), cmd, nil) if err != nil { return err } } if v := q.Get("_time_format"); v != "" { f, ok := writeTimeFormats[v] if !ok { return fmt.Errorf("unknown _time_format %q", v) } c.writeTimeFormat = f } if v := q.Get("_time_integer_format"); v != "" { switch v { case "unix": case "unix_milli": case "unix_micro": case "unix_nano": default: return fmt.Errorf("unknown _time_integer_format %q", v) } c.integerTimeFormat = v } if v := q.Get("_txlock"); v != "" { lower := strings.ToLower(v) if lower != "deferred" && lower != "immediate" && lower != "exclusive" { return fmt.Errorf("unknown _txlock %q", v) } c.beginMode = v } if v := q.Get("_inttotime"); v != "" { onoff, err := strconv.ParseBool(v) if err != nil { return fmt.Errorf("unknown _inttotime %q, must be 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False", v) } c.intToTime = onoff } return nil } // C documentation // // const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); func (c *conn) columnBlob(pstmt uintptr, iCol int) (v []byte, err error) { p := sqlite3.Xsqlite3_column_blob(c.tls, pstmt, int32(iCol)) len, err := c.columnBytes(pstmt, iCol) if err != nil { return nil, err } if p == 0 || len == 0 { return nil, nil } v = make([]byte, len) copy(v, (*libc.RawMem)(unsafe.Pointer(p))[:len:len]) return v, nil } // C documentation // // int sqlite3_column_bytes(sqlite3_stmt*, int iCol); func (c *conn) columnBytes(pstmt uintptr, iCol int) (_ int, err error) { v := sqlite3.Xsqlite3_column_bytes(c.tls, pstmt, int32(iCol)) return int(v), nil } // C documentation // // const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); func (c *conn) columnText(pstmt uintptr, iCol int) (v string, err error) { p := sqlite3.Xsqlite3_column_text(c.tls, pstmt, int32(iCol)) len, err := c.columnBytes(pstmt, iCol) if err != nil { return "", err } if p == 0 || len == 0 { return "", nil } b := make([]byte, len) copy(b, (*libc.RawMem)(unsafe.Pointer(p))[:len:len]) return string(b), nil } // C documentation // // double sqlite3_column_double(sqlite3_stmt*, int iCol); func (c *conn) columnDouble(pstmt uintptr, iCol int) (v float64, err error) { v = sqlite3.Xsqlite3_column_double(c.tls, pstmt, int32(iCol)) return v, nil } // C documentation // // sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); func (c *conn) columnInt64(pstmt uintptr, iCol int) (v int64, err error) { v = sqlite3.Xsqlite3_column_int64(c.tls, pstmt, int32(iCol)) return v, nil } // C documentation // // int sqlite3_column_type(sqlite3_stmt*, int iCol); func (c *conn) columnType(pstmt uintptr, iCol int) (_ int, err error) { v := sqlite3.Xsqlite3_column_type(c.tls, pstmt, int32(iCol)) return int(v), nil } // C documentation // // const char *sqlite3_column_decltype(sqlite3_stmt*,int); func (c *conn) columnDeclType(pstmt uintptr, iCol int) string { return libc.GoString(sqlite3.Xsqlite3_column_decltype(c.tls, pstmt, int32(iCol))) } // C documentation // // const char *sqlite3_column_name(sqlite3_stmt*, int N); func (c *conn) columnName(pstmt uintptr, n int) (string, error) { p := sqlite3.Xsqlite3_column_name(c.tls, pstmt, int32(n)) return libc.GoString(p), nil } // C documentation // // int sqlite3_column_count(sqlite3_stmt *pStmt); func (c *conn) columnCount(pstmt uintptr) (_ int, err error) { v := sqlite3.Xsqlite3_column_count(c.tls, pstmt) return int(v), nil } // C documentation // // sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); func (c *conn) lastInsertRowID() (v int64, _ error) { return sqlite3.Xsqlite3_last_insert_rowid(c.tls, c.db), nil } // C documentation // // int sqlite3_changes(sqlite3*); func (c *conn) changes() (int, error) { v := sqlite3.Xsqlite3_changes(c.tls, c.db) return int(v), nil } // C documentation // // int sqlite3_step(sqlite3_stmt*); func (c *conn) step(pstmt uintptr) (int, error) { for { switch rc := sqlite3.Xsqlite3_step(c.tls, pstmt); rc { case sqliteLockedSharedcache: if err := c.retry(pstmt); err != nil { return sqlite3.SQLITE_LOCKED, err } case sqlite3.SQLITE_DONE, sqlite3.SQLITE_ROW: return int(rc), nil default: return int(rc), c.errstr(rc) } } } func (c *conn) retry(pstmt uintptr) error { mu := mutexAlloc(c.tls) (*mutex)(unsafe.Pointer(mu)).Lock() rc := sqlite3.Xsqlite3_unlock_notify( c.tls, c.db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) }{unlockNotify})), mu, ) if rc == sqlite3.SQLITE_LOCKED { // Deadlock, see https://www.sqlite.org/c3ref/unlock_notify.html (*mutex)(unsafe.Pointer(mu)).Unlock() mutexFree(c.tls, mu) return c.errstr(rc) } (*mutex)(unsafe.Pointer(mu)).Lock() (*mutex)(unsafe.Pointer(mu)).Unlock() mutexFree(c.tls, mu) if pstmt != 0 { sqlite3.Xsqlite3_reset(c.tls, pstmt) } return nil } func unlockNotify(t *libc.TLS, ppArg uintptr, nArg int32) { for i := int32(0); i < nArg; i++ { mu := *(*uintptr)(unsafe.Pointer(ppArg)) (*mutex)(unsafe.Pointer(mu)).Unlock() ppArg += ptrSize } } func (c *conn) bind(pstmt uintptr, n int, args []driver.NamedValue) (allocs []uintptr, err error) { defer func() { if err == nil { return } for _, v := range allocs { c.free(v) } allocs = nil }() for i := 1; i <= n; i++ { name, err := c.bindParameterName(pstmt, i) if err != nil { return allocs, err } var found bool var v driver.NamedValue for _, v = range args { if name != "" { // For ?NNN and $NNN params, match if NNN == v.Ordinal. // // Supporting this for $NNN is a special case that makes eg // `select $1, $2, $3 ...` work without needing to use // sql.Named. if (name[0] == '?' || name[0] == '$') && name[1:] == strconv.Itoa(v.Ordinal) { found = true break } // sqlite supports '$', '@' and ':' prefixes for string // identifiers and '?' for numeric, so we cannot // combine different prefixes with the same name // because `database/sql` requires variable names // to start with a letter if name[1:] == v.Name[:] { found = true break } } else { if v.Ordinal == i { found = true break } } } if !found { if name != "" { return allocs, fmt.Errorf("missing named argument %q", name[1:]) } return allocs, fmt.Errorf("missing argument with index %d", i) } var p uintptr switch x := v.Value.(type) { case int64: if err := c.bindInt64(pstmt, i, x); err != nil { return allocs, err } case float64: if err := c.bindDouble(pstmt, i, x); err != nil { return allocs, err } case bool: v := 0 if x { v = 1 } if err := c.bindInt(pstmt, i, v); err != nil { return allocs, err } case []byte: if p, err = c.bindBlob(pstmt, i, x); err != nil { return allocs, err } case string: if p, err = c.bindText(pstmt, i, x); err != nil { return allocs, err } case time.Time: switch c.integerTimeFormat { case "unix": if err := c.bindInt64(pstmt, i, x.Unix()); err != nil { return allocs, err } case "unix_milli": if err := c.bindInt64(pstmt, i, x.UnixMilli()); err != nil { return allocs, err } case "unix_micro": if err := c.bindInt64(pstmt, i, x.UnixMicro()); err != nil { return allocs, err } case "unix_nano": if err := c.bindInt64(pstmt, i, x.UnixNano()); err != nil { return allocs, err } default: if p, err = c.bindText(pstmt, i, c.formatTime(x)); err != nil { return allocs, err } } case nil: if p, err = c.bindNull(pstmt, i); err != nil { return allocs, err } default: return allocs, fmt.Errorf("sqlite: invalid driver.Value type %T", x) } if p != 0 { allocs = append(allocs, p) } } return allocs, nil } // C documentation // // int sqlite3_bind_null(sqlite3_stmt*, int); func (c *conn) bindNull(pstmt uintptr, idx1 int) (uintptr, error) {
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/sqlite_go18.go
vendor/modernc.org/sqlite/sqlite_go18.go
// Copyright 2017 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build go1.8 // +build go1.8 package sqlite // import "modernc.org/sqlite" import ( "context" "database/sql/driver" ) // Ping implements driver.Pinger func (c *conn) Ping(ctx context.Context) (err error) { if dmesgs { defer func() { dmesg("conn %p, ctx %p: err %v", c, ctx, err) }() } _, err = c.ExecContext(ctx, "select 1", nil) return err } // BeginTx implements driver.ConnBeginTx func (c *conn) BeginTx(ctx context.Context, opts driver.TxOptions) (dt driver.Tx, err error) { if dmesgs { defer func() { dmesg("conn %p, ctx %p, opts %+v: (driver.Tx %v, err %v)", c, ctx, opts, dt, err) }() } return c.begin(ctx, opts) } // PrepareContext implements driver.ConnPrepareContext func (c *conn) PrepareContext(ctx context.Context, query string) (ds driver.Stmt, err error) { if dmesgs { defer func() { dmesg("conn %p, ctx %p, query %q: (driver.Stmt %v, err %v)", c, ctx, query, ds, err) }() } return c.prepare(ctx, query) } // ExecContext implements driver.ExecerContext func (c *conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (dr driver.Result, err error) { if dmesgs { defer func() { dmesg("conn %p, ctx %p, query %q, args %v: (driver.Result %p, err %v)", c, ctx, query, args, dr, err) }() } return c.exec(ctx, query, args) } // QueryContext implements driver.QueryerContext func (c *conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (dr driver.Rows, err error) { if dmesgs { defer func() { dmesg("conn %p, ctx %p, query %q, args %v: (driver.Rows %p, err %v)", c, ctx, query, args, dr, err) }() } return c.query(ctx, query, args) } // ExecContext implements driver.StmtExecContext func (s *stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (dr driver.Result, err error) { if dmesgs { defer func() { dmesg("stmt %p, ctx %p, args %v: (driver.Result %p, err %v)", s, ctx, args, dr, err) }() } return s.exec(ctx, args) } // QueryContext implements driver.StmtQueryContext func (s *stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (dr driver.Rows, err error) { if dmesgs { defer func() { dmesg("stmt %p, ctx %p, args %v: (driver.Rows %p, err %v)", s, ctx, args, dr, err) }() } return s.query(ctx, args) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/doc.go
vendor/modernc.org/sqlite/doc.go
// Copyright 2017 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package sqlite is a sql/database driver using a CGo-free port of the C // SQLite3 library. // // SQLite is an in-process implementation of a self-contained, serverless, // zero-configuration, transactional SQL database engine. // // # Fragile modernc.org/libc dependency // // When you import this package you should use in your go.mod file the exact // same version of modernc.org/libc as seen in the go.mod file of this // repository. // // See the discussion at https://gitlab.com/cznic/sqlite/-/issues/177 for more details. // // # Thanks // // This project is sponsored by Schleibinger Geräte Teubert u. Greim GmbH by // allowing one of the maintainers to work on it also in office hours. // // # Supported platforms and architectures // // These combinations of GOOS and GOARCH are currently supported // // OS Arch SQLite version // ------------------------------ // darwin amd64 3.50.4 // darwin arm64 3.50.4 // freebsd amd64 3.50.4 // freebsd arm64 3.50.4 // linux 386 3.50.4 // linux amd64 3.50.4 // linux arm 3.50.4 // linux arm64 3.50.4 // linux loong64 3.50.4 // linux ppc64le 3.50.4 // linux riscv64 3.50.4 // linux s390x 3.50.4 // windows 386 3.50.4 // windows amd64 3.50.4 // windows arm64 3.50.4 // // # Benchmarks // // [The SQLite Drivers Benchmarks Game] // // # Builders // // Builder results available at: // // https://modern-c.appspot.com/-/builder/?importpath=modernc.org%2fsqlite // // # Changelog // // - 2025-10-10 v1.39.1: Upgrade to SQLite 3.50.4. // // - 2025-06-09 v1.38.0: Upgrade to SQLite 3.50.1. // // - 2025-02-26 v1.36.0: Upgrade to SQLite 3.49.0. // // - 2024-11-16 v1.34.0: Implement ResetSession and IsValid methods in connection // // - 2024-07-22 v1.31.0: Support windows/386. // // - 2024-06-04 v1.30.0: Upgrade to SQLite 3.46.0, release notes at // https://sqlite.org/releaselog/3_46_0.html. // // - 2024-02-13 v1.29.0: Upgrade to SQLite 3.45.1, release notes at // https://sqlite.org/releaselog/3_45_1.html. // // - 2023-12-14: v1.28.0: Add (*Driver).RegisterConnectionHook, // ConnectionHookFn, ExecQuerierContext, RegisterConnectionHook. // // - 2023-08-03 v1.25.0: enable SQLITE_ENABLE_DBSTAT_VTAB. // // - 2023-07-11 v1.24.0: Add // (*conn).{Serialize,Deserialize,NewBackup,NewRestore} methods, add Backup // type. // // - 2023-06-01 v1.23.0: Allow registering aggregate functions. // // - 2023-04-22 v1.22.0: Support linux/s390x. // // - 2023-02-23 v1.21.0: Upgrade to SQLite 3.41.0, release notes at // https://sqlite.org/releaselog/3_41_0.html. // // - 2022-11-28 v1.20.0: Support linux/ppc64le. // // - 2022-09-16 v1.19.0: Support frebsd/arm64. // // - 2022-07-26 v1.18.0: Add support for Go fs.FS based SQLite virtual // filesystems, see function New in modernc.org/sqlite/vfs and/or TestVFS in // all_test.go // // - 2022-04-24 v1.17.0: Support windows/arm64. // // - 2022-04-04 v1.16.0: Support scalar application defined functions written // in Go. See https://www.sqlite.org/appfunc.html // // - 2022-03-13 v1.15.0: Support linux/riscv64. // // - 2021-11-13 v1.14.0: Support windows/amd64. This target had previously // only experimental status because of a now resolved memory leak. // // - 2021-09-07 v1.13.0: Support freebsd/amd64. // // - 2021-06-23 v1.11.0: Upgrade to use sqlite 3.36.0, release notes at // https://www.sqlite.org/releaselog/3_36_0.html. // // - 2021-05-06 v1.10.6: Fixes a memory corruption issue // (https://gitlab.com/cznic/sqlite/-/issues/53). Versions since v1.8.6 were // affected and should be updated to v1.10.6. // // - 2021-03-14 v1.10.0: Update to use sqlite 3.35.0, release notes at // https://www.sqlite.org/releaselog/3_35_0.html. // // - 2021-03-11 v1.9.0: Support darwin/arm64. // // - 2021-01-08 v1.8.0: Support darwin/amd64. // // - 2020-09-13 v1.7.0: Support linux/arm and linux/arm64. // // - 2020-09-08 v1.6.0: Support linux/386. // // - 2020-09-03 v1.5.0: This project is now completely CGo-free, including // the Tcl tests. // // - 2020-08-26 v1.4.0: First stable release for linux/amd64. The // database/sql driver and its tests are CGo free. Tests of the translated // sqlite3.c library still require CGo. // // - 2020-07-26 v1.4.0-beta1: The project has reached beta status while // supporting linux/amd64 only at the moment. The 'extraquick' Tcl testsuite // reports // // - 2019-12-28 v1.2.0-alpha.3: Third alpha fixes issue #19. // // - 2019-12-26 v1.1.0-alpha.2: Second alpha release adds support for // accessing a database concurrently by multiple goroutines and/or processes. // v1.1.0 is now considered feature-complete. Next planed release should be a // beta with a proper test suite. // // - 2019-12-18 v1.1.0-alpha.1: First alpha release using the new cc/v3, // gocc, qbe toolchain. Some primitive tests pass on linux_{amd64,386}. Not // yet safe for concurrent access by multiple goroutines. Next alpha release // is planed to arrive before the end of this year. // // - 2017-06-10: Windows/Intel no more uses the VM (thanks Steffen Butzer). // // - 2017-06-05 Linux/Intel no more uses the VM (cznic/virtual). // // # Connecting to a database // // To access a Sqlite database do something like // // import ( // "database/sql" // // _ "modernc.org/sqlite" // ) // // ... // // // db, err := sql.Open("sqlite", dsnURI) // // ... // // # Debug and development versions // // A comma separated list of options can be passed to `go generate` via the // environment variable GO_GENERATE. Some useful options include for example: // // -DSQLITE_DEBUG // -DSQLITE_MEM_DEBUG // -ccgo-verify-structs // // To create a debug/development version, issue for example: // // $ GO_GENERATE=-DSQLITE_DEBUG,-DSQLITE_MEM_DEBUG go generate // // Note: To run `go generate` you need to have modernc.org/ccgo/v3 installed. // // # Hacking // // This is an example of how to use the debug logs in modernc.org/libc when hunting a bug. // // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ git status // On branch master // Your branch is up to date with 'origin/master'. // // nothing to commit, working tree clean // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ git log -1 // commit df33b8d15107f3cc777799c0fe105f74ef499e62 (HEAD -> master, tag: v1.21.1, origin/master, origin/HEAD, wips, ok) // Author: Jan Mercl <0xjnml@gmail.com> // Date: Mon Mar 27 16:18:28 2023 +0200 // // upgrade to SQLite 3.41.2 // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ rm -f /tmp/libc.log ; go test -v -tags=libc.dmesg -run TestScalar ; ls -l /tmp/libc.log // test binary compiled for linux/amd64 // === RUN TestScalar // --- PASS: TestScalar (0.09s) // PASS // ok modernc.org/sqlite 0.128s // -rw-r--r-- 1 jnml jnml 76 Apr 6 11:22 /tmp/libc.log // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ cat /tmp/libc.log // [10723 sqlite.test] 2023-04-06 11:22:48.288066057 +0200 CEST m=+0.000707150 // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ // // The /tmp/libc.log file is created as requested. No useful messages there because none are enabled in libc. Let's try to enable Xwrite as an example. // // 0:jnml@e5-1650:~/src/modernc.org/libc$ git status // On branch master // Your branch is up to date with 'origin/master'. // // Changes not staged for commit: // (use "git add <file>..." to update what will be committed) // (use "git restore <file>..." to discard changes in working directory) // modified: libc_linux.go // // no changes added to commit (use "git add" and/or "git commit -a") // 0:jnml@e5-1650:~/src/modernc.org/libc$ git log -1 // commit 1e22c18cf2de8aa86d5b19b165f354f99c70479c (HEAD -> master, tag: v1.22.3, origin/master, origin/HEAD) // Author: Jan Mercl <0xjnml@gmail.com> // Date: Wed Feb 22 20:27:45 2023 +0100 // // support sqlite 3.41 on linux targets // 0:jnml@e5-1650:~/src/modernc.org/libc$ git diff // diff --git a/libc_linux.go b/libc_linux.go // index 1c2f482..ac1f08d 100644 // --- a/libc_linux.go // +++ b/libc_linux.go // @@ -332,19 +332,19 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { // var n uintptr // switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err { // case 0: // - // if dmesgs { // - // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // - // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // - // } // + if dmesgs { // + // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // + dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // + } // return types.Ssize_t(n) // case errno.EAGAIN: // // nop // } // } // // - // if dmesgs { // - // dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) // - // } // + if dmesgs { // + dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) // + } // t.setErrno(err) // return -1 // } // 0:jnml@e5-1650:~/src/modernc.org/libc$ // // We need to tell the Go build system to use our local, patched/debug libc: // // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ go work use $(go env GOPATH)/src/modernc.org/libc // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ go work use . // // And run the test again: // // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ rm -f /tmp/libc.log ; go test -v -tags=libc.dmesg -run TestScalar ; ls -l /tmp/libc.log // test binary compiled for linux/amd64 // === RUN TestScalar // --- PASS: TestScalar (0.26s) // PASS // ok modernc.org/sqlite 0.285s // -rw-r--r-- 1 jnml jnml 918 Apr 6 11:29 /tmp/libc.log // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ cat /tmp/libc.log // [11910 sqlite.test] 2023-04-06 11:29:13.143589542 +0200 CEST m=+0.000689270 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x200: 0x200 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0xc: 0xc // [11910 sqlite.test] libc_linux.go:337:Xwrite: 7 0x1000: 0x1000 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 7 0x1000: 0x1000 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x200: 0x200 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x4: 0x4 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x1000: 0x1000 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x4: 0x4 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x4: 0x4 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x1000: 0x1000 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0x4: 0x4 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 8 0xc: 0xc // [11910 sqlite.test] libc_linux.go:337:Xwrite: 7 0x1000: 0x1000 // [11910 sqlite.test] libc_linux.go:337:Xwrite: 7 0x1000: 0x1000 // 0:jnml@e5-1650:~/src/modernc.org/sqlite$ // // # Sqlite documentation // // See https://sqlite.org/docs.html // // [The SQLite Drivers Benchmarks Game]: https://pkg.go.dev/modernc.org/sqlite-bench#readme-tl-dr-scorecard package sqlite // import "modernc.org/sqlite"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/rulimit.go
vendor/modernc.org/sqlite/rulimit.go
// Copyright 2021 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux || darwin || netbsd || openbsd // +build linux darwin netbsd openbsd package sqlite // import "modernc.org/sqlite" import ( "golang.org/x/sys/unix" ) func setMaxOpenFiles(n int64) error { var rLimit unix.Rlimit rLimit.Max = uint64(n) rLimit.Cur = uint64(n) return unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/nodmesg.go
vendor/modernc.org/sqlite/nodmesg.go
// Copyright 2023 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !sqlite.dmesg // +build !sqlite.dmesg package sqlite // import "modernc.org/sqlite" const dmesgs = false func dmesg(s string, args ...interface{}) {}
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go
vendor/modernc.org/sqlite/lib/sqlite_linux_ppc64le.go
// Code generated for linux/ppc64le by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/debian/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/ppc64le -I /home/debian/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/ppc64le -I /home/debian/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/ppc64le -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && ppc64le package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 58 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 536933637 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 536933634 const F2FS_IOC_GET_FEATURES = 1073804556 const F2FS_IOC_START_ATOMIC_WRITE = 536933633 const F2FS_IOC_START_VOLATILE_WRITE = 536933635 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 2147509885 const FIOCLEX = 536897025 const FIOGETOWN = 35075 const FIONBIO = 2147509886 const FIONCLEX = 536897026 const FIONREAD = 1073768063 const FIOQSIZE = 1073768064 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_FAST_FMA = 1 const FP_FAST_FMAF = 1 const FP_FAST_FMAL = 1 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 5 const F_GETLK64 = 5 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 6 const F_SETLK64 = 6 const F_SETLKW = 7 const F_SETLKW64 = 7 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 14002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_NONBLOCK = 65536 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 131072 const O_DIRECTORY = 16384 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 65536 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 32768 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4210688 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_SAO = 16 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go
vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go
// Code generated for freebsd/amd64 by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/freebsd/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/freebsd/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/freebsd/amd64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1 -ltcl8.6 -eval-all-macros', DO NOT EDIT. //go:build freebsd && amd64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ACCESSPERMS = 511 const ALLBITS = -1 const ALLPERMS = 4095 const AT_EACCESS = 256 const AT_EMPTY_PATH = 16384 const AT_FDCWD = -100 const AT_REMOVEDIR = 2048 const AT_RESOLVE_BENEATH = 8192 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 512 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLK_TCK = 128 const CLOCKS_PER_SEC = 128 const CLOCK_BOOTTIME = 5 const CLOCK_MONOTONIC = 4 const CLOCK_MONOTONIC_COARSE = 12 const CLOCK_MONOTONIC_FAST = 12 const CLOCK_MONOTONIC_PRECISE = 11 const CLOCK_PROCESS_CPUTIME_ID = 15 const CLOCK_PROF = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_COARSE = 10 const CLOCK_REALTIME_FAST = 10 const CLOCK_REALTIME_PRECISE = 9 const CLOCK_SECOND = 13 const CLOCK_THREAD_CPUTIME_ID = 14 const CLOCK_UPTIME = 5 const CLOCK_UPTIME_FAST = 8 const CLOCK_UPTIME_PRECISE = 7 const CLOCK_VIRTUAL = 1 const CLOSE_RANGE_CLOEXEC = 4 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPUCLOCK_WHICH_PID = 0 const CPUCLOCK_WHICH_TID = 1 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DEFFILEMODE = 438 const DIRECT_MODE = 0 const DOTLOCK_SUFFIX = ".lock" const DST_AUST = 2 const DST_CAN = 6 const DST_EET = 5 const DST_MET = 4 const DST_NONE = 0 const DST_USA = 1 const DST_WET = 3 const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 48 const EADDRNOTAVAIL = 49 const EAFNOSUPPORT = 47 const EAGAIN = 35 const EALREADY = 37 const EAUTH = 80 const EBADF = 9 const EBADMSG = 89 const EBADRPC = 72 const EBUSY = 16 const ECANCELED = 85 const ECAPMODE = 94 const ECHILD = 10 const ECONNABORTED = 53 const ECONNREFUSED = 61 const ECONNRESET = 54 const EDEADLK = 11 const EDESTADDRREQ = 39 const EDOM = 33 const EDOOFUS = 88 const EDQUOT = 69 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EFTYPE = 79 const EHOSTDOWN = 64 const EHOSTUNREACH = 65 const EIDRM = 82 const EILSEQ = 86 const EINPROGRESS = 36 const EINTEGRITY = 97 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 56 const EISDIR = 21 const ELAST = 97 const ELOOP = 62 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 40 const EMULTIHOP = 90 const ENAMETOOLONG = 63 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENEEDAUTH = 81 const ENETDOWN = 50 const ENETRESET = 52 const ENETUNREACH = 51 const ENFILE = 23 const ENOATTR = 87 const ENOBUFS = 55 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOLCK = 77 const ENOLINK = 91 const ENOMEM = 12 const ENOMSG = 83 const ENOPROTOOPT = 42 const ENOSPC = 28 const ENOSYS = 78 const ENOTBLK = 15 const ENOTCAPABLE = 93 const ENOTCONN = 57 const ENOTDIR = 20 const ENOTEMPTY = 66 const ENOTRECOVERABLE = 95 const ENOTSOCK = 38 const ENOTSUP = 45 const ENOTTY = 25 const ENXIO = 6 const EOF = -1 const EOPNOTSUPP = 45 const EOVERFLOW = 84 const EOWNERDEAD = 96 const EPERM = 1 const EPFNOSUPPORT = 46 const EPIPE = 32 const EPROCLIM = 67 const EPROCUNAVAIL = 76 const EPROGMISMATCH = 75 const EPROGUNAVAIL = 74 const EPROTO = 92 const EPROTONOSUPPORT = 43 const EPROTOTYPE = 41 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMOTE = 71 const EROFS = 30 const ERPCMISMATCH = 73 const ESHUTDOWN = 58 const ESOCKTNOSUPPORT = 44 const ESPIPE = 29 const ESRCH = 3 const ESTALE = 70 const ETIMEDOUT = 60 const ETOOMANYREFS = 59 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUSERS = 68 const EWOULDBLOCK = 35 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const FAPPEND = 8 const FASYNC = 64 const FDSYNC = 16777216 const FD_CLOEXEC = 1 const FD_NONE = -200 const FD_SETSIZE = 1024 const FFSYNC = 128 const FILENAME_MAX = 1024 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 4 const FNONBLOCK = 4 const FOPEN_MAX = 20 const FP_FAST_FMAF = 1 const FP_ILOGB0 = -2147483647 const FP_ILOGBNAN = 2147483647 const FP_INFINITE = 1 const FP_NAN = 2 const FP_NORMAL = 4 const FP_SUBNORMAL = 8 const FP_ZERO = 16 const FRDAHEAD = 512 const FREAD = 1 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const FWRITE = 2 const F_ADD_SEALS = 19 const F_CANCEL = 5 const F_DUP2FD = 10 const F_DUP2FD_CLOEXEC = 18 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 17 const F_GETFD = 1 const F_GETFL = 3 const F_GETLK = 11 const F_GETOWN = 5 const F_GET_SEALS = 20 const F_ISUNIONSTACK = 21 const F_KINFO = 22 const F_LOCK = 1 const F_OGETLK = 7 const F_OK = 0 const F_OSETLK = 8 const F_OSETLKW = 9 const F_RDAHEAD = 16 const F_RDLCK = 1 const F_READAHEAD = 15 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLK = 12 const F_SETLKW = 13 const F_SETLK_REMOTE = 14 const F_SETOWN = 6 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_UNLCKSYS = 4 const F_WRLCK = 3 const GCC_VERSION = 4002001 const GEOPOLY_PI = 3.141592653589793 const H4DISC = 7 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 0 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = "MAXFLOAT" const HUGE_VAL = 0 const HUGE_VALF = 0 const HUGE_VALL = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INHERIT_COPY = 1 const INHERIT_NONE = 2 const INHERIT_SHARE = 0 const INHERIT_ZERO = 3 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const IOCPARM_MASK = 8191 const IOCPARM_MAX = 8192 const IOCPARM_SHIFT = 13 const IOC_DIRMASK = 3758096384 const IOC_IN = 2147483648 const IOC_INOUT = 3221225472 const IOC_OUT = 1073741824 const IOC_VOID = 536870912 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KCMP_FILE = 100 const KCMP_FILEOBJ = 101 const KCMP_FILES = 102 const KCMP_SIGHAND = 103 const KCMP_VM = 104 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOCK_EX = 2 const LOCK_NB = 4 const LOCK_SH = 1 const LOCK_UN = 8 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 1024 const L_cuserid = 17 const L_tmpnam = 1024 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_AUTOSYNC = 7 const MADV_CORE = 9 const MADV_DONTNEED = 4 const MADV_FREE = 5 const MADV_NOCORE = 8 const MADV_NORMAL = 0 const MADV_NOSYNC = 6 const MADV_PROTECT = 10 const MADV_RANDOM = 1 const MADV_SEQUENTIAL = 2 const MADV_WILLNEED = 3 const MAP_32BIT = 524288 const MAP_ALIGNED_SUPER = 16777216 const MAP_ALIGNMENT_MASK = 4278190080 const MAP_ALIGNMENT_SHIFT = 24 const MAP_ANON = 4096 const MAP_ANONYMOUS = 4096 const MAP_COPY = 2 const MAP_EXCL = 16384 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_GUARD = 8192 const MAP_HASSEMAPHORE = 512 const MAP_NOCORE = 131072 const MAP_NOSYNC = 2048 const MAP_PREFAULT_READ = 262144 const MAP_PRIVATE = 2 const MAP_RESERVED0020 = 32 const MAP_RESERVED0040 = 64 const MAP_RESERVED0080 = 128 const MAP_RESERVED0100 = 256 const MAP_SHARED = 1 const MAP_STACK = 1024 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MFD_HUGE_16GB = 2281701376 const MFD_HUGE_16MB = 1610612736 const MFD_HUGE_1GB = 2013265920 const MFD_HUGE_1MB = 1342177280 const MFD_HUGE_256MB = 1879048192 const MFD_HUGE_2GB = 2080374784 const MFD_HUGE_2MB = 1409286144 const MFD_HUGE_32MB = 1677721600 const MFD_HUGE_512KB = 1275068416 const MFD_HUGE_512MB = 1946157056 const MFD_HUGE_64KB = 1073741824 const MFD_HUGE_8MB = 1543503872 const MFD_HUGE_MASK = 4227858432 const MFD_HUGE_SHIFT = 26 const MINCORE_INCORE = 1 const MINCORE_MODIFIED = 4 const MINCORE_MODIFIED_OTHER = 16 const MINCORE_REFERENCED = 2 const MINCORE_REFERENCED_OTHER = 8 const MINCORE_SUPER = 96 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 0 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NETGRAPHDISC = 6 const NFDBITS = 0 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_OR_COST = 3 const N_SORT_BUCKET = 32 const N_STATEMENT = 8 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 3 const O_APPEND = 8 const O_ASYNC = 64 const O_BINARY = 0 const O_CLOEXEC = 1048576 const O_CREAT = 512 const O_DIRECT = 65536 const O_DIRECTORY = 131072 const O_DSYNC = 16777216 const O_EMPTY_PATH = 33554432 const O_EXCL = 2048 const O_EXEC = 262144 const O_EXLOCK = 32 const O_FSYNC = 128 const O_LARGEFILE = 0 const O_NDELAY = 4 const O_NOCTTY = 32768 const O_NOFOLLOW = 256 const O_NONBLOCK = 4 const O_PATH = 4194304 const O_RDONLY = 0 const O_RDWR = 2 const O_RESOLVE_BENEATH = 8388608 const O_SEARCH = 262144 const O_SHLOCK = 16 const O_SYNC = 128 const O_TRUNC = 1024 const O_TTY_INIT = 524288 const O_VERIFY = 2097152 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PPPDISC = 5 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTRMAP_BTREE = 5 const PTRMAP_FREEPAGE = 2 const PTRMAP_OVERFLOW1 = 3 const PTRMAP_OVERFLOW2 = 4 const PTRMAP_ROOTPAGE = 1 const P_tmpdir = "/tmp/" const PragFlg_NeedSchema = 1 const PragFlg_NoColumns = 2 const PragFlg_NoColumns1 = 4 const PragFlg_ReadOnly = 8 const PragFlg_Result0 = 16 const PragFlg_Result1 = 32 const PragFlg_SchemaOpt = 64 const PragFlg_SchemaReq = 128 const PragTyp_ACTIVATE_EXTENSIONS = 0 const PragTyp_ANALYSIS_LIMIT = 1 const PragTyp_AUTO_VACUUM = 3 const PragTyp_BUSY_TIMEOUT = 5 const PragTyp_CACHE_SIZE = 6 const PragTyp_CACHE_SPILL = 7 const PragTyp_CASE_SENSITIVE_LIKE = 8 const PragTyp_COLLATION_LIST = 9 const PragTyp_COMPILE_OPTIONS = 10 const PragTyp_DATABASE_LIST = 12 const PragTyp_DATA_STORE_DIRECTORY = 11 const PragTyp_DEFAULT_CACHE_SIZE = 13 const PragTyp_ENCODING = 14 const PragTyp_FLAG = 4 const PragTyp_FOREIGN_KEY_CHECK = 15 const PragTyp_FOREIGN_KEY_LIST = 16 const PragTyp_FUNCTION_LIST = 17 const PragTyp_HARD_HEAP_LIMIT = 18 const PragTyp_HEADER_VALUE = 2 const PragTyp_INCREMENTAL_VACUUM = 19 const PragTyp_INDEX_INFO = 20 const PragTyp_INDEX_LIST = 21 const PragTyp_INTEGRITY_CHECK = 22 const PragTyp_JOURNAL_MODE = 23 const PragTyp_JOURNAL_SIZE_LIMIT = 24 const PragTyp_LOCKING_MODE = 26 const PragTyp_LOCK_PROXY_FILE = 25 const PragTyp_LOCK_STATUS = 44 const PragTyp_MMAP_SIZE = 28 const PragTyp_MODULE_LIST = 29 const PragTyp_OPTIMIZE = 30 const PragTyp_PAGE_COUNT = 27 const PragTyp_PAGE_SIZE = 31 const PragTyp_PRAGMA_LIST = 32 const PragTyp_SECURE_DELETE = 33 const PragTyp_SHRINK_MEMORY = 34 const PragTyp_SOFT_HEAP_LIMIT = 35 const PragTyp_STATS = 45 const PragTyp_SYNCHRONOUS = 36 const PragTyp_TABLE_INFO = 37 const PragTyp_TABLE_LIST = 38 const PragTyp_TEMP_STORE = 39 const PragTyp_TEMP_STORE_DIRECTORY = 40 const PragTyp_THREADS = 41 const PragTyp_WAL_AUTOCHECKPOINT = 42 const PragTyp_WAL_CHECKPOINT = 43 const RAND_MAX = 2147483647 const RBU_CREATE_STATE = "CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)" const RBU_DELETE = 2 const RBU_ENABLE_DELTA_CKSUM = 0 const RBU_EXCLUSIVE_CHECKPOINT = "rbu_exclusive_checkpoint" const RBU_IDX_DELETE = 4 const RBU_IDX_INSERT = 5 const RBU_INSERT = 1 const RBU_PK_EXTERNAL = 3 const RBU_PK_IPK = 2 const RBU_PK_NONE = 1 const RBU_PK_NOTABLE = 0 const RBU_PK_VTAB = 5 const RBU_PK_WITHOUT_ROWID = 4 const RBU_REPLACE = 3 const RBU_STAGE_CAPTURE = 3 const RBU_STAGE_CKPT = 4 const RBU_STAGE_DONE = 5 const RBU_STAGE_MOVE = 2 const RBU_STAGE_OAL = 1 const RBU_STATE_CKPT = 6 const RBU_STATE_COOKIE = 7 const RBU_STATE_DATATBL = 10 const RBU_STATE_IDX = 3 const RBU_STATE_OALSZ = 8 const RBU_STATE_PHASEONESTEP = 9 const RBU_STATE_PROGRESS = 5 const RBU_STATE_ROW = 4 const RBU_STATE_STAGE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_windows.go
vendor/modernc.org/sqlite/lib/sqlite_windows.go
// Code generated for windows/amd64 by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/windows/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/windows/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/windows/amd64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_MUTEX_NOOP --cpp /usr/bin/x86_64-w64-mingw32-gcc --goarch amd64 --goos windows -DSQLITE_HAVE_C99_MATH_FUNCS=(1) -DSQLITE_OS_WIN=1 -DSQLITE_OMIT_SEH -build-lines \/\/go:build windows && (amd64 || arm64)\n -map gcc=x86_64-w64-mingw32-gcc -eval-all-macros', DO NOT EDIT. //go:build windows && (amd64 || arm64) package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ABE_BOTTOM = 3 const ABE_LEFT = 0 const ABE_RIGHT = 2 const ABE_TOP = 1 const ABM_ACTIVATE = 6 const ABM_GETAUTOHIDEBAR = 7 const ABM_GETAUTOHIDEBAREX = 11 const ABM_GETSTATE = 4 const ABM_GETTASKBARPOS = 5 const ABM_NEW = 0 const ABM_QUERYPOS = 2 const ABM_REMOVE = 1 const ABM_SETAUTOHIDEBAR = 8 const ABM_SETAUTOHIDEBAREX = 12 const ABM_SETPOS = 3 const ABM_SETSTATE = 10 const ABM_WINDOWPOSCHANGED = 9 const ABN_FULLSCREENAPP = 2 const ABN_POSCHANGED = 1 const ABN_STATECHANGE = 0 const ABN_WINDOWARRANGE = 3 const ABORTDOC = 2 const ABOVE_NORMAL_PRIORITY_CLASS = 32768 const ABSOLUTE = 1 const ABS_ALWAYSONTOP = 2 const ABS_AUTOHIDE = 1 const ACCESS_ALLOWED_ACE_TYPE = 0 const ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 9 const ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 11 const ACCESS_ALLOWED_COMPOUND_ACE_TYPE = 4 const ACCESS_ALLOWED_OBJECT_ACE_TYPE = 5 const ACCESS_DENIED_ACE_TYPE = 1 const ACCESS_DENIED_CALLBACK_ACE_TYPE = 10 const ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 12 const ACCESS_DENIED_OBJECT_ACE_TYPE = 6 const ACCESS_DS_OBJECT_TYPE_NAME_A = "Directory Service Object" const ACCESS_DS_OBJECT_TYPE_NAME_W = "Directory Service Object" const ACCESS_DS_SOURCE_A = "DS" const ACCESS_DS_SOURCE_W = "DS" const ACCESS_FILTERKEYS = 2 const ACCESS_MAX_LEVEL = 4 const ACCESS_MAX_MS_ACE_TYPE = 8 const ACCESS_MAX_MS_OBJECT_ACE_TYPE = 8 const ACCESS_MAX_MS_V2_ACE_TYPE = 3 const ACCESS_MAX_MS_V3_ACE_TYPE = 4 const ACCESS_MAX_MS_V4_ACE_TYPE = 8 const ACCESS_MAX_MS_V5_ACE_TYPE = 19 const ACCESS_MIN_MS_ACE_TYPE = 0 const ACCESS_MIN_MS_OBJECT_ACE_TYPE = 5 const ACCESS_MOUSEKEYS = 3 const ACCESS_OBJECT_GUID = 0 const ACCESS_PROPERTY_GUID = 2 const ACCESS_PROPERTY_SET_GUID = 1 const ACCESS_REASON_DATA_MASK = 65535 const ACCESS_REASON_EXDATA_MASK = 2130706432 const ACCESS_REASON_STAGING_MASK = 2147483648 const ACCESS_REASON_TYPE_MASK = 16711680 const ACCESS_STICKYKEYS = 1 const ACCESS_SYSTEM_SECURITY = 16777216 const ACE_INHERITED_OBJECT_TYPE_PRESENT = 2 const ACE_OBJECT_TYPE_PRESENT = 1 const ACL_REVISION = 2 const ACL_REVISION1 = 1 const ACL_REVISION2 = 2 const ACL_REVISION3 = 3 const ACL_REVISION4 = 4 const ACL_REVISION_DS = 4 const ACPI_PPM_HARDWARE_ALL = 254 const ACPI_PPM_SOFTWARE_ALL = 252 const ACPI_PPM_SOFTWARE_ANY = 253 const ACTCTX_FLAG_APPLICATION_NAME_VALID = 32 const ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = 4 const ACTCTX_FLAG_HMODULE_VALID = 128 const ACTCTX_FLAG_LANGID_VALID = 2 const ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 1 const ACTCTX_FLAG_RESOURCE_NAME_VALID = 8 const ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 const ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF = 64 const ACTIVATIONCONTEXTINFOCLASS = 0 const ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1 const ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = 4 const ACTIVATION_CONTEXT_PATH_TYPE_NONE = 1 const ACTIVATION_CONTEXT_PATH_TYPE_URL = 3 const ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = 2 const ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS = 10 const ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = 1 const ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = 9 const ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO = 11 const ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = 5 const ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = 7 const ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = 4 const ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = 6 const ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = 2 const ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = 8 const ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = 3 const ACTIVEOBJECT_STRONG = 0 const ACTIVEOBJECT_WEAK = 1 const AC_LINE_BACKUP_POWER = 2 const AC_LINE_OFFLINE = 0 const AC_LINE_ONLINE = 1 const AC_LINE_UNKNOWN = 255 const AC_SRC_ALPHA = 1 const AC_SRC_OVER = 0 const ADDRESS_TAG_BIT = 4398046511104 const AD_CLOCKWISE = 2 const AD_COUNTERCLOCKWISE = 1 const AF_APPLETALK = 16 const AF_BAN = 21 const AF_CCITT = 10 const AF_CHAOS = 5 const AF_DATAKIT = 9 const AF_DECnet = 12 const AF_DLI = 13 const AF_ECMA = 8 const AF_FIREFOX = 19 const AF_HYLINK = 15 const AF_IMPLINK = 3 const AF_INET = 2 const AF_IPX = 6 const AF_ISO = 7 const AF_LAT = 14 const AF_MAX = 22 const AF_NETBIOS = 17 const AF_NS = 6 const AF_OSI = 7 const AF_PUP = 4 const AF_SNA = 11 const AF_UNIX = 1 const AF_UNKNOWN1 = 20 const AF_UNSPEC = 0 const AF_VOICEVIEW = 18 const ALERT_SYSTEM_CRITICAL = 5 const ALERT_SYSTEM_ERROR = 3 const ALERT_SYSTEM_INFORMATIONAL = 1 const ALERT_SYSTEM_QUERY = 4 const ALERT_SYSTEM_WARNING = 2 const ALG_CLASS_ALL = 57344 const ALG_CLASS_ANY = 0 const ALG_CLASS_DATA_ENCRYPT = 24576 const ALG_CLASS_HASH = 32768 const ALG_CLASS_KEY_EXCHANGE = 40960 const ALG_CLASS_MSG_ENCRYPT = 16384 const ALG_CLASS_SIGNATURE = 8192 const ALG_SID_3DES = 3 const ALG_SID_3DES_112 = 9 const ALG_SID_AES = 17 const ALG_SID_AES_128 = 14 const ALG_SID_AES_192 = 15 const ALG_SID_AES_256 = 16 const ALG_SID_AGREED_KEY_ANY = 3 const ALG_SID_ANY = 0 const ALG_SID_CAST = 6 const ALG_SID_CYLINK_MEK = 12 const ALG_SID_DES = 1 const ALG_SID_DESX = 4 const ALG_SID_DH_EPHEM = 2 const ALG_SID_DH_SANDF = 1 const ALG_SID_DSS_ANY = 0 const ALG_SID_DSS_DMS = 2 const ALG_SID_DSS_PKCS = 1 const ALG_SID_ECDH = 5 const ALG_SID_ECDH_EPHEM = 6 const ALG_SID_ECDSA = 3 const ALG_SID_ECMQV = 1 const ALG_SID_EXAMPLE = 80 const ALG_SID_HASH_REPLACE_OWF = 11 const ALG_SID_HMAC = 9 const ALG_SID_IDEA = 5 const ALG_SID_KEA = 4 const ALG_SID_MAC = 5 const ALG_SID_MD2 = 1 const ALG_SID_MD4 = 2 const ALG_SID_MD5 = 3 const ALG_SID_PCT1_MASTER = 4 const ALG_SID_RC2 = 2 const ALG_SID_RC4 = 1 const ALG_SID_RC5 = 13 const ALG_SID_RIPEMD = 6 const ALG_SID_RIPEMD160 = 7 const ALG_SID_RSA_ANY = 0 const ALG_SID_RSA_ENTRUST = 3 const ALG_SID_RSA_MSATWORK = 2 const ALG_SID_RSA_PGP = 4 const ALG_SID_RSA_PKCS = 1 const ALG_SID_SAFERSK128 = 8 const ALG_SID_SAFERSK64 = 7 const ALG_SID_SCHANNEL_ENC_KEY = 7 const ALG_SID_SCHANNEL_MAC_KEY = 3 const ALG_SID_SCHANNEL_MASTER_HASH = 2 const ALG_SID_SEAL = 2 const ALG_SID_SHA = 4 const ALG_SID_SHA1 = 4 const ALG_SID_SHA_256 = 12 const ALG_SID_SHA_384 = 13 const ALG_SID_SHA_512 = 14 const ALG_SID_SKIPJACK = 10 const ALG_SID_SSL2_MASTER = 5 const ALG_SID_SSL3SHAMD5 = 8 const ALG_SID_SSL3_MASTER = 1 const ALG_SID_TEK = 11 const ALG_SID_TLS1PRF = 10 const ALG_SID_TLS1_MASTER = 6 const ALG_TYPE_ANY = 0 const ALG_TYPE_BLOCK = 1536 const ALG_TYPE_DH = 2560 const ALG_TYPE_DSS = 512 const ALG_TYPE_ECDH = 3584 const ALG_TYPE_RSA = 1024 const ALG_TYPE_SECURECHANNEL = 3072 const ALG_TYPE_STREAM = 2048 const ALLBITS = -1 const ALL_PROCESSOR_GROUPS = 65535 const ALL_TRANSPORTS = "M\\0\\0\\0" const ALTERNATE = 1 const ALTNUMPAD_BIT = 67108864 const ANSI_CHARSET = 0 const ANSI_FIXED_FONT = 11 const ANSI_VAR_FONT = 12 const ANTIALIASED_QUALITY = 4 const ANYSIZE_ARRAY = 1 const APD_COPY_ALL_FILES = 4 const APD_COPY_FROM_DIRECTORY = 16 const APD_COPY_NEW_FILES = 8 const APD_STRICT_DOWNGRADE = 2 const APD_STRICT_UPGRADE = 1 const APIENTRY = 0 const APIPRIVATE = 0 const API_SET_EXTENSION_NAME_A = "EXT-" const API_SET_EXTENSION_NAME_U = "EXT-" const API_SET_HELPER_NAME = 0 const API_SET_LOAD_SCHEMA_ORDINAL = 1 const API_SET_LOOKUP_ORDINAL = 2 const API_SET_PREFIX_NAME_A = "API-" const API_SET_PREFIX_NAME_U = "API-" const API_SET_RELEASE_SCHEMA_ORDINAL = 3 const API_SET_SCHEMA_NAME = 0 const API_SET_SCHEMA_SUFFIX = ".sys" const API_SET_SCHEMA_VERSION = 2 const API_SET_SECTION_NAME = ".apiset" const APPCLASS_MASK = 15 const APPCLASS_MONITOR = 1 const APPCLASS_STANDARD = 0 const APPCMD_CLIENTONLY = 16 const APPCMD_FILTERINITS = 32 const APPCMD_MASK = 4080 const APPCOMMAND_BASS_BOOST = 20 const APPCOMMAND_BASS_DOWN = 19 const APPCOMMAND_BASS_UP = 21 const APPCOMMAND_BROWSER_BACKWARD = 1 const APPCOMMAND_BROWSER_FAVORITES = 6 const APPCOMMAND_BROWSER_FORWARD = 2 const APPCOMMAND_BROWSER_HOME = 7 const APPCOMMAND_BROWSER_REFRESH = 3 const APPCOMMAND_BROWSER_SEARCH = 5 const APPCOMMAND_BROWSER_STOP = 4 const APPCOMMAND_CLOSE = 31 const APPCOMMAND_COPY = 36 const APPCOMMAND_CORRECTION_LIST = 45 const APPCOMMAND_CUT = 37 const APPCOMMAND_DELETE = 53 const APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43 const APPCOMMAND_DWM_FLIP3D = 54 const APPCOMMAND_FIND = 28 const APPCOMMAND_FORWARD_MAIL = 40 const APPCOMMAND_HELP = 27 const APPCOMMAND_LAUNCH_APP1 = 17 const APPCOMMAND_LAUNCH_APP2 = 18 const APPCOMMAND_LAUNCH_MAIL = 15 const APPCOMMAND_LAUNCH_MEDIA_SELECT = 16 const APPCOMMAND_MEDIA_CHANNEL_DOWN = 52 const APPCOMMAND_MEDIA_CHANNEL_UP = 51 const APPCOMMAND_MEDIA_FAST_FORWARD = 49 const APPCOMMAND_MEDIA_NEXTTRACK = 11 const APPCOMMAND_MEDIA_PAUSE = 47 const APPCOMMAND_MEDIA_PLAY = 46 const APPCOMMAND_MEDIA_PLAY_PAUSE = 14 const APPCOMMAND_MEDIA_PREVIOUSTRACK = 12 const APPCOMMAND_MEDIA_RECORD = 48 const APPCOMMAND_MEDIA_REWIND = 50 const APPCOMMAND_MEDIA_STOP = 13 const APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25 const APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24 const APPCOMMAND_MICROPHONE_VOLUME_UP = 26 const APPCOMMAND_MIC_ON_OFF_TOGGLE = 44 const APPCOMMAND_NEW = 29 const APPCOMMAND_OPEN = 30 const APPCOMMAND_PASTE = 38 const APPCOMMAND_PRINT = 33 const APPCOMMAND_REDO = 35 const APPCOMMAND_REPLY_TO_MAIL = 39 const APPCOMMAND_SAVE = 32 const APPCOMMAND_SEND_MAIL = 41 const APPCOMMAND_SPELL_CHECK = 42 const APPCOMMAND_TREBLE_DOWN = 22 const APPCOMMAND_TREBLE_UP = 23 const APPCOMMAND_UNDO = 34 const APPCOMMAND_VOLUME_DOWN = 9 const APPCOMMAND_VOLUME_MUTE = 8 const APPCOMMAND_VOLUME_UP = 10 const APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP = 1 const APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY = 4 const APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY = 32 const APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION = 16 const APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN = 8 const APPIDREGFLAGS_RESERVED1 = 64 const APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND = 2 const APPLICATION_ERROR_MASK = 536870912 const APPLICATION_VERIFIER_ACCESS_VIOLATION = 2 const APPLICATION_VERIFIER_BAD_HEAP_HANDLE = 5 const APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = 1025 const APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = 1034 const APPLICATION_VERIFIER_COM_ERROR = 1024 const APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = 1035 const APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = 1040 const APPLICATION_VERIFIER_COM_NULL_DACL = 1030 const APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = 1036 const APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = 1037 const APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = 1033 const APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = 1032 const APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = 1027 const APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = 1028 const APPLICATION_VERIFIER_COM_UNBALANCED_SWC = 1029 const APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = 1026 const APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = 1031 const APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = 1038 const APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = 1039 const APPLICATION_VERIFIER_CONTINUABLE_BREAK = 268435456 const APPLICATION_VERIFIER_CORRUPTED_FREED_HEAP_BLOCK = 14 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = 8 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_END_STAMP = 17 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_HEADER = 11 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_PROBING = 12 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_HEADER = 13 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_PREFIX = 18 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_START_STAMP = 16 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_SUFFIX = 15 const APPLICATION_VERIFIER_CORRUPTED_HEAP_LIST = 20 const APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = 9 const APPLICATION_VERIFIER_DOUBLE_FREE = 7 const APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = 512 const APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = 4 const APPLICATION_VERIFIER_FIRST_CHANCE_ACCESS_VIOLATION = 19 const APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = 770 const APPLICATION_VERIFIER_INTERNAL_ERROR = 2147483648 const APPLICATION_VERIFIER_INTERNAL_WARNING = 1073741824 const APPLICATION_VERIFIER_INVALID_ALLOCMEM = 1537 const APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = 258 const APPLICATION_VERIFIER_INVALID_FREEMEM = 1536 const APPLICATION_VERIFIER_INVALID_HANDLE = 768 const APPLICATION_VERIFIER_INVALID_MAPVIEW = 1538 const APPLICATION_VERIFIER_INVALID_TLS_VALUE = 769 const APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = 529 const APPLICATION_VERIFIER_LOCK_CORRUPTED = 517 const APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = 515 const APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = 520 const APPLICATION_VERIFIER_LOCK_INVALID_OWNER = 518 const APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = 519 const APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = 514 const APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = 516 const APPLICATION_VERIFIER_LOCK_IN_FREED_VMEM = 530 const APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = 513 const APPLICATION_VERIFIER_LOCK_IN_UNMAPPED_MEM = 531 const APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = 528 const APPLICATION_VERIFIER_LOCK_OVER_RELEASED = 521 const APPLICATION_VERIFIER_NO_BREAK = 536870912 const APPLICATION_VERIFIER_NULL_HANDLE = 771 const APPLICATION_VERIFIER_PROBE_FREE_MEM = 1540 const APPLICATION_VERIFIER_PROBE_GUARD_PAGE = 1541 const APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = 1539 const APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = 1543 const APPLICATION_VERIFIER_PROBE_NULL = 1542 const APPLICATION_VERIFIER_RPC_ERROR = 1280 const APPLICATION_VERIFIER_SIZE_HEAP_UNEXPECTED_EXCEPTION = 1560 const APPLICATION_VERIFIER_STACK_OVERFLOW = 257 const APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = 6 const APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = 256 const APPLICATION_VERIFIER_THREAD_NOT_LOCK_OWNER = 532 const APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = 10 const APPLICATION_VERIFIER_UNKNOWN_ERROR = 1 const APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = 3 const APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = 772 const APPMODEL_ERROR_NO_APPLICATION = 15703 const APPMODEL_ERROR_NO_PACKAGE = 15700 const APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT = 15702 const APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT = 15701 const APP_LOCAL_DEVICE_ID_SIZE = 32 const ARABIC_CHARSET = 178 const ARW_BOTTOMLEFT = 0 const ARW_BOTTOMRIGHT = 1 const ARW_DOWN = 4 const ARW_HIDE = 8 const ARW_LEFT = 0 const ARW_RIGHT = 0 const ARW_STARTMASK = 3 const ARW_STARTRIGHT = 1 const ARW_STARTTOP = 2 const ARW_TOPLEFT = 2 const ARW_TOPRIGHT = 3 const ARW_UP = 4 const ASFW_ANY = -1 const ASPECTX = 40 const ASPECTXY = 44 const ASPECTY = 42 const ASPECT_FILTERING = 1 const ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = 0 const ASSERT_ALTERNATE = 9 const ASSERT_PRIMARY = 8 const ASYNCH = 128 const ASYNC_MODE_COMPATIBILITY = 1 const ASYNC_MODE_DEFAULT = 0 const ATAPI_ID_CMD = 161 const ATF_ONOFFFEEDBACK = 2 const ATF_TIMEOUTON = 1 const ATOM_FLAG_GLOBAL = 2 const ATTACH_PARENT_PROCESS = -1 const ATTRIBUTE_SECURITY_INFORMATION = 32 const ATTR_CONVERTED = 2 const ATTR_FIXEDCONVERTED = 5 const ATTR_INPUT = 0 const ATTR_INPUT_ERROR = 4 const ATTR_TARGET_CONVERTED = 1 const ATTR_TARGET_NOTCONVERTED = 3 const AT_KEYEXCHANGE = 1 const AT_SIGNATURE = 2 const AUDIT_ALLOW_NO_PRIVILEGE = 1 const AUTHTYPE_CLIENT = 1 const AUTHTYPE_SERVER = 2 const AUXCAPS_AUXIN = 2 const AUXCAPS_CDAUDIO = 1 const AUXCAPS_LRVOLUME = 2 const AUXCAPS_VOLUME = 1 const AUX_MAPPER = -1 const AW_ACTIVATE = 131072 const AW_BLEND = 524288 const AW_CENTER = 16 const AW_HIDE = 65536 const AW_HOR_NEGATIVE = 2 const AW_HOR_POSITIVE = 1 const AW_SLIDE = 262144 const AW_VER_NEGATIVE = 8 const AW_VER_POSITIVE = 4 const AbnormalTermination = 0 const AbortSystemShutdown = 0 const AccessCheckAndAuditAlarm = 0 const AccessCheckByTypeAndAuditAlarm = 0 const AccessCheckByTypeResultListAndAuditAlarm = 0 const AccessCheckByTypeResultListAndAuditAlarmByHandle = 0 const AddAtom = 0 const AddConsoleAlias = 0 const AddFontResource = 0 const AddFontResourceEx = 0 const AddForm = 0 const AddJob = 0 const AddMonitor = 0 const AddPort = 0 const AddPrintProcessor = 0 const AddPrintProvidor = 0 const AddPrinter = 0 const AddPrinterConnection = 0 const AddPrinterConnection2 = 0 const AddPrinterDriver = 0 const AddPrinterDriverEx = 0 const AdvancedDocumentProperties = 0 const AnsiLower = 0 const AnsiLowerBuff = 0 const AnsiNext = 0 const AnsiPrev = 0 const AnsiToOem = 0 const AnsiToOemBuff = 0 const AnsiUpper = 0 const AnsiUpperBuff = 0 const AppendMenu = 0 const BACKGROUND_BLUE = 16 const BACKGROUND_GREEN = 32 const BACKGROUND_INTENSITY = 128 const BACKGROUND_RED = 64 const BACKUP_ALTERNATE_DATA = 4 const BACKUP_DATA = 1 const BACKUP_EA_DATA = 2 const BACKUP_GHOSTED_FILE_EXTENTS = 11 const BACKUP_INVALID = 0 const BACKUP_LINK = 5 const BACKUP_OBJECT_ID = 7 const BACKUP_PROPERTY_DATA = 6 const BACKUP_REPARSE_DATA = 8 const BACKUP_SECURITY_DATA = 3 const BACKUP_SECURITY_INFORMATION = 65536 const BACKUP_SPARSE_BLOCK = 9 const BACKUP_TXFS_DATA = 10 const BALTIC_CHARSET = 186 const BANDINFO = 24 const BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE = 65536 const BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE = 1 const BASE_SEARCH_PATH_INVALID_FLAGS = -98306 const BASE_SEARCH_PATH_PERMANENT = 32768 const BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG = 2147483648 const BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG = 1073741824 const BATTERY_DISCHARGE_FLAGS_ENABLE = 2147483648 const BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK = 7 const BATTERY_FLAG_CHARGING = 8 const BATTERY_FLAG_CRITICAL = 4 const BATTERY_FLAG_HIGH = 1 const BATTERY_FLAG_LOW = 2 const BATTERY_FLAG_NO_BATTERY = 128 const BATTERY_FLAG_UNKNOWN = 255 const BATTERY_LIFE_UNKNOWN = 4294967295 const BATTERY_PERCENTAGE_UNKNOWN = 255 const BCRYPTBUFFER_VERSION = 0 const BCRYPT_3DES_112_ALGORITHM = "3DES_112" const BCRYPT_3DES_ALGORITHM = "3DES" const BCRYPT_AES_ALGORITHM = "AES" const BCRYPT_AES_CMAC_ALGORITHM = "AES-CMAC" const BCRYPT_AES_GMAC_ALGORITHM = "AES-GMAC" const BCRYPT_AES_WRAP_KEY_BLOB = "Rfc3565KeyWrapBlob" const BCRYPT_ALGORITHM_NAME = "AlgorithmName" const BCRYPT_ALG_HANDLE_HMAC_FLAG = 8 const BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE = 3 const BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 4 const BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION = 1 const BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG = 1 const BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG = 2 const BCRYPT_AUTH_TAG_LENGTH = "AuthTagLength" const BCRYPT_BLOCK_LENGTH = "BlockLength" const BCRYPT_BLOCK_PADDING = 1 const BCRYPT_BLOCK_SIZE_LIST = "BlockSizeList" const BCRYPT_BUFFERS_LOCKED_FLAG = 64 const BCRYPT_CAPI_AES_FLAG = 16 const BCRYPT_CAPI_KDF_ALGORITHM = "CAPI_KDF" const BCRYPT_CHAINING_MODE = "ChainingMode" const BCRYPT_CHAIN_MODE_CBC = "ChainingModeCBC" const BCRYPT_CHAIN_MODE_CCM = "ChainingModeCCM" const BCRYPT_CHAIN_MODE_CFB = "ChainingModeCFB" const BCRYPT_CHAIN_MODE_ECB = "ChainingModeECB" const BCRYPT_CHAIN_MODE_GCM = "ChainingModeGCM" const BCRYPT_CHAIN_MODE_NA = "ChainingModeN/A" const BCRYPT_CIPHER_INTERFACE = 1 const BCRYPT_CIPHER_OPERATION = 1 const BCRYPT_DESX_ALGORITHM = "DESX" const BCRYPT_DES_ALGORITHM = "DES" const BCRYPT_DH_ALGORITHM = "DH" const BCRYPT_DH_PARAMETERS = "DHParameters" const BCRYPT_DH_PARAMETERS_MAGIC = 1297107012 const BCRYPT_DH_PRIVATE_BLOB = "DHPRIVATEBLOB" const BCRYPT_DH_PRIVATE_MAGIC = 1448101956 const BCRYPT_DH_PUBLIC_BLOB = "DHPUBLICBLOB" const BCRYPT_DH_PUBLIC_MAGIC = 1112557636 const BCRYPT_DSA_ALGORITHM = "DSA" const BCRYPT_DSA_PARAMETERS = "DSAParameters" const BCRYPT_DSA_PARAMETERS_MAGIC = 1297109828 const BCRYPT_DSA_PARAMETERS_MAGIC_V2 = 843927620 const BCRYPT_DSA_PRIVATE_BLOB = "DSAPRIVATEBLOB" const BCRYPT_DSA_PRIVATE_MAGIC = 1448104772 const BCRYPT_DSA_PRIVATE_MAGIC_V2 = 844517444 const BCRYPT_DSA_PUBLIC_BLOB = "DSAPUBLICBLOB" const BCRYPT_DSA_PUBLIC_MAGIC = 1112560452 const BCRYPT_DSA_PUBLIC_MAGIC_V2 = 843206724 const BCRYPT_ECCFULLPRIVATE_BLOB = "ECCFULLPRIVATEBLOB" const BCRYPT_ECCFULLPUBLIC_BLOB = "ECCFULLPUBLICBLOB" const BCRYPT_ECCPRIVATE_BLOB = "ECCPRIVATEBLOB" const BCRYPT_ECCPUBLIC_BLOB = "ECCPUBLICBLOB" const BCRYPT_ECDH_P256_ALGORITHM = "ECDH_P256" const BCRYPT_ECDH_P384_ALGORITHM = "ECDH_P384" const BCRYPT_ECDH_P521_ALGORITHM = "ECDH_P521" const BCRYPT_ECDH_PRIVATE_GENERIC_MAGIC = 1447772997 const BCRYPT_ECDH_PRIVATE_P256_MAGIC = 843793221 const BCRYPT_ECDH_PRIVATE_P384_MAGIC = 877347653 const BCRYPT_ECDH_PRIVATE_P521_MAGIC = 910902085 const BCRYPT_ECDH_PUBLIC_GENERIC_MAGIC = 1347109701 const BCRYPT_ECDH_PUBLIC_P256_MAGIC = 827016005 const BCRYPT_ECDH_PUBLIC_P384_MAGIC = 860570437 const BCRYPT_ECDH_PUBLIC_P521_MAGIC = 894124869 const BCRYPT_ECDSA_P256_ALGORITHM = "ECDSA_P256" const BCRYPT_ECDSA_P384_ALGORITHM = "ECDSA_P384" const BCRYPT_ECDSA_P521_ALGORITHM = "ECDSA_P521" const BCRYPT_ECDSA_PRIVATE_GENERIC_MAGIC = 1447314245 const BCRYPT_ECDSA_PRIVATE_P256_MAGIC = 844317509 const BCRYPT_ECDSA_PRIVATE_P384_MAGIC = 877871941 const BCRYPT_ECDSA_PRIVATE_P521_MAGIC = 911426373 const BCRYPT_ECDSA_PUBLIC_GENERIC_MAGIC = 1346650949 const BCRYPT_ECDSA_PUBLIC_P256_MAGIC = 827540293 const BCRYPT_ECDSA_PUBLIC_P384_MAGIC = 861094725 const BCRYPT_ECDSA_PUBLIC_P521_MAGIC = 894649157 const BCRYPT_EFFECTIVE_KEY_LENGTH = "EffectiveKeyLength" const BCRYPT_GLOBAL_PARAMETERS = "SecretAgreementParam" const BCRYPT_HASH_BLOCK_LENGTH = "HashBlockLength" const BCRYPT_HASH_INTERFACE = 2 const BCRYPT_HASH_LENGTH = "HashDigestLength" const BCRYPT_HASH_OID_LIST = "HashOIDList" const BCRYPT_HASH_OPERATION = 2 const BCRYPT_HASH_REUSABLE_FLAG = 32 const BCRYPT_INITIALIZATION_VECTOR = "IV" const BCRYPT_IS_KEYED_HASH = "IsKeyedHash" const BCRYPT_IS_REUSABLE_HASH = "IsReusableHash" const BCRYPT_KDF_HASH = "HASH" const BCRYPT_KDF_HMAC = "HMAC" const BCRYPT_KDF_RAW_SECRET = "TRUNCATE" const BCRYPT_KDF_SP80056A_CONCAT = "SP800_56A_CONCAT" const BCRYPT_KDF_TLS_PRF = "TLS_PRF" const BCRYPT_KEY_DATA_BLOB = "KeyDataBlob" const BCRYPT_KEY_DATA_BLOB_MAGIC = 1296188491 const BCRYPT_KEY_DATA_BLOB_VERSION1 = 1 const BCRYPT_KEY_DERIVATION_INTERFACE = 7 const BCRYPT_KEY_DERIVATION_OPERATION = 64 const BCRYPT_KEY_LENGTH = "KeyLength" const BCRYPT_KEY_LENGTHS = "KeyLengths" const BCRYPT_KEY_OBJECT_LENGTH = "KeyObjectLength" const BCRYPT_KEY_STRENGTH = "KeyStrength" const BCRYPT_MD2_ALGORITHM = "MD2" const BCRYPT_MD4_ALGORITHM = "MD4" const BCRYPT_MD5_ALGORITHM = "MD5" const BCRYPT_MESSAGE_BLOCK_LENGTH = "MessageBlockLength" const BCRYPT_MULTI_OBJECT_LENGTH = "MultiObjectLength" const BCRYPT_NO_KEY_VALIDATION = 8 const BCRYPT_OBJECT_ALIGNMENT = 16 const BCRYPT_OBJECT_LENGTH = "ObjectLength" const BCRYPT_OPAQUE_KEY_BLOB = "OpaqueKeyBlob" const BCRYPT_PADDING_SCHEMES = "PaddingSchemes" const BCRYPT_PAD_NONE = 1 const BCRYPT_PAD_OAEP = 4 const BCRYPT_PAD_PKCS1 = 2 const BCRYPT_PAD_PKCS1_OPTIONAL_HASH_OID = 16 const BCRYPT_PAD_PSS = 8 const BCRYPT_PBKDF2_ALGORITHM = "PBKDF2" const BCRYPT_PCP_PLATFORM_TYPE_PROPERTY = "PCP_PLATFORM_TYPE" const BCRYPT_PCP_PROVIDER_VERSION_PROPERTY = "PCP_PROVIDER_VERSION" const BCRYPT_PRIMITIVE_TYPE = "PrimitiveType" const BCRYPT_PRIVATE_KEY = "PrivKeyVal" const BCRYPT_PRIVATE_KEY_BLOB = "PRIVATEBLOB" const BCRYPT_PRIVATE_KEY_FLAG = 2 const BCRYPT_PROVIDER_HANDLE = "ProviderHandle" const BCRYPT_PROV_DISPATCH = 1 const BCRYPT_PUBLIC_KEY_BLOB = "PUBLICBLOB" const BCRYPT_PUBLIC_KEY_FLAG = 1 const BCRYPT_PUBLIC_KEY_LENGTH = "PublicKeyLength" const BCRYPT_RC2_ALGORITHM = "RC2" const BCRYPT_RC4_ALGORITHM = "RC4" const BCRYPT_RNG_ALGORITHM = "RNG" const BCRYPT_RNG_DUAL_EC_ALGORITHM = "DUALECRNG" const BCRYPT_RNG_FIPS186_DSA_ALGORITHM = "FIPS186DSARNG" const BCRYPT_RNG_INTERFACE = 6 const BCRYPT_RNG_OPERATION = 32 const BCRYPT_RNG_USE_ENTROPY_IN_BUFFER = 1 const BCRYPT_RSAFULLPRIVATE_BLOB = "RSAFULLPRIVATEBLOB" const BCRYPT_RSAFULLPRIVATE_MAGIC = 859919186 const BCRYPT_RSAPRIVATE_BLOB = "RSAPRIVATEBLOB" const BCRYPT_RSAPRIVATE_MAGIC = 843141970 const BCRYPT_RSAPUBLIC_BLOB = "RSAPUBLICBLOB" const BCRYPT_RSAPUBLIC_MAGIC = 826364754 const BCRYPT_RSA_ALGORITHM = "RSA" const BCRYPT_RSA_SIGN_ALGORITHM = "RSA_SIGN" const BCRYPT_SECRET_AGREEMENT_INTERFACE = 4 const BCRYPT_SECRET_AGREEMENT_OPERATION = 8 const BCRYPT_SHA1_ALGORITHM = "SHA1" const BCRYPT_SHA256_ALGORITHM = "SHA256" const BCRYPT_SHA384_ALGORITHM = "SHA384" const BCRYPT_SHA512_ALGORITHM = "SHA512" const BCRYPT_SIGNATURE_INTERFACE = 5 const BCRYPT_SIGNATURE_LENGTH = "SignatureLength" const BCRYPT_SIGNATURE_OPERATION = 16 const BCRYPT_SP800108_CTR_HMAC_ALGORITHM = "SP800_108_CTR_HMAC" const BCRYPT_SP80056A_CONCAT_ALGORITHM = "SP800_56A_CONCAT" const BCRYPT_SUPPORTED_PAD_OAEP = 8 const BCRYPT_SUPPORTED_PAD_PKCS1_ENC = 2 const BCRYPT_SUPPORTED_PAD_PKCS1_SIG = 4 const BCRYPT_SUPPORTED_PAD_PSS = 16 const BCRYPT_SUPPORTED_PAD_ROUTER = 1 const BCRYPT_USE_SYSTEM_PREFERRED_RNG = 2 const BDR_INNER = 12 const BDR_OUTER = 3 const BDR_RAISED = 5 const BDR_RAISEDINNER = 4 const BDR_RAISEDOUTER = 1 const BDR_SUNKEN = 10 const BDR_SUNKENINNER = 8 const BDR_SUNKENOUTER = 2 const BEGIN_PATH = 4096 const BELOW_NORMAL_PRIORITY_CLASS = 16384 const BF_ADJUST = 8192 const BF_BOTTOM = 8 const BF_BOTTOMLEFT = 9 const BF_BOTTOMRIGHT = 12 const BF_DIAGONAL = 16 const BF_DIAGONAL_ENDBOTTOMLEFT = 25 const BF_DIAGONAL_ENDBOTTOMRIGHT = 28 const BF_DIAGONAL_ENDTOPLEFT = 19 const BF_DIAGONAL_ENDTOPRIGHT = 22 const BF_FLAT = 16384 const BF_LEFT = 1 const BF_MIDDLE = 2048 const BF_MONO = 32768 const BF_RECT = 15 const BF_RIGHT = 4 const BF_SOFT = 4096 const BF_TOP = 2 const BF_TOPLEFT = 3 const BF_TOPRIGHT = 6 const BIDI_ACCESS_ADMINISTRATOR = 1 const BIDI_ACCESS_USER = 2 const BIDI_ACTION_ENUM_SCHEMA = "EnumSchema" const BIDI_ACTION_GET = "Get" const BIDI_ACTION_GET_ALL = "GetAll" const BIDI_ACTION_SET = "Set" const BINDF_DONTPUTINCACHE = 0 const BINDF_DONTUSECACHE = 0 const BINDF_NOCOPYDATA = 0 const BITSPIXEL = 12 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BI_BITFIELDS = 3 const BI_JPEG = 4 const BI_PNG = 5 const BI_RGB = 0 const BI_RLE4 = 2 const BI_RLE8 = 1 const BKMODE_LAST = 2 const BLACKONWHITE = 1 const BLACK_BRUSH = 4 const BLACK_PEN = 7 const BLTALIGNMENT = 119 const BM_CLICK = 245 const BM_GETCHECK = 240 const BM_GETIMAGE = 246 const BM_GETSTATE = 242 const BM_SETCHECK = 241 const BM_SETDONTCLICK = 248 const BM_SETIMAGE = 247 const BM_SETSTATE = 243 const BM_SETSTYLE = 244 const BN_CLICKED = 0 const BN_DBLCLK = 5 const BN_DISABLE = 4 const BN_DOUBLECLICKED = 5 const BN_HILITE = 2 const BN_KILLFOCUS = 7 const BN_PAINT = 1 const BN_PUSHED = 2 const BN_SETFOCUS = 6 const BN_UNHILITE = 3 const BN_UNPUSHED = 3 const BOLD_FONTTYPE = 256 const BROADCAST_QUERY_DENY = 1112363332 const BSF_ALLOWSFW = 128 const BSF_FLUSHDISK = 4 const BSF_FORCEIFHUNG = 32 const BSF_IGNORECURRENTTASK = 2 const BSF_LUID = 1024 const BSF_NOHANG = 8 const BSF_NOTIMEOUTIFNOTHUNG = 64 const BSF_POSTMESSAGE = 16 const BSF_QUERY = 1 const BSF_RETURNHDESK = 512 const BSF_SENDNOTIFYMESSAGE = 256 const BSM_ALLCOMPONENTS = 0 const BSM_ALLDESKTOPS = 16 const BSM_APPLICATIONS = 8 const BSM_INSTALLABLEDRIVERS = 4 const BSM_NETDRIVER = 2 const BSM_VXDS = 1 const BST_CHECKED = 1 const BST_FOCUS = 8 const BST_INDETERMINATE = 2 const BST_PUSHED = 4 const BST_UNCHECKED = 0 const BS_3STATE = 5 const BS_AUTO3STATE = 6 const BS_AUTOCHECKBOX = 3 const BS_AUTORADIOBUTTON = 9 const BS_BITMAP = 128 const BS_BOTTOM = 2048 const BS_CENTER = 768 const BS_CHECKBOX = 2 const BS_DEFPUSHBUTTON = 1 const BS_DIBPATTERN = 5 const BS_DIBPATTERN8X8 = 8 const BS_DIBPATTERNPT = 6 const BS_FLAT = 32768 const BS_GROUPBOX = 7 const BS_HATCHED = 2 const BS_HOLLOW = 1 const BS_ICON = 64 const BS_INDEXED = 4 const BS_LEFT = 256 const BS_LEFTTEXT = 32 const BS_MONOPATTERN = 9 const BS_MULTILINE = 8192 const BS_NOTIFY = 16384 const BS_NULL = 1 const BS_OWNERDRAW = 11 const BS_PATTERN = 3 const BS_PATTERN8X8 = 7 const BS_PUSHBOX = 10 const BS_PUSHBUTTON = 0 const BS_PUSHLIKE = 4096 const BS_RADIOBUTTON = 4 const BS_RIGHT = 512 const BS_RIGHTBUTTON = 32 const BS_SOLID = 0 const BS_TEXT = 0 const BS_TOP = 1024 const BS_TYPEMASK = 15 const BS_USERBUTTON = 8 const BS_VCENTER = 3072 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 512 const BackupEventLog = 0 const BeginUpdateResource = 0 const BitScanForward = 0 const BitScanForward64 = 0 const BitScanReverse = 0 const BitScanReverse64 = 0 const BitTest = 0 const BitTest64 = 0 const BitTestAndComplement = 0 const BitTestAndComplement64 = 0 const BitTestAndReset = 0 const BitTestAndReset64 = 0 const BitTestAndSet = 0 const BitTestAndSet64 = 0 const BroadcastSystemMessage = 0 const BroadcastSystemMessageEx = 0 const BuildCommDCB = 0 const BuildCommDCBAndTimeouts = 0 const C1_ALPHA = 256 const C1_BLANK = 64 const C1_CNTRL = 32 const C1_DEFINED = 512 const C1_DIGIT = 4 const C1_LOWER = 2 const C1_PUNCT = 16 const C1_SPACE = 8 const C1_UPPER = 1 const C1_XDIGIT = 128 const C2_ARABICNUMBER = 6 const C2_BLOCKSEPARATOR = 8 const C2_COMMONSEPARATOR = 7 const C2_EUROPENUMBER = 3 const C2_EUROPESEPARATOR = 4 const C2_EUROPETERMINATOR = 5 const C2_LEFTTORIGHT = 1 const C2_NOTAPPLICABLE = 0 const C2_OTHERNEUTRAL = 11 const C2_RIGHTTOLEFT = 2 const C2_SEGMENTSEPARATOR = 9 const C2_WHITESPACE = 10 const C3_ALPHA = 32768 const C3_DIACRITIC = 2 const C3_FULLWIDTH = 128 const C3_HALFWIDTH = 64 const C3_HIGHSURROGATE = 2048 const C3_HIRAGANA = 32 const C3_IDEOGRAPH = 256 const C3_KASHIDA = 512 const C3_KATAKANA = 16 const C3_LEXICAL = 1024 const C3_LOWSURROGATE = 4096 const C3_NONSPACING = 1 const C3_NOTAPPLICABLE = 0 const C3_SYMBOL = 8 const C3_VOWELMARK = 4 const CACHE_E_FIRST = 2147746160 const CACHE_E_LAST = 2147746175 const CACHE_FULLY_ASSOCIATIVE = 255 const CACHE_STALE = 0 const CACHE_S_FIRST = 262512 const CACHE_S_LAST = 262527 const CADV_LATEACK = 65535 const CALERT_SYSTEM = 6
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go
vendor/modernc.org/sqlite/lib/sqlite_linux_riscv64.go
// Code generated for linux/riscv64 by 'generator --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/riscv64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/riscv64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/riscv64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && riscv64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOQSIZE = 21600 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_FAST_FMA = 1 const FP_FAST_FMAF = 1 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 5 const F_GETLK64 = 5 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 6 const F_SETLK64 = 6 const F_SETLKW = 7 const F_SETLKW64 = 7 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 14002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 16384 const O_DIRECTORY = 65536 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 32768 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 131072 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4259840 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go
vendor/modernc.org/sqlite/lib/sqlite_linux_amd64.go
// Code generated for linux/amd64 by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/amd64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && amd64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOQSIZE = 21600 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 5 const F_GETLK64 = 5 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 6 const F_SETLK64 = 6 const F_SETLKW = 7 const F_SETLKW64 = 7 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 12002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_32BIT = 64 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 16384 const O_DIRECTORY = 65536 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 32768 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 131072 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4259840 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_freebsd_386.go
vendor/modernc.org/sqlite/lib/sqlite_freebsd_386.go
// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_386.go -trace-translation-units testdata/sqlite-amalgamation-3410200/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ *libc.TLS var _ types.Size_t const ( ACCESSPERMS = 511 ALLPERMS = 4095 AT_EACCESS = 0x0100 AT_EMPTY_PATH = 0x4000 AT_FDCWD = -100 AT_REMOVEDIR = 0x0800 AT_RESOLVE_BENEATH = 0x2000 AT_SYMLINK_FOLLOW = 0x0400 AT_SYMLINK_NOFOLLOW = 0x0200 BIG_ENDIAN = 4321 BITVEC_SZ = 512 BITVEC_SZELEM = 8 BTALLOC_ANY = 0 BTALLOC_EXACT = 1 BTALLOC_LE = 2 BTCF_AtLast = 0x08 BTCF_Incrblob = 0x10 BTCF_Multiple = 0x20 BTCF_Pinned = 0x40 BTCF_ValidNKey = 0x02 BTCF_ValidOvfl = 0x04 BTCF_WriteFlag = 0x01 BTCURSOR_MAX_DEPTH = 20 BTREE_APPEND = 0x08 BTREE_APPLICATION_ID = 8 BTREE_AUTOVACUUM_FULL = 1 BTREE_AUTOVACUUM_INCR = 2 BTREE_AUTOVACUUM_NONE = 0 BTREE_AUXDELETE = 0x04 BTREE_BLOBKEY = 2 BTREE_BULKLOAD = 0x00000001 BTREE_DATA_VERSION = 15 BTREE_DEFAULT_CACHE_SIZE = 3 BTREE_FILE_FORMAT = 2 BTREE_FORDELETE = 0x00000008 BTREE_FREE_PAGE_COUNT = 0 BTREE_HINT_RANGE = 0 BTREE_INCR_VACUUM = 7 BTREE_INTKEY = 1 BTREE_LARGEST_ROOT_PAGE = 4 BTREE_MEMORY = 2 BTREE_OMIT_JOURNAL = 1 BTREE_PREFORMAT = 0x80 BTREE_SAVEPOSITION = 0x02 BTREE_SCHEMA_VERSION = 1 BTREE_SEEK_EQ = 0x00000002 BTREE_SINGLE = 4 BTREE_TEXT_ENCODING = 5 BTREE_UNORDERED = 8 BTREE_USER_VERSION = 6 BTREE_WRCSR = 0x00000004 BTS_EXCLUSIVE = 0x0040 BTS_FAST_SECURE = 0x000c BTS_INITIALLY_EMPTY = 0x0010 BTS_NO_WAL = 0x0020 BTS_OVERWRITE = 0x0008 BTS_PAGESIZE_FIXED = 0x0002 BTS_PENDING = 0x0080 BTS_READ_ONLY = 0x0001 BTS_SECURE_DELETE = 0x0004 BUFSIZ = 1024 BYTE_ORDER = 1234 CACHE_STALE = 0 CC_AND = 24 CC_BANG = 15 CC_BOM = 30 CC_COMMA = 23 CC_DIGIT = 3 CC_DOLLAR = 4 CC_DOT = 26 CC_EQ = 14 CC_GT = 13 CC_ID = 27 CC_ILLEGAL = 28 CC_KYWD = 2 CC_KYWD0 = 1 CC_LP = 17 CC_LT = 12 CC_MINUS = 11 CC_NUL = 29 CC_PERCENT = 22 CC_PIPE = 10 CC_PLUS = 20 CC_QUOTE = 8 CC_QUOTE2 = 9 CC_RP = 18 CC_SEMI = 19 CC_SLASH = 16 CC_SPACE = 7 CC_STAR = 21 CC_TILDA = 25 CC_VARALPHA = 5 CC_VARNUM = 6 CC_X = 0 CKCNSTRNT_COLUMN = 0x01 CKCNSTRNT_ROWID = 0x02 CLK_TCK = 128 CLOCKS_PER_SEC = 128 CLOCK_BOOTTIME = 5 CLOCK_MONOTONIC = 4 CLOCK_MONOTONIC_COARSE = 12 CLOCK_MONOTONIC_FAST = 12 CLOCK_MONOTONIC_PRECISE = 11 CLOCK_PROCESS_CPUTIME_ID = 15 CLOCK_PROF = 2 CLOCK_REALTIME = 0 CLOCK_REALTIME_COARSE = 10 CLOCK_REALTIME_FAST = 10 CLOCK_REALTIME_PRECISE = 9 CLOCK_SECOND = 13 CLOCK_THREAD_CPUTIME_ID = 14 CLOCK_UPTIME = 5 CLOCK_UPTIME_FAST = 8 CLOCK_UPTIME_PRECISE = 7 CLOCK_VIRTUAL = 1 CLOSE_RANGE_CLOEXEC = 4 COLFLAG_BUSY = 0x0100 COLFLAG_GENERATED = 0x0060 COLFLAG_HASCOLL = 0x0200 COLFLAG_HASTYPE = 0x0004 COLFLAG_HIDDEN = 0x0002 COLFLAG_NOEXPAND = 0x0400 COLFLAG_NOINSERT = 0x0062 COLFLAG_NOTAVAIL = 0x0080 COLFLAG_PRIMKEY = 0x0001 COLFLAG_SORTERREF = 0x0010 COLFLAG_STORED = 0x0040 COLFLAG_UNIQUE = 0x0008 COLFLAG_VIRTUAL = 0x0020 COLNAME_COLUMN = 4 COLNAME_DATABASE = 2 COLNAME_DECLTYPE = 1 COLNAME_N = 5 COLNAME_NAME = 0 COLNAME_TABLE = 3 COLTYPE_ANY = 1 COLTYPE_BLOB = 2 COLTYPE_CUSTOM = 0 COLTYPE_INT = 3 COLTYPE_INTEGER = 4 COLTYPE_REAL = 5 COLTYPE_TEXT = 6 CPUCLOCK_WHICH_PID = 0 CPUCLOCK_WHICH_TID = 1 CURSOR_FAULT = 4 CURSOR_INVALID = 1 CURSOR_REQUIRESEEK = 3 CURSOR_SKIPNEXT = 2 CURSOR_VALID = 0 CURTYPE_BTREE = 0 CURTYPE_PSEUDO = 3 CURTYPE_SORTER = 1 CURTYPE_VTAB = 2 DBFLAG_EncodingFixed = 0x0040 DBFLAG_InternalFunc = 0x0020 DBFLAG_PreferBuiltin = 0x0002 DBFLAG_SchemaChange = 0x0001 DBFLAG_SchemaKnownOk = 0x0010 DBFLAG_Vacuum = 0x0004 DBFLAG_VacuumInto = 0x0008 DBSTAT_PAGE_PADDING_BYTES = 256 DB_ResetWanted = 0x0008 DB_SchemaLoaded = 0x0001 DB_UnresetViews = 0x0002 DEFFILEMODE = 438 DIRECT_MODE = 0 DOTLOCK_SUFFIX = ".lock" DST_AUST = 2 DST_CAN = 6 DST_EET = 5 DST_MET = 4 DST_NONE = 0 DST_USA = 1 DST_WET = 3 E2BIG = 7 EACCES = 13 EADDRINUSE = 48 EADDRNOTAVAIL = 49 EAFNOSUPPORT = 47 EAGAIN = 35 EALREADY = 37 EAUTH = 80 EBADF = 9 EBADMSG = 89 EBADRPC = 72 EBUSY = 16 ECANCELED = 85 ECAPMODE = 94 ECHILD = 10 ECONNABORTED = 53 ECONNREFUSED = 61 ECONNRESET = 54 EDEADLK = 11 EDESTADDRREQ = 39 EDOM = 33 EDOOFUS = 88 EDQUOT = 69 EEXIST = 17 EFAULT = 14 EFBIG = 27 EFTYPE = 79 EHOSTDOWN = 64 EHOSTUNREACH = 65 EIDRM = 82 EILSEQ = 86 EINPROGRESS = 36 EINTEGRITY = 97 EINTR = 4 EINVAL = 22 EIO = 5 EISCONN = 56 EISDIR = 21 ELAST = 97 ELOOP = 62 EMFILE = 24 EMLINK = 31 EMSGSIZE = 40 EMULTIHOP = 90 ENAMETOOLONG = 63 ENAME_NAME = 0 ENAME_SPAN = 1 ENAME_TAB = 2 ENEEDAUTH = 81 ENETDOWN = 50 ENETRESET = 52 ENETUNREACH = 51 ENFILE = 23 ENOATTR = 87 ENOBUFS = 55 ENODEV = 19 ENOENT = 2 ENOEXEC = 8 ENOLCK = 77 ENOLINK = 91 ENOMEM = 12 ENOMSG = 83 ENOPROTOOPT = 42 ENOSPC = 28 ENOSYS = 78 ENOTBLK = 15 ENOTCAPABLE = 93 ENOTCONN = 57 ENOTDIR = 20 ENOTEMPTY = 66 ENOTRECOVERABLE = 95 ENOTSOCK = 38 ENOTSUP = 45 ENOTTY = 25 ENXIO = 6 EOF = -1 EOPNOTSUPP = 45 EOVERFLOW = 84 EOWNERDEAD = 96 EPERM = 1 EPFNOSUPPORT = 46 EPIPE = 32 EPROCLIM = 67 EPROCUNAVAIL = 76 EPROGMISMATCH = 75 EPROGUNAVAIL = 74 EPROTO = 92 EPROTONOSUPPORT = 43 EPROTOTYPE = 41 EP_Agg = 0x000010 EP_CanBeNull = 0x200000 EP_Collate = 0x000200 EP_Commuted = 0x000400 EP_ConstFunc = 0x100000 EP_DblQuoted = 0x000080 EP_Distinct = 0x000004 EP_FixedCol = 0x000020 EP_FromDDL = 0x40000000 EP_HasFunc = 0x000008 EP_IfNullRow = 0x040000 EP_Immutable = 0x02 EP_InfixFunc = 0x000100 EP_InnerON = 0x000002 EP_IntValue = 0x000800 EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 EP_Quoted = 0x4000000 EP_Reduced = 0x004000 EP_Skip = 0x002000 EP_Static = 0x8000000 EP_Subquery = 0x400000 EP_Subrtn = 0x2000000 EP_TokenOnly = 0x010000 EP_Unlikely = 0x080000 EP_VarSelect = 0x000040 EP_Win = 0x008000 EP_WinFunc = 0x1000000 EP_xIsSelect = 0x001000 ERANGE = 34 EREMOTE = 71 EROFS = 30 ERPCMISMATCH = 73 ESHUTDOWN = 58 ESOCKTNOSUPPORT = 44 ESPIPE = 29 ESRCH = 3 ESTALE = 70 ETIMEDOUT = 60 ETOOMANYREFS = 59 ETXTBSY = 26 EU4_EXPR = 2 EU4_IDX = 1 EU4_NONE = 0 EUSERS = 68 EWOULDBLOCK = 35 EXCLUDED_TABLE_NUMBER = 2 EXCLUSIVE_LOCK = 4 EXDEV = 18 EXIT_FAILURE = 1 EXIT_SUCCESS = 0 EXPRDUP_REDUCE = 0x0001 FAPPEND = 8 FASYNC = 64 FDSYNC = 16777216 FD_CLOEXEC = 1 FD_NONE = -200 FD_SETSIZE = 1024 FFSYNC = 128 FILENAME_MAX = 1024 FLAG_SIGNED = 1 FLAG_STRING = 4 FNDELAY = 4 FNONBLOCK = 4 FOPEN_MAX = 20 FP_FAST_FMAF = 1 FP_ILOGB0 = -2147483647 FP_ILOGBNAN = 2147483647 FP_INFINITE = 0x01 FP_NAN = 0x02 FP_NORMAL = 0x04 FP_SUBNORMAL = 0x08 FP_ZERO = 0x10 FRDAHEAD = 512 FREAD = 0x0001 FTS5CSR_EOF = 0x01 FTS5CSR_FREE_ZRANK = 0x10 FTS5CSR_REQUIRE_CONTENT = 0x02 FTS5CSR_REQUIRE_DOCSIZE = 0x04 FTS5CSR_REQUIRE_INST = 0x08 FTS5CSR_REQUIRE_POSLIST = 0x40 FTS5CSR_REQUIRE_RESEEK = 0x20 FTS5INDEX_QUERY_DESC = 0x0002 FTS5INDEX_QUERY_NOOUTPUT = 0x0020 FTS5INDEX_QUERY_PREFIX = 0x0001 FTS5INDEX_QUERY_SCAN = 0x0008 FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 FTS5_AND = 2 FTS5_AVERAGES_ROWID = 1 FTS5_BI_MATCH = 0x0001 FTS5_BI_ORDER_DESC = 0x0080 FTS5_BI_ORDER_RANK = 0x0020 FTS5_BI_ORDER_ROWID = 0x0040 FTS5_BI_RANK = 0x0002 FTS5_BI_ROWID_EQ = 0x0004 FTS5_BI_ROWID_GE = 0x0010 FTS5_BI_ROWID_LE = 0x0008 FTS5_CARET = 12 FTS5_COLON = 5 FTS5_COMMA = 13 FTS5_CONTENT_EXTERNAL = 2 FTS5_CONTENT_NONE = 1 FTS5_CONTENT_NORMAL = 0 FTS5_CORRUPT = 267 FTS5_CURRENT_VERSION = 4 FTS5_DATA_DLI_B = 1 FTS5_DATA_HEIGHT_B = 5 FTS5_DATA_ID_B = 16 FTS5_DATA_PADDING = 20 FTS5_DATA_PAGE_B = 31 FTS5_DATA_ZERO_PADDING = 8 FTS5_DEFAULT_AUTOMERGE = 4 FTS5_DEFAULT_CRISISMERGE = 16 FTS5_DEFAULT_HASHSIZE = 1048576 FTS5_DEFAULT_NEARDIST = 10 FTS5_DEFAULT_PAGE_SIZE = 4050 FTS5_DEFAULT_RANK = "bm25" FTS5_DEFAULT_USERMERGE = 4 FTS5_DETAIL_COLUMNS = 2 FTS5_DETAIL_FULL = 0 FTS5_DETAIL_NONE = 1 FTS5_EOF = 0 FTS5_LCP = 7 FTS5_LP = 10 FTS5_MAIN_PREFIX = 48 FTS5_MAX_LEVEL = 64 FTS5_MAX_PAGE_SIZE = 65536 FTS5_MAX_PREFIX_INDEXES = 31 FTS5_MAX_SEGMENT = 2000 FTS5_MAX_TOKEN_SIZE = 32768 FTS5_MERGE_NLIST = 16 FTS5_MINUS = 6 FTS5_MIN_DLIDX_SIZE = 4 FTS5_NOT = 3 FTS5_OPT_WORK_UNIT = 1000 FTS5_OR = 1 FTS5_PATTERN_GLOB = 66 FTS5_PATTERN_LIKE = 65 FTS5_PATTERN_NONE = 0 FTS5_PLAN_MATCH = 1 FTS5_PLAN_ROWID = 6 FTS5_PLAN_SCAN = 5 FTS5_PLAN_SORTED_MATCH = 4 FTS5_PLAN_SOURCE = 2 FTS5_PLAN_SPECIAL = 3 FTS5_PLUS = 14 FTS5_PORTER_MAX_TOKEN = 64 FTS5_RANK_NAME = "rank" FTS5_RCP = 8 FTS5_REMOVE_DIACRITICS_COMPLEX = 2 FTS5_REMOVE_DIACRITICS_NONE = 0 FTS5_REMOVE_DIACRITICS_SIMPLE = 1 FTS5_ROWID_NAME = "rowid" FTS5_RP = 11 FTS5_SEGITER_ONETERM = 0x01 FTS5_SEGITER_REVERSE = 0x02 FTS5_STAR = 15 FTS5_STMT_DELETE_CONTENT = 5 FTS5_STMT_DELETE_DOCSIZE = 7 FTS5_STMT_INSERT_CONTENT = 3 FTS5_STMT_LOOKUP = 2 FTS5_STMT_LOOKUP_DOCSIZE = 8 FTS5_STMT_REPLACE_CONFIG = 9 FTS5_STMT_REPLACE_CONTENT = 4 FTS5_STMT_REPLACE_DOCSIZE = 6 FTS5_STMT_SCAN = 10 FTS5_STMT_SCAN_ASC = 0 FTS5_STMT_SCAN_DESC = 1 FTS5_STRING = 9 FTS5_STRUCTURE_ROWID = 10 FTS5_TERM = 4 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 FTS5_TOKENIZE_QUERY = 0x0001 FTS5_TOKEN_COLOCATED = 0x0001 FTS5_VOCAB_COL = 0 FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" FTS5_VOCAB_INSTANCE = 2 FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" FTS5_VOCAB_ROW = 1 FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" FTS5_VOCAB_TERM_EQ = 0x01 FTS5_VOCAB_TERM_GE = 0x02 FTS5_VOCAB_TERM_LE = 0x04 FTS5_WORK_UNIT = 64 FULLY_WITHIN = 2 FUNC_PERFECT_MATCH = 6 FWRITE = 0x0002 F_ADD_SEALS = 19 F_CANCEL = 5 F_DUP2FD = 10 F_DUP2FD_CLOEXEC = 18 F_DUPFD = 0 F_DUPFD_CLOEXEC = 17 F_GETFD = 1 F_GETFL = 3 F_GETLK = 11 F_GETOWN = 5 F_GET_SEALS = 20 F_ISUNIONSTACK = 21 F_KINFO = 22 F_LOCK = 1 F_OGETLK = 7 F_OK = 0 F_OSETLK = 8 F_OSETLKW = 9 F_RDAHEAD = 16 F_RDLCK = 1 F_READAHEAD = 15 F_SEAL_GROW = 0x0004 F_SEAL_SEAL = 0x0001 F_SEAL_SHRINK = 0x0002 F_SEAL_WRITE = 0x0008 F_SETFD = 2 F_SETFL = 4 F_SETLK = 12 F_SETLKW = 13 F_SETLK_REMOTE = 14 F_SETOWN = 6 F_TEST = 3 F_TLOCK = 2 F_ULOCK = 0 F_UNLCK = 2 F_UNLCKSYS = 4 F_WRLCK = 3 GCC_VERSION = 4002001 GEOPOLY_PI = 3.1415926535897932385 H4DISC = 7 HASHSIZE = 97 HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 HAVE_FCHMOD = 0 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 HAVE_LSTAT = 1 HAVE_MREMAP = 0 HAVE_READLINK = 1 HAVE_USLEEP = 1 INCRINIT_NORMAL = 0 INCRINIT_ROOT = 2 INCRINIT_TASK = 1 INHERIT_COPY = 1 INHERIT_NONE = 2 INHERIT_SHARE = 0 INHERIT_ZERO = 3 INITFLAG_AlterAdd = 0x0003 INITFLAG_AlterDrop = 0x0002 INITFLAG_AlterMask = 0x0003 INITFLAG_AlterRename = 0x0001 INLINEFUNC_affinity = 4 INLINEFUNC_coalesce = 0 INLINEFUNC_expr_compare = 3 INLINEFUNC_expr_implies_expr = 2 INLINEFUNC_iif = 5 INLINEFUNC_implies_nonnull_row = 1 INLINEFUNC_sqlite_offset = 6 INLINEFUNC_unlikely = 99 INTERFACE = 1 IN_INDEX_EPH = 2 IN_INDEX_INDEX_ASC = 3 IN_INDEX_INDEX_DESC = 4 IN_INDEX_LOOP = 0x0004 IN_INDEX_MEMBERSHIP = 0x0002 IN_INDEX_NOOP = 5 IN_INDEX_NOOP_OK = 0x0001 IN_INDEX_ROWID = 1 IOCPARM_MASK = 8191 IOCPARM_MAX = 8192 IOCPARM_SHIFT = 13 IOC_DIRMASK = 3758096384 IOC_IN = 0x80000000 IOC_INOUT = 3221225472 IOC_OUT = 0x40000000 IOC_VOID = 0x20000000 ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 IsStat4 = 1 JEACH_ATOM = 3 JEACH_FULLKEY = 6 JEACH_ID = 4 JEACH_JSON = 8 JEACH_KEY = 0 JEACH_PARENT = 5 JEACH_PATH = 7 JEACH_ROOT = 9 JEACH_TYPE = 2 JEACH_VALUE = 1 JNODE_APPEND = 0x20 JNODE_ESCAPE = 0x02 JNODE_LABEL = 0x40 JNODE_PATCH = 0x10 JNODE_RAW = 0x01 JNODE_REMOVE = 0x04 JNODE_REPLACE = 0x08 JSON_ABPATH = 0x03 JSON_ARRAY = 6 JSON_CACHE_ID = -429938 JSON_CACHE_SZ = 4 JSON_FALSE = 2 JSON_INT = 3 JSON_ISSET = 0x04 JSON_JSON = 0x01 JSON_MAX_DEPTH = 2000 JSON_NULL = 0 JSON_OBJECT = 7 JSON_REAL = 4 JSON_SQL = 0x02 JSON_STRING = 5 JSON_SUBTYPE = 74 JSON_TRUE = 1 JT_CROSS = 0x02 JT_ERROR = 0x80 JT_INNER = 0x01 JT_LEFT = 0x08 JT_LTORJ = 0x40 JT_NATURAL = 0x04 JT_OUTER = 0x20 JT_RIGHT = 0x10 KEYINFO_ORDER_BIGNULL = 0x02 KEYINFO_ORDER_DESC = 0x01 LEGACY_SCHEMA_TABLE = "sqlite_master" LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" LITTLE_ENDIAN = 1234 LOCATE_NOERR = 0x02 LOCATE_VIEW = 0x01 LOCK_EX = 0x02 LOCK_NB = 0x04 LOCK_SH = 0x01 LOCK_UN = 0x08 LOOKASIDE_SMALL = 128 L_INCR = 1 L_SET = 0 L_XTND = 2 L_ctermid = 1024 L_cuserid = 17 L_tmpnam = 1024 M10d_Any = 1 M10d_No = 2 M10d_Yes = 0 MADV_AUTOSYNC = 7 MADV_CORE = 9 MADV_DONTNEED = 4 MADV_FREE = 5 MADV_NOCORE = 8 MADV_NORMAL = 0 MADV_NOSYNC = 6 MADV_PROTECT = 10 MADV_RANDOM = 1 MADV_SEQUENTIAL = 2 MADV_WILLNEED = 3 MAP_ALIGNED_SUPER = 16777216 MAP_ALIGNMENT_MASK = 4278190080 MAP_ALIGNMENT_SHIFT = 24 MAP_ANON = 0x1000 MAP_ANONYMOUS = 4096 MAP_COPY = 2 MAP_EXCL = 0x00004000 MAP_FILE = 0x0000 MAP_FIXED = 0x0010 MAP_GUARD = 0x00002000 MAP_HASSEMAPHORE = 0x0200 MAP_NOCORE = 0x00020000 MAP_NOSYNC = 0x0800 MAP_PREFAULT_READ = 0x00040000 MAP_PRIVATE = 0x0002 MAP_RESERVED0020 = 0x0020 MAP_RESERVED0040 = 0x0040 MAP_RESERVED0080 = 0x0080 MAP_RESERVED0100 = 0x0100 MAP_SHARED = 0x0001 MAP_STACK = 0x0400 MATH_ERREXCEPT = 2 MATH_ERRNO = 1 MAX_PATHNAME = 512 MAX_SECTOR_SIZE = 0x10000 MCL_CURRENT = 0x0001 MCL_FUTURE = 0x0002 MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 MEMTYPE_HEAP = 0x01 MEMTYPE_LOOKASIDE = 0x02 MEMTYPE_PCACHE = 0x04 MEM_AffMask = 0x003f MEM_Agg = 0x8000 MEM_Blob = 0x0010 MEM_Cleared = 0x0100 MEM_Dyn = 0x1000 MEM_Ephem = 0x4000 MEM_FromBind = 0x0040 MEM_Int = 0x0004 MEM_IntReal = 0x0020 MEM_Null = 0x0001 MEM_Real = 0x0008 MEM_Static = 0x2000 MEM_Str = 0x0002 MEM_Subtype = 0x0800 MEM_Term = 0x0200 MEM_TypeMask = 0x0dbf MEM_Undefined = 0x0000 MEM_Zero = 0x0400 MFD_ALLOW_SEALING = 0x00000002 MFD_CLOEXEC = 0x00000001 MFD_HUGETLB = 0x00000004 MFD_HUGE_16GB = 2281701376 MFD_HUGE_16MB = 1610612736 MFD_HUGE_1GB = 2013265920 MFD_HUGE_1MB = 1342177280 MFD_HUGE_256MB = 1879048192 MFD_HUGE_2GB = 2080374784 MFD_HUGE_2MB = 1409286144 MFD_HUGE_32MB = 1677721600 MFD_HUGE_512KB = 1275068416 MFD_HUGE_512MB = 1946157056 MFD_HUGE_64KB = 1073741824 MFD_HUGE_8MB = 1543503872 MFD_HUGE_MASK = 0xFC000000 MFD_HUGE_SHIFT = 26 MINCORE_INCORE = 0x1 MINCORE_MODIFIED = 0x4 MINCORE_MODIFIED_OTHER = 0x10
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/defs.go
vendor/modernc.org/sqlite/lib/defs.go
// Copyright 2022 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sqlite3 const ( SQLITE_STATIC = uintptr(0) // ((sqlite3_destructor_type)0) SQLITE_TRANSIENT = ^uintptr(0) // ((sqlite3_destructor_type)-1) ) type ( Sqlite3_index_constraint = sqlite3_index_constraint Sqlite3_index_orderby = sqlite3_index_orderby Sqlite3_index_constraint_usage = sqlite3_index_constraint_usage )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/mutex.go
vendor/modernc.org/sqlite/lib/mutex.go
// Copyright 2021 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !linux package sqlite3 import ( "fmt" "sync" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) func init() { tls := libc.NewTLS() if Xsqlite3_threadsafe(tls) == 0 { panic(fmt.Errorf("sqlite: thread safety configuration error")) } varArgs := libc.Xmalloc(tls, types.Size_t(unsafe.Sizeof(uintptr(0)))) if varArgs == 0 { panic(fmt.Errorf("cannot allocate memory")) } // int sqlite3_config(int, ...); if rc := Xsqlite3_config(tls, SQLITE_CONFIG_MUTEX, libc.VaList(varArgs, uintptr(unsafe.Pointer(&mutexMethods)))); rc != SQLITE_OK { p := Xsqlite3_errstr(tls, rc) str := libc.GoString(p) panic(fmt.Errorf("sqlite: failed to configure mutex methods: %v", str)) } libc.Xfree(tls, varArgs) tls.Close() } var ( mutexMethods = Sqlite3_mutex_methods{ FxMutexInit: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{mutexInit})), FxMutexEnd: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{mutexEnd})), FxMutexAlloc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32) uintptr }{mutexAlloc})), FxMutexFree: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{mutexFree})), FxMutexEnter: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{mutexEnter})), FxMutexTry: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{mutexTry})), FxMutexLeave: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{mutexLeave})), FxMutexHeld: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{mutexHeld})), FxMutexNotheld: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{mutexNotheld})), } mutexApp10 mutex mutexApp20 mutex mutexApp30 mutex mutexLRU0 mutex mutexMaster0 mutex mutexMem0 mutex mutexOpen0 mutex mutexPMem0 mutex mutexPRNG0 mutex mutexVFS10 mutex mutexVFS20 mutex mutexVFS30 mutex mutexApp1 = uintptr(unsafe.Pointer(&mutexApp10)) mutexApp2 = uintptr(unsafe.Pointer(&mutexApp20)) mutexApp3 = uintptr(unsafe.Pointer(&mutexApp30)) mutexLRU = uintptr(unsafe.Pointer(&mutexLRU0)) mutexMaster = uintptr(unsafe.Pointer(&mutexMaster0)) mutexMem = uintptr(unsafe.Pointer(&mutexMem0)) mutexOpen = uintptr(unsafe.Pointer(&mutexOpen0)) mutexPMem = uintptr(unsafe.Pointer(&mutexPMem0)) mutexPRNG = uintptr(unsafe.Pointer(&mutexPRNG0)) mutexVFS1 = uintptr(unsafe.Pointer(&mutexVFS10)) mutexVFS2 = uintptr(unsafe.Pointer(&mutexVFS20)) mutexVFS3 = uintptr(unsafe.Pointer(&mutexVFS30)) ) type mutex struct { sync.Mutex cnt int32 id int32 // tls.ID recursive bool } // int (*xMutexInit)(void); // // The xMutexInit method defined by this structure is invoked as part of system // initialization by the sqlite3_initialize() function. The xMutexInit routine // is called by SQLite exactly once for each effective call to // sqlite3_initialize(). // // The xMutexInit() method must be threadsafe. It must be harmless to invoke // xMutexInit() multiple times within the same process and without intervening // calls to xMutexEnd(). Second and subsequent calls to xMutexInit() must be // no-ops. xMutexInit() must not use SQLite memory allocation (sqlite3_malloc() // and its associates). // // If xMutexInit fails in any way, it is expected to clean up after itself // prior to returning. func mutexInit(tls *libc.TLS) int32 { return SQLITE_OK } // int (*xMutexEnd)(void); func mutexEnd(tls *libc.TLS) int32 { return SQLITE_OK } // sqlite3_mutex *(*xMutexAlloc)(int); // // The sqlite3_mutex_alloc() routine allocates a new mutex and returns a // pointer to it. The sqlite3_mutex_alloc() routine returns NULL if it is // unable to allocate the requested mutex. The argument to // sqlite3_mutex_alloc() must one of these integer constants: // // SQLITE_MUTEX_FAST // SQLITE_MUTEX_RECURSIVE // SQLITE_MUTEX_STATIC_MASTER // SQLITE_MUTEX_STATIC_MEM // SQLITE_MUTEX_STATIC_OPEN // SQLITE_MUTEX_STATIC_PRNG // SQLITE_MUTEX_STATIC_LRU // SQLITE_MUTEX_STATIC_PMEM // SQLITE_MUTEX_STATIC_APP1 // SQLITE_MUTEX_STATIC_APP2 // SQLITE_MUTEX_STATIC_APP3 // SQLITE_MUTEX_STATIC_VFS1 // SQLITE_MUTEX_STATIC_VFS2 // SQLITE_MUTEX_STATIC_VFS3 // // The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) cause // sqlite3_mutex_alloc() to create a new mutex. The new mutex is recursive when // SQLITE_MUTEX_RECURSIVE is used but not necessarily so when SQLITE_MUTEX_FAST // is used. The mutex implementation does not need to make a distinction // between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does not want to. // SQLite will only request a recursive mutex in cases where it really needs // one. If a faster non-recursive mutex implementation is available on the host // platform, the mutex subsystem might return such a mutex in response to // SQLITE_MUTEX_FAST. // // The other allowed parameters to sqlite3_mutex_alloc() (anything other than // SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return a pointer to a // static preexisting mutex. Nine static mutexes are used by the current // version of SQLite. Future versions of SQLite may add additional static // mutexes. Static mutexes are for internal use by SQLite only. Applications // that use SQLite mutexes should use only the dynamic mutexes returned by // SQLITE_MUTEX_FAST or SQLITE_MUTEX_RECURSIVE. // // Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST or // SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() returns a // different mutex on every call. For the static mutex types, the same mutex is // returned on every call that has the same type number. func mutexAlloc(tls *libc.TLS, typ int32) (r uintptr) { switch typ { case SQLITE_MUTEX_FAST: r = libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{}))) return r case SQLITE_MUTEX_RECURSIVE: r = libc.Xcalloc(tls, 1, types.Size_t(unsafe.Sizeof(mutex{}))) (*mutex)(unsafe.Pointer(r)).recursive = true return r case SQLITE_MUTEX_STATIC_MASTER: return mutexMaster case SQLITE_MUTEX_STATIC_MEM: return mutexMem case SQLITE_MUTEX_STATIC_OPEN: return mutexOpen case SQLITE_MUTEX_STATIC_PRNG: return mutexPRNG case SQLITE_MUTEX_STATIC_LRU: return mutexLRU case SQLITE_MUTEX_STATIC_PMEM: return mutexPMem case SQLITE_MUTEX_STATIC_APP1: return mutexApp1 case SQLITE_MUTEX_STATIC_APP2: return mutexApp2 case SQLITE_MUTEX_STATIC_APP3: return mutexApp3 case SQLITE_MUTEX_STATIC_VFS1: return mutexVFS1 case SQLITE_MUTEX_STATIC_VFS2: return mutexVFS2 case SQLITE_MUTEX_STATIC_VFS3: return mutexVFS3 default: return 0 } } // void (*xMutexFree)(sqlite3_mutex *); func mutexFree(tls *libc.TLS, m uintptr) { libc.Xfree(tls, m) } // The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt to enter // a mutex. If another thread is already within the mutex, // sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return // SQLITE_BUSY. The sqlite3_mutex_try() interface returns SQLITE_OK upon // successful entry. Mutexes created using SQLITE_MUTEX_RECURSIVE can be // entered multiple times by the same thread. In such cases, the mutex must be // exited an equal number of times before another thread can enter. If the same // thread tries to enter any mutex other than an SQLITE_MUTEX_RECURSIVE more // than once, the behavior is undefined. // // If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or // sqlite3_mutex_leave() is a NULL pointer, then all three routines behave as // no-ops. // void (*xMutexEnter)(sqlite3_mutex *); func mutexEnter(tls *libc.TLS, m uintptr) { if m == 0 { return } if !(*mutex)(unsafe.Pointer(m)).recursive { (*mutex)(unsafe.Pointer(m)).Lock() (*mutex)(unsafe.Pointer(m)).id = tls.ID return } id := tls.ID if atomic.CompareAndSwapInt32(&(*mutex)(unsafe.Pointer(m)).id, 0, id) { (*mutex)(unsafe.Pointer(m)).cnt = 1 (*mutex)(unsafe.Pointer(m)).Lock() return } if atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) == id { (*mutex)(unsafe.Pointer(m)).cnt++ return } for { (*mutex)(unsafe.Pointer(m)).Lock() if atomic.CompareAndSwapInt32(&(*mutex)(unsafe.Pointer(m)).id, 0, id) { (*mutex)(unsafe.Pointer(m)).cnt = 1 return } (*mutex)(unsafe.Pointer(m)).Unlock() } } // int (*xMutexTry)(sqlite3_mutex *); func mutexTry(tls *libc.TLS, m uintptr) int32 { if m == 0 { return SQLITE_OK } if !(*mutex)(unsafe.Pointer(m)).recursive { if (*mutex)(unsafe.Pointer(m)).TryLock() { return SQLITE_OK } } return SQLITE_BUSY } // void (*xMutexLeave)(sqlite3_mutex *); func mutexLeave(tls *libc.TLS, m uintptr) { if m == 0 { return } if !(*mutex)(unsafe.Pointer(m)).recursive { (*mutex)(unsafe.Pointer(m)).id = 0 (*mutex)(unsafe.Pointer(m)).Unlock() return } if atomic.AddInt32(&(*mutex)(unsafe.Pointer(m)).cnt, -1) == 0 { atomic.StoreInt32(&(*mutex)(unsafe.Pointer(m)).id, 0) (*mutex)(unsafe.Pointer(m)).Unlock() } } // The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines are intended // for use inside assert() statements. The SQLite core never uses these // routines except inside an assert() and applications are advised to follow // the lead of the core. The SQLite core only provides implementations for // these routines when it is compiled with the SQLITE_DEBUG flag. External // mutex implementations are only required to provide these routines if // SQLITE_DEBUG is defined and if NDEBUG is not defined. // // These routines should return true if the mutex in their argument is held or // not held, respectively, by the calling thread. // // The implementation is not required to provide versions of these routines // that actually work. If the implementation does not provide working versions // of these routines, it should at least provide stubs that always return true // so that one does not get spurious assertion failures. // // If the argument to sqlite3_mutex_held() is a NULL pointer then the routine // should return 1. This seems counter-intuitive since clearly the mutex cannot // be held if it does not exist. But the reason the mutex does not exist is // because the build is not using mutexes. And we do not want the assert() // containing the call to sqlite3_mutex_held() to fail, so a non-zero return is // the appropriate thing to do. The sqlite3_mutex_notheld() interface should // also return 1 when given a NULL pointer. // int (*xMutexHeld)(sqlite3_mutex *); func mutexHeld(tls *libc.TLS, m uintptr) int32 { if m == 0 { return 1 } return libc.Bool32(atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) == tls.ID) } // int (*xMutexNotheld)(sqlite3_mutex *); func mutexNotheld(tls *libc.TLS, m uintptr) int32 { if m == 0 { return 1 } return libc.Bool32(atomic.LoadInt32(&(*mutex)(unsafe.Pointer(m)).id) != tls.ID) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_windows_386.go
vendor/modernc.org/sqlite/lib/sqlite_windows_386.go
// Code generated for windows/386 by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/windows/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/windows/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/windows/386 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_MUTEX_NOOP --cpp /usr/bin/i686-w64-mingw32-gcc --goarch 386 --goos windows -DSQLITE_HAVE_C99_MATH_FUNCS=(1) -DSQLITE_OS_WIN=1 -DSQLITE_OMIT_SEH -map gcc=i686-w64-mingw32-gcc -eval-all-macros', DO NOT EDIT. //go:build windows && 386 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ABE_BOTTOM = 3 const ABE_LEFT = 0 const ABE_RIGHT = 2 const ABE_TOP = 1 const ABM_ACTIVATE = 6 const ABM_GETAUTOHIDEBAR = 7 const ABM_GETAUTOHIDEBAREX = 11 const ABM_GETSTATE = 4 const ABM_GETTASKBARPOS = 5 const ABM_NEW = 0 const ABM_QUERYPOS = 2 const ABM_REMOVE = 1 const ABM_SETAUTOHIDEBAR = 8 const ABM_SETAUTOHIDEBAREX = 12 const ABM_SETPOS = 3 const ABM_SETSTATE = 10 const ABM_WINDOWPOSCHANGED = 9 const ABN_FULLSCREENAPP = 2 const ABN_POSCHANGED = 1 const ABN_STATECHANGE = 0 const ABN_WINDOWARRANGE = 3 const ABORTDOC = 2 const ABOVE_NORMAL_PRIORITY_CLASS = 32768 const ABSOLUTE = 1 const ABS_ALWAYSONTOP = 2 const ABS_AUTOHIDE = 1 const ACCESS_ALLOWED_ACE_TYPE = 0 const ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 9 const ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 11 const ACCESS_ALLOWED_COMPOUND_ACE_TYPE = 4 const ACCESS_ALLOWED_OBJECT_ACE_TYPE = 5 const ACCESS_DENIED_ACE_TYPE = 1 const ACCESS_DENIED_CALLBACK_ACE_TYPE = 10 const ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 12 const ACCESS_DENIED_OBJECT_ACE_TYPE = 6 const ACCESS_DS_OBJECT_TYPE_NAME_A = "Directory Service Object" const ACCESS_DS_OBJECT_TYPE_NAME_W = "Directory Service Object" const ACCESS_DS_SOURCE_A = "DS" const ACCESS_DS_SOURCE_W = "DS" const ACCESS_FILTERKEYS = 2 const ACCESS_MAX_LEVEL = 4 const ACCESS_MAX_MS_ACE_TYPE = 8 const ACCESS_MAX_MS_OBJECT_ACE_TYPE = 8 const ACCESS_MAX_MS_V2_ACE_TYPE = 3 const ACCESS_MAX_MS_V3_ACE_TYPE = 4 const ACCESS_MAX_MS_V4_ACE_TYPE = 8 const ACCESS_MAX_MS_V5_ACE_TYPE = 19 const ACCESS_MIN_MS_ACE_TYPE = 0 const ACCESS_MIN_MS_OBJECT_ACE_TYPE = 5 const ACCESS_MOUSEKEYS = 3 const ACCESS_OBJECT_GUID = 0 const ACCESS_PROPERTY_GUID = 2 const ACCESS_PROPERTY_SET_GUID = 1 const ACCESS_REASON_DATA_MASK = 65535 const ACCESS_REASON_EXDATA_MASK = 2130706432 const ACCESS_REASON_STAGING_MASK = 2147483648 const ACCESS_REASON_TYPE_MASK = 16711680 const ACCESS_STICKYKEYS = 1 const ACCESS_SYSTEM_SECURITY = 16777216 const ACE_INHERITED_OBJECT_TYPE_PRESENT = 2 const ACE_OBJECT_TYPE_PRESENT = 1 const ACL_REVISION = 2 const ACL_REVISION1 = 1 const ACL_REVISION2 = 2 const ACL_REVISION3 = 3 const ACL_REVISION4 = 4 const ACL_REVISION_DS = 4 const ACPI_PPM_HARDWARE_ALL = 254 const ACPI_PPM_SOFTWARE_ALL = 252 const ACPI_PPM_SOFTWARE_ANY = 253 const ACTCTX_FLAG_APPLICATION_NAME_VALID = 32 const ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = 4 const ACTCTX_FLAG_HMODULE_VALID = 128 const ACTCTX_FLAG_LANGID_VALID = 2 const ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 1 const ACTCTX_FLAG_RESOURCE_NAME_VALID = 8 const ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 const ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF = 64 const ACTIVATIONCONTEXTINFOCLASS = 0 const ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1 const ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = 4 const ACTIVATION_CONTEXT_PATH_TYPE_NONE = 1 const ACTIVATION_CONTEXT_PATH_TYPE_URL = 3 const ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = 2 const ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS = 10 const ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = 1 const ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = 9 const ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO = 11 const ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = 5 const ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = 7 const ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = 4 const ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = 6 const ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = 2 const ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = 8 const ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = 3 const ACTIVEOBJECT_STRONG = 0 const ACTIVEOBJECT_WEAK = 1 const AC_LINE_BACKUP_POWER = 2 const AC_LINE_OFFLINE = 0 const AC_LINE_ONLINE = 1 const AC_LINE_UNKNOWN = 255 const AC_SRC_ALPHA = 1 const AC_SRC_OVER = 0 const ADDRESS_TAG_BIT = 2147483648 const AD_CLOCKWISE = 2 const AD_COUNTERCLOCKWISE = 1 const AF_APPLETALK = 16 const AF_BAN = 21 const AF_CCITT = 10 const AF_CHAOS = 5 const AF_DATAKIT = 9 const AF_DECnet = 12 const AF_DLI = 13 const AF_ECMA = 8 const AF_FIREFOX = 19 const AF_HYLINK = 15 const AF_IMPLINK = 3 const AF_INET = 2 const AF_IPX = 6 const AF_ISO = 7 const AF_LAT = 14 const AF_MAX = 22 const AF_NETBIOS = 17 const AF_NS = 6 const AF_OSI = 7 const AF_PUP = 4 const AF_SNA = 11 const AF_UNIX = 1 const AF_UNKNOWN1 = 20 const AF_UNSPEC = 0 const AF_VOICEVIEW = 18 const ALERT_SYSTEM_CRITICAL = 5 const ALERT_SYSTEM_ERROR = 3 const ALERT_SYSTEM_INFORMATIONAL = 1 const ALERT_SYSTEM_QUERY = 4 const ALERT_SYSTEM_WARNING = 2 const ALG_CLASS_ALL = 57344 const ALG_CLASS_ANY = 0 const ALG_CLASS_DATA_ENCRYPT = 24576 const ALG_CLASS_HASH = 32768 const ALG_CLASS_KEY_EXCHANGE = 40960 const ALG_CLASS_MSG_ENCRYPT = 16384 const ALG_CLASS_SIGNATURE = 8192 const ALG_SID_3DES = 3 const ALG_SID_3DES_112 = 9 const ALG_SID_AES = 17 const ALG_SID_AES_128 = 14 const ALG_SID_AES_192 = 15 const ALG_SID_AES_256 = 16 const ALG_SID_AGREED_KEY_ANY = 3 const ALG_SID_ANY = 0 const ALG_SID_CAST = 6 const ALG_SID_CYLINK_MEK = 12 const ALG_SID_DES = 1 const ALG_SID_DESX = 4 const ALG_SID_DH_EPHEM = 2 const ALG_SID_DH_SANDF = 1 const ALG_SID_DSS_ANY = 0 const ALG_SID_DSS_DMS = 2 const ALG_SID_DSS_PKCS = 1 const ALG_SID_ECDH = 5 const ALG_SID_ECDH_EPHEM = 6 const ALG_SID_ECDSA = 3 const ALG_SID_ECMQV = 1 const ALG_SID_EXAMPLE = 80 const ALG_SID_HASH_REPLACE_OWF = 11 const ALG_SID_HMAC = 9 const ALG_SID_IDEA = 5 const ALG_SID_KEA = 4 const ALG_SID_MAC = 5 const ALG_SID_MD2 = 1 const ALG_SID_MD4 = 2 const ALG_SID_MD5 = 3 const ALG_SID_PCT1_MASTER = 4 const ALG_SID_RC2 = 2 const ALG_SID_RC4 = 1 const ALG_SID_RC5 = 13 const ALG_SID_RIPEMD = 6 const ALG_SID_RIPEMD160 = 7 const ALG_SID_RSA_ANY = 0 const ALG_SID_RSA_ENTRUST = 3 const ALG_SID_RSA_MSATWORK = 2 const ALG_SID_RSA_PGP = 4 const ALG_SID_RSA_PKCS = 1 const ALG_SID_SAFERSK128 = 8 const ALG_SID_SAFERSK64 = 7 const ALG_SID_SCHANNEL_ENC_KEY = 7 const ALG_SID_SCHANNEL_MAC_KEY = 3 const ALG_SID_SCHANNEL_MASTER_HASH = 2 const ALG_SID_SEAL = 2 const ALG_SID_SHA = 4 const ALG_SID_SHA1 = 4 const ALG_SID_SHA_256 = 12 const ALG_SID_SHA_384 = 13 const ALG_SID_SHA_512 = 14 const ALG_SID_SKIPJACK = 10 const ALG_SID_SSL2_MASTER = 5 const ALG_SID_SSL3SHAMD5 = 8 const ALG_SID_SSL3_MASTER = 1 const ALG_SID_TEK = 11 const ALG_SID_TLS1PRF = 10 const ALG_SID_TLS1_MASTER = 6 const ALG_TYPE_ANY = 0 const ALG_TYPE_BLOCK = 1536 const ALG_TYPE_DH = 2560 const ALG_TYPE_DSS = 512 const ALG_TYPE_ECDH = 3584 const ALG_TYPE_RSA = 1024 const ALG_TYPE_SECURECHANNEL = 3072 const ALG_TYPE_STREAM = 2048 const ALLBITS = -1 const ALL_PROCESSOR_GROUPS = 65535 const ALL_TRANSPORTS = "M\\0\\0\\0" const ALTERNATE = 1 const ALTNUMPAD_BIT = 67108864 const ANSI_CHARSET = 0 const ANSI_FIXED_FONT = 11 const ANSI_VAR_FONT = 12 const ANTIALIASED_QUALITY = 4 const ANYSIZE_ARRAY = 1 const APD_COPY_ALL_FILES = 4 const APD_COPY_FROM_DIRECTORY = 16 const APD_COPY_NEW_FILES = 8 const APD_STRICT_DOWNGRADE = 2 const APD_STRICT_UPGRADE = 1 const APIENTRY = "WINAPI" const APIPRIVATE = "__stdcall" const API_SET_EXTENSION_NAME_A = "EXT-" const API_SET_EXTENSION_NAME_U = "EXT-" const API_SET_HELPER_NAME = 0 const API_SET_LOAD_SCHEMA_ORDINAL = 1 const API_SET_LOOKUP_ORDINAL = 2 const API_SET_PREFIX_NAME_A = "API-" const API_SET_PREFIX_NAME_U = "API-" const API_SET_RELEASE_SCHEMA_ORDINAL = 3 const API_SET_SCHEMA_NAME = 0 const API_SET_SCHEMA_SUFFIX = ".sys" const API_SET_SCHEMA_VERSION = 2 const API_SET_SECTION_NAME = ".apiset" const APPCLASS_MASK = 15 const APPCLASS_MONITOR = 1 const APPCLASS_STANDARD = 0 const APPCMD_CLIENTONLY = 16 const APPCMD_FILTERINITS = 32 const APPCMD_MASK = 4080 const APPCOMMAND_BASS_BOOST = 20 const APPCOMMAND_BASS_DOWN = 19 const APPCOMMAND_BASS_UP = 21 const APPCOMMAND_BROWSER_BACKWARD = 1 const APPCOMMAND_BROWSER_FAVORITES = 6 const APPCOMMAND_BROWSER_FORWARD = 2 const APPCOMMAND_BROWSER_HOME = 7 const APPCOMMAND_BROWSER_REFRESH = 3 const APPCOMMAND_BROWSER_SEARCH = 5 const APPCOMMAND_BROWSER_STOP = 4 const APPCOMMAND_CLOSE = 31 const APPCOMMAND_COPY = 36 const APPCOMMAND_CORRECTION_LIST = 45 const APPCOMMAND_CUT = 37 const APPCOMMAND_DELETE = 53 const APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43 const APPCOMMAND_DWM_FLIP3D = 54 const APPCOMMAND_FIND = 28 const APPCOMMAND_FORWARD_MAIL = 40 const APPCOMMAND_HELP = 27 const APPCOMMAND_LAUNCH_APP1 = 17 const APPCOMMAND_LAUNCH_APP2 = 18 const APPCOMMAND_LAUNCH_MAIL = 15 const APPCOMMAND_LAUNCH_MEDIA_SELECT = 16 const APPCOMMAND_MEDIA_CHANNEL_DOWN = 52 const APPCOMMAND_MEDIA_CHANNEL_UP = 51 const APPCOMMAND_MEDIA_FAST_FORWARD = 49 const APPCOMMAND_MEDIA_NEXTTRACK = 11 const APPCOMMAND_MEDIA_PAUSE = 47 const APPCOMMAND_MEDIA_PLAY = 46 const APPCOMMAND_MEDIA_PLAY_PAUSE = 14 const APPCOMMAND_MEDIA_PREVIOUSTRACK = 12 const APPCOMMAND_MEDIA_RECORD = 48 const APPCOMMAND_MEDIA_REWIND = 50 const APPCOMMAND_MEDIA_STOP = 13 const APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25 const APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24 const APPCOMMAND_MICROPHONE_VOLUME_UP = 26 const APPCOMMAND_MIC_ON_OFF_TOGGLE = 44 const APPCOMMAND_NEW = 29 const APPCOMMAND_OPEN = 30 const APPCOMMAND_PASTE = 38 const APPCOMMAND_PRINT = 33 const APPCOMMAND_REDO = 35 const APPCOMMAND_REPLY_TO_MAIL = 39 const APPCOMMAND_SAVE = 32 const APPCOMMAND_SEND_MAIL = 41 const APPCOMMAND_SPELL_CHECK = 42 const APPCOMMAND_TREBLE_DOWN = 22 const APPCOMMAND_TREBLE_UP = 23 const APPCOMMAND_UNDO = 34 const APPCOMMAND_VOLUME_DOWN = 9 const APPCOMMAND_VOLUME_MUTE = 8 const APPCOMMAND_VOLUME_UP = 10 const APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP = 1 const APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY = 4 const APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY = 32 const APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION = 16 const APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN = 8 const APPIDREGFLAGS_RESERVED1 = 64 const APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND = 2 const APPLICATION_ERROR_MASK = 536870912 const APPLICATION_VERIFIER_ACCESS_VIOLATION = 2 const APPLICATION_VERIFIER_BAD_HEAP_HANDLE = 5 const APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = 1025 const APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = 1034 const APPLICATION_VERIFIER_COM_ERROR = 1024 const APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = 1035 const APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = 1040 const APPLICATION_VERIFIER_COM_NULL_DACL = 1030 const APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = 1036 const APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = 1037 const APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = 1033 const APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = 1032 const APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = 1027 const APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = 1028 const APPLICATION_VERIFIER_COM_UNBALANCED_SWC = 1029 const APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = 1026 const APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = 1031 const APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = 1038 const APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = 1039 const APPLICATION_VERIFIER_CONTINUABLE_BREAK = 268435456 const APPLICATION_VERIFIER_CORRUPTED_FREED_HEAP_BLOCK = 14 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = 8 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_END_STAMP = 17 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_HEADER = 11 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_PROBING = 12 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_HEADER = 13 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_PREFIX = 18 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_START_STAMP = 16 const APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_SUFFIX = 15 const APPLICATION_VERIFIER_CORRUPTED_HEAP_LIST = 20 const APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = 9 const APPLICATION_VERIFIER_DOUBLE_FREE = 7 const APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = 512 const APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = 4 const APPLICATION_VERIFIER_FIRST_CHANCE_ACCESS_VIOLATION = 19 const APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = 770 const APPLICATION_VERIFIER_INTERNAL_ERROR = 2147483648 const APPLICATION_VERIFIER_INTERNAL_WARNING = 1073741824 const APPLICATION_VERIFIER_INVALID_ALLOCMEM = 1537 const APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = 258 const APPLICATION_VERIFIER_INVALID_FREEMEM = 1536 const APPLICATION_VERIFIER_INVALID_HANDLE = 768 const APPLICATION_VERIFIER_INVALID_MAPVIEW = 1538 const APPLICATION_VERIFIER_INVALID_TLS_VALUE = 769 const APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = 529 const APPLICATION_VERIFIER_LOCK_CORRUPTED = 517 const APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = 515 const APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = 520 const APPLICATION_VERIFIER_LOCK_INVALID_OWNER = 518 const APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = 519 const APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = 514 const APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = 516 const APPLICATION_VERIFIER_LOCK_IN_FREED_VMEM = 530 const APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = 513 const APPLICATION_VERIFIER_LOCK_IN_UNMAPPED_MEM = 531 const APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = 528 const APPLICATION_VERIFIER_LOCK_OVER_RELEASED = 521 const APPLICATION_VERIFIER_NO_BREAK = 536870912 const APPLICATION_VERIFIER_NULL_HANDLE = 771 const APPLICATION_VERIFIER_PROBE_FREE_MEM = 1540 const APPLICATION_VERIFIER_PROBE_GUARD_PAGE = 1541 const APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = 1539 const APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = 1543 const APPLICATION_VERIFIER_PROBE_NULL = 1542 const APPLICATION_VERIFIER_RPC_ERROR = 1280 const APPLICATION_VERIFIER_SIZE_HEAP_UNEXPECTED_EXCEPTION = 1560 const APPLICATION_VERIFIER_STACK_OVERFLOW = 257 const APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = 6 const APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = 256 const APPLICATION_VERIFIER_THREAD_NOT_LOCK_OWNER = 532 const APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = 10 const APPLICATION_VERIFIER_UNKNOWN_ERROR = 1 const APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = 3 const APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = 772 const APPMODEL_ERROR_NO_APPLICATION = 15703 const APPMODEL_ERROR_NO_PACKAGE = 15700 const APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT = 15702 const APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT = 15701 const APP_LOCAL_DEVICE_ID_SIZE = 32 const ARABIC_CHARSET = 178 const ARW_BOTTOMLEFT = 0 const ARW_BOTTOMRIGHT = 1 const ARW_DOWN = 4 const ARW_HIDE = 8 const ARW_LEFT = 0 const ARW_RIGHT = 0 const ARW_STARTMASK = 3 const ARW_STARTRIGHT = 1 const ARW_STARTTOP = 2 const ARW_TOPLEFT = 2 const ARW_TOPRIGHT = 3 const ARW_UP = 4 const ASFW_ANY = -1 const ASPECTX = 40 const ASPECTXY = 44 const ASPECTY = 42 const ASPECT_FILTERING = 1 const ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = 0 const ASSERT_ALTERNATE = 9 const ASSERT_PRIMARY = 8 const ASYNCH = 128 const ASYNC_MODE_COMPATIBILITY = 1 const ASYNC_MODE_DEFAULT = 0 const ATAPI_ID_CMD = 161 const ATF_ONOFFFEEDBACK = 2 const ATF_TIMEOUTON = 1 const ATOM_FLAG_GLOBAL = 2 const ATTACH_PARENT_PROCESS = -1 const ATTRIBUTE_SECURITY_INFORMATION = 32 const ATTR_CONVERTED = 2 const ATTR_FIXEDCONVERTED = 5 const ATTR_INPUT = 0 const ATTR_INPUT_ERROR = 4 const ATTR_TARGET_CONVERTED = 1 const ATTR_TARGET_NOTCONVERTED = 3 const AT_KEYEXCHANGE = 1 const AT_SIGNATURE = 2 const AUDIT_ALLOW_NO_PRIVILEGE = 1 const AUTHTYPE_CLIENT = 1 const AUTHTYPE_SERVER = 2 const AUXCAPS_AUXIN = 2 const AUXCAPS_CDAUDIO = 1 const AUXCAPS_LRVOLUME = 2 const AUXCAPS_VOLUME = 1 const AUX_MAPPER = -1 const AW_ACTIVATE = 131072 const AW_BLEND = 524288 const AW_CENTER = 16 const AW_HIDE = 65536 const AW_HOR_NEGATIVE = 2 const AW_HOR_POSITIVE = 1 const AW_SLIDE = 262144 const AW_VER_NEGATIVE = 8 const AW_VER_POSITIVE = 4 const AbnormalTermination = 0 const AbortSystemShutdown = 0 const AccessCheckAndAuditAlarm = 0 const AccessCheckByTypeAndAuditAlarm = 0 const AccessCheckByTypeResultListAndAuditAlarm = 0 const AccessCheckByTypeResultListAndAuditAlarmByHandle = 0 const AddAtom = 0 const AddConsoleAlias = 0 const AddFontResource = 0 const AddFontResourceEx = 0 const AddForm = 0 const AddJob = 0 const AddMonitor = 0 const AddPort = 0 const AddPrintProcessor = 0 const AddPrintProvidor = 0 const AddPrinter = 0 const AddPrinterConnection = 0 const AddPrinterConnection2 = 0 const AddPrinterDriver = 0 const AddPrinterDriverEx = 0 const AdvancedDocumentProperties = 0 const AnsiLower = 0 const AnsiLowerBuff = 0 const AnsiNext = 0 const AnsiPrev = 0 const AnsiToOem = 0 const AnsiToOemBuff = 0 const AnsiUpper = 0 const AnsiUpperBuff = 0 const AppendMenu = 0 const BACKGROUND_BLUE = 16 const BACKGROUND_GREEN = 32 const BACKGROUND_INTENSITY = 128 const BACKGROUND_RED = 64 const BACKUP_ALTERNATE_DATA = 4 const BACKUP_DATA = 1 const BACKUP_EA_DATA = 2 const BACKUP_GHOSTED_FILE_EXTENTS = 11 const BACKUP_INVALID = 0 const BACKUP_LINK = 5 const BACKUP_OBJECT_ID = 7 const BACKUP_PROPERTY_DATA = 6 const BACKUP_REPARSE_DATA = 8 const BACKUP_SECURITY_DATA = 3 const BACKUP_SECURITY_INFORMATION = 65536 const BACKUP_SPARSE_BLOCK = 9 const BACKUP_TXFS_DATA = 10 const BALTIC_CHARSET = 186 const BANDINFO = 24 const BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE = 65536 const BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE = 1 const BASE_SEARCH_PATH_INVALID_FLAGS = -98306 const BASE_SEARCH_PATH_PERMANENT = 32768 const BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG = 2147483648 const BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG = 1073741824 const BATTERY_DISCHARGE_FLAGS_ENABLE = 2147483648 const BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK = 7 const BATTERY_FLAG_CHARGING = 8 const BATTERY_FLAG_CRITICAL = 4 const BATTERY_FLAG_HIGH = 1 const BATTERY_FLAG_LOW = 2 const BATTERY_FLAG_NO_BATTERY = 128 const BATTERY_FLAG_UNKNOWN = 255 const BATTERY_LIFE_UNKNOWN = 4294967295 const BATTERY_PERCENTAGE_UNKNOWN = 255 const BCRYPTBUFFER_VERSION = 0 const BCRYPT_3DES_112_ALGORITHM = "3DES_112" const BCRYPT_3DES_ALGORITHM = "3DES" const BCRYPT_AES_ALGORITHM = "AES" const BCRYPT_AES_CMAC_ALGORITHM = "AES-CMAC" const BCRYPT_AES_GMAC_ALGORITHM = "AES-GMAC" const BCRYPT_AES_WRAP_KEY_BLOB = "Rfc3565KeyWrapBlob" const BCRYPT_ALGORITHM_NAME = "AlgorithmName" const BCRYPT_ALG_HANDLE_HMAC_FLAG = 8 const BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE = 3 const BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 4 const BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION = 1 const BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG = 1 const BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG = 2 const BCRYPT_AUTH_TAG_LENGTH = "AuthTagLength" const BCRYPT_BLOCK_LENGTH = "BlockLength" const BCRYPT_BLOCK_PADDING = 1 const BCRYPT_BLOCK_SIZE_LIST = "BlockSizeList" const BCRYPT_BUFFERS_LOCKED_FLAG = 64 const BCRYPT_CAPI_AES_FLAG = 16 const BCRYPT_CAPI_KDF_ALGORITHM = "CAPI_KDF" const BCRYPT_CHAINING_MODE = "ChainingMode" const BCRYPT_CHAIN_MODE_CBC = "ChainingModeCBC" const BCRYPT_CHAIN_MODE_CCM = "ChainingModeCCM" const BCRYPT_CHAIN_MODE_CFB = "ChainingModeCFB" const BCRYPT_CHAIN_MODE_ECB = "ChainingModeECB" const BCRYPT_CHAIN_MODE_GCM = "ChainingModeGCM" const BCRYPT_CHAIN_MODE_NA = "ChainingModeN/A" const BCRYPT_CIPHER_INTERFACE = 1 const BCRYPT_CIPHER_OPERATION = 1 const BCRYPT_DESX_ALGORITHM = "DESX" const BCRYPT_DES_ALGORITHM = "DES" const BCRYPT_DH_ALGORITHM = "DH" const BCRYPT_DH_PARAMETERS = "DHParameters" const BCRYPT_DH_PARAMETERS_MAGIC = 1297107012 const BCRYPT_DH_PRIVATE_BLOB = "DHPRIVATEBLOB" const BCRYPT_DH_PRIVATE_MAGIC = 1448101956 const BCRYPT_DH_PUBLIC_BLOB = "DHPUBLICBLOB" const BCRYPT_DH_PUBLIC_MAGIC = 1112557636 const BCRYPT_DSA_ALGORITHM = "DSA" const BCRYPT_DSA_PARAMETERS = "DSAParameters" const BCRYPT_DSA_PARAMETERS_MAGIC = 1297109828 const BCRYPT_DSA_PARAMETERS_MAGIC_V2 = 843927620 const BCRYPT_DSA_PRIVATE_BLOB = "DSAPRIVATEBLOB" const BCRYPT_DSA_PRIVATE_MAGIC = 1448104772 const BCRYPT_DSA_PRIVATE_MAGIC_V2 = 844517444 const BCRYPT_DSA_PUBLIC_BLOB = "DSAPUBLICBLOB" const BCRYPT_DSA_PUBLIC_MAGIC = 1112560452 const BCRYPT_DSA_PUBLIC_MAGIC_V2 = 843206724 const BCRYPT_ECCFULLPRIVATE_BLOB = "ECCFULLPRIVATEBLOB" const BCRYPT_ECCFULLPUBLIC_BLOB = "ECCFULLPUBLICBLOB" const BCRYPT_ECCPRIVATE_BLOB = "ECCPRIVATEBLOB" const BCRYPT_ECCPUBLIC_BLOB = "ECCPUBLICBLOB" const BCRYPT_ECDH_P256_ALGORITHM = "ECDH_P256" const BCRYPT_ECDH_P384_ALGORITHM = "ECDH_P384" const BCRYPT_ECDH_P521_ALGORITHM = "ECDH_P521" const BCRYPT_ECDH_PRIVATE_GENERIC_MAGIC = 1447772997 const BCRYPT_ECDH_PRIVATE_P256_MAGIC = 843793221 const BCRYPT_ECDH_PRIVATE_P384_MAGIC = 877347653 const BCRYPT_ECDH_PRIVATE_P521_MAGIC = 910902085 const BCRYPT_ECDH_PUBLIC_GENERIC_MAGIC = 1347109701 const BCRYPT_ECDH_PUBLIC_P256_MAGIC = 827016005 const BCRYPT_ECDH_PUBLIC_P384_MAGIC = 860570437 const BCRYPT_ECDH_PUBLIC_P521_MAGIC = 894124869 const BCRYPT_ECDSA_P256_ALGORITHM = "ECDSA_P256" const BCRYPT_ECDSA_P384_ALGORITHM = "ECDSA_P384" const BCRYPT_ECDSA_P521_ALGORITHM = "ECDSA_P521" const BCRYPT_ECDSA_PRIVATE_GENERIC_MAGIC = 1447314245 const BCRYPT_ECDSA_PRIVATE_P256_MAGIC = 844317509 const BCRYPT_ECDSA_PRIVATE_P384_MAGIC = 877871941 const BCRYPT_ECDSA_PRIVATE_P521_MAGIC = 911426373 const BCRYPT_ECDSA_PUBLIC_GENERIC_MAGIC = 1346650949 const BCRYPT_ECDSA_PUBLIC_P256_MAGIC = 827540293 const BCRYPT_ECDSA_PUBLIC_P384_MAGIC = 861094725 const BCRYPT_ECDSA_PUBLIC_P521_MAGIC = 894649157 const BCRYPT_EFFECTIVE_KEY_LENGTH = "EffectiveKeyLength" const BCRYPT_GLOBAL_PARAMETERS = "SecretAgreementParam" const BCRYPT_HASH_BLOCK_LENGTH = "HashBlockLength" const BCRYPT_HASH_INTERFACE = 2 const BCRYPT_HASH_LENGTH = "HashDigestLength" const BCRYPT_HASH_OID_LIST = "HashOIDList" const BCRYPT_HASH_OPERATION = 2 const BCRYPT_HASH_REUSABLE_FLAG = 32 const BCRYPT_INITIALIZATION_VECTOR = "IV" const BCRYPT_IS_KEYED_HASH = "IsKeyedHash" const BCRYPT_IS_REUSABLE_HASH = "IsReusableHash" const BCRYPT_KDF_HASH = "HASH" const BCRYPT_KDF_HMAC = "HMAC" const BCRYPT_KDF_RAW_SECRET = "TRUNCATE" const BCRYPT_KDF_SP80056A_CONCAT = "SP800_56A_CONCAT" const BCRYPT_KDF_TLS_PRF = "TLS_PRF" const BCRYPT_KEY_DATA_BLOB = "KeyDataBlob" const BCRYPT_KEY_DATA_BLOB_MAGIC = 1296188491 const BCRYPT_KEY_DATA_BLOB_VERSION1 = 1 const BCRYPT_KEY_DERIVATION_INTERFACE = 7 const BCRYPT_KEY_DERIVATION_OPERATION = 64 const BCRYPT_KEY_LENGTH = "KeyLength" const BCRYPT_KEY_LENGTHS = "KeyLengths" const BCRYPT_KEY_OBJECT_LENGTH = "KeyObjectLength" const BCRYPT_KEY_STRENGTH = "KeyStrength" const BCRYPT_MD2_ALGORITHM = "MD2" const BCRYPT_MD4_ALGORITHM = "MD4" const BCRYPT_MD5_ALGORITHM = "MD5" const BCRYPT_MESSAGE_BLOCK_LENGTH = "MessageBlockLength" const BCRYPT_MULTI_OBJECT_LENGTH = "MultiObjectLength" const BCRYPT_NO_KEY_VALIDATION = 8 const BCRYPT_OBJECT_ALIGNMENT = 16 const BCRYPT_OBJECT_LENGTH = "ObjectLength" const BCRYPT_OPAQUE_KEY_BLOB = "OpaqueKeyBlob" const BCRYPT_PADDING_SCHEMES = "PaddingSchemes" const BCRYPT_PAD_NONE = 1 const BCRYPT_PAD_OAEP = 4 const BCRYPT_PAD_PKCS1 = 2 const BCRYPT_PAD_PKCS1_OPTIONAL_HASH_OID = 16 const BCRYPT_PAD_PSS = 8 const BCRYPT_PBKDF2_ALGORITHM = "PBKDF2" const BCRYPT_PCP_PLATFORM_TYPE_PROPERTY = "PCP_PLATFORM_TYPE" const BCRYPT_PCP_PROVIDER_VERSION_PROPERTY = "PCP_PROVIDER_VERSION" const BCRYPT_PRIMITIVE_TYPE = "PrimitiveType" const BCRYPT_PRIVATE_KEY = "PrivKeyVal" const BCRYPT_PRIVATE_KEY_BLOB = "PRIVATEBLOB" const BCRYPT_PRIVATE_KEY_FLAG = 2 const BCRYPT_PROVIDER_HANDLE = "ProviderHandle" const BCRYPT_PROV_DISPATCH = 1 const BCRYPT_PUBLIC_KEY_BLOB = "PUBLICBLOB" const BCRYPT_PUBLIC_KEY_FLAG = 1 const BCRYPT_PUBLIC_KEY_LENGTH = "PublicKeyLength" const BCRYPT_RC2_ALGORITHM = "RC2" const BCRYPT_RC4_ALGORITHM = "RC4" const BCRYPT_RNG_ALGORITHM = "RNG" const BCRYPT_RNG_DUAL_EC_ALGORITHM = "DUALECRNG" const BCRYPT_RNG_FIPS186_DSA_ALGORITHM = "FIPS186DSARNG" const BCRYPT_RNG_INTERFACE = 6 const BCRYPT_RNG_OPERATION = 32 const BCRYPT_RNG_USE_ENTROPY_IN_BUFFER = 1 const BCRYPT_RSAFULLPRIVATE_BLOB = "RSAFULLPRIVATEBLOB" const BCRYPT_RSAFULLPRIVATE_MAGIC = 859919186 const BCRYPT_RSAPRIVATE_BLOB = "RSAPRIVATEBLOB" const BCRYPT_RSAPRIVATE_MAGIC = 843141970 const BCRYPT_RSAPUBLIC_BLOB = "RSAPUBLICBLOB" const BCRYPT_RSAPUBLIC_MAGIC = 826364754 const BCRYPT_RSA_ALGORITHM = "RSA" const BCRYPT_RSA_SIGN_ALGORITHM = "RSA_SIGN" const BCRYPT_SECRET_AGREEMENT_INTERFACE = 4 const BCRYPT_SECRET_AGREEMENT_OPERATION = 8 const BCRYPT_SHA1_ALGORITHM = "SHA1" const BCRYPT_SHA256_ALGORITHM = "SHA256" const BCRYPT_SHA384_ALGORITHM = "SHA384" const BCRYPT_SHA512_ALGORITHM = "SHA512" const BCRYPT_SIGNATURE_INTERFACE = 5 const BCRYPT_SIGNATURE_LENGTH = "SignatureLength" const BCRYPT_SIGNATURE_OPERATION = 16 const BCRYPT_SP800108_CTR_HMAC_ALGORITHM = "SP800_108_CTR_HMAC" const BCRYPT_SP80056A_CONCAT_ALGORITHM = "SP800_56A_CONCAT" const BCRYPT_SUPPORTED_PAD_OAEP = 8 const BCRYPT_SUPPORTED_PAD_PKCS1_ENC = 2 const BCRYPT_SUPPORTED_PAD_PKCS1_SIG = 4 const BCRYPT_SUPPORTED_PAD_PSS = 16 const BCRYPT_SUPPORTED_PAD_ROUTER = 1 const BCRYPT_USE_SYSTEM_PREFERRED_RNG = 2 const BDR_INNER = 12 const BDR_OUTER = 3 const BDR_RAISED = 5 const BDR_RAISEDINNER = 4 const BDR_RAISEDOUTER = 1 const BDR_SUNKEN = 10 const BDR_SUNKENINNER = 8 const BDR_SUNKENOUTER = 2 const BEGIN_PATH = 4096 const BELOW_NORMAL_PRIORITY_CLASS = 16384 const BF_ADJUST = 8192 const BF_BOTTOM = 8 const BF_BOTTOMLEFT = 9 const BF_BOTTOMRIGHT = 12 const BF_DIAGONAL = 16 const BF_DIAGONAL_ENDBOTTOMLEFT = 25 const BF_DIAGONAL_ENDBOTTOMRIGHT = 28 const BF_DIAGONAL_ENDTOPLEFT = 19 const BF_DIAGONAL_ENDTOPRIGHT = 22 const BF_FLAT = 16384 const BF_LEFT = 1 const BF_MIDDLE = 2048 const BF_MONO = 32768 const BF_RECT = 15 const BF_RIGHT = 4 const BF_SOFT = 4096 const BF_TOP = 2 const BF_TOPLEFT = 3 const BF_TOPRIGHT = 6 const BIDI_ACCESS_ADMINISTRATOR = 1 const BIDI_ACCESS_USER = 2 const BIDI_ACTION_ENUM_SCHEMA = "EnumSchema" const BIDI_ACTION_GET = "Get" const BIDI_ACTION_GET_ALL = "GetAll" const BIDI_ACTION_SET = "Set" const BINDF_DONTPUTINCACHE = 0 const BINDF_DONTUSECACHE = 0 const BINDF_NOCOPYDATA = 0 const BITSPIXEL = 12 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BI_BITFIELDS = 3 const BI_JPEG = 4 const BI_PNG = 5 const BI_RGB = 0 const BI_RLE4 = 2 const BI_RLE8 = 1 const BKMODE_LAST = 2 const BLACKONWHITE = 1 const BLACK_BRUSH = 4 const BLACK_PEN = 7 const BLTALIGNMENT = 119 const BM_CLICK = 245 const BM_GETCHECK = 240 const BM_GETIMAGE = 246 const BM_GETSTATE = 242 const BM_SETCHECK = 241 const BM_SETDONTCLICK = 248 const BM_SETIMAGE = 247 const BM_SETSTATE = 243 const BM_SETSTYLE = 244 const BN_CLICKED = 0 const BN_DBLCLK = 5 const BN_DISABLE = 4 const BN_DOUBLECLICKED = 5 const BN_HILITE = 2 const BN_KILLFOCUS = 7 const BN_PAINT = 1 const BN_PUSHED = 2 const BN_SETFOCUS = 6 const BN_UNHILITE = 3 const BN_UNPUSHED = 3 const BOLD_FONTTYPE = 256 const BROADCAST_QUERY_DENY = 1112363332 const BSF_ALLOWSFW = 128 const BSF_FLUSHDISK = 4 const BSF_FORCEIFHUNG = 32 const BSF_IGNORECURRENTTASK = 2 const BSF_LUID = 1024 const BSF_NOHANG = 8 const BSF_NOTIMEOUTIFNOTHUNG = 64 const BSF_POSTMESSAGE = 16 const BSF_QUERY = 1 const BSF_RETURNHDESK = 512 const BSF_SENDNOTIFYMESSAGE = 256 const BSM_ALLCOMPONENTS = 0 const BSM_ALLDESKTOPS = 16 const BSM_APPLICATIONS = 8 const BSM_INSTALLABLEDRIVERS = 4 const BSM_NETDRIVER = 2 const BSM_VXDS = 1 const BST_CHECKED = 1 const BST_FOCUS = 8 const BST_INDETERMINATE = 2 const BST_PUSHED = 4 const BST_UNCHECKED = 0 const BS_3STATE = 5 const BS_AUTO3STATE = 6 const BS_AUTOCHECKBOX = 3 const BS_AUTORADIOBUTTON = 9 const BS_BITMAP = 128 const BS_BOTTOM = 2048 const BS_CENTER = 768 const BS_CHECKBOX = 2 const BS_DEFPUSHBUTTON = 1 const BS_DIBPATTERN = 5 const BS_DIBPATTERN8X8 = 8 const BS_DIBPATTERNPT = 6 const BS_FLAT = 32768 const BS_GROUPBOX = 7 const BS_HATCHED = 2 const BS_HOLLOW = 1 const BS_ICON = 64 const BS_INDEXED = 4 const BS_LEFT = 256 const BS_LEFTTEXT = 32 const BS_MONOPATTERN = 9 const BS_MULTILINE = 8192 const BS_NOTIFY = 16384 const BS_NULL = 1 const BS_OWNERDRAW = 11 const BS_PATTERN = 3 const BS_PATTERN8X8 = 7 const BS_PUSHBOX = 10 const BS_PUSHBUTTON = 0 const BS_PUSHLIKE = 4096 const BS_RADIOBUTTON = 4 const BS_RIGHT = 512 const BS_RIGHTBUTTON = 32 const BS_SOLID = 0 const BS_TEXT = 0 const BS_TOP = 1024 const BS_TYPEMASK = 15 const BS_USERBUTTON = 8 const BS_VCENTER = 3072 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 512 const BackupEventLog = 0 const BeginUpdateResource = 0 const BitScanForward = 0 const BitScanReverse = 0 const BitTest = 0 const BitTestAndComplement = 0 const BitTestAndReset = 0 const BitTestAndSet = 0 const BroadcastSystemMessage = 0 const BroadcastSystemMessageEx = 0 const BuildCommDCB = 0 const BuildCommDCBAndTimeouts = 0 const C1_ALPHA = 256 const C1_BLANK = 64 const C1_CNTRL = 32 const C1_DEFINED = 512 const C1_DIGIT = 4 const C1_LOWER = 2 const C1_PUNCT = 16 const C1_SPACE = 8 const C1_UPPER = 1 const C1_XDIGIT = 128 const C2_ARABICNUMBER = 6 const C2_BLOCKSEPARATOR = 8 const C2_COMMONSEPARATOR = 7 const C2_EUROPENUMBER = 3 const C2_EUROPESEPARATOR = 4 const C2_EUROPETERMINATOR = 5 const C2_LEFTTORIGHT = 1 const C2_NOTAPPLICABLE = 0 const C2_OTHERNEUTRAL = 11 const C2_RIGHTTOLEFT = 2 const C2_SEGMENTSEPARATOR = 9 const C2_WHITESPACE = 10 const C3_ALPHA = 32768 const C3_DIACRITIC = 2 const C3_FULLWIDTH = 128 const C3_HALFWIDTH = 64 const C3_HIGHSURROGATE = 2048 const C3_HIRAGANA = 32 const C3_IDEOGRAPH = 256 const C3_KASHIDA = 512 const C3_KATAKANA = 16 const C3_LEXICAL = 1024 const C3_LOWSURROGATE = 4096 const C3_NONSPACING = 1 const C3_NOTAPPLICABLE = 0 const C3_SYMBOL = 8 const C3_VOWELMARK = 4 const CACHE_E_FIRST = 2147746160 const CACHE_E_LAST = 2147746175 const CACHE_FULLY_ASSOCIATIVE = 255 const CACHE_STALE = 0 const CACHE_S_FIRST = 262512 const CACHE_S_LAST = 262527 const CADV_LATEACK = 65535 const CALERT_SYSTEM = 6 const CALG_3DES = 26115 const CALG_3DES_112 = 26121 const CALG_AES = 26129 const CALG_AES_128 = 26126 const CALG_AES_192 = 26127 const CALG_AES_256 = 26128 const CALG_AGREEDKEY_ANY = 43523 const CALG_CYLINK_MEK = 26124 const CALG_DES = 26113
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go
vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go
// Code generated for darwin/arm64 by 'generator --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /Users/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/darwin/arm64 -I /Users/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/darwin/arm64 -I /Users/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/darwin/arm64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build darwin && arm64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ACCESSPERMS = 511 const ACCESSX_MAX_DESCRIPTORS = 100 const ACCESSX_MAX_TABLESIZE = 16384 const AF_APPLETALK = 16 const AF_CCITT = 10 const AF_CHAOS = 5 const AF_CNT = 21 const AF_COIP = 20 const AF_DATAKIT = 9 const AF_DECnet = 12 const AF_DLI = 13 const AF_E164 = 28 const AF_ECMA = 8 const AF_HYLINK = 15 const AF_IEEE80211 = 37 const AF_IMPLINK = 3 const AF_INET = 2 const AF_INET6 = 30 const AF_IPX = 23 const AF_ISDN = 28 const AF_ISO = 7 const AF_LAT = 14 const AF_LINK = 18 const AF_LOCAL = 1 const AF_MAX = 41 const AF_NATM = 31 const AF_NDRV = 27 const AF_NETBIOS = 33 const AF_NS = 6 const AF_OSI = 7 const AF_PPP = 34 const AF_PUP = 4 const AF_RESERVED_36 = 36 const AF_ROUTE = 17 const AF_SIP = 24 const AF_SNA = 11 const AF_SYSTEM = 32 const AF_UNIX = 1 const AF_UNSPEC = 0 const AF_UTUN = 38 const AF_VSOCK = 40 const ALIGNBYTES = -1 const ALLBITS = -1 const ALLPERMS = 4095 const APPLE_IF_FAM_BOND = 14 const APPLE_IF_FAM_CELLULAR = 15 const APPLE_IF_FAM_DISC = 8 const APPLE_IF_FAM_ETHERNET = 2 const APPLE_IF_FAM_FAITH = 11 const APPLE_IF_FAM_FIREWIRE = 13 const APPLE_IF_FAM_GIF = 10 const APPLE_IF_FAM_IPSEC = 18 const APPLE_IF_FAM_LOOPBACK = 1 const APPLE_IF_FAM_MDECAP = 9 const APPLE_IF_FAM_PPP = 6 const APPLE_IF_FAM_PVC = 7 const APPLE_IF_FAM_SLIP = 3 const APPLE_IF_FAM_STF = 12 const APPLE_IF_FAM_TUN = 4 const APPLE_IF_FAM_UNUSED_16 = 16 const APPLE_IF_FAM_UTUN = 17 const APPLE_IF_FAM_VLAN = 5 const AQ_BUFSZ = 32767 const AQ_HIWATER = 100 const AQ_LOWATER = 10 const AQ_MAXBUFSZ = 1048576 const AQ_MAXHIGH = 10000 const ARG_MAX = 1048576 const ATTRIBUTION_NAME_MAX = 255 const ATTR_BIT_MAP_COUNT = 5 const ATTR_BULK_REQUIRED = 2147483649 const ATTR_CMNEXT_ATTRIBUTION_TAG = 2048 const ATTR_CMNEXT_CLONEID = 256 const ATTR_CMNEXT_CLONE_REFCNT = 4096 const ATTR_CMNEXT_EXT_FLAGS = 512 const ATTR_CMNEXT_LINKID = 16 const ATTR_CMNEXT_NOFIRMLINKPATH = 32 const ATTR_CMNEXT_PRIVATESIZE = 8 const ATTR_CMNEXT_REALDEVID = 64 const ATTR_CMNEXT_REALFSID = 128 const ATTR_CMNEXT_RECURSIVE_GENCOUNT = 1024 const ATTR_CMNEXT_RELPATH = 4 const ATTR_CMNEXT_SETMASK = 0 const ATTR_CMNEXT_VALIDMASK = 8188 const ATTR_CMN_ACCESSMASK = 131072 const ATTR_CMN_ACCTIME = 4096 const ATTR_CMN_ADDEDTIME = 268435456 const ATTR_CMN_BKUPTIME = 8192 const ATTR_CMN_CHGTIME = 2048 const ATTR_CMN_CRTIME = 512 const ATTR_CMN_DATA_PROTECT_FLAGS = 1073741824 const ATTR_CMN_DEVID = 2 const ATTR_CMN_DOCUMENT_ID = 1048576 const ATTR_CMN_ERROR = 536870912 const ATTR_CMN_EXTENDED_SECURITY = 4194304 const ATTR_CMN_FILEID = 33554432 const ATTR_CMN_FLAGS = 262144 const ATTR_CMN_FNDRINFO = 16384 const ATTR_CMN_FSID = 4 const ATTR_CMN_FULLPATH = 134217728 const ATTR_CMN_GEN_COUNT = 524288 const ATTR_CMN_GRPID = 65536 const ATTR_CMN_GRPUUID = 16777216 const ATTR_CMN_MODTIME = 1024 const ATTR_CMN_NAME = 1 const ATTR_CMN_NAMEDATTRCOUNT = 524288 const ATTR_CMN_NAMEDATTRLIST = 1048576 const ATTR_CMN_OBJID = 32 const ATTR_CMN_OBJPERMANENTID = 64 const ATTR_CMN_OBJTAG = 16 const ATTR_CMN_OBJTYPE = 8 const ATTR_CMN_OWNERID = 32768 const ATTR_CMN_PARENTID = 67108864 const ATTR_CMN_PAROBJID = 128 const ATTR_CMN_RETURNED_ATTRS = 2147483648 const ATTR_CMN_SCRIPT = 256 const ATTR_CMN_SETMASK = 1372061440 const ATTR_CMN_USERACCESS = 2097152 const ATTR_CMN_UUID = 8388608 const ATTR_CMN_VALIDMASK = 4294967295 const ATTR_CMN_VOLSETMASK = 26368 const ATTR_DIR_ALLOCSIZE = 8 const ATTR_DIR_DATALENGTH = 32 const ATTR_DIR_ENTRYCOUNT = 2 const ATTR_DIR_IOBLOCKSIZE = 16 const ATTR_DIR_LINKCOUNT = 1 const ATTR_DIR_MOUNTSTATUS = 4 const ATTR_DIR_SETMASK = 0 const ATTR_DIR_VALIDMASK = 63 const ATTR_FILE_ALLOCSIZE = 4 const ATTR_FILE_CLUMPSIZE = 16 const ATTR_FILE_DATAALLOCSIZE = 1024 const ATTR_FILE_DATAEXTENTS = 2048 const ATTR_FILE_DATALENGTH = 512 const ATTR_FILE_DEVTYPE = 32 const ATTR_FILE_FILETYPE = 64 const ATTR_FILE_FORKCOUNT = 128 const ATTR_FILE_FORKLIST = 256 const ATTR_FILE_IOBLOCKSIZE = 8 const ATTR_FILE_LINKCOUNT = 1 const ATTR_FILE_RSRCALLOCSIZE = 8192 const ATTR_FILE_RSRCEXTENTS = 16384 const ATTR_FILE_RSRCLENGTH = 4096 const ATTR_FILE_SETMASK = 32 const ATTR_FILE_TOTALSIZE = 2 const ATTR_FILE_VALIDMASK = 14335 const ATTR_FORK_ALLOCSIZE = 2 const ATTR_FORK_RESERVED = 4294967295 const ATTR_FORK_SETMASK = 0 const ATTR_FORK_TOTALSIZE = 1 const ATTR_FORK_VALIDMASK = 3 const ATTR_MAX_BUFFER = 8192 const ATTR_MAX_BUFFER_LONGPATHS = 7168 const ATTR_VOL_ALLOCATIONCLUMP = 64 const ATTR_VOL_ATTRIBUTES = 1073741824 const ATTR_VOL_CAPABILITIES = 131072 const ATTR_VOL_DIRCOUNT = 1024 const ATTR_VOL_ENCODINGSUSED = 65536 const ATTR_VOL_FILECOUNT = 512 const ATTR_VOL_FSSUBTYPE = 2097152 const ATTR_VOL_FSTYPE = 1 const ATTR_VOL_FSTYPENAME = 1048576 const ATTR_VOL_INFO = 2147483648 const ATTR_VOL_IOBLOCKSIZE = 128 const ATTR_VOL_MAXOBJCOUNT = 2048 const ATTR_VOL_MINALLOCATION = 32 const ATTR_VOL_MOUNTEDDEVICE = 32768 const ATTR_VOL_MOUNTEXTFLAGS = 524288 const ATTR_VOL_MOUNTFLAGS = 16384 const ATTR_VOL_MOUNTPOINT = 4096 const ATTR_VOL_NAME = 8192 const ATTR_VOL_OBJCOUNT = 256 const ATTR_VOL_OWNER = 4194304 const ATTR_VOL_QUOTA_SIZE = 268435456 const ATTR_VOL_RESERVED_SIZE = 536870912 const ATTR_VOL_SETMASK = 2147491840 const ATTR_VOL_SIGNATURE = 2 const ATTR_VOL_SIZE = 4 const ATTR_VOL_SPACEAVAIL = 16 const ATTR_VOL_SPACEFREE = 8 const ATTR_VOL_SPACEUSED = 8388608 const ATTR_VOL_UUID = 262144 const ATTR_VOL_VALIDMASK = 4043309055 const AT_EACCESS = 16 const AT_FDCWD = -2 const AT_FDONLY = 1024 const AT_REALDEV = 512 const AT_REMOVEDIR = 128 const AT_SYMLINK_FOLLOW = 64 const AT_SYMLINK_NOFOLLOW = 32 const AT_SYMLINK_NOFOLLOW_ANY = 2048 const AUC_AUDITING = 1 const AUC_DISABLED = -1 const AUC_NOAUDIT = 2 const AUC_UNSET = 0 const AUDITDEV_FILENAME = "audit" const AUDIT_AHLT = 2 const AUDIT_ARGE = 8 const AUDIT_ARGV = 4 const AUDIT_CNT = 1 const AUDIT_GROUP = 128 const AUDIT_HARD_LIMIT_FREE_BLOCKS = 4 const AUDIT_PATH = 512 const AUDIT_PERZONE = 8192 const AUDIT_PUBLIC = 2048 const AUDIT_RECORD_MAGIC = 2190085915 const AUDIT_SCNT = 1024 const AUDIT_SEQ = 16 const AUDIT_TRAIL = 256 const AUDIT_TRIGGER_CLOSE_AND_DIE = 4 const AUDIT_TRIGGER_EXPIRE_TRAILS = 8 const AUDIT_TRIGGER_INITIALIZE = 7 const AUDIT_TRIGGER_LOW_SPACE = 1 const AUDIT_TRIGGER_MAX = 8 const AUDIT_TRIGGER_MIN = 1 const AUDIT_TRIGGER_NO_SPACE = 5 const AUDIT_TRIGGER_READ_FILE = 3 const AUDIT_TRIGGER_ROTATE_KERNEL = 2 const AUDIT_TRIGGER_ROTATE_USER = 6 const AUDIT_USER = 64 const AUDIT_WINDATA = 32 const AUDIT_ZONENAME = 4096 const AUTH_OPEN_NOAUTHFD = -1 const AU_ASSIGN_ASID = -1 const AU_CLASS_MASK_RESERVED = 268435456 const AU_DEFAUDITSID = 0 const AU_FS_MINFREE = 20 const AU_IPv4 = 4 const AU_IPv6 = 16 const A_GETCAR = 9 const A_GETCLASS = 22 const A_GETCOND = 37 const A_GETCTLMODE = 41 const A_GETCWD = 8 const A_GETEXPAFTER = 43 const A_GETFSIZE = 27 const A_GETKAUDIT = 29 const A_GETKMASK = 4 const A_GETPINFO = 24 const A_GETPINFO_ADDR = 28 const A_GETPOLICY = 33 const A_GETQCTRL = 35 const A_GETSFLAGS = 39 const A_GETSINFO_ADDR = 32 const A_GETSTAT = 12 const A_OLDGETCOND = 20 const A_OLDGETPOLICY = 2 const A_OLDGETQCTRL = 6 const A_OLDSETCOND = 21 const A_OLDSETPOLICY = 3 const A_OLDSETQCTRL = 7 const A_SENDTRIGGER = 31 const A_SETCLASS = 23 const A_SETCOND = 38 const A_SETCTLMODE = 42 const A_SETEXPAFTER = 44 const A_SETFSIZE = 26 const A_SETKAUDIT = 30 const A_SETKMASK = 5 const A_SETPMASK = 25 const A_SETPOLICY = 34 const A_SETQCTRL = 36 const A_SETSFLAGS = 40 const A_SETSMASK = 15 const A_SETSTAT = 13 const A_SETUMASK = 14 const BADSIG = "SIG_ERR" const BC_BASE_MAX = 99 const BC_DIM_MAX = 2048 const BC_SCALE_MAX = 99 const BC_STRING_MAX = 1000 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BLKDEV_IOSIZE = 2048 const BSD = 199506 const BSD4_3 = 1 const BSD4_4 = 1 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BUS_ADRALN = 1 const BUS_ADRERR = 2 const BUS_NOOP = 0 const BUS_OBJERR = 3 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CBLOCK = 64 const CBQSIZE = 8 const CBSIZE = 56 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CHARCLASS_NAME_MAX = 14 const CHILD_MAX = 266 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLBYTES = 4096 const CLD_CONTINUED = 6 const CLD_DUMPED = 3 const CLD_EXITED = 1 const CLD_KILLED = 2 const CLD_NOOP = 0 const CLD_STOPPED = 5 const CLD_TRAPPED = 4 const CLOCK_MONOTONIC = 0 const CLOCK_MONOTONIC_RAW = 0 const CLOCK_MONOTONIC_RAW_APPROX = 0 const CLOCK_PROCESS_CPUTIME_ID = 0 const CLOCK_REALTIME = 0 const CLOCK_THREAD_CPUTIME_ID = 0 const CLOCK_UPTIME_RAW = 0 const CLOCK_UPTIME_RAW_APPROX = 0 const CLOFF = 4095 const CLOFSET = 4095 const CLSHIFT = 12 const CLSIZE = 1 const CLSIZELOG2 = 0 const CMASK = 18 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLL_WEIGHTS_MAX = 2 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CONNECT_DATA_AUTHENTICATED = 4 const CONNECT_DATA_IDEMPOTENT = 2 const CONNECT_RESUME_ON_READ_WRITE = 1 const CPF_IGNORE_MODE = 2 const CPF_MASK = 3 const CPF_OVERWRITE = 1 const CPUMON_MAKE_FATAL = 4096 const CRF_MAC_ENFORCE = 2 const CRF_NOMEMBERD = 1 const CROUND = 63 const CRYPTEX_AUTH_STRUCT_VERSION = 2 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DEFFILEMODE = 438 const DEV_BSHIFT = 9 const DEV_BSIZE = 512 const DIRECT_MODE = 0 const DIR_MNTSTATUS_MNTPOINT = 1 const DIR_MNTSTATUS_TRIGGER = 2 const DOMAIN = 1 const DOTLOCK_SUFFIX = ".lock" const DST_AUST = 2 const DST_CAN = 6 const DST_EET = 5 const DST_MET = 4 const DST_NONE = 0 const DST_USA = 1 const DST_WET = 3 const DYNAMIC_TARGETS_ENABLED = 0 const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 48 const EADDRNOTAVAIL = 49 const EAFNOSUPPORT = 47 const EAGAIN = 35 const EALREADY = 37 const EAUTH = 80 const EBADARCH = 86 const EBADEXEC = 85 const EBADF = 9 const EBADMACHO = 88 const EBADMSG = 94 const EBADRPC = 72 const EBUSY = 16 const ECANCELED = 89 const ECHILD = 10 const ECONNABORTED = 53 const ECONNREFUSED = 61 const ECONNRESET = 54 const EDEADLK = 11 const EDESTADDRREQ = 39 const EDEVERR = 83 const EDOM = 33 const EDQUOT = 69 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EFTYPE = 79 const EF_IS_PURGEABLE = 8 const EF_IS_SPARSE = 16 const EF_IS_SYNC_ROOT = 4 const EF_IS_SYNTHETIC = 32 const EF_MAY_SHARE_BLOCKS = 1 const EF_NO_XATTRS = 2 const EF_SHARES_ALL_BLOCKS = 64 const EHOSTDOWN = 64 const EHOSTUNREACH = 65 const EIDRM = 90 const EILSEQ = 92 const EINPROGRESS = 36 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 56 const EISDIR = 21 const ELAST = 106 const ELOOP = 62 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 40 const EMULTIHOP = 95 const ENAMETOOLONG = 63 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENEEDAUTH = 81 const ENETDOWN = 50 const ENETRESET = 52 const ENETUNREACH = 51 const ENFILE = 23 const ENOATTR = 93 const ENOBUFS = 55 const ENODATA = 96 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOLCK = 77 const ENOLINK = 97 const ENOMEM = 12 const ENOMSG = 91 const ENOPOLICY = 103 const ENOPROTOOPT = 42 const ENOSPC = 28 const ENOSR = 98 const ENOSTR = 99 const ENOSYS = 78 const ENOTBLK = 15 const ENOTCONN = 57 const ENOTDIR = 20 const ENOTEMPTY = 66 const ENOTRECOVERABLE = 104 const ENOTSOCK = 38 const ENOTSUP = 45 const ENOTTY = 25 const ENXIO = 6 const EOF = -1 const EOPNOTSUPP = 102 const EOVERFLOW = 84 const EOWNERDEAD = 105 const EPERM = 1 const EPFNOSUPPORT = 46 const EPIPE = 32 const EPROCLIM = 67 const EPROCUNAVAIL = 76 const EPROGMISMATCH = 75 const EPROGUNAVAIL = 74 const EPROTO = 100 const EPROTONOSUPPORT = 43 const EPROTOTYPE = 41 const EPWROFF = 82 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const EQFULL = 106 const EQUIV_CLASS_MAX = 2 const ERANGE = 34 const EREMOTE = 71 const EROFS = 30 const ERPCMISMATCH = 73 const ESHLIBVERS = 87 const ESHUTDOWN = 58 const ESOCKTNOSUPPORT = 44 const ESPIPE = 29 const ESRCH = 3 const ESTALE = 70 const ETIME = 101 const ETIMEDOUT = 60 const ETOOMANYREFS = 59 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUSERS = 68 const EWOULDBLOCK = 35 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const EXPR_NEST_MAX = 32 const FALSE = 0 const FAPPEND = 8 const FASYNC = 64 const FCNTL_FS_SPECIFIC_BASE = 65536 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFDSYNC = 4194304 const FFSYNC = 128 const FILENAME_MAX = 1024 const FILESEC_GUID = 0 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 4 const FNONBLOCK = 4 const FOOTPRINT_INTERVAL_RESET = 1 const FOPEN_MAX = 20 const FPE_FLTDIV = 1 const FPE_FLTINV = 5 const FPE_FLTOVF = 2 const FPE_FLTRES = 4 const FPE_FLTSUB = 6 const FPE_FLTUND = 3 const FPE_INTDIV = 7 const FPE_INTOVF = 8 const FPE_NOOP = 0 const FP_FAST_FMA = 1 const FP_FAST_FMAF = 1 const FP_FAST_FMAL = 1 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 2 const FP_NAN = 1 const FP_NORMAL = 4 const FP_QNAN = 1 const FP_SNAN = 1 const FP_SUBNORMAL = 5 const FP_SUPERNORMAL = 6 const FP_ZERO = 3 const FREAD = 1 const FSCALE = 2048 const FSCRED = -1 const FSHIFT = 11 const FSOPT_ATTR_CMN_EXTENDED = 32 const FSOPT_NOFOLLOW = 1 const FSOPT_NOFOLLOW_ANY = 2048 const FSOPT_NOINMEMUPDATE = 2 const FSOPT_PACK_INVAL_ATTRS = 8 const FSOPT_REPORT_FULLSIZE = 4 const FSOPT_RETURN_REALDEV = 512 const FST_EOF = -1 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const FWRITE = 2 const F_ADDFILESIGS = 61 const F_ADDFILESIGS_FOR_DYLD_SIM = 83 const F_ADDFILESIGS_INFO = 103 const F_ADDFILESIGS_RETURN = 97 const F_ADDFILESUPPL = 104 const F_ADDSIGS = 59 const F_ADDSIGS_MAIN_BINARY = 113 const F_ALLOCATEALL = 4 const F_ALLOCATECONTIG = 2 const F_ALLOCATEPERSIST = 8 const F_ATTRIBUTION_TAG = 111 const F_BARRIERFSYNC = 85 const F_CHECK_LV = 98 const F_CHKCLEAN = 41 const F_CREATE_TAG = 1 const F_DELETE_TAG = 2 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 67 const F_FINDSIGS = 78 const F_FLUSH_DATA = 40 const F_FREEZE_FS = 53 const F_FULLFSYNC = 51 const F_GETCODEDIR = 72 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 107 const F_GETLK = 7 const F_GETLKPID = 66 const F_GETNOSIGPIPE = 74 const F_GETOWN = 5 const F_GETPATH = 50 const F_GETPATH_MTMINFO = 71 const F_GETPATH_NOFIRMLINK = 102 const F_GETPROTECTIONCLASS = 63 const F_GETPROTECTIONLEVEL = 77 const F_GETSIGSINFO = 105 const F_GLOBAL_NOCACHE = 55 const F_LOCK = 1 const F_LOG2PHYS = 49 const F_LOG2PHYS_EXT = 65 const F_NOCACHE = 48 const F_NODIRECT = 62 const F_OFD_GETLK = 92 const F_OFD_SETLK = 90 const F_OFD_SETLKW = 91 const F_OFD_SETLKWTIMEOUT = 93 const F_OK = 0 const F_PATHPKG_CHECK = 52 const F_PEOFPOSMODE = 3 const F_PREALLOCATE = 42 const F_PUNCHHOLE = 99 const F_QUERY_TAG = 4 const F_RDADVISE = 44 const F_RDAHEAD = 45 const F_RDLCK = 1 const F_SETBACKINGSTORE = 70 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 106 const F_SETLK = 8 const F_SETLKW = 9 const F_SETLKWTIMEOUT = 10 const F_SETNOSIGPIPE = 73 const F_SETOWN = 6 const F_SETPROTECTIONCLASS = 64 const F_SETSIZE = 43 const F_SINGLE_WRITER = 76 const F_SPECULATIVE_READ = 101 const F_TEST = 3 const F_THAW_FS = 54 const F_TLOCK = 2 const F_TRANSCODEKEY = 75 const F_TRANSFEREXTENTS = 110 const F_TRIM_ACTIVE_FILE = 100 const F_ULOCK = 0 const F_UNLCK = 2 const F_VOLPOSMODE = 4 const F_WRLCK = 3 const GCC_VERSION = 4002001 const GEOPOLY_PI = 3.141592653589793 const GETSIGSINFO_PLATFORM_BINARY = 1 const GID_MAX = 2147483647 const GRAFTDMG_SECURE_BOOT_CRYPTEX_ARGS_VERSION = 1 const GUARD_TYPE_MACH_PORT = 1 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 1 const HAVE_LSTAT = 1 const HAVE_MREMAP = 0 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VAL = 0 const HUGE_VALF = 0 const HUGE_VALL = 0 const IFCAP_AV = 256 const IFCAP_CSUM_PARTIAL = 8192 const IFCAP_CSUM_ZERO_INVERT = 16384 const IFCAP_HWCSUM = 3 const IFCAP_HW_TIMESTAMP = 2048 const IFCAP_JUMBO_MTU = 16 const IFCAP_LRO = 128 const IFCAP_LRO_NUM_SEG = 32768 const IFCAP_RXCSUM = 1 const IFCAP_SKYWALK = 1024 const IFCAP_SW_TIMESTAMP = 4096 const IFCAP_TSO = 96 const IFCAP_TSO4 = 32 const IFCAP_TSO6 = 64 const IFCAP_TXCSUM = 2 const IFCAP_TXSTATUS = 512 const IFCAP_VALID = 65535 const IFCAP_VLAN_HWTAGGING = 8 const IFCAP_VLAN_MTU = 4 const IFF_ALLMULTI = 512 const IFF_ALTPHYS = 16384 const IFF_BROADCAST = 2 const IFF_DEBUG = 4 const IFF_LINK0 = 4096 const IFF_LINK1 = 8192 const IFF_LINK2 = 16384 const IFF_LOOPBACK = 8 const IFF_MULTICAST = 32768 const IFF_NOARP = 128 const IFF_NOTRAILERS = 32 const IFF_OACTIVE = 1024 const IFF_POINTOPOINT = 16 const IFF_PROMISC = 256 const IFF_RUNNING = 64 const IFF_SIMPLEX = 2048 const IFF_UP = 1 const IFNAMSIZ = 16 const IFNET_SLOWHZ = 1 const IFQ_DEF_C_TARGET_DELAY = 10000000 const IFQ_DEF_C_UPDATE_INTERVAL = 100000000 const IFQ_DEF_L4S_TARGET_DELAY = 2000000 const IFQ_DEF_L4S_UPDATE_INTERVAL = 100000000 const IFQ_DEF_L4S_WIRELESS_TARGET_DELAY = 15000000 const IFQ_LL_C_TARGET_DELAY = 10000000 const IFQ_LL_C_UPDATE_INTERVAL = 100000000 const IFQ_LL_L4S_TARGET_DELAY = 2000000 const IFQ_LL_L4S_UPDATE_INTERVAL = 100000000 const IFQ_LL_L4S_WIRELESS_TARGET_DELAY = 15000000 const IFQ_MAXLEN = 128 const IFRTYPE_FUNCTIONAL_CELLULAR = 5 const IFRTYPE_FUNCTIONAL_COMPANIONLINK = 7 const IFRTYPE_FUNCTIONAL_INTCOPROC = 6 const IFRTYPE_FUNCTIONAL_LAST = 8 const IFRTYPE_FUNCTIONAL_LOOPBACK = 1 const IFRTYPE_FUNCTIONAL_MANAGEMENT = 8 const IFRTYPE_FUNCTIONAL_UNKNOWN = 0 const IFRTYPE_FUNCTIONAL_WIFI_AWDL = 4 const IFRTYPE_FUNCTIONAL_WIFI_INFRA = 3 const IFRTYPE_FUNCTIONAL_WIRED = 2 const IFSTATMAX = 800 const IF_DATA_TIMEVAL = 0 const IF_MAXMTU = 65535 const IF_MINMTU = 72 const IF_NAMESIZE = 16 const IF_WAKE_ON_MAGIC_PACKET = 1 const ILL_BADSTK = 8 const ILL_COPROC = 7 const ILL_ILLADR = 5 const ILL_ILLOPC = 1 const ILL_ILLOPN = 4 const ILL_ILLTRP = 2 const ILL_NOOP = 0 const ILL_PRVOPC = 3 const ILL_PRVREG = 6 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INT16_MAX = 32767 const INT16_MIN = -32768 const INT32_MAX = 2147483647 const INT32_MIN = -2147483648 const INT64_MAX = 9223372036854775807 const INT64_MIN = -9223372036854775808 const INT8_MAX = 127 const INT8_MIN = -128 const INTERFACE = 1 const INTMAX_MAX = 9223372036854775807 const INTMAX_MIN = -9223372036854775808 const INTPTR_MAX = 9223372036854775807 const INTPTR_MIN = -9223372036854775808 const INT_FAST16_MAX = 32767 const INT_FAST16_MIN = -32768 const INT_FAST32_MAX = 2147483647 const INT_FAST32_MIN = -2147483648 const INT_FAST64_MAX = 9223372036854775807 const INT_FAST64_MIN = -9223372036854775808 const INT_FAST8_MAX = 127 const INT_FAST8_MIN = -128 const INT_LEAST16_MAX = 32767 const INT_LEAST16_MIN = -32768 const INT_LEAST32_MAX = 2147483647 const INT_LEAST32_MIN = -2147483648 const INT_LEAST64_MAX = 9223372036854775807 const INT_LEAST64_MIN = -9223372036854775808 const INT_LEAST8_MAX = 127 const INT_LEAST8_MIN = -128 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const IOCPARM_MASK = 8191 const IOCPARM_MAX = 8192 const IOPOL_APPLICATION = 5 const IOPOL_ATIME_UPDATES_DEFAULT = 0 const IOPOL_ATIME_UPDATES_OFF = 1 const IOPOL_DEFAULT = 0 const IOPOL_IMPORTANT = 1 const IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 const IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 const IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 const IOPOL_NORMAL = 1 const IOPOL_PASSIVE = 2 const IOPOL_SCOPE_DARWIN_BG = 2 const IOPOL_SCOPE_PROCESS = 0 const IOPOL_SCOPE_THREAD = 1 const IOPOL_STANDARD = 5 const IOPOL_THROTTLE = 3 const IOPOL_TYPE_DISK = 0 const IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9 const IOPOL_TYPE_VFS_ATIME_UPDATES = 2 const IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10 const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6 const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7 const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8 const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 const IOPOL_TYPE_VFS_TRIGGER_RESOLVE = 5 const IOPOL_UTILITY = 4 const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0 const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1 const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0 const IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1 const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0 const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1 const IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0 const IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1 const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT = 0 const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON = 1 const IOPOL_VFS_SKIP_MTIME_UPDATE_IGNORE = 2 const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0 const IOPOL_VFS_SKIP_MTIME_UPDATE_ON = 1 const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT = 0 const IOPOL_VFS_TRIGGER_RESOLVE_OFF = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEV_DL_ADDMULTI = 7 const KEV_DL_AWDL_RESTRICTED = 26 const KEV_DL_AWDL_UNRESTRICTED = 27 const KEV_DL_DELMULTI = 8 const KEV_DL_IFCAP_CHANGED = 19 const KEV_DL_IFDELEGATE_CHANGED = 25 const KEV_DL_IF_ATTACHED = 9 const KEV_DL_IF_DETACHED = 11 const KEV_DL_IF_DETACHING = 10 const KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 const KEV_DL_ISSUES = 24 const KEV_DL_LINK_ADDRESS_CHANGED = 16 const KEV_DL_LINK_OFF = 12 const KEV_DL_LINK_ON = 13 const KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 const KEV_DL_LOW_POWER_MODE_CHANGED = 30 const KEV_DL_MASTER_ELECTED = 23 const KEV_DL_NODE_ABSENCE = 22 const KEV_DL_NODE_PRESENCE = 21 const KEV_DL_PRIMARY_ELECTED = 23
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go
vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go
// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_arm.go -trace-translation-units testdata/sqlite-amalgamation-3410200/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ *libc.TLS var _ types.Size_t const ( ACCESSPERMS = 511 ALLPERMS = 4095 AT_EACCESS = 0x0100 AT_EMPTY_PATH = 0x4000 AT_FDCWD = -100 AT_REMOVEDIR = 0x0800 AT_RESOLVE_BENEATH = 0x2000 AT_SYMLINK_FOLLOW = 0x0400 AT_SYMLINK_NOFOLLOW = 0x0200 BIG_ENDIAN = 4321 BITVEC_SZ = 512 BITVEC_SZELEM = 8 BTALLOC_ANY = 0 BTALLOC_EXACT = 1 BTALLOC_LE = 2 BTCF_AtLast = 0x08 BTCF_Incrblob = 0x10 BTCF_Multiple = 0x20 BTCF_Pinned = 0x40 BTCF_ValidNKey = 0x02 BTCF_ValidOvfl = 0x04 BTCF_WriteFlag = 0x01 BTCURSOR_MAX_DEPTH = 20 BTREE_APPEND = 0x08 BTREE_APPLICATION_ID = 8 BTREE_AUTOVACUUM_FULL = 1 BTREE_AUTOVACUUM_INCR = 2 BTREE_AUTOVACUUM_NONE = 0 BTREE_AUXDELETE = 0x04 BTREE_BLOBKEY = 2 BTREE_BULKLOAD = 0x00000001 BTREE_DATA_VERSION = 15 BTREE_DEFAULT_CACHE_SIZE = 3 BTREE_FILE_FORMAT = 2 BTREE_FORDELETE = 0x00000008 BTREE_FREE_PAGE_COUNT = 0 BTREE_HINT_RANGE = 0 BTREE_INCR_VACUUM = 7 BTREE_INTKEY = 1 BTREE_LARGEST_ROOT_PAGE = 4 BTREE_MEMORY = 2 BTREE_OMIT_JOURNAL = 1 BTREE_PREFORMAT = 0x80 BTREE_SAVEPOSITION = 0x02 BTREE_SCHEMA_VERSION = 1 BTREE_SEEK_EQ = 0x00000002 BTREE_SINGLE = 4 BTREE_TEXT_ENCODING = 5 BTREE_UNORDERED = 8 BTREE_USER_VERSION = 6 BTREE_WRCSR = 0x00000004 BTS_EXCLUSIVE = 0x0040 BTS_FAST_SECURE = 0x000c BTS_INITIALLY_EMPTY = 0x0010 BTS_NO_WAL = 0x0020 BTS_OVERWRITE = 0x0008 BTS_PAGESIZE_FIXED = 0x0002 BTS_PENDING = 0x0080 BTS_READ_ONLY = 0x0001 BTS_SECURE_DELETE = 0x0004 BUFSIZ = 1024 BYTE_ORDER = 1234 CACHE_STALE = 0 CC_AND = 24 CC_BANG = 15 CC_BOM = 30 CC_COMMA = 23 CC_DIGIT = 3 CC_DOLLAR = 4 CC_DOT = 26 CC_EQ = 14 CC_GT = 13 CC_ID = 27 CC_ILLEGAL = 28 CC_KYWD = 2 CC_KYWD0 = 1 CC_LP = 17 CC_LT = 12 CC_MINUS = 11 CC_NUL = 29 CC_PERCENT = 22 CC_PIPE = 10 CC_PLUS = 20 CC_QUOTE = 8 CC_QUOTE2 = 9 CC_RP = 18 CC_SEMI = 19 CC_SLASH = 16 CC_SPACE = 7 CC_STAR = 21 CC_TILDA = 25 CC_VARALPHA = 5 CC_VARNUM = 6 CC_X = 0 CKCNSTRNT_COLUMN = 0x01 CKCNSTRNT_ROWID = 0x02 CLK_TCK = 128 CLOCKS_PER_SEC = 128 CLOCK_BOOTTIME = 5 CLOCK_MONOTONIC = 4 CLOCK_MONOTONIC_COARSE = 12 CLOCK_MONOTONIC_FAST = 12 CLOCK_MONOTONIC_PRECISE = 11 CLOCK_PROCESS_CPUTIME_ID = 15 CLOCK_PROF = 2 CLOCK_REALTIME = 0 CLOCK_REALTIME_COARSE = 10 CLOCK_REALTIME_FAST = 10 CLOCK_REALTIME_PRECISE = 9 CLOCK_SECOND = 13 CLOCK_THREAD_CPUTIME_ID = 14 CLOCK_UPTIME = 5 CLOCK_UPTIME_FAST = 8 CLOCK_UPTIME_PRECISE = 7 CLOCK_VIRTUAL = 1 CLOSE_RANGE_CLOEXEC = 4 COLFLAG_BUSY = 0x0100 COLFLAG_GENERATED = 0x0060 COLFLAG_HASCOLL = 0x0200 COLFLAG_HASTYPE = 0x0004 COLFLAG_HIDDEN = 0x0002 COLFLAG_NOEXPAND = 0x0400 COLFLAG_NOINSERT = 0x0062 COLFLAG_NOTAVAIL = 0x0080 COLFLAG_PRIMKEY = 0x0001 COLFLAG_SORTERREF = 0x0010 COLFLAG_STORED = 0x0040 COLFLAG_UNIQUE = 0x0008 COLFLAG_VIRTUAL = 0x0020 COLNAME_COLUMN = 4 COLNAME_DATABASE = 2 COLNAME_DECLTYPE = 1 COLNAME_N = 5 COLNAME_NAME = 0 COLNAME_TABLE = 3 COLTYPE_ANY = 1 COLTYPE_BLOB = 2 COLTYPE_CUSTOM = 0 COLTYPE_INT = 3 COLTYPE_INTEGER = 4 COLTYPE_REAL = 5 COLTYPE_TEXT = 6 CPUCLOCK_WHICH_PID = 0 CPUCLOCK_WHICH_TID = 1 CURSOR_FAULT = 4 CURSOR_INVALID = 1 CURSOR_REQUIRESEEK = 3 CURSOR_SKIPNEXT = 2 CURSOR_VALID = 0 CURTYPE_BTREE = 0 CURTYPE_PSEUDO = 3 CURTYPE_SORTER = 1 CURTYPE_VTAB = 2 DBFLAG_EncodingFixed = 0x0040 DBFLAG_InternalFunc = 0x0020 DBFLAG_PreferBuiltin = 0x0002 DBFLAG_SchemaChange = 0x0001 DBFLAG_SchemaKnownOk = 0x0010 DBFLAG_Vacuum = 0x0004 DBFLAG_VacuumInto = 0x0008 DBSTAT_PAGE_PADDING_BYTES = 256 DB_ResetWanted = 0x0008 DB_SchemaLoaded = 0x0001 DB_UnresetViews = 0x0002 DEFFILEMODE = 438 DIRECT_MODE = 0 DOTLOCK_SUFFIX = ".lock" DST_AUST = 2 DST_CAN = 6 DST_EET = 5 DST_MET = 4 DST_NONE = 0 DST_USA = 1 DST_WET = 3 E2BIG = 7 EACCES = 13 EADDRINUSE = 48 EADDRNOTAVAIL = 49 EAFNOSUPPORT = 47 EAGAIN = 35 EALREADY = 37 EAUTH = 80 EBADF = 9 EBADMSG = 89 EBADRPC = 72 EBUSY = 16 ECANCELED = 85 ECAPMODE = 94 ECHILD = 10 ECONNABORTED = 53 ECONNREFUSED = 61 ECONNRESET = 54 EDEADLK = 11 EDESTADDRREQ = 39 EDOM = 33 EDOOFUS = 88 EDQUOT = 69 EEXIST = 17 EFAULT = 14 EFBIG = 27 EFTYPE = 79 EHOSTDOWN = 64 EHOSTUNREACH = 65 EIDRM = 82 EILSEQ = 86 EINPROGRESS = 36 EINTEGRITY = 97 EINTR = 4 EINVAL = 22 EIO = 5 EISCONN = 56 EISDIR = 21 ELAST = 97 ELOOP = 62 EMFILE = 24 EMLINK = 31 EMSGSIZE = 40 EMULTIHOP = 90 ENAMETOOLONG = 63 ENAME_NAME = 0 ENAME_SPAN = 1 ENAME_TAB = 2 ENEEDAUTH = 81 ENETDOWN = 50 ENETRESET = 52 ENETUNREACH = 51 ENFILE = 23 ENOATTR = 87 ENOBUFS = 55 ENODEV = 19 ENOENT = 2 ENOEXEC = 8 ENOLCK = 77 ENOLINK = 91 ENOMEM = 12 ENOMSG = 83 ENOPROTOOPT = 42 ENOSPC = 28 ENOSYS = 78 ENOTBLK = 15 ENOTCAPABLE = 93 ENOTCONN = 57 ENOTDIR = 20 ENOTEMPTY = 66 ENOTRECOVERABLE = 95 ENOTSOCK = 38 ENOTSUP = 45 ENOTTY = 25 ENXIO = 6 EOF = -1 EOPNOTSUPP = 45 EOVERFLOW = 84 EOWNERDEAD = 96 EPERM = 1 EPFNOSUPPORT = 46 EPIPE = 32 EPROCLIM = 67 EPROCUNAVAIL = 76 EPROGMISMATCH = 75 EPROGUNAVAIL = 74 EPROTO = 92 EPROTONOSUPPORT = 43 EPROTOTYPE = 41 EP_Agg = 0x000010 EP_CanBeNull = 0x200000 EP_Collate = 0x000200 EP_Commuted = 0x000400 EP_ConstFunc = 0x100000 EP_DblQuoted = 0x000080 EP_Distinct = 0x000004 EP_FixedCol = 0x000020 EP_FromDDL = 0x40000000 EP_HasFunc = 0x000008 EP_IfNullRow = 0x040000 EP_Immutable = 0x02 EP_InfixFunc = 0x000100 EP_InnerON = 0x000002 EP_IntValue = 0x000800 EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 EP_Quoted = 0x4000000 EP_Reduced = 0x004000 EP_Skip = 0x002000 EP_Static = 0x8000000 EP_Subquery = 0x400000 EP_Subrtn = 0x2000000 EP_TokenOnly = 0x010000 EP_Unlikely = 0x080000 EP_VarSelect = 0x000040 EP_Win = 0x008000 EP_WinFunc = 0x1000000 EP_xIsSelect = 0x001000 ERANGE = 34 EREMOTE = 71 EROFS = 30 ERPCMISMATCH = 73 ESHUTDOWN = 58 ESOCKTNOSUPPORT = 44 ESPIPE = 29 ESRCH = 3 ESTALE = 70 ETIMEDOUT = 60 ETOOMANYREFS = 59 ETXTBSY = 26 EU4_EXPR = 2 EU4_IDX = 1 EU4_NONE = 0 EUSERS = 68 EWOULDBLOCK = 35 EXCLUDED_TABLE_NUMBER = 2 EXCLUSIVE_LOCK = 4 EXDEV = 18 EXIT_FAILURE = 1 EXIT_SUCCESS = 0 EXPRDUP_REDUCE = 0x0001 FAPPEND = 8 FASYNC = 64 FDSYNC = 16777216 FD_CLOEXEC = 1 FD_NONE = -200 FD_SETSIZE = 1024 FFSYNC = 128 FILENAME_MAX = 1024 FLAG_SIGNED = 1 FLAG_STRING = 4 FNDELAY = 4 FNONBLOCK = 4 FOPEN_MAX = 20 FP_FAST_FMAF = 1 FP_ILOGB0 = -2147483647 FP_ILOGBNAN = 2147483647 FP_INFINITE = 0x01 FP_NAN = 0x02 FP_NORMAL = 0x04 FP_SUBNORMAL = 0x08 FP_ZERO = 0x10 FRDAHEAD = 512 FREAD = 0x0001 FTS5CSR_EOF = 0x01 FTS5CSR_FREE_ZRANK = 0x10 FTS5CSR_REQUIRE_CONTENT = 0x02 FTS5CSR_REQUIRE_DOCSIZE = 0x04 FTS5CSR_REQUIRE_INST = 0x08 FTS5CSR_REQUIRE_POSLIST = 0x40 FTS5CSR_REQUIRE_RESEEK = 0x20 FTS5INDEX_QUERY_DESC = 0x0002 FTS5INDEX_QUERY_NOOUTPUT = 0x0020 FTS5INDEX_QUERY_PREFIX = 0x0001 FTS5INDEX_QUERY_SCAN = 0x0008 FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 FTS5_AND = 2 FTS5_AVERAGES_ROWID = 1 FTS5_BI_MATCH = 0x0001 FTS5_BI_ORDER_DESC = 0x0080 FTS5_BI_ORDER_RANK = 0x0020 FTS5_BI_ORDER_ROWID = 0x0040 FTS5_BI_RANK = 0x0002 FTS5_BI_ROWID_EQ = 0x0004 FTS5_BI_ROWID_GE = 0x0010 FTS5_BI_ROWID_LE = 0x0008 FTS5_CARET = 12 FTS5_COLON = 5 FTS5_COMMA = 13 FTS5_CONTENT_EXTERNAL = 2 FTS5_CONTENT_NONE = 1 FTS5_CONTENT_NORMAL = 0 FTS5_CORRUPT = 267 FTS5_CURRENT_VERSION = 4 FTS5_DATA_DLI_B = 1 FTS5_DATA_HEIGHT_B = 5 FTS5_DATA_ID_B = 16 FTS5_DATA_PADDING = 20 FTS5_DATA_PAGE_B = 31 FTS5_DATA_ZERO_PADDING = 8 FTS5_DEFAULT_AUTOMERGE = 4 FTS5_DEFAULT_CRISISMERGE = 16 FTS5_DEFAULT_HASHSIZE = 1048576 FTS5_DEFAULT_NEARDIST = 10 FTS5_DEFAULT_PAGE_SIZE = 4050 FTS5_DEFAULT_RANK = "bm25" FTS5_DEFAULT_USERMERGE = 4 FTS5_DETAIL_COLUMNS = 2 FTS5_DETAIL_FULL = 0 FTS5_DETAIL_NONE = 1 FTS5_EOF = 0 FTS5_LCP = 7 FTS5_LP = 10 FTS5_MAIN_PREFIX = 48 FTS5_MAX_LEVEL = 64 FTS5_MAX_PAGE_SIZE = 65536 FTS5_MAX_PREFIX_INDEXES = 31 FTS5_MAX_SEGMENT = 2000 FTS5_MAX_TOKEN_SIZE = 32768 FTS5_MERGE_NLIST = 16 FTS5_MINUS = 6 FTS5_MIN_DLIDX_SIZE = 4 FTS5_NOT = 3 FTS5_OPT_WORK_UNIT = 1000 FTS5_OR = 1 FTS5_PATTERN_GLOB = 66 FTS5_PATTERN_LIKE = 65 FTS5_PATTERN_NONE = 0 FTS5_PLAN_MATCH = 1 FTS5_PLAN_ROWID = 6 FTS5_PLAN_SCAN = 5 FTS5_PLAN_SORTED_MATCH = 4 FTS5_PLAN_SOURCE = 2 FTS5_PLAN_SPECIAL = 3 FTS5_PLUS = 14 FTS5_PORTER_MAX_TOKEN = 64 FTS5_RANK_NAME = "rank" FTS5_RCP = 8 FTS5_REMOVE_DIACRITICS_COMPLEX = 2 FTS5_REMOVE_DIACRITICS_NONE = 0 FTS5_REMOVE_DIACRITICS_SIMPLE = 1 FTS5_ROWID_NAME = "rowid" FTS5_RP = 11 FTS5_SEGITER_ONETERM = 0x01 FTS5_SEGITER_REVERSE = 0x02 FTS5_STAR = 15 FTS5_STMT_DELETE_CONTENT = 5 FTS5_STMT_DELETE_DOCSIZE = 7 FTS5_STMT_INSERT_CONTENT = 3 FTS5_STMT_LOOKUP = 2 FTS5_STMT_LOOKUP_DOCSIZE = 8 FTS5_STMT_REPLACE_CONFIG = 9 FTS5_STMT_REPLACE_CONTENT = 4 FTS5_STMT_REPLACE_DOCSIZE = 6 FTS5_STMT_SCAN = 10 FTS5_STMT_SCAN_ASC = 0 FTS5_STMT_SCAN_DESC = 1 FTS5_STRING = 9 FTS5_STRUCTURE_ROWID = 10 FTS5_TERM = 4 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 FTS5_TOKENIZE_QUERY = 0x0001 FTS5_TOKEN_COLOCATED = 0x0001 FTS5_VOCAB_COL = 0 FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" FTS5_VOCAB_INSTANCE = 2 FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" FTS5_VOCAB_ROW = 1 FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" FTS5_VOCAB_TERM_EQ = 0x01 FTS5_VOCAB_TERM_GE = 0x02 FTS5_VOCAB_TERM_LE = 0x04 FTS5_WORK_UNIT = 64 FULLY_WITHIN = 2 FUNC_PERFECT_MATCH = 6 FWRITE = 0x0002 F_ADD_SEALS = 19 F_CANCEL = 5 F_DUP2FD = 10 F_DUP2FD_CLOEXEC = 18 F_DUPFD = 0 F_DUPFD_CLOEXEC = 17 F_GETFD = 1 F_GETFL = 3 F_GETLK = 11 F_GETOWN = 5 F_GET_SEALS = 20 F_ISUNIONSTACK = 21 F_KINFO = 22 F_LOCK = 1 F_OGETLK = 7 F_OK = 0 F_OSETLK = 8 F_OSETLKW = 9 F_RDAHEAD = 16 F_RDLCK = 1 F_READAHEAD = 15 F_SEAL_GROW = 0x0004 F_SEAL_SEAL = 0x0001 F_SEAL_SHRINK = 0x0002 F_SEAL_WRITE = 0x0008 F_SETFD = 2 F_SETFL = 4 F_SETLK = 12 F_SETLKW = 13 F_SETLK_REMOTE = 14 F_SETOWN = 6 F_TEST = 3 F_TLOCK = 2 F_ULOCK = 0 F_UNLCK = 2 F_UNLCKSYS = 4 F_WRLCK = 3 GCC_VERSION = 4002001 GEOPOLY_PI = 3.1415926535897932385 H4DISC = 7 HASHSIZE = 97 HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 HAVE_FCHMOD = 0 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 HAVE_LSTAT = 1 HAVE_MREMAP = 0 HAVE_READLINK = 1 HAVE_USLEEP = 1 INCRINIT_NORMAL = 0 INCRINIT_ROOT = 2 INCRINIT_TASK = 1 INHERIT_COPY = 1 INHERIT_NONE = 2 INHERIT_SHARE = 0 INHERIT_ZERO = 3 INITFLAG_AlterAdd = 0x0003 INITFLAG_AlterDrop = 0x0002 INITFLAG_AlterMask = 0x0003 INITFLAG_AlterRename = 0x0001 INLINEFUNC_affinity = 4 INLINEFUNC_coalesce = 0 INLINEFUNC_expr_compare = 3 INLINEFUNC_expr_implies_expr = 2 INLINEFUNC_iif = 5 INLINEFUNC_implies_nonnull_row = 1 INLINEFUNC_sqlite_offset = 6 INLINEFUNC_unlikely = 99 INTERFACE = 1 IN_INDEX_EPH = 2 IN_INDEX_INDEX_ASC = 3 IN_INDEX_INDEX_DESC = 4 IN_INDEX_LOOP = 0x0004 IN_INDEX_MEMBERSHIP = 0x0002 IN_INDEX_NOOP = 5 IN_INDEX_NOOP_OK = 0x0001 IN_INDEX_ROWID = 1 IOCPARM_MASK = 8191 IOCPARM_MAX = 8192 IOCPARM_SHIFT = 13 IOC_DIRMASK = 3758096384 IOC_IN = 0x80000000 IOC_INOUT = 3221225472 IOC_OUT = 0x40000000 IOC_VOID = 0x20000000 ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 IsStat4 = 1 JEACH_ATOM = 3 JEACH_FULLKEY = 6 JEACH_ID = 4 JEACH_JSON = 8 JEACH_KEY = 0 JEACH_PARENT = 5 JEACH_PATH = 7 JEACH_ROOT = 9 JEACH_TYPE = 2 JEACH_VALUE = 1 JNODE_APPEND = 0x20 JNODE_ESCAPE = 0x02 JNODE_LABEL = 0x40 JNODE_PATCH = 0x10 JNODE_RAW = 0x01 JNODE_REMOVE = 0x04 JNODE_REPLACE = 0x08 JSON_ABPATH = 0x03 JSON_ARRAY = 6 JSON_CACHE_ID = -429938 JSON_CACHE_SZ = 4 JSON_FALSE = 2 JSON_INT = 3 JSON_ISSET = 0x04 JSON_JSON = 0x01 JSON_MAX_DEPTH = 2000 JSON_NULL = 0 JSON_OBJECT = 7 JSON_REAL = 4 JSON_SQL = 0x02 JSON_STRING = 5 JSON_SUBTYPE = 74 JSON_TRUE = 1 JT_CROSS = 0x02 JT_ERROR = 0x80 JT_INNER = 0x01 JT_LEFT = 0x08 JT_LTORJ = 0x40 JT_NATURAL = 0x04 JT_OUTER = 0x20 JT_RIGHT = 0x10 KEYINFO_ORDER_BIGNULL = 0x02 KEYINFO_ORDER_DESC = 0x01 LEGACY_SCHEMA_TABLE = "sqlite_master" LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" LITTLE_ENDIAN = 1234 LOCATE_NOERR = 0x02 LOCATE_VIEW = 0x01 LOCK_EX = 0x02 LOCK_NB = 0x04 LOCK_SH = 0x01 LOCK_UN = 0x08 LOOKASIDE_SMALL = 128 L_INCR = 1 L_SET = 0 L_XTND = 2 L_ctermid = 1024 L_cuserid = 17 L_tmpnam = 1024 M10d_Any = 1 M10d_No = 2 M10d_Yes = 0 MADV_AUTOSYNC = 7 MADV_CORE = 9 MADV_DONTNEED = 4 MADV_FREE = 5 MADV_NOCORE = 8 MADV_NORMAL = 0 MADV_NOSYNC = 6 MADV_PROTECT = 10 MADV_RANDOM = 1 MADV_SEQUENTIAL = 2 MADV_WILLNEED = 3 MAP_ALIGNED_SUPER = 16777216 MAP_ALIGNMENT_MASK = 4278190080 MAP_ALIGNMENT_SHIFT = 24 MAP_ANON = 0x1000 MAP_ANONYMOUS = 4096 MAP_COPY = 2 MAP_EXCL = 0x00004000 MAP_FILE = 0x0000 MAP_FIXED = 0x0010 MAP_GUARD = 0x00002000 MAP_HASSEMAPHORE = 0x0200 MAP_NOCORE = 0x00020000 MAP_NOSYNC = 0x0800 MAP_PREFAULT_READ = 0x00040000 MAP_PRIVATE = 0x0002 MAP_RESERVED0020 = 0x0020 MAP_RESERVED0040 = 0x0040 MAP_RESERVED0080 = 0x0080 MAP_RESERVED0100 = 0x0100 MAP_SHARED = 0x0001 MAP_STACK = 0x0400 MATH_ERREXCEPT = 2 MATH_ERRNO = 1 MAX_PATHNAME = 512 MAX_SECTOR_SIZE = 0x10000 MCL_CURRENT = 0x0001 MCL_FUTURE = 0x0002 MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 MEMTYPE_HEAP = 0x01 MEMTYPE_LOOKASIDE = 0x02 MEMTYPE_PCACHE = 0x04 MEM_AffMask = 0x003f MEM_Agg = 0x8000 MEM_Blob = 0x0010 MEM_Cleared = 0x0100 MEM_Dyn = 0x1000 MEM_Ephem = 0x4000 MEM_FromBind = 0x0040 MEM_Int = 0x0004 MEM_IntReal = 0x0020 MEM_Null = 0x0001 MEM_Real = 0x0008 MEM_Static = 0x2000 MEM_Str = 0x0002 MEM_Subtype = 0x0800 MEM_Term = 0x0200 MEM_TypeMask = 0x0dbf MEM_Undefined = 0x0000 MEM_Zero = 0x0400 MFD_ALLOW_SEALING = 0x00000002 MFD_CLOEXEC = 0x00000001 MFD_HUGETLB = 0x00000004 MFD_HUGE_16GB = 2281701376 MFD_HUGE_16MB = 1610612736 MFD_HUGE_1GB = 2013265920 MFD_HUGE_1MB = 1342177280 MFD_HUGE_256MB = 1879048192 MFD_HUGE_2GB = 2080374784 MFD_HUGE_2MB = 1409286144 MFD_HUGE_32MB = 1677721600 MFD_HUGE_512KB = 1275068416 MFD_HUGE_512MB = 1946157056 MFD_HUGE_64KB = 1073741824 MFD_HUGE_8MB = 1543503872 MFD_HUGE_MASK = 0xFC000000 MFD_HUGE_SHIFT = 26 MINCORE_INCORE = 0x1 MINCORE_MODIFIED = 0x4 MINCORE_MODIFIED_OTHER = 0x10
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go
vendor/modernc.org/sqlite/lib/sqlite_linux_loong64.go
// Code generated for linux/loong64 by 'generator --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/cznic/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/loong64 -I /home/cznic/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/loong64 -I /home/cznic/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/loong64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && loong64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOQSIZE = 21600 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_FAST_FMA = 1 const FP_FAST_FMAF = 1 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 5 const F_GETLK64 = 5 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 6 const F_SETLK64 = 6 const F_SETLKW = 7 const F_SETLKW64 = 7 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 14002001 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 16384 const O_DIRECTORY = 65536 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 32768 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 131072 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4259840 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go
vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go
// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3410200/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ *libc.TLS var _ types.Size_t const ( ACCESSPERMS = 511 ALLPERMS = 4095 AT_EACCESS = 0x01 AT_FDCWD = -100 AT_REMOVEDIR = 0x08 AT_SYMLINK_FOLLOW = 0x04 AT_SYMLINK_NOFOLLOW = 0x02 BIG_ENDIAN = 4321 BITVEC_SZ = 512 BITVEC_SZELEM = 8 BTALLOC_ANY = 0 BTALLOC_EXACT = 1 BTALLOC_LE = 2 BTCF_AtLast = 0x08 BTCF_Incrblob = 0x10 BTCF_Multiple = 0x20 BTCF_Pinned = 0x40 BTCF_ValidNKey = 0x02 BTCF_ValidOvfl = 0x04 BTCF_WriteFlag = 0x01 BTCURSOR_MAX_DEPTH = 20 BTREE_APPEND = 0x08 BTREE_APPLICATION_ID = 8 BTREE_AUTOVACUUM_FULL = 1 BTREE_AUTOVACUUM_INCR = 2 BTREE_AUTOVACUUM_NONE = 0 BTREE_AUXDELETE = 0x04 BTREE_BLOBKEY = 2 BTREE_BULKLOAD = 0x00000001 BTREE_DATA_VERSION = 15 BTREE_DEFAULT_CACHE_SIZE = 3 BTREE_FILE_FORMAT = 2 BTREE_FORDELETE = 0x00000008 BTREE_FREE_PAGE_COUNT = 0 BTREE_HINT_RANGE = 0 BTREE_INCR_VACUUM = 7 BTREE_INTKEY = 1 BTREE_LARGEST_ROOT_PAGE = 4 BTREE_MEMORY = 2 BTREE_OMIT_JOURNAL = 1 BTREE_PREFORMAT = 0x80 BTREE_SAVEPOSITION = 0x02 BTREE_SCHEMA_VERSION = 1 BTREE_SEEK_EQ = 0x00000002 BTREE_SINGLE = 4 BTREE_TEXT_ENCODING = 5 BTREE_UNORDERED = 8 BTREE_USER_VERSION = 6 BTREE_WRCSR = 0x00000004 BTS_EXCLUSIVE = 0x0040 BTS_FAST_SECURE = 0x000c BTS_INITIALLY_EMPTY = 0x0010 BTS_NO_WAL = 0x0020 BTS_OVERWRITE = 0x0008 BTS_PAGESIZE_FIXED = 0x0002 BTS_PENDING = 0x0080 BTS_READ_ONLY = 0x0001 BTS_SECURE_DELETE = 0x0004 BUFSIZ = 1024 BYTE_ORDER = 1234 CACHE_STALE = 0 CC_AND = 24 CC_BANG = 15 CC_BOM = 30 CC_COMMA = 23 CC_DIGIT = 3 CC_DOLLAR = 4 CC_DOT = 26 CC_EQ = 14 CC_GT = 13 CC_ID = 27 CC_ILLEGAL = 28 CC_KYWD = 2 CC_KYWD0 = 1 CC_LP = 17 CC_LT = 12 CC_MINUS = 11 CC_NUL = 29 CC_PERCENT = 22 CC_PIPE = 10 CC_PLUS = 20 CC_QUOTE = 8 CC_QUOTE2 = 9 CC_RP = 18 CC_SEMI = 19 CC_SLASH = 16 CC_SPACE = 7 CC_STAR = 21 CC_TILDA = 25 CC_VARALPHA = 5 CC_VARNUM = 6 CC_X = 0 CHAR_BIT = 8 CHAR_MAX = 0xff CHAR_MIN = 0 CKCNSTRNT_COLUMN = 0x01 CKCNSTRNT_ROWID = 0x02 CLK_TCK = 100 CLOCKS_PER_SEC = 100 CLOCK_BOOTTIME = 6 CLOCK_MONOTONIC = 3 CLOCK_PROCESS_CPUTIME_ID = 2 CLOCK_REALTIME = 0 CLOCK_THREAD_CPUTIME_ID = 4 CLOCK_UPTIME = 5 COLFLAG_BUSY = 0x0100 COLFLAG_GENERATED = 0x0060 COLFLAG_HASCOLL = 0x0200 COLFLAG_HASTYPE = 0x0004 COLFLAG_HIDDEN = 0x0002 COLFLAG_NOEXPAND = 0x0400 COLFLAG_NOINSERT = 0x0062 COLFLAG_NOTAVAIL = 0x0080 COLFLAG_PRIMKEY = 0x0001 COLFLAG_SORTERREF = 0x0010 COLFLAG_STORED = 0x0040 COLFLAG_UNIQUE = 0x0008 COLFLAG_VIRTUAL = 0x0020 COLNAME_COLUMN = 4 COLNAME_DATABASE = 2 COLNAME_DECLTYPE = 1 COLNAME_N = 5 COLNAME_NAME = 0 COLNAME_TABLE = 3 COLTYPE_ANY = 1 COLTYPE_BLOB = 2 COLTYPE_CUSTOM = 0 COLTYPE_INT = 3 COLTYPE_INTEGER = 4 COLTYPE_REAL = 5 COLTYPE_TEXT = 6 CURSOR_FAULT = 4 CURSOR_INVALID = 1 CURSOR_REQUIRESEEK = 3 CURSOR_SKIPNEXT = 2 CURSOR_VALID = 0 CURTYPE_BTREE = 0 CURTYPE_PSEUDO = 3 CURTYPE_SORTER = 1 CURTYPE_VTAB = 2 DBFLAG_EncodingFixed = 0x0040 DBFLAG_InternalFunc = 0x0020 DBFLAG_PreferBuiltin = 0x0002 DBFLAG_SchemaChange = 0x0001 DBFLAG_SchemaKnownOk = 0x0010 DBFLAG_Vacuum = 0x0004 DBFLAG_VacuumInto = 0x0008 DBSTAT_PAGE_PADDING_BYTES = 256 DB_ResetWanted = 0x0008 DB_SchemaLoaded = 0x0001 DB_UnresetViews = 0x0002 DEFFILEMODE = 438 DIRECT_MODE = 0 DL_GETERRNO = 1 DL_LAZY = 1 DL_REFERENCE = 4 DL_SETBINDLCK = 3 DL_SETTHREADLCK = 2 DOTLOCK_SUFFIX = ".lock" DST_AUST = 2 DST_CAN = 6 DST_EET = 5 DST_MET = 4 DST_NONE = 0 DST_USA = 1 DST_WET = 3 E2BIG = 7 EACCES = 13 EADDRINUSE = 48 EADDRNOTAVAIL = 49 EAFNOSUPPORT = 47 EAGAIN = 35 EALREADY = 37 EAUTH = 80 EBADF = 9 EBADMSG = 92 EBADRPC = 72 EBUSY = 16 ECANCELED = 88 ECHILD = 10 ECONNABORTED = 53 ECONNREFUSED = 61 ECONNRESET = 54 EDEADLK = 11 EDESTADDRREQ = 39 EDOM = 33 EDQUOT = 69 EEXIST = 17 EFAULT = 14 EFBIG = 27 EFTYPE = 79 EHOSTDOWN = 64 EHOSTUNREACH = 65 EIDRM = 89 EILSEQ = 84 EINPROGRESS = 36 EINTR = 4 EINVAL = 22 EIO = 5 EIPSEC = 82 EISCONN = 56 EISDIR = 21 ELAST = 95 ELOOP = 62 EMEDIUMTYPE = 86 EMFILE = 24 EMLINK = 31 EMSGSIZE = 40 ENAMETOOLONG = 63 ENAME_NAME = 0 ENAME_SPAN = 1 ENAME_TAB = 2 ENDRUNDISC = 9 ENEEDAUTH = 81 ENETDOWN = 50 ENETRESET = 52 ENETUNREACH = 51 ENFILE = 23 ENOATTR = 83 ENOBUFS = 55 ENODEV = 19 ENOENT = 2 ENOEXEC = 8 ENOLCK = 77 ENOMEDIUM = 85 ENOMEM = 12 ENOMSG = 90 ENOPROTOOPT = 42 ENOSPC = 28 ENOSYS = 78 ENOTBLK = 15 ENOTCONN = 57 ENOTDIR = 20 ENOTEMPTY = 66 ENOTRECOVERABLE = 93 ENOTSOCK = 38 ENOTSUP = 91 ENOTTY = 25 ENXIO = 6 EOF = -1 EOPNOTSUPP = 45 EOVERFLOW = 87 EOWNERDEAD = 94 EPERM = 1 EPFNOSUPPORT = 46 EPIPE = 32 EPROCLIM = 67 EPROCUNAVAIL = 76 EPROGMISMATCH = 75 EPROGUNAVAIL = 74 EPROTO = 95 EPROTONOSUPPORT = 43 EPROTOTYPE = 41 EP_Agg = 0x000010 EP_CanBeNull = 0x200000 EP_Collate = 0x000200 EP_Commuted = 0x000400 EP_ConstFunc = 0x100000 EP_DblQuoted = 0x000080 EP_Distinct = 0x000004 EP_FixedCol = 0x000020 EP_FromDDL = 0x40000000 EP_HasFunc = 0x000008 EP_IfNullRow = 0x040000 EP_Immutable = 0x02 EP_InfixFunc = 0x000100 EP_InnerON = 0x000002 EP_IntValue = 0x000800 EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 EP_Quoted = 0x4000000 EP_Reduced = 0x004000 EP_Skip = 0x002000 EP_Static = 0x8000000 EP_Subquery = 0x400000 EP_Subrtn = 0x2000000 EP_TokenOnly = 0x010000 EP_Unlikely = 0x080000 EP_VarSelect = 0x000040 EP_Win = 0x008000 EP_WinFunc = 0x1000000 EP_xIsSelect = 0x001000 ERANGE = 34 EREMOTE = 71 EROFS = 30 ERPCMISMATCH = 73 ESHUTDOWN = 58 ESOCKTNOSUPPORT = 44 ESPIPE = 29 ESRCH = 3 ESTALE = 70 ETIMEDOUT = 60 ETOOMANYREFS = 59 ETXTBSY = 26 EU4_EXPR = 2 EU4_IDX = 1 EU4_NONE = 0 EUSERS = 68 EWOULDBLOCK = 35 EXCLUDED_TABLE_NUMBER = 2 EXCLUSIVE_LOCK = 4 EXDEV = 18 EXIT_FAILURE = 1 EXIT_SUCCESS = 0 EXPRDUP_REDUCE = 0x0001 FAPPEND = 8 FASYNC = 64 FD_CLOEXEC = 1 FD_SETSIZE = 1024 FFSYNC = 128 FILENAME_MAX = 1024 FLAG_SIGNED = 1 FLAG_STRING = 4 FNDELAY = 4 FNONBLOCK = 4 FOPEN_MAX = 20 FP_ILOGB0 = -2147483647 FP_ILOGBNAN = 2147483647 FP_INFINITE = 0x01 FP_NAN = 0x02 FP_NORMAL = 0x04 FP_SUBNORMAL = 0x08 FP_ZERO = 0x10 FREAD = 0x0001 FTS5CSR_EOF = 0x01 FTS5CSR_FREE_ZRANK = 0x10 FTS5CSR_REQUIRE_CONTENT = 0x02 FTS5CSR_REQUIRE_DOCSIZE = 0x04 FTS5CSR_REQUIRE_INST = 0x08 FTS5CSR_REQUIRE_POSLIST = 0x40 FTS5CSR_REQUIRE_RESEEK = 0x20 FTS5INDEX_QUERY_DESC = 0x0002 FTS5INDEX_QUERY_NOOUTPUT = 0x0020 FTS5INDEX_QUERY_PREFIX = 0x0001 FTS5INDEX_QUERY_SCAN = 0x0008 FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 FTS5_AND = 2 FTS5_AVERAGES_ROWID = 1 FTS5_BI_MATCH = 0x0001 FTS5_BI_ORDER_DESC = 0x0080 FTS5_BI_ORDER_RANK = 0x0020 FTS5_BI_ORDER_ROWID = 0x0040 FTS5_BI_RANK = 0x0002 FTS5_BI_ROWID_EQ = 0x0004 FTS5_BI_ROWID_GE = 0x0010 FTS5_BI_ROWID_LE = 0x0008 FTS5_CARET = 12 FTS5_COLON = 5 FTS5_COMMA = 13 FTS5_CONTENT_EXTERNAL = 2 FTS5_CONTENT_NONE = 1 FTS5_CONTENT_NORMAL = 0 FTS5_CORRUPT = 267 FTS5_CURRENT_VERSION = 4 FTS5_DATA_DLI_B = 1 FTS5_DATA_HEIGHT_B = 5 FTS5_DATA_ID_B = 16 FTS5_DATA_PADDING = 20 FTS5_DATA_PAGE_B = 31 FTS5_DATA_ZERO_PADDING = 8 FTS5_DEFAULT_AUTOMERGE = 4 FTS5_DEFAULT_CRISISMERGE = 16 FTS5_DEFAULT_HASHSIZE = 1048576 FTS5_DEFAULT_NEARDIST = 10 FTS5_DEFAULT_PAGE_SIZE = 4050 FTS5_DEFAULT_RANK = "bm25" FTS5_DEFAULT_USERMERGE = 4 FTS5_DETAIL_COLUMNS = 2 FTS5_DETAIL_FULL = 0 FTS5_DETAIL_NONE = 1 FTS5_EOF = 0 FTS5_LCP = 7 FTS5_LP = 10 FTS5_MAIN_PREFIX = 48 FTS5_MAX_LEVEL = 64 FTS5_MAX_PAGE_SIZE = 65536 FTS5_MAX_PREFIX_INDEXES = 31 FTS5_MAX_SEGMENT = 2000 FTS5_MAX_TOKEN_SIZE = 32768 FTS5_MERGE_NLIST = 16 FTS5_MINUS = 6 FTS5_MIN_DLIDX_SIZE = 4 FTS5_NOT = 3 FTS5_OPT_WORK_UNIT = 1000 FTS5_OR = 1 FTS5_PATTERN_GLOB = 66 FTS5_PATTERN_LIKE = 65 FTS5_PATTERN_NONE = 0 FTS5_PLAN_MATCH = 1 FTS5_PLAN_ROWID = 6 FTS5_PLAN_SCAN = 5 FTS5_PLAN_SORTED_MATCH = 4 FTS5_PLAN_SOURCE = 2 FTS5_PLAN_SPECIAL = 3 FTS5_PLUS = 14 FTS5_PORTER_MAX_TOKEN = 64 FTS5_RANK_NAME = "rank" FTS5_RCP = 8 FTS5_REMOVE_DIACRITICS_COMPLEX = 2 FTS5_REMOVE_DIACRITICS_NONE = 0 FTS5_REMOVE_DIACRITICS_SIMPLE = 1 FTS5_ROWID_NAME = "rowid" FTS5_RP = 11 FTS5_SEGITER_ONETERM = 0x01 FTS5_SEGITER_REVERSE = 0x02 FTS5_STAR = 15 FTS5_STMT_DELETE_CONTENT = 5 FTS5_STMT_DELETE_DOCSIZE = 7 FTS5_STMT_INSERT_CONTENT = 3 FTS5_STMT_LOOKUP = 2 FTS5_STMT_LOOKUP_DOCSIZE = 8 FTS5_STMT_REPLACE_CONFIG = 9 FTS5_STMT_REPLACE_CONTENT = 4 FTS5_STMT_REPLACE_DOCSIZE = 6 FTS5_STMT_SCAN = 10 FTS5_STMT_SCAN_ASC = 0 FTS5_STMT_SCAN_DESC = 1 FTS5_STRING = 9 FTS5_STRUCTURE_ROWID = 10 FTS5_TERM = 4 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 FTS5_TOKENIZE_QUERY = 0x0001 FTS5_TOKEN_COLOCATED = 0x0001 FTS5_VOCAB_COL = 0 FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" FTS5_VOCAB_INSTANCE = 2 FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" FTS5_VOCAB_ROW = 1 FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" FTS5_VOCAB_TERM_EQ = 0x01 FTS5_VOCAB_TERM_GE = 0x02 FTS5_VOCAB_TERM_LE = 0x04 FTS5_WORK_UNIT = 64 FULLY_WITHIN = 2 FUNC_PERFECT_MATCH = 6 FWRITE = 0x0002 F_DUPFD = 0 F_DUPFD_CLOEXEC = 10 F_GETFD = 1 F_GETFL = 3 F_GETLK = 7 F_GETOWN = 5 F_ISATTY = 11 F_LOCK = 1 F_OK = 0 F_RDLCK = 1 F_SETFD = 2 F_SETFL = 4 F_SETLK = 8 F_SETLKW = 9 F_SETOWN = 6 F_TEST = 3 F_TLOCK = 2 F_ULOCK = 0 F_UNLCK = 2 F_WRLCK = 3 GCC_VERSION = 4002001 GEOPOLY_PI = 3.1415926535897932385 GID_MAX = 4294967295 HASHSIZE = 97 HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 HAVE_FCHMOD = 0 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 HAVE_LSTAT = 1 HAVE_MREMAP = 0 HAVE_READLINK = 1 HAVE_USLEEP = 1 INCRINIT_NORMAL = 0 INCRINIT_ROOT = 2 INCRINIT_TASK = 1 INITFLAG_AlterAdd = 0x0003 INITFLAG_AlterDrop = 0x0002 INITFLAG_AlterMask = 0x0003 INITFLAG_AlterRename = 0x0001 INLINEFUNC_affinity = 4 INLINEFUNC_coalesce = 0 INLINEFUNC_expr_compare = 3 INLINEFUNC_expr_implies_expr = 2 INLINEFUNC_iif = 5 INLINEFUNC_implies_nonnull_row = 1 INLINEFUNC_sqlite_offset = 6 INLINEFUNC_unlikely = 99 INTERFACE = 1 INT_MAX = 0x7fffffff INT_MIN = -2147483648 IN_INDEX_EPH = 2 IN_INDEX_INDEX_ASC = 3 IN_INDEX_INDEX_DESC = 4 IN_INDEX_LOOP = 0x0004 IN_INDEX_MEMBERSHIP = 0x0002 IN_INDEX_NOOP = 5 IN_INDEX_NOOP_OK = 0x0001 IN_INDEX_ROWID = 1 IOCPARM_MASK = 0x1fff ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 IsStat4 = 1 JEACH_ATOM = 3 JEACH_FULLKEY = 6 JEACH_ID = 4 JEACH_JSON = 8 JEACH_KEY = 0 JEACH_PARENT = 5 JEACH_PATH = 7 JEACH_ROOT = 9 JEACH_TYPE = 2 JEACH_VALUE = 1 JNODE_APPEND = 0x20 JNODE_ESCAPE = 0x02 JNODE_LABEL = 0x40 JNODE_PATCH = 0x10 JNODE_RAW = 0x01 JNODE_REMOVE = 0x04 JNODE_REPLACE = 0x08 JSON_ABPATH = 0x03 JSON_ARRAY = 6 JSON_CACHE_ID = -429938 JSON_CACHE_SZ = 4 JSON_FALSE = 2 JSON_INT = 3 JSON_ISSET = 0x04 JSON_JSON = 0x01 JSON_MAX_DEPTH = 2000 JSON_NULL = 0 JSON_OBJECT = 7 JSON_REAL = 4 JSON_SQL = 0x02 JSON_STRING = 5 JSON_SUBTYPE = 74 JSON_TRUE = 1 JT_CROSS = 0x02 JT_ERROR = 0x80 JT_INNER = 0x01 JT_LEFT = 0x08 JT_LTORJ = 0x40 JT_NATURAL = 0x04 JT_OUTER = 0x20 JT_RIGHT = 0x10 KBIND_BLOCK_MAX = 2 KBIND_DATA_MAX = 24 KEYINFO_ORDER_BIGNULL = 0x02 KEYINFO_ORDER_DESC = 0x01 LEGACY_SCHEMA_TABLE = "sqlite_master" LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" LITTLE_ENDIAN = 1234 LLONG_MAX = 0x7fffffffffffffff LLONG_MIN = -9223372036854775808 LOCATE_NOERR = 0x02 LOCATE_VIEW = 0x01 LOCK_EX = 0x02 LOCK_NB = 0x04 LOCK_SH = 0x01 LOCK_UN = 0x08 LONG_BIT = 64 LONG_MAX = 0x7fffffffffffffff LONG_MIN = -9223372036854775808 LOOKASIDE_SMALL = 128 L_INCR = 1 L_SET = 0 L_XTND = 2 L_ctermid = 1024 L_tmpnam = 1024 M10d_Any = 1 M10d_No = 2 M10d_Yes = 0 MADV_DONTNEED = 4 MADV_FREE = 6 MADV_NORMAL = 0 MADV_RANDOM = 1 MADV_SEQUENTIAL = 2 MADV_SPACEAVAIL = 5 MADV_WILLNEED = 3 MAP_ANON = 0x1000 MAP_ANONYMOUS = 4096 MAP_CONCEAL = 0x8000 MAP_COPY = 2 MAP_FILE = 0 MAP_FIXED = 0x0010 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0 MAP_INHERIT = 0 MAP_INHERIT_COPY = 1 MAP_INHERIT_NONE = 2 MAP_INHERIT_SHARE = 0 MAP_INHERIT_ZERO = 3 MAP_NOEXTEND = 0 MAP_NORESERVE = 0 MAP_PRIVATE = 0x0002 MAP_RENAME = 0 MAP_SHARED = 0x0001 MAP_STACK = 0x4000 MAP_TRYFIXED = 0 MATH_ERREXCEPT = 2 MATH_ERRNO = 1 MAX_PATHNAME = 512 MAX_SECTOR_SIZE = 0x10000 MB_LEN_MAX = 4 MCL_CURRENT = 0x01 MCL_FUTURE = 0x02 MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 MEMTYPE_HEAP = 0x01 MEMTYPE_LOOKASIDE = 0x02 MEMTYPE_PCACHE = 0x04 MEM_AffMask = 0x003f MEM_Agg = 0x8000 MEM_Blob = 0x0010 MEM_Cleared = 0x0100 MEM_Dyn = 0x1000 MEM_Ephem = 0x4000 MEM_FromBind = 0x0040 MEM_Int = 0x0004 MEM_IntReal = 0x0020 MEM_Null = 0x0001 MEM_Real = 0x0008 MEM_Static = 0x2000 MEM_Str = 0x0002 MEM_Subtype = 0x0800 MEM_Term = 0x0200 MEM_TypeMask = 0x0dbf MEM_Undefined = 0x0000 MEM_Zero = 0x0400 MSTSDISC = 8 MSVC_VERSION = 0 MS_ASYNC = 0x01 MS_INVALIDATE = 0x04 MS_SYNC = 0x02 NB = 3 NBBY = 8 NC_AllowAgg = 0x000001 NC_AllowWin = 0x004000 NC_Complex = 0x002000 NC_FromDDL = 0x040000 NC_GenCol = 0x000008 NC_HasAgg = 0x000010 NC_HasWin = 0x008000 NC_IdxExpr = 0x000020 NC_InAggFunc = 0x020000 NC_IsCheck = 0x000004 NC_IsDDL = 0x010000 NC_MinMaxAgg = 0x001000 NC_NoSelect = 0x080000 NC_OrderAgg = 0x8000000 NC_PartIdx = 0x000002 NC_SelfRef = 0x00002e NC_Subquery = 0x000040 NC_UAggInfo = 0x000100 NC_UBaseReg = 0x000400 NC_UEList = 0x000080 NC_UUpsert = 0x000200 NDEBUG = 1 NMEADISC = 7 NN = 1 NOT_WITHIN = 0 NO_LOCK = 0 N_OR_COST = 3 N_SORT_BUCKET = 32 N_STATEMENT = 8 OE_Abort = 2 OE_Cascade = 10 OE_Default = 11 OE_Fail = 3 OE_Ignore = 4 OE_None = 0 OE_Replace = 5 OE_Restrict = 7 OE_Rollback = 1 OE_SetDflt = 9 OE_SetNull = 8 OE_Update = 6 OMIT_TEMPDB = 0 ONEPASS_MULTI = 2 ONEPASS_OFF = 0 ONEPASS_SINGLE = 1 OPFLAG_APPEND = 0x08 OPFLAG_AUXDELETE = 0x04 OPFLAG_BULKCSR = 0x01 OPFLAG_EPHEM = 0x01 OPFLAG_FORDELETE = 0x08 OPFLAG_ISNOOP = 0x40 OPFLAG_ISUPDATE = 0x04 OPFLAG_LASTROWID = 0x20
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
// Code generated for linux/s390x by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/s390x -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/s390x -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/s390x -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && s390x package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 4321 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_FAST_FMA = 1 const FP_FAST_FMAF = 1 const FP_FAST_FMAL = 1 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 5 const F_GETLK64 = 5 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 6 const F_SETLK64 = 6 const F_SETLKW = 7 const F_SETLKW64 = 7 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 12002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 16384 const O_DIRECTORY = 65536 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 32768 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 131072 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4259840 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 6 const POSIX_FADV_NOREUSE = 7 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go
vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm64.go
// Code generated for freebsd/arm64 by 'generator --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/freebsd/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/freebsd/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/freebsd/arm64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1 -ltcl8.6 -eval-all-macros', DO NOT EDIT. //go:build freebsd && arm64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ACCESSPERMS = 511 const ALLBITS = -1 const ALLPERMS = 4095 const AT_EACCESS = 256 const AT_EMPTY_PATH = 16384 const AT_FDCWD = -100 const AT_REMOVEDIR = 2048 const AT_RESOLVE_BENEATH = 8192 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 512 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLK_TCK = 128 const CLOCKS_PER_SEC = 128 const CLOCK_BOOTTIME = 5 const CLOCK_MONOTONIC = 4 const CLOCK_MONOTONIC_COARSE = 12 const CLOCK_MONOTONIC_FAST = 12 const CLOCK_MONOTONIC_PRECISE = 11 const CLOCK_PROCESS_CPUTIME_ID = 15 const CLOCK_PROF = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_COARSE = 10 const CLOCK_REALTIME_FAST = 10 const CLOCK_REALTIME_PRECISE = 9 const CLOCK_SECOND = 13 const CLOCK_THREAD_CPUTIME_ID = 14 const CLOCK_UPTIME = 5 const CLOCK_UPTIME_FAST = 8 const CLOCK_UPTIME_PRECISE = 7 const CLOCK_VIRTUAL = 1 const CLOSE_RANGE_CLOEXEC = 4 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPUCLOCK_WHICH_PID = 0 const CPUCLOCK_WHICH_TID = 1 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DEFFILEMODE = 438 const DIRECT_MODE = 0 const DOTLOCK_SUFFIX = ".lock" const DST_AUST = 2 const DST_CAN = 6 const DST_EET = 5 const DST_MET = 4 const DST_NONE = 0 const DST_USA = 1 const DST_WET = 3 const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 48 const EADDRNOTAVAIL = 49 const EAFNOSUPPORT = 47 const EAGAIN = 35 const EALREADY = 37 const EAUTH = 80 const EBADF = 9 const EBADMSG = 89 const EBADRPC = 72 const EBUSY = 16 const ECANCELED = 85 const ECAPMODE = 94 const ECHILD = 10 const ECONNABORTED = 53 const ECONNREFUSED = 61 const ECONNRESET = 54 const EDEADLK = 11 const EDESTADDRREQ = 39 const EDOM = 33 const EDOOFUS = 88 const EDQUOT = 69 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EFTYPE = 79 const EHOSTDOWN = 64 const EHOSTUNREACH = 65 const EIDRM = 82 const EILSEQ = 86 const EINPROGRESS = 36 const EINTEGRITY = 97 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 56 const EISDIR = 21 const ELAST = 97 const ELOOP = 62 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 40 const EMULTIHOP = 90 const ENAMETOOLONG = 63 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENEEDAUTH = 81 const ENETDOWN = 50 const ENETRESET = 52 const ENETUNREACH = 51 const ENFILE = 23 const ENOATTR = 87 const ENOBUFS = 55 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOLCK = 77 const ENOLINK = 91 const ENOMEM = 12 const ENOMSG = 83 const ENOPROTOOPT = 42 const ENOSPC = 28 const ENOSYS = 78 const ENOTBLK = 15 const ENOTCAPABLE = 93 const ENOTCONN = 57 const ENOTDIR = 20 const ENOTEMPTY = 66 const ENOTRECOVERABLE = 95 const ENOTSOCK = 38 const ENOTSUP = 45 const ENOTTY = 25 const ENXIO = 6 const EOF = -1 const EOPNOTSUPP = 45 const EOVERFLOW = 84 const EOWNERDEAD = 96 const EPERM = 1 const EPFNOSUPPORT = 46 const EPIPE = 32 const EPROCLIM = 67 const EPROCUNAVAIL = 76 const EPROGMISMATCH = 75 const EPROGUNAVAIL = 74 const EPROTO = 92 const EPROTONOSUPPORT = 43 const EPROTOTYPE = 41 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMOTE = 71 const EROFS = 30 const ERPCMISMATCH = 73 const ESHUTDOWN = 58 const ESOCKTNOSUPPORT = 44 const ESPIPE = 29 const ESRCH = 3 const ESTALE = 70 const ETIMEDOUT = 60 const ETOOMANYREFS = 59 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUSERS = 68 const EWOULDBLOCK = 35 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const FAPPEND = 8 const FASYNC = 64 const FDSYNC = 16777216 const FD_CLOEXEC = 1 const FD_NONE = -200 const FD_SETSIZE = 1024 const FFSYNC = 128 const FILENAME_MAX = 1024 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 4 const FNONBLOCK = 4 const FOPEN_MAX = 20 const FP_FAST_FMAF = 1 const FP_ILOGB0 = -2147483647 const FP_ILOGBNAN = 2147483647 const FP_INFINITE = 1 const FP_NAN = 2 const FP_NORMAL = 4 const FP_SUBNORMAL = 8 const FP_ZERO = 16 const FRDAHEAD = 512 const FREAD = 1 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const FWRITE = 2 const F_ADD_SEALS = 19 const F_CANCEL = 5 const F_DUP2FD = 10 const F_DUP2FD_CLOEXEC = 18 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 17 const F_GETFD = 1 const F_GETFL = 3 const F_GETLK = 11 const F_GETOWN = 5 const F_GET_SEALS = 20 const F_ISUNIONSTACK = 21 const F_KINFO = 22 const F_LOCK = 1 const F_OGETLK = 7 const F_OK = 0 const F_OSETLK = 8 const F_OSETLKW = 9 const F_RDAHEAD = 16 const F_RDLCK = 1 const F_READAHEAD = 15 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLK = 12 const F_SETLKW = 13 const F_SETLK_REMOTE = 14 const F_SETOWN = 6 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_UNLCKSYS = 4 const F_WRLCK = 3 const GCC_VERSION = 4002001 const GEOPOLY_PI = 3.141592653589793 const H4DISC = 7 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 0 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = "MAXFLOAT" const HUGE_VAL = 0 const HUGE_VALF = 0 const HUGE_VALL = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INHERIT_COPY = 1 const INHERIT_NONE = 2 const INHERIT_SHARE = 0 const INHERIT_ZERO = 3 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const IOCPARM_MASK = 8191 const IOCPARM_MAX = 8192 const IOCPARM_SHIFT = 13 const IOC_DIRMASK = 3758096384 const IOC_IN = 2147483648 const IOC_INOUT = 3221225472 const IOC_OUT = 1073741824 const IOC_VOID = 536870912 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KCMP_FILE = 100 const KCMP_FILEOBJ = 101 const KCMP_FILES = 102 const KCMP_SIGHAND = 103 const KCMP_VM = 104 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOCK_EX = 2 const LOCK_NB = 4 const LOCK_SH = 1 const LOCK_UN = 8 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 1024 const L_cuserid = 17 const L_tmpnam = 1024 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_AUTOSYNC = 7 const MADV_CORE = 9 const MADV_DONTNEED = 4 const MADV_FREE = 5 const MADV_NOCORE = 8 const MADV_NORMAL = 0 const MADV_NOSYNC = 6 const MADV_PROTECT = 10 const MADV_RANDOM = 1 const MADV_SEQUENTIAL = 2 const MADV_WILLNEED = 3 const MAP_32BIT = 524288 const MAP_ALIGNED_SUPER = 16777216 const MAP_ALIGNMENT_MASK = 4278190080 const MAP_ALIGNMENT_SHIFT = 24 const MAP_ANON = 4096 const MAP_ANONYMOUS = 4096 const MAP_COPY = 2 const MAP_EXCL = 16384 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_GUARD = 8192 const MAP_HASSEMAPHORE = 512 const MAP_NOCORE = 131072 const MAP_NOSYNC = 2048 const MAP_PREFAULT_READ = 262144 const MAP_PRIVATE = 2 const MAP_RESERVED0020 = 32 const MAP_RESERVED0040 = 64 const MAP_RESERVED0080 = 128 const MAP_RESERVED0100 = 256 const MAP_SHARED = 1 const MAP_STACK = 1024 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MFD_HUGE_16GB = 2281701376 const MFD_HUGE_16MB = 1610612736 const MFD_HUGE_1GB = 2013265920 const MFD_HUGE_1MB = 1342177280 const MFD_HUGE_256MB = 1879048192 const MFD_HUGE_2GB = 2080374784 const MFD_HUGE_2MB = 1409286144 const MFD_HUGE_32MB = 1677721600 const MFD_HUGE_512KB = 1275068416 const MFD_HUGE_512MB = 1946157056 const MFD_HUGE_64KB = 1073741824 const MFD_HUGE_8MB = 1543503872 const MFD_HUGE_MASK = 4227858432 const MFD_HUGE_SHIFT = 26 const MINCORE_INCORE = 1 const MINCORE_MODIFIED = 4 const MINCORE_MODIFIED_OTHER = 16 const MINCORE_REFERENCED = 2 const MINCORE_REFERENCED_OTHER = 8 const MINCORE_SUPER = 96 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 0 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NETGRAPHDISC = 6 const NFDBITS = 0 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_OR_COST = 3 const N_SORT_BUCKET = 32 const N_STATEMENT = 8 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 3 const O_APPEND = 8 const O_ASYNC = 64 const O_BINARY = 0 const O_CLOEXEC = 1048576 const O_CREAT = 512 const O_DIRECT = 65536 const O_DIRECTORY = 131072 const O_DSYNC = 16777216 const O_EMPTY_PATH = 33554432 const O_EXCL = 2048 const O_EXEC = 262144 const O_EXLOCK = 32 const O_FSYNC = 128 const O_LARGEFILE = 0 const O_NDELAY = 4 const O_NOCTTY = 32768 const O_NOFOLLOW = 256 const O_NONBLOCK = 4 const O_PATH = 4194304 const O_RDONLY = 0 const O_RDWR = 2 const O_RESOLVE_BENEATH = 8388608 const O_SEARCH = 262144 const O_SHLOCK = 16 const O_SYNC = 128 const O_TRUNC = 1024 const O_TTY_INIT = 524288 const O_VERIFY = 2097152 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PPPDISC = 5 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTRMAP_BTREE = 5 const PTRMAP_FREEPAGE = 2 const PTRMAP_OVERFLOW1 = 3 const PTRMAP_OVERFLOW2 = 4 const PTRMAP_ROOTPAGE = 1 const P_tmpdir = "/tmp/" const PragFlg_NeedSchema = 1 const PragFlg_NoColumns = 2 const PragFlg_NoColumns1 = 4 const PragFlg_ReadOnly = 8 const PragFlg_Result0 = 16 const PragFlg_Result1 = 32 const PragFlg_SchemaOpt = 64 const PragFlg_SchemaReq = 128 const PragTyp_ACTIVATE_EXTENSIONS = 0 const PragTyp_ANALYSIS_LIMIT = 1 const PragTyp_AUTO_VACUUM = 3 const PragTyp_BUSY_TIMEOUT = 5 const PragTyp_CACHE_SIZE = 6 const PragTyp_CACHE_SPILL = 7 const PragTyp_CASE_SENSITIVE_LIKE = 8 const PragTyp_COLLATION_LIST = 9 const PragTyp_COMPILE_OPTIONS = 10 const PragTyp_DATABASE_LIST = 12 const PragTyp_DATA_STORE_DIRECTORY = 11 const PragTyp_DEFAULT_CACHE_SIZE = 13 const PragTyp_ENCODING = 14 const PragTyp_FLAG = 4 const PragTyp_FOREIGN_KEY_CHECK = 15 const PragTyp_FOREIGN_KEY_LIST = 16 const PragTyp_FUNCTION_LIST = 17 const PragTyp_HARD_HEAP_LIMIT = 18 const PragTyp_HEADER_VALUE = 2 const PragTyp_INCREMENTAL_VACUUM = 19 const PragTyp_INDEX_INFO = 20 const PragTyp_INDEX_LIST = 21 const PragTyp_INTEGRITY_CHECK = 22 const PragTyp_JOURNAL_MODE = 23 const PragTyp_JOURNAL_SIZE_LIMIT = 24 const PragTyp_LOCKING_MODE = 26 const PragTyp_LOCK_PROXY_FILE = 25 const PragTyp_LOCK_STATUS = 44 const PragTyp_MMAP_SIZE = 28 const PragTyp_MODULE_LIST = 29 const PragTyp_OPTIMIZE = 30 const PragTyp_PAGE_COUNT = 27 const PragTyp_PAGE_SIZE = 31 const PragTyp_PRAGMA_LIST = 32 const PragTyp_SECURE_DELETE = 33 const PragTyp_SHRINK_MEMORY = 34 const PragTyp_SOFT_HEAP_LIMIT = 35 const PragTyp_STATS = 45 const PragTyp_SYNCHRONOUS = 36 const PragTyp_TABLE_INFO = 37 const PragTyp_TABLE_LIST = 38 const PragTyp_TEMP_STORE = 39 const PragTyp_TEMP_STORE_DIRECTORY = 40 const PragTyp_THREADS = 41 const PragTyp_WAL_AUTOCHECKPOINT = 42 const PragTyp_WAL_CHECKPOINT = 43 const RAND_MAX = 2147483647 const RBU_CREATE_STATE = "CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)" const RBU_DELETE = 2 const RBU_ENABLE_DELTA_CKSUM = 0 const RBU_EXCLUSIVE_CHECKPOINT = "rbu_exclusive_checkpoint" const RBU_IDX_DELETE = 4 const RBU_IDX_INSERT = 5 const RBU_INSERT = 1 const RBU_PK_EXTERNAL = 3 const RBU_PK_IPK = 2 const RBU_PK_NONE = 1 const RBU_PK_NOTABLE = 0 const RBU_PK_VTAB = 5 const RBU_PK_WITHOUT_ROWID = 4 const RBU_REPLACE = 3 const RBU_STAGE_CAPTURE = 3 const RBU_STAGE_CKPT = 4 const RBU_STAGE_DONE = 5 const RBU_STAGE_MOVE = 2 const RBU_STAGE_OAL = 1 const RBU_STATE_CKPT = 6 const RBU_STATE_COOKIE = 7 const RBU_STATE_DATATBL = 10 const RBU_STATE_IDX = 3 const RBU_STATE_OALSZ = 8 const RBU_STATE_PHASEONESTEP = 9 const RBU_STATE_PROGRESS = 5 const RBU_STATE_ROW = 4 const RBU_STATE_STAGE = 1 const RBU_STATE_TBL = 2
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go
vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go
// Copyright 2019 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sqlite3 import ( "syscall" "unsafe" "modernc.org/libc" ) // Format and write a message to the log if logging is enabled. func X__ccgo_sqlite3_log(t *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29405:17: */ libc.X__ccgo_sqlite3_log(t, iErrCode, zFormat, va) } // https://gitlab.com/cznic/sqlite/-/issues/199 // // We are currently stuck on libc@v1.55.3. Until that is resolved - fix the // problem at runtime. func PatchIssue199() { p := unsafe.Pointer(&_aSyscall) *(*uintptr)(unsafe.Add(p, 608)) = __ccgo_fp(_unixGetpagesizeIssue199) } func _unixGetpagesizeIssue199(tls *libc.TLS) (r int32) { return int32(syscall.Getpagesize()) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/hooks.go
vendor/modernc.org/sqlite/lib/hooks.go
// Copyright 2019 The Sqlite Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !(linux && arm64) package sqlite3 import ( "modernc.org/libc" ) // Format and write a message to the log if logging is enabled. func X__ccgo_sqlite3_log(t *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29405:17: */ libc.X__ccgo_sqlite3_log(t, iErrCode, zFormat, va) } func PatchIssue199() { // nop }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go
vendor/modernc.org/sqlite/lib/sqlite_linux_arm.go
// Code generated for linux/arm by 'generator --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/arm -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/arm -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/arm -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && arm package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 12 const F_GETLK64 = 12 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 13 const F_SETLK64 = 13 const F_SETLKW = 14 const F_SETLKW64 = 14 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 12002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 65536 const O_DIRECTORY = 16384 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 131072 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 32768 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4210688 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1 const PTHREAD_MUTEX_ROBUST = 1 const PTHREAD_MUTEX_STALLED = 0
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go
vendor/modernc.org/sqlite/lib/sqlite_linux_arm64.go
// Code generated for linux/arm64 by 'generator --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/arm64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && arm64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOQSIZE = 21600 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_FAST_FMA = 1 const FP_FAST_FMAF = 1 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 5 const F_GETLK64 = 5 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 6 const F_SETLK64 = 6 const F_SETLKW = 7 const F_SETLKW64 = 7 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 12002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 65536 const O_DIRECTORY = 16384 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 131072 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 32768 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4210688 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_BTI = 16 const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_MTE = 32 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go
vendor/modernc.org/sqlite/lib/sqlite_darwin_amd64.go
// Code generated for darwin/amd64 by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /Users/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/darwin/amd64 -I /Users/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/darwin/amd64 -I /Users/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/darwin/amd64 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build darwin && amd64 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ACCESSPERMS = 511 const ACCESSX_MAX_DESCRIPTORS = 100 const ACCESSX_MAX_TABLESIZE = 16384 const AF_APPLETALK = 16 const AF_CCITT = 10 const AF_CHAOS = 5 const AF_CNT = 21 const AF_COIP = 20 const AF_DATAKIT = 9 const AF_DECnet = 12 const AF_DLI = 13 const AF_E164 = 28 const AF_ECMA = 8 const AF_HYLINK = 15 const AF_IEEE80211 = 37 const AF_IMPLINK = 3 const AF_INET = 2 const AF_INET6 = 30 const AF_IPX = 23 const AF_ISDN = 28 const AF_ISO = 7 const AF_LAT = 14 const AF_LINK = 18 const AF_LOCAL = 1 const AF_MAX = 41 const AF_NATM = 31 const AF_NDRV = 27 const AF_NETBIOS = 33 const AF_NS = 6 const AF_OSI = 7 const AF_PPP = 34 const AF_PUP = 4 const AF_RESERVED_36 = 36 const AF_ROUTE = 17 const AF_SIP = 24 const AF_SNA = 11 const AF_SYSTEM = 32 const AF_UNIX = 1 const AF_UNSPEC = 0 const AF_UTUN = 38 const AF_VSOCK = 40 const ALIGNBYTES = -1 const ALLBITS = -1 const ALLPERMS = 4095 const APPLE_IF_FAM_BOND = 14 const APPLE_IF_FAM_CELLULAR = 15 const APPLE_IF_FAM_DISC = 8 const APPLE_IF_FAM_ETHERNET = 2 const APPLE_IF_FAM_FAITH = 11 const APPLE_IF_FAM_FIREWIRE = 13 const APPLE_IF_FAM_GIF = 10 const APPLE_IF_FAM_IPSEC = 18 const APPLE_IF_FAM_LOOPBACK = 1 const APPLE_IF_FAM_MDECAP = 9 const APPLE_IF_FAM_PPP = 6 const APPLE_IF_FAM_PVC = 7 const APPLE_IF_FAM_SLIP = 3 const APPLE_IF_FAM_STF = 12 const APPLE_IF_FAM_TUN = 4 const APPLE_IF_FAM_UNUSED_16 = 16 const APPLE_IF_FAM_UTUN = 17 const APPLE_IF_FAM_VLAN = 5 const AQ_BUFSZ = 32767 const AQ_HIWATER = 100 const AQ_LOWATER = 10 const AQ_MAXBUFSZ = 1048576 const AQ_MAXHIGH = 10000 const ARG_MAX = 1048576 const ATTRIBUTION_NAME_MAX = 255 const ATTR_BIT_MAP_COUNT = 5 const ATTR_BULK_REQUIRED = 2147483649 const ATTR_CMNEXT_ATTRIBUTION_TAG = 2048 const ATTR_CMNEXT_CLONEID = 256 const ATTR_CMNEXT_CLONE_REFCNT = 4096 const ATTR_CMNEXT_EXT_FLAGS = 512 const ATTR_CMNEXT_LINKID = 16 const ATTR_CMNEXT_NOFIRMLINKPATH = 32 const ATTR_CMNEXT_PRIVATESIZE = 8 const ATTR_CMNEXT_REALDEVID = 64 const ATTR_CMNEXT_REALFSID = 128 const ATTR_CMNEXT_RECURSIVE_GENCOUNT = 1024 const ATTR_CMNEXT_RELPATH = 4 const ATTR_CMNEXT_SETMASK = 0 const ATTR_CMNEXT_VALIDMASK = 8188 const ATTR_CMN_ACCESSMASK = 131072 const ATTR_CMN_ACCTIME = 4096 const ATTR_CMN_ADDEDTIME = 268435456 const ATTR_CMN_BKUPTIME = 8192 const ATTR_CMN_CHGTIME = 2048 const ATTR_CMN_CRTIME = 512 const ATTR_CMN_DATA_PROTECT_FLAGS = 1073741824 const ATTR_CMN_DEVID = 2 const ATTR_CMN_DOCUMENT_ID = 1048576 const ATTR_CMN_ERROR = 536870912 const ATTR_CMN_EXTENDED_SECURITY = 4194304 const ATTR_CMN_FILEID = 33554432 const ATTR_CMN_FLAGS = 262144 const ATTR_CMN_FNDRINFO = 16384 const ATTR_CMN_FSID = 4 const ATTR_CMN_FULLPATH = 134217728 const ATTR_CMN_GEN_COUNT = 524288 const ATTR_CMN_GRPID = 65536 const ATTR_CMN_GRPUUID = 16777216 const ATTR_CMN_MODTIME = 1024 const ATTR_CMN_NAME = 1 const ATTR_CMN_NAMEDATTRCOUNT = 524288 const ATTR_CMN_NAMEDATTRLIST = 1048576 const ATTR_CMN_OBJID = 32 const ATTR_CMN_OBJPERMANENTID = 64 const ATTR_CMN_OBJTAG = 16 const ATTR_CMN_OBJTYPE = 8 const ATTR_CMN_OWNERID = 32768 const ATTR_CMN_PARENTID = 67108864 const ATTR_CMN_PAROBJID = 128 const ATTR_CMN_RETURNED_ATTRS = 2147483648 const ATTR_CMN_SCRIPT = 256 const ATTR_CMN_SETMASK = 1372061440 const ATTR_CMN_USERACCESS = 2097152 const ATTR_CMN_UUID = 8388608 const ATTR_CMN_VALIDMASK = 4294967295 const ATTR_CMN_VOLSETMASK = 26368 const ATTR_DIR_ALLOCSIZE = 8 const ATTR_DIR_DATALENGTH = 32 const ATTR_DIR_ENTRYCOUNT = 2 const ATTR_DIR_IOBLOCKSIZE = 16 const ATTR_DIR_LINKCOUNT = 1 const ATTR_DIR_MOUNTSTATUS = 4 const ATTR_DIR_SETMASK = 0 const ATTR_DIR_VALIDMASK = 63 const ATTR_FILE_ALLOCSIZE = 4 const ATTR_FILE_CLUMPSIZE = 16 const ATTR_FILE_DATAALLOCSIZE = 1024 const ATTR_FILE_DATAEXTENTS = 2048 const ATTR_FILE_DATALENGTH = 512 const ATTR_FILE_DEVTYPE = 32 const ATTR_FILE_FILETYPE = 64 const ATTR_FILE_FORKCOUNT = 128 const ATTR_FILE_FORKLIST = 256 const ATTR_FILE_IOBLOCKSIZE = 8 const ATTR_FILE_LINKCOUNT = 1 const ATTR_FILE_RSRCALLOCSIZE = 8192 const ATTR_FILE_RSRCEXTENTS = 16384 const ATTR_FILE_RSRCLENGTH = 4096 const ATTR_FILE_SETMASK = 32 const ATTR_FILE_TOTALSIZE = 2 const ATTR_FILE_VALIDMASK = 14335 const ATTR_FORK_ALLOCSIZE = 2 const ATTR_FORK_RESERVED = 4294967295 const ATTR_FORK_SETMASK = 0 const ATTR_FORK_TOTALSIZE = 1 const ATTR_FORK_VALIDMASK = 3 const ATTR_MAX_BUFFER = 8192 const ATTR_MAX_BUFFER_LONGPATHS = 7168 const ATTR_VOL_ALLOCATIONCLUMP = 64 const ATTR_VOL_ATTRIBUTES = 1073741824 const ATTR_VOL_CAPABILITIES = 131072 const ATTR_VOL_DIRCOUNT = 1024 const ATTR_VOL_ENCODINGSUSED = 65536 const ATTR_VOL_FILECOUNT = 512 const ATTR_VOL_FSSUBTYPE = 2097152 const ATTR_VOL_FSTYPE = 1 const ATTR_VOL_FSTYPENAME = 1048576 const ATTR_VOL_INFO = 2147483648 const ATTR_VOL_IOBLOCKSIZE = 128 const ATTR_VOL_MAXOBJCOUNT = 2048 const ATTR_VOL_MINALLOCATION = 32 const ATTR_VOL_MOUNTEDDEVICE = 32768 const ATTR_VOL_MOUNTEXTFLAGS = 524288 const ATTR_VOL_MOUNTFLAGS = 16384 const ATTR_VOL_MOUNTPOINT = 4096 const ATTR_VOL_NAME = 8192 const ATTR_VOL_OBJCOUNT = 256 const ATTR_VOL_OWNER = 4194304 const ATTR_VOL_QUOTA_SIZE = 268435456 const ATTR_VOL_RESERVED_SIZE = 536870912 const ATTR_VOL_SETMASK = 2147491840 const ATTR_VOL_SIGNATURE = 2 const ATTR_VOL_SIZE = 4 const ATTR_VOL_SPACEAVAIL = 16 const ATTR_VOL_SPACEFREE = 8 const ATTR_VOL_SPACEUSED = 8388608 const ATTR_VOL_UUID = 262144 const ATTR_VOL_VALIDMASK = 4043309055 const AT_EACCESS = 16 const AT_FDCWD = -2 const AT_FDONLY = 1024 const AT_REALDEV = 512 const AT_REMOVEDIR = 128 const AT_SYMLINK_FOLLOW = 64 const AT_SYMLINK_NOFOLLOW = 32 const AT_SYMLINK_NOFOLLOW_ANY = 2048 const AUC_AUDITING = 1 const AUC_DISABLED = -1 const AUC_NOAUDIT = 2 const AUC_UNSET = 0 const AUDITDEV_FILENAME = "audit" const AUDIT_AHLT = 2 const AUDIT_ARGE = 8 const AUDIT_ARGV = 4 const AUDIT_CNT = 1 const AUDIT_GROUP = 128 const AUDIT_HARD_LIMIT_FREE_BLOCKS = 4 const AUDIT_PATH = 512 const AUDIT_PERZONE = 8192 const AUDIT_PUBLIC = 2048 const AUDIT_RECORD_MAGIC = 2190085915 const AUDIT_SCNT = 1024 const AUDIT_SEQ = 16 const AUDIT_TRAIL = 256 const AUDIT_TRIGGER_CLOSE_AND_DIE = 4 const AUDIT_TRIGGER_EXPIRE_TRAILS = 8 const AUDIT_TRIGGER_INITIALIZE = 7 const AUDIT_TRIGGER_LOW_SPACE = 1 const AUDIT_TRIGGER_MAX = 8 const AUDIT_TRIGGER_MIN = 1 const AUDIT_TRIGGER_NO_SPACE = 5 const AUDIT_TRIGGER_READ_FILE = 3 const AUDIT_TRIGGER_ROTATE_KERNEL = 2 const AUDIT_TRIGGER_ROTATE_USER = 6 const AUDIT_USER = 64 const AUDIT_WINDATA = 32 const AUDIT_ZONENAME = 4096 const AUTH_OPEN_NOAUTHFD = -1 const AU_ASSIGN_ASID = -1 const AU_CLASS_MASK_RESERVED = 268435456 const AU_DEFAUDITSID = 0 const AU_FS_MINFREE = 20 const AU_IPv4 = 4 const AU_IPv6 = 16 const A_GETCAR = 9 const A_GETCLASS = 22 const A_GETCOND = 37 const A_GETCTLMODE = 41 const A_GETCWD = 8 const A_GETEXPAFTER = 43 const A_GETFSIZE = 27 const A_GETKAUDIT = 29 const A_GETKMASK = 4 const A_GETPINFO = 24 const A_GETPINFO_ADDR = 28 const A_GETPOLICY = 33 const A_GETQCTRL = 35 const A_GETSFLAGS = 39 const A_GETSINFO_ADDR = 32 const A_GETSTAT = 12 const A_OLDGETCOND = 20 const A_OLDGETPOLICY = 2 const A_OLDGETQCTRL = 6 const A_OLDSETCOND = 21 const A_OLDSETPOLICY = 3 const A_OLDSETQCTRL = 7 const A_SENDTRIGGER = 31 const A_SETCLASS = 23 const A_SETCOND = 38 const A_SETCTLMODE = 42 const A_SETEXPAFTER = 44 const A_SETFSIZE = 26 const A_SETKAUDIT = 30 const A_SETKMASK = 5 const A_SETPMASK = 25 const A_SETPOLICY = 34 const A_SETQCTRL = 36 const A_SETSFLAGS = 40 const A_SETSMASK = 15 const A_SETSTAT = 13 const A_SETUMASK = 14 const BADSIG = "SIG_ERR" const BC_BASE_MAX = 99 const BC_DIM_MAX = 2048 const BC_SCALE_MAX = 99 const BC_STRING_MAX = 1000 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BLKDEV_IOSIZE = 2048 const BSD = 199506 const BSD4_3 = 1 const BSD4_4 = 1 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BUS_ADRALN = 1 const BUS_ADRERR = 2 const BUS_NOOP = 0 const BUS_OBJERR = 3 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CBLOCK = 64 const CBQSIZE = 8 const CBSIZE = 56 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CHARCLASS_NAME_MAX = 14 const CHILD_MAX = 266 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLBYTES = 4096 const CLD_CONTINUED = 6 const CLD_DUMPED = 3 const CLD_EXITED = 1 const CLD_KILLED = 2 const CLD_NOOP = 0 const CLD_STOPPED = 5 const CLD_TRAPPED = 4 const CLOCK_MONOTONIC = 0 const CLOCK_MONOTONIC_RAW = 0 const CLOCK_MONOTONIC_RAW_APPROX = 0 const CLOCK_PROCESS_CPUTIME_ID = 0 const CLOCK_REALTIME = 0 const CLOCK_THREAD_CPUTIME_ID = 0 const CLOCK_UPTIME_RAW = 0 const CLOCK_UPTIME_RAW_APPROX = 0 const CLOFF = 4095 const CLOFSET = 4095 const CLSHIFT = 12 const CLSIZE = 1 const CLSIZELOG2 = 0 const CMASK = 18 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLL_WEIGHTS_MAX = 2 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CONNECT_DATA_AUTHENTICATED = 4 const CONNECT_DATA_IDEMPOTENT = 2 const CONNECT_RESUME_ON_READ_WRITE = 1 const CPF_IGNORE_MODE = 2 const CPF_MASK = 3 const CPF_OVERWRITE = 1 const CPUMON_MAKE_FATAL = 4096 const CRF_MAC_ENFORCE = 2 const CRF_NOMEMBERD = 1 const CROUND = 63 const CRYPTEX_AUTH_STRUCT_VERSION = 2 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DEFFILEMODE = 438 const DEV_BSHIFT = 9 const DEV_BSIZE = 512 const DIRECT_MODE = 0 const DIR_MNTSTATUS_MNTPOINT = 1 const DIR_MNTSTATUS_TRIGGER = 2 const DOMAIN = 1 const DOTLOCK_SUFFIX = ".lock" const DST_AUST = 2 const DST_CAN = 6 const DST_EET = 5 const DST_MET = 4 const DST_NONE = 0 const DST_USA = 1 const DST_WET = 3 const DYNAMIC_TARGETS_ENABLED = 0 const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 48 const EADDRNOTAVAIL = 49 const EAFNOSUPPORT = 47 const EAGAIN = 35 const EALREADY = 37 const EAUTH = 80 const EBADARCH = 86 const EBADEXEC = 85 const EBADF = 9 const EBADMACHO = 88 const EBADMSG = 94 const EBADRPC = 72 const EBUSY = 16 const ECANCELED = 89 const ECHILD = 10 const ECONNABORTED = 53 const ECONNREFUSED = 61 const ECONNRESET = 54 const EDEADLK = 11 const EDESTADDRREQ = 39 const EDEVERR = 83 const EDOM = 33 const EDQUOT = 69 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EFTYPE = 79 const EF_IS_PURGEABLE = 8 const EF_IS_SPARSE = 16 const EF_IS_SYNC_ROOT = 4 const EF_IS_SYNTHETIC = 32 const EF_MAY_SHARE_BLOCKS = 1 const EF_NO_XATTRS = 2 const EF_SHARES_ALL_BLOCKS = 64 const EHOSTDOWN = 64 const EHOSTUNREACH = 65 const EIDRM = 90 const EILSEQ = 92 const EINPROGRESS = 36 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 56 const EISDIR = 21 const ELAST = 106 const ELOOP = 62 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 40 const EMULTIHOP = 95 const ENAMETOOLONG = 63 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENEEDAUTH = 81 const ENETDOWN = 50 const ENETRESET = 52 const ENETUNREACH = 51 const ENFILE = 23 const ENOATTR = 93 const ENOBUFS = 55 const ENODATA = 96 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOLCK = 77 const ENOLINK = 97 const ENOMEM = 12 const ENOMSG = 91 const ENOPOLICY = 103 const ENOPROTOOPT = 42 const ENOSPC = 28 const ENOSR = 98 const ENOSTR = 99 const ENOSYS = 78 const ENOTBLK = 15 const ENOTCONN = 57 const ENOTDIR = 20 const ENOTEMPTY = 66 const ENOTRECOVERABLE = 104 const ENOTSOCK = 38 const ENOTSUP = 45 const ENOTTY = 25 const ENXIO = 6 const EOF = -1 const EOPNOTSUPP = 102 const EOVERFLOW = 84 const EOWNERDEAD = 105 const EPERM = 1 const EPFNOSUPPORT = 46 const EPIPE = 32 const EPROCLIM = 67 const EPROCUNAVAIL = 76 const EPROGMISMATCH = 75 const EPROGUNAVAIL = 74 const EPROTO = 100 const EPROTONOSUPPORT = 43 const EPROTOTYPE = 41 const EPWROFF = 82 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const EQFULL = 106 const EQUIV_CLASS_MAX = 2 const ERANGE = 34 const EREMOTE = 71 const EROFS = 30 const ERPCMISMATCH = 73 const ESHLIBVERS = 87 const ESHUTDOWN = 58 const ESOCKTNOSUPPORT = 44 const ESPIPE = 29 const ESRCH = 3 const ESTALE = 70 const ETIME = 101 const ETIMEDOUT = 60 const ETOOMANYREFS = 59 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUSERS = 68 const EWOULDBLOCK = 35 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const EXPR_NEST_MAX = 32 const FALSE = 0 const FAPPEND = 8 const FASYNC = 64 const FCNTL_FS_SPECIFIC_BASE = 65536 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFDSYNC = 4194304 const FFSYNC = 128 const FILENAME_MAX = 1024 const FILESEC_GUID = 0 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 4 const FNONBLOCK = 4 const FOOTPRINT_INTERVAL_RESET = 1 const FOPEN_MAX = 20 const FPE_FLTDIV = 1 const FPE_FLTINV = 5 const FPE_FLTOVF = 2 const FPE_FLTRES = 4 const FPE_FLTSUB = 6 const FPE_FLTUND = 3 const FPE_INTDIV = 7 const FPE_INTOVF = 8 const FPE_NOOP = 0 const FP_CHOP = 3 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 2 const FP_NAN = 1 const FP_NORMAL = 4 const FP_PREC_24B = 0 const FP_PREC_53B = 2 const FP_PREC_64B = 3 const FP_QNAN = 1 const FP_RND_DOWN = 1 const FP_RND_NEAR = 0 const FP_RND_UP = 2 const FP_SNAN = 1 const FP_STATE_BYTES = 512 const FP_SUBNORMAL = 5 const FP_SUPERNORMAL = 6 const FP_ZERO = 3 const FREAD = 1 const FSCALE = 2048 const FSCRED = -1 const FSHIFT = 11 const FSOPT_ATTR_CMN_EXTENDED = 32 const FSOPT_NOFOLLOW = 1 const FSOPT_NOFOLLOW_ANY = 2048 const FSOPT_NOINMEMUPDATE = 2 const FSOPT_PACK_INVAL_ATTRS = 8 const FSOPT_REPORT_FULLSIZE = 4 const FSOPT_RETURN_REALDEV = 512 const FST_EOF = -1 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const FWRITE = 2 const F_ADDFILESIGS = 61 const F_ADDFILESIGS_FOR_DYLD_SIM = 83 const F_ADDFILESIGS_INFO = 103 const F_ADDFILESIGS_RETURN = 97 const F_ADDFILESUPPL = 104 const F_ADDSIGS = 59 const F_ADDSIGS_MAIN_BINARY = 113 const F_ALLOCATEALL = 4 const F_ALLOCATECONTIG = 2 const F_ALLOCATEPERSIST = 8 const F_ATTRIBUTION_TAG = 111 const F_BARRIERFSYNC = 85 const F_CHECK_LV = 98 const F_CHKCLEAN = 41 const F_CREATE_TAG = 1 const F_DELETE_TAG = 2 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 67 const F_FINDSIGS = 78 const F_FLUSH_DATA = 40 const F_FREEZE_FS = 53 const F_FULLFSYNC = 51 const F_GETCODEDIR = 72 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 107 const F_GETLK = 7 const F_GETLKPID = 66 const F_GETNOSIGPIPE = 74 const F_GETOWN = 5 const F_GETPATH = 50 const F_GETPATH_MTMINFO = 71 const F_GETPATH_NOFIRMLINK = 102 const F_GETPROTECTIONCLASS = 63 const F_GETPROTECTIONLEVEL = 77 const F_GETSIGSINFO = 105 const F_GLOBAL_NOCACHE = 55 const F_LOCK = 1 const F_LOG2PHYS = 49 const F_LOG2PHYS_EXT = 65 const F_NOCACHE = 48 const F_NODIRECT = 62 const F_OFD_GETLK = 92 const F_OFD_SETLK = 90 const F_OFD_SETLKW = 91 const F_OFD_SETLKWTIMEOUT = 93 const F_OK = 0 const F_PATHPKG_CHECK = 52 const F_PEOFPOSMODE = 3 const F_PREALLOCATE = 42 const F_PUNCHHOLE = 99 const F_QUERY_TAG = 4 const F_RDADVISE = 44 const F_RDAHEAD = 45 const F_RDLCK = 1 const F_SETBACKINGSTORE = 70 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 106 const F_SETLK = 8 const F_SETLKW = 9 const F_SETLKWTIMEOUT = 10 const F_SETNOSIGPIPE = 73 const F_SETOWN = 6 const F_SETPROTECTIONCLASS = 64 const F_SETSIZE = 43 const F_SINGLE_WRITER = 76 const F_SPECULATIVE_READ = 101 const F_TEST = 3 const F_THAW_FS = 54 const F_TLOCK = 2 const F_TRANSCODEKEY = 75 const F_TRANSFEREXTENTS = 110 const F_TRIM_ACTIVE_FILE = 100 const F_ULOCK = 0 const F_UNLCK = 2 const F_VOLPOSMODE = 4 const F_WRLCK = 3 const GCC_VERSION = 4002001 const GEOPOLY_PI = 3.141592653589793 const GETSIGSINFO_PLATFORM_BINARY = 1 const GID_MAX = 2147483647 const GRAFTDMG_SECURE_BOOT_CRYPTEX_ARGS_VERSION = 1 const GUARD_TYPE_MACH_PORT = 1 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 1 const HAVE_LSTAT = 1 const HAVE_MREMAP = 0 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VAL = 0 const HUGE_VALF = 0 const HUGE_VALL = 0 const IFCAP_AV = 256 const IFCAP_CSUM_PARTIAL = 8192 const IFCAP_CSUM_ZERO_INVERT = 16384 const IFCAP_HWCSUM = 3 const IFCAP_HW_TIMESTAMP = 2048 const IFCAP_JUMBO_MTU = 16 const IFCAP_LRO = 128 const IFCAP_LRO_NUM_SEG = 32768 const IFCAP_RXCSUM = 1 const IFCAP_SKYWALK = 1024 const IFCAP_SW_TIMESTAMP = 4096 const IFCAP_TSO = 96 const IFCAP_TSO4 = 32 const IFCAP_TSO6 = 64 const IFCAP_TXCSUM = 2 const IFCAP_TXSTATUS = 512 const IFCAP_VALID = 65535 const IFCAP_VLAN_HWTAGGING = 8 const IFCAP_VLAN_MTU = 4 const IFF_ALLMULTI = 512 const IFF_ALTPHYS = 16384 const IFF_BROADCAST = 2 const IFF_DEBUG = 4 const IFF_LINK0 = 4096 const IFF_LINK1 = 8192 const IFF_LINK2 = 16384 const IFF_LOOPBACK = 8 const IFF_MULTICAST = 32768 const IFF_NOARP = 128 const IFF_NOTRAILERS = 32 const IFF_OACTIVE = 1024 const IFF_POINTOPOINT = 16 const IFF_PROMISC = 256 const IFF_RUNNING = 64 const IFF_SIMPLEX = 2048 const IFF_UP = 1 const IFNAMSIZ = 16 const IFNET_SLOWHZ = 1 const IFQ_DEF_C_TARGET_DELAY = 10000000 const IFQ_DEF_C_UPDATE_INTERVAL = 100000000 const IFQ_DEF_L4S_TARGET_DELAY = 2000000 const IFQ_DEF_L4S_UPDATE_INTERVAL = 100000000 const IFQ_DEF_L4S_WIRELESS_TARGET_DELAY = 15000000 const IFQ_LL_C_TARGET_DELAY = 10000000 const IFQ_LL_C_UPDATE_INTERVAL = 100000000 const IFQ_LL_L4S_TARGET_DELAY = 2000000 const IFQ_LL_L4S_UPDATE_INTERVAL = 100000000 const IFQ_LL_L4S_WIRELESS_TARGET_DELAY = 15000000 const IFQ_MAXLEN = 128 const IFRTYPE_FUNCTIONAL_CELLULAR = 5 const IFRTYPE_FUNCTIONAL_COMPANIONLINK = 7 const IFRTYPE_FUNCTIONAL_INTCOPROC = 6 const IFRTYPE_FUNCTIONAL_LAST = 8 const IFRTYPE_FUNCTIONAL_LOOPBACK = 1 const IFRTYPE_FUNCTIONAL_MANAGEMENT = 8 const IFRTYPE_FUNCTIONAL_UNKNOWN = 0 const IFRTYPE_FUNCTIONAL_WIFI_AWDL = 4 const IFRTYPE_FUNCTIONAL_WIFI_INFRA = 3 const IFRTYPE_FUNCTIONAL_WIRED = 2 const IFSTATMAX = 800 const IF_DATA_TIMEVAL = 0 const IF_MAXMTU = 65535 const IF_MINMTU = 72 const IF_NAMESIZE = 16 const IF_WAKE_ON_MAGIC_PACKET = 1 const ILL_BADSTK = 8 const ILL_COPROC = 7 const ILL_ILLADR = 5 const ILL_ILLOPC = 1 const ILL_ILLOPN = 4 const ILL_ILLTRP = 2 const ILL_NOOP = 0 const ILL_PRVOPC = 3 const ILL_PRVREG = 6 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INT16_MAX = 32767 const INT16_MIN = -32768 const INT32_MAX = 2147483647 const INT32_MIN = -2147483648 const INT64_MAX = 9223372036854775807 const INT64_MIN = -9223372036854775808 const INT8_MAX = 127 const INT8_MIN = -128 const INTERFACE = 1 const INTMAX_MAX = 9223372036854775807 const INTMAX_MIN = -9223372036854775808 const INTPTR_MAX = 9223372036854775807 const INTPTR_MIN = -9223372036854775808 const INT_FAST16_MAX = 32767 const INT_FAST16_MIN = -32768 const INT_FAST32_MAX = 2147483647 const INT_FAST32_MIN = -2147483648 const INT_FAST64_MAX = 9223372036854775807 const INT_FAST64_MIN = -9223372036854775808 const INT_FAST8_MAX = 127 const INT_FAST8_MIN = -128 const INT_LEAST16_MAX = 32767 const INT_LEAST16_MIN = -32768 const INT_LEAST32_MAX = 2147483647 const INT_LEAST32_MIN = -2147483648 const INT_LEAST64_MAX = 9223372036854775807 const INT_LEAST64_MIN = -9223372036854775808 const INT_LEAST8_MAX = 127 const INT_LEAST8_MIN = -128 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const IOCPARM_MASK = 8191 const IOCPARM_MAX = 8192 const IOPOL_APPLICATION = 5 const IOPOL_ATIME_UPDATES_DEFAULT = 0 const IOPOL_ATIME_UPDATES_OFF = 1 const IOPOL_DEFAULT = 0 const IOPOL_IMPORTANT = 1 const IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 const IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 const IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 const IOPOL_NORMAL = 1 const IOPOL_PASSIVE = 2 const IOPOL_SCOPE_DARWIN_BG = 2 const IOPOL_SCOPE_PROCESS = 0 const IOPOL_SCOPE_THREAD = 1 const IOPOL_STANDARD = 5 const IOPOL_THROTTLE = 3 const IOPOL_TYPE_DISK = 0 const IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9 const IOPOL_TYPE_VFS_ATIME_UPDATES = 2 const IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10 const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6 const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7 const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8 const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 const IOPOL_TYPE_VFS_TRIGGER_RESOLVE = 5 const IOPOL_UTILITY = 4 const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0 const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1 const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0 const IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1 const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0 const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1 const IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0 const IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1 const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT = 0 const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON = 1 const IOPOL_VFS_SKIP_MTIME_UPDATE_IGNORE = 2 const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0 const IOPOL_VFS_SKIP_MTIME_UPDATE_ON = 1 const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT = 0 const IOPOL_VFS_TRIGGER_RESOLVE_OFF = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEV_DL_ADDMULTI = 7 const KEV_DL_AWDL_RESTRICTED = 26 const KEV_DL_AWDL_UNRESTRICTED = 27 const KEV_DL_DELMULTI = 8 const KEV_DL_IFCAP_CHANGED = 19 const KEV_DL_IFDELEGATE_CHANGED = 25 const KEV_DL_IF_ATTACHED = 9 const KEV_DL_IF_DETACHED = 11 const KEV_DL_IF_DETACHING = 10 const KEV_DL_IF_IDLE_ROUTE_REFCNT = 18 const KEV_DL_ISSUES = 24 const KEV_DL_LINK_ADDRESS_CHANGED = 16 const KEV_DL_LINK_OFF = 12 const KEV_DL_LINK_ON = 13 const KEV_DL_LINK_QUALITY_METRIC_CHANGED = 20 const KEV_DL_LOW_POWER_MODE_CHANGED = 30
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
// Code generated for linux/386 by 'generator -mlong-double-64 --package-name libsqlite3 --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -ignore-unsupported-alignment -ignore-link-errors -import=sync -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_WITHOUT_ZONEMALLOC -D_LARGEFILE64_SOURCE -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libc/include/linux/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libz/include/linux/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libtcl8.6/include/linux/386 -extended-errors -o sqlite3.go sqlite3.c -DSQLITE_OS_UNIX=1 -eval-all-macros', DO NOT EDIT. //go:build linux && 386 package sqlite3 import ( "reflect" "unsafe" "modernc.org/libc" "sync" ) var _ reflect.Type var _ unsafe.Pointer const ALLBITS = -1 const AT_EACCESS = 512 const AT_EMPTY_PATH = 4096 const AT_FDCWD = -100 const AT_NO_AUTOMOUNT = 2048 const AT_RECURSIVE = 32768 const AT_REMOVEDIR = 512 const AT_STATX_DONT_SYNC = 16384 const AT_STATX_FORCE_SYNC = 8192 const AT_STATX_SYNC_AS_STAT = 0 const AT_STATX_SYNC_TYPE = 24576 const AT_SYMLINK_FOLLOW = 1024 const AT_SYMLINK_NOFOLLOW = 256 const BIG_ENDIAN = 4321 const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 const BITVEC_USIZE = 0 const BTALLOC_ANY = 0 const BTALLOC_EXACT = 1 const BTALLOC_LE = 2 const BTCF_AtLast = 8 const BTCF_Incrblob = 16 const BTCF_Multiple = 32 const BTCF_Pinned = 64 const BTCF_ValidNKey = 2 const BTCF_ValidOvfl = 4 const BTCF_WriteFlag = 1 const BTCURSOR_FIRST_UNINIT = 0 const BTCURSOR_MAX_DEPTH = 20 const BTREE_APPEND = 8 const BTREE_APPLICATION_ID = 8 const BTREE_AUTOVACUUM_FULL = 1 const BTREE_AUTOVACUUM_INCR = 2 const BTREE_AUTOVACUUM_NONE = 0 const BTREE_AUXDELETE = 4 const BTREE_BLOBKEY = 2 const BTREE_BULKLOAD = 1 const BTREE_DATA_VERSION = 15 const BTREE_DEFAULT_CACHE_SIZE = 3 const BTREE_FILE_FORMAT = 2 const BTREE_FORDELETE = 8 const BTREE_FREE_PAGE_COUNT = 0 const BTREE_HINT_RANGE = 0 const BTREE_INCR_VACUUM = 7 const BTREE_INTKEY = 1 const BTREE_LARGEST_ROOT_PAGE = 4 const BTREE_MEMORY = 2 const BTREE_OMIT_JOURNAL = 1 const BTREE_PREFORMAT = 128 const BTREE_SAVEPOSITION = 2 const BTREE_SCHEMA_VERSION = 1 const BTREE_SEEK_EQ = 2 const BTREE_SINGLE = 4 const BTREE_TEXT_ENCODING = 5 const BTREE_UNORDERED = 8 const BTREE_USER_VERSION = 6 const BTREE_WRCSR = 4 const BTS_EXCLUSIVE = 64 const BTS_FAST_SECURE = 12 const BTS_INITIALLY_EMPTY = 16 const BTS_NO_WAL = 32 const BTS_OVERWRITE = 8 const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 const CC_AND = 24 const CC_BANG = 15 const CC_BOM = 30 const CC_COMMA = 23 const CC_DIGIT = 3 const CC_DOLLAR = 4 const CC_DOT = 26 const CC_EQ = 14 const CC_GT = 13 const CC_ID = 27 const CC_ILLEGAL = 28 const CC_KYWD = 2 const CC_KYWD0 = 1 const CC_LP = 17 const CC_LT = 12 const CC_MINUS = 11 const CC_NUL = 29 const CC_PERCENT = 22 const CC_PIPE = 10 const CC_PLUS = 20 const CC_QUOTE = 8 const CC_QUOTE2 = 9 const CC_RP = 18 const CC_SEMI = 19 const CC_SLASH = 16 const CC_SPACE = 7 const CC_STAR = 21 const CC_TILDA = 25 const CC_VARALPHA = 5 const CC_VARNUM = 6 const CC_X = 0 const CKCNSTRNT_COLUMN = 1 const CKCNSTRNT_ROWID = 2 const CLOCKS_PER_SEC = 1000000 const CLOCK_BOOTTIME = 7 const CLOCK_BOOTTIME_ALARM = 9 const CLOCK_MONOTONIC = 1 const CLOCK_MONOTONIC_COARSE = 6 const CLOCK_MONOTONIC_RAW = 4 const CLOCK_PROCESS_CPUTIME_ID = 2 const CLOCK_REALTIME = 0 const CLOCK_REALTIME_ALARM = 8 const CLOCK_REALTIME_COARSE = 5 const CLOCK_SGI_CYCLE = 10 const CLOCK_TAI = 11 const CLOCK_THREAD_CPUTIME_ID = 3 const CLONE_CHILD_CLEARTID = 2097152 const CLONE_CHILD_SETTID = 16777216 const CLONE_DETACHED = 4194304 const CLONE_FILES = 1024 const CLONE_FS = 512 const CLONE_IO = 2147483648 const CLONE_NEWCGROUP = 33554432 const CLONE_NEWIPC = 134217728 const CLONE_NEWNET = 1073741824 const CLONE_NEWNS = 131072 const CLONE_NEWPID = 536870912 const CLONE_NEWTIME = 128 const CLONE_NEWUSER = 268435456 const CLONE_NEWUTS = 67108864 const CLONE_PARENT = 32768 const CLONE_PARENT_SETTID = 1048576 const CLONE_PIDFD = 4096 const CLONE_PTRACE = 8192 const CLONE_SETTLS = 524288 const CLONE_SIGHAND = 2048 const CLONE_SYSVSEM = 262144 const CLONE_THREAD = 65536 const CLONE_UNTRACED = 8388608 const CLONE_VFORK = 16384 const CLONE_VM = 256 const COLFLAG_BUSY = 256 const COLFLAG_GENERATED = 96 const COLFLAG_HASCOLL = 512 const COLFLAG_HASTYPE = 4 const COLFLAG_HIDDEN = 2 const COLFLAG_NOEXPAND = 1024 const COLFLAG_NOINSERT = 98 const COLFLAG_NOTAVAIL = 128 const COLFLAG_PRIMKEY = 1 const COLFLAG_SORTERREF = 16 const COLFLAG_STORED = 64 const COLFLAG_UNIQUE = 8 const COLFLAG_VIRTUAL = 32 const COLNAME_COLUMN = 4 const COLNAME_DATABASE = 2 const COLNAME_DECLTYPE = 1 const COLNAME_N = 5 const COLNAME_NAME = 0 const COLNAME_TABLE = 3 const COLTYPE_ANY = 1 const COLTYPE_BLOB = 2 const COLTYPE_CUSTOM = 0 const COLTYPE_INT = 3 const COLTYPE_INTEGER = 4 const COLTYPE_REAL = 5 const COLTYPE_TEXT = 6 const CPU_SETSIZE = 1024 const CSIGNAL = 255 const CURSOR_FAULT = 4 const CURSOR_INVALID = 1 const CURSOR_REQUIRESEEK = 3 const CURSOR_SKIPNEXT = 2 const CURSOR_VALID = 0 const CURTYPE_BTREE = 0 const CURTYPE_PSEUDO = 3 const CURTYPE_SORTER = 1 const CURTYPE_VTAB = 2 const DBFLAG_EncodingFixed = 64 const DBFLAG_InternalFunc = 32 const DBFLAG_PreferBuiltin = 2 const DBFLAG_SchemaChange = 1 const DBFLAG_SchemaKnownOk = 16 const DBFLAG_Vacuum = 4 const DBFLAG_VacuumInto = 8 const DBSTAT_PAGE_PADDING_BYTES = 256 const DB_ResetWanted = 8 const DB_SchemaLoaded = 1 const DB_UnresetViews = 2 const DIRECT_MODE = 0 const DN_ACCESS = 1 const DN_ATTRIB = 32 const DN_CREATE = 4 const DN_DELETE = 8 const DN_MODIFY = 2 const DN_MULTISHOT = 2147483648 const DN_RENAME = 16 const DOTLOCK_SUFFIX = ".lock" const E2BIG = 7 const EACCES = 13 const EADDRINUSE = 98 const EADDRNOTAVAIL = 99 const EADV = 68 const EAFNOSUPPORT = 97 const EAGAIN = 11 const EALREADY = 114 const EBADE = 52 const EBADF = 9 const EBADFD = 77 const EBADMSG = 74 const EBADR = 53 const EBADRQC = 56 const EBADSLT = 57 const EBFONT = 59 const EBUSY = 16 const ECANCELED = 125 const ECHILD = 10 const ECHRNG = 44 const ECOMM = 70 const ECONNABORTED = 103 const ECONNREFUSED = 111 const ECONNRESET = 104 const EDEADLK = 35 const EDEADLOCK = 35 const EDESTADDRREQ = 89 const EDOM = 33 const EDOTDOT = 73 const EDQUOT = 122 const EEXIST = 17 const EFAULT = 14 const EFBIG = 27 const EHOSTDOWN = 112 const EHOSTUNREACH = 113 const EHWPOISON = 133 const EIDRM = 43 const EILSEQ = 84 const EINPROGRESS = 115 const EINTR = 4 const EINVAL = 22 const EIO = 5 const EISCONN = 106 const EISDIR = 21 const EISNAM = 120 const EKEYEXPIRED = 127 const EKEYREJECTED = 129 const EKEYREVOKED = 128 const EL2HLT = 51 const EL2NSYNC = 45 const EL3HLT = 46 const EL3RST = 47 const ELIBACC = 79 const ELIBBAD = 80 const ELIBEXEC = 83 const ELIBMAX = 82 const ELIBSCN = 81 const ELNRNG = 48 const ELOOP = 40 const EMEDIUMTYPE = 124 const EMFILE = 24 const EMLINK = 31 const EMSGSIZE = 90 const EMULTIHOP = 72 const ENAMETOOLONG = 36 const ENAME_NAME = 0 const ENAME_ROWID = 3 const ENAME_SPAN = 1 const ENAME_TAB = 2 const ENAVAIL = 119 const ENETDOWN = 100 const ENETRESET = 102 const ENETUNREACH = 101 const ENFILE = 23 const ENOANO = 55 const ENOBUFS = 105 const ENOCSI = 50 const ENODATA = 61 const ENODEV = 19 const ENOENT = 2 const ENOEXEC = 8 const ENOKEY = 126 const ENOLCK = 37 const ENOLINK = 67 const ENOMEDIUM = 123 const ENOMEM = 12 const ENOMSG = 42 const ENONET = 64 const ENOPKG = 65 const ENOPROTOOPT = 92 const ENOSPC = 28 const ENOSR = 63 const ENOSTR = 60 const ENOSYS = 38 const ENOTBLK = 15 const ENOTCONN = 107 const ENOTDIR = 20 const ENOTEMPTY = 39 const ENOTNAM = 118 const ENOTRECOVERABLE = 131 const ENOTSOCK = 88 const ENOTSUP = 95 const ENOTTY = 25 const ENOTUNIQ = 76 const ENXIO = 6 const EOPNOTSUPP = 95 const EOVERFLOW = 75 const EOWNERDEAD = 130 const EPERM = 1 const EPFNOSUPPORT = 96 const EPIPE = 32 const EPROTO = 71 const EPROTONOSUPPORT = 93 const EPROTOTYPE = 91 const EP_Agg = 16 const EP_CanBeNull = 2097152 const EP_Collate = 512 const EP_Commuted = 1024 const EP_ConstFunc = 1048576 const EP_DblQuoted = 128 const EP_Distinct = 4 const EP_FixedCol = 32 const EP_FromDDL = 1073741824 const EP_FullSize = 131072 const EP_HasFunc = 8 const EP_IfNullRow = 262144 const EP_Immutable = 2 const EP_InfixFunc = 256 const EP_InnerON = 2 const EP_IntValue = 2048 const EP_IsFalse = 536870912 const EP_IsTrue = 268435456 const EP_Leaf = 8388608 const EP_NoReduce = 1 const EP_OuterON = 1 const EP_Propagate = 4194824 const EP_Quoted = 67108864 const EP_Reduced = 16384 const EP_Skip = 8192 const EP_Static = 134217728 const EP_Subquery = 4194304 const EP_Subrtn = 33554432 const EP_SubtArg = 2147483648 const EP_TokenOnly = 65536 const EP_Unlikely = 524288 const EP_VarSelect = 64 const EP_Win = 32768 const EP_WinFunc = 16777216 const EP_xIsSelect = 4096 const ERANGE = 34 const EREMCHG = 78 const EREMOTE = 66 const EREMOTEIO = 121 const ERESTART = 85 const ERFKILL = 132 const EROFS = 30 const ESHUTDOWN = 108 const ESOCKTNOSUPPORT = 94 const ESPIPE = 29 const ESRCH = 3 const ESRMNT = 69 const ESTALE = 116 const ESTRPIPE = 86 const ETIME = 62 const ETIMEDOUT = 110 const ETOOMANYREFS = 109 const ETXTBSY = 26 const EU4_EXPR = 2 const EU4_IDX = 1 const EU4_NONE = 0 const EUCLEAN = 117 const EUNATCH = 49 const EUSERS = 87 const EWOULDBLOCK = 11 const EXCLUDED_TABLE_NUMBER = 2 const EXCLUSIVE_LOCK = 4 const EXDEV = 18 const EXFULL = 54 const EXIT_FAILURE = 1 const EXIT_SUCCESS = 0 const EXPRDUP_REDUCE = 1 const EXPR_FULLSIZE = 0 const F2FS_FEATURE_ATOMIC_WRITE = 4 const F2FS_IOCTL_MAGIC = 245 const F2FS_IOC_ABORT_VOLATILE_WRITE = 62725 const F2FS_IOC_COMMIT_ATOMIC_WRITE = 62722 const F2FS_IOC_GET_FEATURES = 2147546380 const F2FS_IOC_START_ATOMIC_WRITE = 62721 const F2FS_IOC_START_VOLATILE_WRITE = 62723 const FALLOC_FL_KEEP_SIZE = 1 const FALLOC_FL_PUNCH_HOLE = 2 const FAPPEND = 1024 const FASYNC = 8192 const FD_CLOEXEC = 1 const FD_SETSIZE = 1024 const FFSYNC = 1052672 const FILENAME_MAX = 4096 const FIOASYNC = 21586 const FIOCLEX = 21585 const FIOGETOWN = 35075 const FIONBIO = 21537 const FIONCLEX = 21584 const FIONREAD = 21531 const FIOQSIZE = 21600 const FIOSETOWN = 35073 const FLAG_SIGNED = 1 const FLAG_STRING = 4 const FNDELAY = 2048 const FNONBLOCK = 2048 const FOPEN_MAX = 1000 const FP_ILOGB0 = -2147483648 const FP_ILOGBNAN = -2147483648 const FP_INFINITE = 1 const FP_NAN = 0 const FP_NORMAL = 4 const FP_SUBNORMAL = 3 const FP_ZERO = 2 const FTS5CSR_EOF = 1 const FTS5CSR_FREE_ZRANK = 16 const FTS5CSR_REQUIRE_CONTENT = 2 const FTS5CSR_REQUIRE_DOCSIZE = 4 const FTS5CSR_REQUIRE_INST = 8 const FTS5CSR_REQUIRE_POSLIST = 64 const FTS5CSR_REQUIRE_RESEEK = 32 const FTS5INDEX_QUERY_DESC = 2 const FTS5INDEX_QUERY_NOOUTPUT = 32 const FTS5INDEX_QUERY_NOTOKENDATA = 128 const FTS5INDEX_QUERY_PREFIX = 1 const FTS5INDEX_QUERY_SCAN = 8 const FTS5INDEX_QUERY_SCANONETERM = 256 const FTS5INDEX_QUERY_SKIPEMPTY = 16 const FTS5INDEX_QUERY_SKIPHASH = 64 const FTS5INDEX_QUERY_TEST_NOIDX = 4 const FTS5TOKEN = 0 const FTS5_AND = 2 const FTS5_AVERAGES_ROWID = 1 const FTS5_BI_MATCH = 1 const FTS5_BI_ORDER_DESC = 128 const FTS5_BI_ORDER_RANK = 32 const FTS5_BI_ORDER_ROWID = 64 const FTS5_BI_RANK = 2 const FTS5_BI_ROWID_EQ = 4 const FTS5_BI_ROWID_GE = 16 const FTS5_BI_ROWID_LE = 8 const FTS5_CARET = 12 const FTS5_COLON = 5 const FTS5_COMMA = 13 const FTS5_CONTENT_EXTERNAL = 2 const FTS5_CONTENT_NONE = 1 const FTS5_CONTENT_NORMAL = 0 const FTS5_CONTENT_UNINDEXED = 3 const FTS5_CORRUPT = 267 const FTS5_CURRENT_VERSION = 4 const FTS5_CURRENT_VERSION_SECUREDELETE = 5 const FTS5_DATA_DLI_B = 1 const FTS5_DATA_HEIGHT_B = 5 const FTS5_DATA_ID_B = 16 const FTS5_DATA_PADDING = 20 const FTS5_DATA_PAGE_B = 31 const FTS5_DATA_ZERO_PADDING = 8 const FTS5_DEFAULT_AUTOMERGE = 4 const FTS5_DEFAULT_CRISISMERGE = 16 const FTS5_DEFAULT_DELETE_AUTOMERGE = 10 const FTS5_DEFAULT_HASHSIZE = 1048576 const FTS5_DEFAULT_NEARDIST = 10 const FTS5_DEFAULT_PAGE_SIZE = 4050 const FTS5_DEFAULT_RANK = "bm25" const FTS5_DEFAULT_USERMERGE = 4 const FTS5_DETAIL_COLUMNS = 2 const FTS5_DETAIL_FULL = 0 const FTS5_DETAIL_NONE = 1 const FTS5_EOF = 0 const FTS5_INSTTOKEN_SUBTYPE = 73 const FTS5_LCP = 7 const FTS5_LP = 10 const FTS5_MAIN_PREFIX = 48 const FTS5_MAX_LEVEL = 64 const FTS5_MAX_PAGE_SIZE = 65536 const FTS5_MAX_PREFIX_INDEXES = 31 const FTS5_MAX_SEGMENT = 2000 const FTS5_MAX_TOKEN_SIZE = 32768 const FTS5_MERGE_NLIST = 16 const FTS5_MINUS = 6 const FTS5_MIN_DLIDX_SIZE = 4 const FTS5_NOINLINE = "SQLITE_NOINLINE" const FTS5_NOT = 3 const FTS5_OPT_WORK_UNIT = 1000 const FTS5_OR = 1 const FTS5_PATTERN_GLOB = 66 const FTS5_PATTERN_LIKE = 65 const FTS5_PATTERN_NONE = 0 const FTS5_PLAN_MATCH = 1 const FTS5_PLAN_ROWID = 6 const FTS5_PLAN_SCAN = 5 const FTS5_PLAN_SORTED_MATCH = 4 const FTS5_PLAN_SOURCE = 2 const FTS5_PLAN_SPECIAL = 3 const FTS5_PLUS = 14 const FTS5_PORTER_MAX_TOKEN = 64 const FTS5_RANK_NAME = "rank" const FTS5_RCP = 8 const FTS5_REMOVE_DIACRITICS_COMPLEX = 2 const FTS5_REMOVE_DIACRITICS_NONE = 0 const FTS5_REMOVE_DIACRITICS_SIMPLE = 1 const FTS5_ROWID_NAME = "rowid" const FTS5_RP = 11 const FTS5_SEGITER_ONETERM = 1 const FTS5_SEGITER_REVERSE = 2 const FTS5_STAR = 15 const FTS5_STMT_DELETE_CONTENT = 6 const FTS5_STMT_DELETE_DOCSIZE = 8 const FTS5_STMT_INSERT_CONTENT = 4 const FTS5_STMT_LOOKUP = 2 const FTS5_STMT_LOOKUP2 = 3 const FTS5_STMT_LOOKUP_DOCSIZE = 9 const FTS5_STMT_REPLACE_CONFIG = 10 const FTS5_STMT_REPLACE_CONTENT = 5 const FTS5_STMT_REPLACE_DOCSIZE = 7 const FTS5_STMT_SCAN = 11 const FTS5_STMT_SCAN_ASC = 0 const FTS5_STMT_SCAN_DESC = 1 const FTS5_STRING = 9 const FTS5_STRUCTURE_ROWID = 10 const FTS5_STRUCTURE_V2 = "\xff\x00\x00\x01" const FTS5_TERM = 4 const FTS5_TOKENIZE_AUX = 8 const FTS5_TOKENIZE_DOCUMENT = 4 const FTS5_TOKENIZE_PREFIX = 2 const FTS5_TOKENIZE_QUERY = 1 const FTS5_TOKEN_COLOCATED = 1 const FTS5_VOCAB_COL = 0 const FTS5_VOCAB_COLUSED_MASK = 255 const FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" const FTS5_VOCAB_INSTANCE = 2 const FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" const FTS5_VOCAB_ROW = 1 const FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" const FTS5_VOCAB_TERM_EQ = 256 const FTS5_VOCAB_TERM_GE = 512 const FTS5_VOCAB_TERM_LE = 1024 const FTS5_WORK_UNIT = 64 const FULLY_WITHIN = 2 const FUNC_PERFECT_MATCH = 6 const F_ADD_SEALS = 1033 const F_CANCELLK = 1029 const F_DUPFD = 0 const F_DUPFD_CLOEXEC = 1030 const F_GETFD = 1 const F_GETFL = 3 const F_GETLEASE = 1025 const F_GETLK = 12 const F_GETLK64 = 12 const F_GETOWN = 9 const F_GETOWNER_UIDS = 17 const F_GETOWN_EX = 16 const F_GETPIPE_SZ = 1032 const F_GETSIG = 11 const F_GET_FILE_RW_HINT = 1037 const F_GET_RW_HINT = 1035 const F_GET_SEALS = 1034 const F_LOCK = 1 const F_NOTIFY = 1026 const F_OFD_GETLK = 36 const F_OFD_SETLK = 37 const F_OFD_SETLKW = 38 const F_OK = 0 const F_OWNER_GID = 2 const F_OWNER_PGRP = 2 const F_OWNER_PID = 1 const F_OWNER_TID = 0 const F_RDLCK = 0 const F_SEAL_FUTURE_WRITE = 16 const F_SEAL_GROW = 4 const F_SEAL_SEAL = 1 const F_SEAL_SHRINK = 2 const F_SEAL_WRITE = 8 const F_SETFD = 2 const F_SETFL = 4 const F_SETLEASE = 1024 const F_SETLK = 13 const F_SETLK64 = 13 const F_SETLKW = 14 const F_SETLKW64 = 14 const F_SETOWN = 8 const F_SETOWN_EX = 15 const F_SETPIPE_SZ = 1031 const F_SETSIG = 10 const F_SET_FILE_RW_HINT = 1038 const F_SET_RW_HINT = 1036 const F_TEST = 3 const F_TLOCK = 2 const F_ULOCK = 0 const F_UNLCK = 2 const F_WRLCK = 1 const GCC_VERSION = 12002000 const GEOPOLY_PI = 3.141592653589793 const HASHSIZE = 97 const HASHTABLE_HASH_1 = 383 const HASHTABLE_NPAGE = 4096 const HASHTABLE_NPAGE_ONE = 4096 const HASHTABLE_NSLOT = 8192 const HAVE_FCHMOD = 1 const HAVE_FCHOWN = 1 const HAVE_FULLFSYNC = 0 const HAVE_GETHOSTUUID = 0 const HAVE_LSTAT = 1 const HAVE_MREMAP = 1 const HAVE_PREAD = 1 const HAVE_PWRITE = 1 const HAVE_READLINK = 1 const HAVE_USLEEP = 1 const HUGE = 0 const HUGE_VALF = 0 const INCRINIT_NORMAL = 0 const INCRINIT_ROOT = 2 const INCRINIT_TASK = 1 const INFINITY = 0 const INITFLAG_AlterAdd = 3 const INITFLAG_AlterDrop = 2 const INITFLAG_AlterMask = 3 const INITFLAG_AlterRename = 1 const INLINEFUNC_affinity = 4 const INLINEFUNC_coalesce = 0 const INLINEFUNC_expr_compare = 3 const INLINEFUNC_expr_implies_expr = 2 const INLINEFUNC_iif = 5 const INLINEFUNC_implies_nonnull_row = 1 const INLINEFUNC_sqlite_offset = 6 const INLINEFUNC_unlikely = 99 const INTERFACE = 1 const IN_INDEX_EPH = 2 const IN_INDEX_INDEX_ASC = 3 const IN_INDEX_INDEX_DESC = 4 const IN_INDEX_LOOP = 4 const IN_INDEX_MEMBERSHIP = 2 const IN_INDEX_NOOP = 5 const IN_INDEX_NOOP_OK = 1 const IN_INDEX_ROWID = 1 const ITIMER_PROF = 2 const ITIMER_REAL = 0 const ITIMER_VIRTUAL = 1 const IsStat4 = 1 const JEACH_ATOM = 3 const JEACH_FULLKEY = 6 const JEACH_ID = 4 const JEACH_JSON = 8 const JEACH_KEY = 0 const JEACH_PARENT = 5 const JEACH_PATH = 7 const JEACH_ROOT = 9 const JEACH_TYPE = 2 const JEACH_VALUE = 1 const JEDIT_DEL = 1 const JEDIT_INS = 3 const JEDIT_REPL = 2 const JEDIT_SET = 4 const JSONB_ARRAY = 11 const JSONB_FALSE = 2 const JSONB_FLOAT = 5 const JSONB_FLOAT5 = 6 const JSONB_INT = 3 const JSONB_INT5 = 4 const JSONB_NULL = 0 const JSONB_OBJECT = 12 const JSONB_TEXT = 7 const JSONB_TEXT5 = 9 const JSONB_TEXTJ = 8 const JSONB_TEXTRAW = 10 const JSONB_TRUE = 1 const JSON_ABPATH = 3 const JSON_BLOB = 8 const JSON_CACHE_ID = -429938 const JSON_CACHE_SIZE = 4 const JSON_EDITABLE = 1 const JSON_INVALID_CHAR = 629145 const JSON_ISSET = 4 const JSON_JSON = 1 const JSON_KEEPERROR = 2 const JSON_LOOKUP_ERROR = 4294967295 const JSON_LOOKUP_NOTFOUND = 4294967294 const JSON_LOOKUP_PATHERROR = 4294967293 const JSON_MAX_DEPTH = 1000 const JSON_MERGE_BADPATCH = 2 const JSON_MERGE_BADTARGET = 1 const JSON_MERGE_OK = 0 const JSON_MERGE_OOM = 3 const JSON_SQL = 2 const JSON_SUBTYPE = 74 const JSTRING_ERR = 4 const JSTRING_MALFORMED = 2 const JSTRING_OOM = 1 const JT_CROSS = 2 const JT_ERROR = 128 const JT_INNER = 1 const JT_LEFT = 8 const JT_LTORJ = 64 const JT_NATURAL = 4 const JT_OUTER = 32 const JT_RIGHT = 16 const KEYINFO_ORDER_BIGNULL = 2 const KEYINFO_ORDER_DESC = 1 const LEGACY_SCHEMA_TABLE = "sqlite_master" const LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" const LITTLE_ENDIAN = 1234 const LOCATE_NOERR = 2 const LOCATE_VIEW = 1 const LOGEST_MAX = 32767 const LOGEST_MIN = -32768 const LONGDOUBLE_TYPE = 0 const LOOKASIDE_SMALL = 128 const L_INCR = 1 const L_SET = 0 const L_XTND = 2 const L_ctermid = 20 const L_cuserid = 20 const L_tmpnam = 20 const M10d_Any = 1 const M10d_No = 2 const M10d_Yes = 0 const MADV_COLD = 20 const MADV_DODUMP = 17 const MADV_DOFORK = 11 const MADV_DONTDUMP = 16 const MADV_DONTFORK = 10 const MADV_DONTNEED = 4 const MADV_FREE = 8 const MADV_HUGEPAGE = 14 const MADV_HWPOISON = 100 const MADV_KEEPONFORK = 19 const MADV_MERGEABLE = 12 const MADV_NOHUGEPAGE = 15 const MADV_NORMAL = 0 const MADV_PAGEOUT = 21 const MADV_RANDOM = 1 const MADV_REMOVE = 9 const MADV_SEQUENTIAL = 2 const MADV_SOFT_OFFLINE = 101 const MADV_UNMERGEABLE = 13 const MADV_WILLNEED = 3 const MADV_WIPEONFORK = 18 const MAP_32BIT = 64 const MAP_ANON = 32 const MAP_ANONYMOUS = 32 const MAP_DENYWRITE = 2048 const MAP_EXECUTABLE = 4096 const MAP_FAILED = -1 const MAP_FILE = 0 const MAP_FIXED = 16 const MAP_FIXED_NOREPLACE = 1048576 const MAP_GROWSDOWN = 256 const MAP_HUGETLB = 262144 const MAP_HUGE_16GB = 2281701376 const MAP_HUGE_16KB = 939524096 const MAP_HUGE_16MB = 1610612736 const MAP_HUGE_1GB = 2013265920 const MAP_HUGE_1MB = 1342177280 const MAP_HUGE_256MB = 1879048192 const MAP_HUGE_2GB = 2080374784 const MAP_HUGE_2MB = 1409286144 const MAP_HUGE_32MB = 1677721600 const MAP_HUGE_512KB = 1275068416 const MAP_HUGE_512MB = 1946157056 const MAP_HUGE_64KB = 1073741824 const MAP_HUGE_8MB = 1543503872 const MAP_HUGE_MASK = 63 const MAP_HUGE_SHIFT = 26 const MAP_LOCKED = 8192 const MAP_NONBLOCK = 65536 const MAP_NORESERVE = 16384 const MAP_POPULATE = 32768 const MAP_PRIVATE = 2 const MAP_SHARED = 1 const MAP_SHARED_VALIDATE = 3 const MAP_STACK = 131072 const MAP_SYNC = 524288 const MAP_TYPE = 15 const MATH_ERREXCEPT = 2 const MATH_ERRNO = 1 const MAX_HANDLE_SZ = 128 const MAX_PATHNAME = 512 const MAX_SECTOR_SIZE = 65536 const MB_CUR_MAX = 0 const MCL_CURRENT = 1 const MCL_FUTURE = 2 const MCL_ONFAULT = 4 const MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 const MEMTYPE_HEAP = 1 const MEMTYPE_LOOKASIDE = 2 const MEMTYPE_PCACHE = 4 const MEM_AffMask = 63 const MEM_Agg = 32768 const MEM_Blob = 16 const MEM_Cleared = 256 const MEM_Dyn = 4096 const MEM_Ephem = 16384 const MEM_FromBind = 64 const MEM_Int = 4 const MEM_IntReal = 32 const MEM_Null = 1 const MEM_Real = 8 const MEM_Static = 8192 const MEM_Str = 2 const MEM_Subtype = 2048 const MEM_Term = 512 const MEM_TypeMask = 3519 const MEM_Undefined = 0 const MEM_Zero = 1024 const MFD_ALLOW_SEALING = 2 const MFD_CLOEXEC = 1 const MFD_HUGETLB = 4 const MLOCK_ONFAULT = 1 const MREMAP_DONTUNMAP = 4 const MREMAP_FIXED = 2 const MREMAP_MAYMOVE = 1 const MSVC_VERSION = 0 const MS_ASYNC = 1 const MS_INVALIDATE = 2 const MS_SYNC = 4 const M_1_PI = 0 const M_2_PI = 0 const M_2_SQRTPI = 0 const M_E = 0 const M_LN10 = 0 const M_LN2 = 0 const M_LOG10E = 0 const M_LOG2E = 0 const M_PI = 3.141592653589793 const M_PI_2 = 0 const M_PI_4 = 0 const M_SQRT1_2 = 0 const M_SQRT2 = 0 const NAN = 0 const NB = 3 const NC_AllowAgg = 1 const NC_AllowWin = 16384 const NC_FromDDL = 262144 const NC_GenCol = 8 const NC_HasAgg = 16 const NC_HasWin = 32768 const NC_IdxExpr = 32 const NC_InAggFunc = 131072 const NC_IsCheck = 4 const NC_IsDDL = 65536 const NC_MinMaxAgg = 4096 const NC_NoSelect = 524288 const NC_OrderAgg = 134217728 const NC_PartIdx = 2 const NC_SelfRef = 46 const NC_Subquery = 64 const NC_UAggInfo = 256 const NC_UBaseReg = 1024 const NC_UEList = 128 const NC_UUpsert = 512 const NC_Where = 1048576 const NDEBUG = 1 const NN = 1 const NOT_WITHIN = 0 const NO_LOCK = 0 const N_6PACK = 7 const N_AX25 = 5 const N_CAIF = 20 const N_GIGASET_M101 = 16 const N_GSM0710 = 21 const N_HCI = 15 const N_HDLC = 13 const N_IRDA = 11 const N_MASC = 8 const N_MOUSE = 2 const N_NCI = 25 const N_NULL = 27 const N_OR_COST = 3 const N_PPP = 3 const N_PPS = 18 const N_PROFIBUS_FDL = 10 const N_R3964 = 9 const N_SLCAN = 17 const N_SLIP = 1 const N_SMSBLOCK = 12 const N_SORT_BUCKET = 32 const N_SPEAKUP = 26 const N_STATEMENT = 8 const N_STRIP = 4 const N_SYNC_PPP = 14 const N_TI_WL = 22 const N_TRACEROUTER = 24 const N_TRACESINK = 23 const N_TTY = 0 const N_V253 = 19 const N_X25 = 6 const OE_Abort = 2 const OE_Cascade = 10 const OE_Default = 11 const OE_Fail = 3 const OE_Ignore = 4 const OE_None = 0 const OE_Replace = 5 const OE_Restrict = 7 const OE_Rollback = 1 const OE_SetDflt = 9 const OE_SetNull = 8 const OE_Update = 6 const OMIT_TEMPDB = 0 const ONEPASS_MULTI = 2 const ONEPASS_OFF = 0 const ONEPASS_SINGLE = 1 const OPFLAG_APPEND = 8 const OPFLAG_AUXDELETE = 4 const OPFLAG_BULKCSR = 1 const OPFLAG_BYTELENARG = 192 const OPFLAG_EPHEM = 1 const OPFLAG_FORDELETE = 8 const OPFLAG_ISNOOP = 64 const OPFLAG_ISUPDATE = 4 const OPFLAG_LASTROWID = 32 const OPFLAG_LENGTHARG = 64 const OPFLAG_NCHANGE = 1 const OPFLAG_NOCHNG = 1 const OPFLAG_NOCHNG_MAGIC = 109 const OPFLAG_P2ISREG = 16 const OPFLAG_PERMUTE = 1 const OPFLAG_PREFORMAT = 128 const OPFLAG_SAVEPOSITION = 2 const OPFLAG_SEEKEQ = 2 const OPFLAG_TYPEOFARG = 128 const OPFLAG_USESEEKRESULT = 16 const OPFLG_IN1 = 2 const OPFLG_IN2 = 4 const OPFLG_IN3 = 8 const OPFLG_JUMP = 1 const OPFLG_JUMP0 = 128 const OPFLG_NCYCLE = 64 const OPFLG_OUT2 = 16 const OPFLG_OUT3 = 32 const OP_Abortable = 189 const OP_Add = 107 const OP_AddImm = 86 const OP_Affinity = 96 const OP_AggFinal = 165 const OP_AggInverse = 161 const OP_AggStep = 162 const OP_AggStep1 = 163 const OP_AggValue = 164 const OP_And = 44 const OP_AutoCommit = 1 const OP_BeginSubrtn = 74 const OP_BitAnd = 103 const OP_BitNot = 115 const OP_BitOr = 104 const OP_Blob = 77 const OP_Cast = 88 const OP_Checkpoint = 3 const OP_Clear = 145 const OP_Close = 122 const OP_ClrSubtype = 180 const OP_CollSeq = 85 const OP_Column = 94 const OP_ColumnsUsed = 123 const OP_Compare = 90 const OP_Concat = 112 const OP_Copy = 80 const OP_Count = 98 const OP_CreateBtree = 147 const OP_CursorHint = 185 const OP_CursorLock = 167 const OP_CursorUnlock = 168 const OP_DecrJumpZero = 61 const OP_DeferredSeek = 141 const OP_Delete = 130 const OP_Destroy = 144 const OP_Divide = 110 const OP_DropIndex = 152 const OP_DropTable = 151 const OP_DropTrigger = 153 const OP_ElseEq = 59 const OP_EndCoroutine = 68 const OP_Eq = 54 const OP_Expire = 166 const OP_Explain = 188 const OP_Filter = 64 const OP_FilterAdd = 183 const OP_FinishSeek = 143 const OP_FkCheck = 83 const OP_FkCounter = 158 const OP_FkIfZero = 49 const OP_Found = 29 const OP_Function = 66 const OP_Ge = 58 const OP_GetSubtype = 181 const OP_Gosub = 10 const OP_Goto = 9 const OP_Gt = 55 const OP_Halt = 70 const OP_HaltIfNull = 69 const OP_IdxDelete = 140 const OP_IdxGE = 45 const OP_IdxGT = 41 const OP_IdxInsert = 138 const OP_IdxLE = 40 const OP_IdxLT = 42 const OP_IdxRowid = 142 const OP_If = 16 const OP_IfNoHope = 26 const OP_IfNot = 17 const OP_IfNotOpen = 25 const OP_IfNotZero = 60 const OP_IfNullRow = 20 const OP_IfPos = 50 const OP_IfSizeBetween = 33 const OP_IncrVacuum = 62 const OP_Init = 8 const OP_InitCoroutine = 11 const OP_Insert = 128 const OP_Int64 = 72 const OP_IntCopy = 82 const OP_Integer = 71 const OP_IntegrityCk = 155 const OP_IsNull = 51 const OP_IsTrue = 91 const OP_IsType = 18 const OP_JournalMode = 4 const OP_Jump = 14 const OP_Last = 32 const OP_Le = 56 const OP_LoadAnalysis = 150 const OP_Lt = 57 const OP_MakeRecord = 97 const OP_MaxPgcnt = 179 const OP_MemMax = 159 const OP_Move = 79 const OP_Multiply = 109 const OP_MustBeInt = 13 const OP_Ne = 53 const OP_NewRowid = 127 const OP_Next = 39 const OP_NoConflict = 27 const OP_Noop = 187 const OP_Not = 19 const OP_NotExists = 31 const OP_NotFound = 28 const OP_NotNull = 52 const OP_Null = 75 const OP_NullRow = 136 const OP_Offset = 93 const OP_OffsetLimit = 160 const OP_Once = 15 const OP_OpenAutoindex = 116 const OP_OpenDup = 114 const OP_OpenEphemeral = 117 const OP_OpenPseudo = 121 const OP_OpenRead = 102 const OP_OpenWrite = 113 const OP_Or = 43 const OP_Pagecount = 178 const OP_Param = 157 const OP_ParseSchema = 149 const OP_Permutation = 89 const OP_Prev = 38 const OP_Program = 48 const OP_PureFunc = 65 const OP_ReadCookie = 99 const OP_Real = 154 const OP_RealAffinity = 87 const OP_ReleaseReg = 186 const OP_Remainder = 111 const OP_ReopenIdx = 101 const OP_ResetCount = 131 const OP_ResetSorter = 146 const OP_ResultRow = 84 const OP_Return = 67 const OP_Rewind = 36 const OP_RowCell = 129 const OP_RowData = 134 const OP_RowSetAdd = 156 const OP_RowSetRead = 46 const OP_RowSetTest = 47 const OP_Rowid = 135 const OP_SCopy = 81 const OP_Savepoint = 0 const OP_SeekEnd = 137 const OP_SeekGE = 23 const OP_SeekGT = 24 const OP_SeekHit = 125 const OP_SeekLE = 22 const OP_SeekLT = 21 const OP_SeekRowid = 30 const OP_SeekScan = 124 const OP_Sequence = 126 const OP_SequenceTest = 120 const OP_SetCookie = 100 const OP_SetSubtype = 182 const OP_ShiftLeft = 105 const OP_ShiftRight = 106 const OP_SoftNull = 76 const OP_Sort = 35 const OP_SorterCompare = 132 const OP_SorterData = 133 const OP_SorterInsert = 139 const OP_SorterNext = 37 const OP_SorterOpen = 119 const OP_SorterSort = 34 const OP_SqlExec = 148 const OP_String = 73 const OP_String8 = 118 const OP_Subtract = 108 const OP_TableLock = 169 const OP_Trace = 184 const OP_Transaction = 2 const OP_TypeCheck = 95 const OP_VBegin = 170 const OP_VCheck = 174 const OP_VColumn = 176 const OP_VCreate = 171 const OP_VDestroy = 172 const OP_VFilter = 6 const OP_VInitIn = 175 const OP_VNext = 63 const OP_VOpen = 173 const OP_VRename = 177 const OP_VUpdate = 7 const OP_Vacuum = 5 const OP_Variable = 78 const OP_Yield = 12 const OP_ZeroOrNull = 92 const OS_VXWORKS = 0 const O_ACCMODE = 2097155 const O_APPEND = 1024 const O_ASYNC = 8192 const O_BINARY = 0 const O_CLOEXEC = 524288 const O_CREAT = 64 const O_DIRECT = 16384 const O_DIRECTORY = 65536 const O_DSYNC = 4096 const O_EXCL = 128 const O_EXEC = 2097152 const O_LARGEFILE = 32768 const O_NDELAY = 2048 const O_NOATIME = 262144 const O_NOCTTY = 256 const O_NOFOLLOW = 131072 const O_NONBLOCK = 2048 const O_PATH = 2097152 const O_RDONLY = 0 const O_RDWR = 2 const O_RSYNC = 1052672 const O_SEARCH = 2097152 const O_SYNC = 1052672 const O_TMPFILE = 4259840 const O_TRUNC = 512 const O_TTY_INIT = 0 const O_WRONLY = 1 const P4_COLLSEQ = -2 const P4_DYNAMIC = -6 const P4_EXPR = -9 const P4_FREE_IF_LE = -6 const P4_FUNCCTX = -15 const P4_FUNCDEF = -7 const P4_INT32 = -3 const P4_INT64 = -13 const P4_INTARRAY = -14 const P4_KEYINFO = -8 const P4_MEM = -10 const P4_NOTUSED = 0 const P4_REAL = -12 const P4_STATIC = -1 const P4_SUBPROGRAM = -4 const P4_SUBRTNSIG = -17 const P4_TABLE = -5 const P4_TABLEREF = -16 const P4_TRANSIENT = 0 const P4_VTAB = -11 const P5_ConstraintCheck = 3 const P5_ConstraintFK = 4 const P5_ConstraintNotNull = 1 const P5_ConstraintUnique = 2 const PAGER_CACHESPILL = 32 const PAGER_CKPT_FULLFSYNC = 16 const PAGER_ERROR = 6 const PAGER_FLAGS_MASK = 56 const PAGER_FULLFSYNC = 8 const PAGER_GET_NOCONTENT = 1 const PAGER_GET_READONLY = 2 const PAGER_JOURNALMODE_DELETE = 0 const PAGER_JOURNALMODE_MEMORY = 4 const PAGER_JOURNALMODE_OFF = 2 const PAGER_JOURNALMODE_PERSIST = 1 const PAGER_JOURNALMODE_QUERY = -1 const PAGER_JOURNALMODE_TRUNCATE = 3 const PAGER_JOURNALMODE_WAL = 5 const PAGER_LOCKINGMODE_EXCLUSIVE = 1 const PAGER_LOCKINGMODE_NORMAL = 0 const PAGER_LOCKINGMODE_QUERY = -1 const PAGER_MEMORY = 2 const PAGER_OMIT_JOURNAL = 1 const PAGER_OPEN = 0 const PAGER_READER = 1 const PAGER_STAT_HIT = 0 const PAGER_STAT_MISS = 1 const PAGER_STAT_SPILL = 3 const PAGER_STAT_WRITE = 2 const PAGER_SYNCHRONOUS_EXTRA = 4 const PAGER_SYNCHRONOUS_FULL = 3 const PAGER_SYNCHRONOUS_MASK = 7 const PAGER_SYNCHRONOUS_NORMAL = 2 const PAGER_SYNCHRONOUS_OFF = 1 const PAGER_WRITER_CACHEMOD = 3 const PAGER_WRITER_DBMOD = 4 const PAGER_WRITER_FINISHED = 5 const PAGER_WRITER_LOCKED = 2 const PARSE_MODE_DECLARE_VTAB = 1 const PARSE_MODE_NORMAL = 0 const PARSE_MODE_RENAME = 2 const PARSE_MODE_UNMAP = 3 const PARTLY_WITHIN = 1 const PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 const PCACHE_DIRTYLIST_ADD = 2 const PCACHE_DIRTYLIST_FRONT = 3 const PCACHE_DIRTYLIST_REMOVE = 1 const PDP_ENDIAN = 3412 const PENDING_BYTE = 0 const PENDING_LOCK = 3 const PGHDR_CLEAN = 1 const PGHDR_DIRTY = 2 const PGHDR_DONT_WRITE = 16 const PGHDR_MMAP = 32 const PGHDR_NEED_SYNC = 8 const PGHDR_WAL_APPEND = 64 const PGHDR_WRITEABLE = 4 const POSIX_CLOSE_RESTART = 0 const POSIX_FADV_DONTNEED = 4 const POSIX_FADV_NOREUSE = 5 const POSIX_FADV_NORMAL = 0 const POSIX_FADV_RANDOM = 1 const POSIX_FADV_SEQUENTIAL = 2 const POSIX_FADV_WILLNEED = 3 const POSIX_MADV_DONTNEED = 4 const POSIX_MADV_NORMAL = 0 const POSIX_MADV_RANDOM = 1 const POSIX_MADV_SEQUENTIAL = 2 const POSIX_MADV_WILLNEED = 3 const PREFERRED_SCHEMA_TABLE = "sqlite_schema" const PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" const PROT_EXEC = 4 const PROT_GROWSDOWN = 16777216 const PROT_GROWSUP = 33554432 const PROT_NONE = 0 const PROT_READ = 1 const PROT_WRITE = 2 const PTF_INTKEY = 1 const PTF_LEAF = 8 const PTF_LEAFDATA = 4 const PTF_ZERODATA = 2 const PTHREAD_BARRIER_SERIAL_THREAD = -1 const PTHREAD_CANCELED = -1 const PTHREAD_CANCEL_ASYNCHRONOUS = 1 const PTHREAD_CANCEL_DEFERRED = 0 const PTHREAD_CANCEL_DISABLE = 1 const PTHREAD_CANCEL_ENABLE = 0 const PTHREAD_CANCEL_MASKED = 2 const PTHREAD_CREATE_DETACHED = 1 const PTHREAD_CREATE_JOINABLE = 0 const PTHREAD_EXPLICIT_SCHED = 1 const PTHREAD_INHERIT_SCHED = 0 const PTHREAD_MUTEX_DEFAULT = 0 const PTHREAD_MUTEX_ERRORCHECK = 2 const PTHREAD_MUTEX_NORMAL = 0 const PTHREAD_MUTEX_RECURSIVE = 1
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_openbsd_amd64.go
vendor/modernc.org/sqlite/lib/sqlite_openbsd_amd64.go
// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3410200/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ *libc.TLS var _ types.Size_t const ( ACCESSPERMS = 511 ALLPERMS = 4095 AT_EACCESS = 0x01 AT_FDCWD = -100 AT_REMOVEDIR = 0x08 AT_SYMLINK_FOLLOW = 0x04 AT_SYMLINK_NOFOLLOW = 0x02 BIG_ENDIAN = 4321 BITVEC_SZ = 512 BITVEC_SZELEM = 8 BTALLOC_ANY = 0 BTALLOC_EXACT = 1 BTALLOC_LE = 2 BTCF_AtLast = 0x08 BTCF_Incrblob = 0x10 BTCF_Multiple = 0x20 BTCF_Pinned = 0x40 BTCF_ValidNKey = 0x02 BTCF_ValidOvfl = 0x04 BTCF_WriteFlag = 0x01 BTCURSOR_MAX_DEPTH = 20 BTREE_APPEND = 0x08 BTREE_APPLICATION_ID = 8 BTREE_AUTOVACUUM_FULL = 1 BTREE_AUTOVACUUM_INCR = 2 BTREE_AUTOVACUUM_NONE = 0 BTREE_AUXDELETE = 0x04 BTREE_BLOBKEY = 2 BTREE_BULKLOAD = 0x00000001 BTREE_DATA_VERSION = 15 BTREE_DEFAULT_CACHE_SIZE = 3 BTREE_FILE_FORMAT = 2 BTREE_FORDELETE = 0x00000008 BTREE_FREE_PAGE_COUNT = 0 BTREE_HINT_RANGE = 0 BTREE_INCR_VACUUM = 7 BTREE_INTKEY = 1 BTREE_LARGEST_ROOT_PAGE = 4 BTREE_MEMORY = 2 BTREE_OMIT_JOURNAL = 1 BTREE_PREFORMAT = 0x80 BTREE_SAVEPOSITION = 0x02 BTREE_SCHEMA_VERSION = 1 BTREE_SEEK_EQ = 0x00000002 BTREE_SINGLE = 4 BTREE_TEXT_ENCODING = 5 BTREE_UNORDERED = 8 BTREE_USER_VERSION = 6 BTREE_WRCSR = 0x00000004 BTS_EXCLUSIVE = 0x0040 BTS_FAST_SECURE = 0x000c BTS_INITIALLY_EMPTY = 0x0010 BTS_NO_WAL = 0x0020 BTS_OVERWRITE = 0x0008 BTS_PAGESIZE_FIXED = 0x0002 BTS_PENDING = 0x0080 BTS_READ_ONLY = 0x0001 BTS_SECURE_DELETE = 0x0004 BUFSIZ = 1024 BYTE_ORDER = 1234 CACHE_STALE = 0 CC_AND = 24 CC_BANG = 15 CC_BOM = 30 CC_COMMA = 23 CC_DIGIT = 3 CC_DOLLAR = 4 CC_DOT = 26 CC_EQ = 14 CC_GT = 13 CC_ID = 27 CC_ILLEGAL = 28 CC_KYWD = 2 CC_KYWD0 = 1 CC_LP = 17 CC_LT = 12 CC_MINUS = 11 CC_NUL = 29 CC_PERCENT = 22 CC_PIPE = 10 CC_PLUS = 20 CC_QUOTE = 8 CC_QUOTE2 = 9 CC_RP = 18 CC_SEMI = 19 CC_SLASH = 16 CC_SPACE = 7 CC_STAR = 21 CC_TILDA = 25 CC_VARALPHA = 5 CC_VARNUM = 6 CC_X = 0 CHAR_BIT = 8 CHAR_MAX = 0x7f CHAR_MIN = -128 CKCNSTRNT_COLUMN = 0x01 CKCNSTRNT_ROWID = 0x02 CLK_TCK = 100 CLOCKS_PER_SEC = 100 CLOCK_BOOTTIME = 6 CLOCK_MONOTONIC = 3 CLOCK_PROCESS_CPUTIME_ID = 2 CLOCK_REALTIME = 0 CLOCK_THREAD_CPUTIME_ID = 4 CLOCK_UPTIME = 5 COLFLAG_BUSY = 0x0100 COLFLAG_GENERATED = 0x0060 COLFLAG_HASCOLL = 0x0200 COLFLAG_HASTYPE = 0x0004 COLFLAG_HIDDEN = 0x0002 COLFLAG_NOEXPAND = 0x0400 COLFLAG_NOINSERT = 0x0062 COLFLAG_NOTAVAIL = 0x0080 COLFLAG_PRIMKEY = 0x0001 COLFLAG_SORTERREF = 0x0010 COLFLAG_STORED = 0x0040 COLFLAG_UNIQUE = 0x0008 COLFLAG_VIRTUAL = 0x0020 COLNAME_COLUMN = 4 COLNAME_DATABASE = 2 COLNAME_DECLTYPE = 1 COLNAME_N = 5 COLNAME_NAME = 0 COLNAME_TABLE = 3 COLTYPE_ANY = 1 COLTYPE_BLOB = 2 COLTYPE_CUSTOM = 0 COLTYPE_INT = 3 COLTYPE_INTEGER = 4 COLTYPE_REAL = 5 COLTYPE_TEXT = 6 CURSOR_FAULT = 4 CURSOR_INVALID = 1 CURSOR_REQUIRESEEK = 3 CURSOR_SKIPNEXT = 2 CURSOR_VALID = 0 CURTYPE_BTREE = 0 CURTYPE_PSEUDO = 3 CURTYPE_SORTER = 1 CURTYPE_VTAB = 2 DBFLAG_EncodingFixed = 0x0040 DBFLAG_InternalFunc = 0x0020 DBFLAG_PreferBuiltin = 0x0002 DBFLAG_SchemaChange = 0x0001 DBFLAG_SchemaKnownOk = 0x0010 DBFLAG_Vacuum = 0x0004 DBFLAG_VacuumInto = 0x0008 DBSTAT_PAGE_PADDING_BYTES = 256 DB_ResetWanted = 0x0008 DB_SchemaLoaded = 0x0001 DB_UnresetViews = 0x0002 DEFFILEMODE = 438 DIRECT_MODE = 0 DL_GETERRNO = 1 DL_LAZY = 1 DL_REFERENCE = 4 DL_SETBINDLCK = 3 DL_SETTHREADLCK = 2 DOTLOCK_SUFFIX = ".lock" DST_AUST = 2 DST_CAN = 6 DST_EET = 5 DST_MET = 4 DST_NONE = 0 DST_USA = 1 DST_WET = 3 E2BIG = 7 EACCES = 13 EADDRINUSE = 48 EADDRNOTAVAIL = 49 EAFNOSUPPORT = 47 EAGAIN = 35 EALREADY = 37 EAUTH = 80 EBADF = 9 EBADMSG = 92 EBADRPC = 72 EBUSY = 16 ECANCELED = 88 ECHILD = 10 ECONNABORTED = 53 ECONNREFUSED = 61 ECONNRESET = 54 EDEADLK = 11 EDESTADDRREQ = 39 EDOM = 33 EDQUOT = 69 EEXIST = 17 EFAULT = 14 EFBIG = 27 EFTYPE = 79 EHOSTDOWN = 64 EHOSTUNREACH = 65 EIDRM = 89 EILSEQ = 84 EINPROGRESS = 36 EINTR = 4 EINVAL = 22 EIO = 5 EIPSEC = 82 EISCONN = 56 EISDIR = 21 ELAST = 95 ELOOP = 62 EMEDIUMTYPE = 86 EMFILE = 24 EMLINK = 31 EMSGSIZE = 40 ENAMETOOLONG = 63 ENAME_NAME = 0 ENAME_SPAN = 1 ENAME_TAB = 2 ENDRUNDISC = 9 ENEEDAUTH = 81 ENETDOWN = 50 ENETRESET = 52 ENETUNREACH = 51 ENFILE = 23 ENOATTR = 83 ENOBUFS = 55 ENODEV = 19 ENOENT = 2 ENOEXEC = 8 ENOLCK = 77 ENOMEDIUM = 85 ENOMEM = 12 ENOMSG = 90 ENOPROTOOPT = 42 ENOSPC = 28 ENOSYS = 78 ENOTBLK = 15 ENOTCONN = 57 ENOTDIR = 20 ENOTEMPTY = 66 ENOTRECOVERABLE = 93 ENOTSOCK = 38 ENOTSUP = 91 ENOTTY = 25 ENXIO = 6 EOF = -1 EOPNOTSUPP = 45 EOVERFLOW = 87 EOWNERDEAD = 94 EPERM = 1 EPFNOSUPPORT = 46 EPIPE = 32 EPROCLIM = 67 EPROCUNAVAIL = 76 EPROGMISMATCH = 75 EPROGUNAVAIL = 74 EPROTO = 95 EPROTONOSUPPORT = 43 EPROTOTYPE = 41 EP_Agg = 0x000010 EP_CanBeNull = 0x200000 EP_Collate = 0x000200 EP_Commuted = 0x000400 EP_ConstFunc = 0x100000 EP_DblQuoted = 0x000080 EP_Distinct = 0x000004 EP_FixedCol = 0x000020 EP_FromDDL = 0x40000000 EP_HasFunc = 0x000008 EP_IfNullRow = 0x040000 EP_Immutable = 0x02 EP_InfixFunc = 0x000100 EP_InnerON = 0x000002 EP_IntValue = 0x000800 EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 EP_Quoted = 0x4000000 EP_Reduced = 0x004000 EP_Skip = 0x002000 EP_Static = 0x8000000 EP_Subquery = 0x400000 EP_Subrtn = 0x2000000 EP_TokenOnly = 0x010000 EP_Unlikely = 0x080000 EP_VarSelect = 0x000040 EP_Win = 0x008000 EP_WinFunc = 0x1000000 EP_xIsSelect = 0x001000 ERANGE = 34 EREMOTE = 71 EROFS = 30 ERPCMISMATCH = 73 ESHUTDOWN = 58 ESOCKTNOSUPPORT = 44 ESPIPE = 29 ESRCH = 3 ESTALE = 70 ETIMEDOUT = 60 ETOOMANYREFS = 59 ETXTBSY = 26 EU4_EXPR = 2 EU4_IDX = 1 EU4_NONE = 0 EUSERS = 68 EWOULDBLOCK = 35 EXCLUDED_TABLE_NUMBER = 2 EXCLUSIVE_LOCK = 4 EXDEV = 18 EXIT_FAILURE = 1 EXIT_SUCCESS = 0 EXPRDUP_REDUCE = 0x0001 FAPPEND = 8 FASYNC = 64 FD_CLOEXEC = 1 FD_SETSIZE = 1024 FFSYNC = 128 FILENAME_MAX = 1024 FLAG_SIGNED = 1 FLAG_STRING = 4 FNDELAY = 4 FNONBLOCK = 4 FOPEN_MAX = 20 FP_ILOGB0 = -2147483647 FP_ILOGBNAN = 2147483647 FP_INFINITE = 0x01 FP_NAN = 0x02 FP_NORMAL = 0x04 FP_SUBNORMAL = 0x08 FP_ZERO = 0x10 FREAD = 0x0001 FTS5CSR_EOF = 0x01 FTS5CSR_FREE_ZRANK = 0x10 FTS5CSR_REQUIRE_CONTENT = 0x02 FTS5CSR_REQUIRE_DOCSIZE = 0x04 FTS5CSR_REQUIRE_INST = 0x08 FTS5CSR_REQUIRE_POSLIST = 0x40 FTS5CSR_REQUIRE_RESEEK = 0x20 FTS5INDEX_QUERY_DESC = 0x0002 FTS5INDEX_QUERY_NOOUTPUT = 0x0020 FTS5INDEX_QUERY_PREFIX = 0x0001 FTS5INDEX_QUERY_SCAN = 0x0008 FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 FTS5_AND = 2 FTS5_AVERAGES_ROWID = 1 FTS5_BI_MATCH = 0x0001 FTS5_BI_ORDER_DESC = 0x0080 FTS5_BI_ORDER_RANK = 0x0020 FTS5_BI_ORDER_ROWID = 0x0040 FTS5_BI_RANK = 0x0002 FTS5_BI_ROWID_EQ = 0x0004 FTS5_BI_ROWID_GE = 0x0010 FTS5_BI_ROWID_LE = 0x0008 FTS5_CARET = 12 FTS5_COLON = 5 FTS5_COMMA = 13 FTS5_CONTENT_EXTERNAL = 2 FTS5_CONTENT_NONE = 1 FTS5_CONTENT_NORMAL = 0 FTS5_CORRUPT = 267 FTS5_CURRENT_VERSION = 4 FTS5_DATA_DLI_B = 1 FTS5_DATA_HEIGHT_B = 5 FTS5_DATA_ID_B = 16 FTS5_DATA_PADDING = 20 FTS5_DATA_PAGE_B = 31 FTS5_DATA_ZERO_PADDING = 8 FTS5_DEFAULT_AUTOMERGE = 4 FTS5_DEFAULT_CRISISMERGE = 16 FTS5_DEFAULT_HASHSIZE = 1048576 FTS5_DEFAULT_NEARDIST = 10 FTS5_DEFAULT_PAGE_SIZE = 4050 FTS5_DEFAULT_RANK = "bm25" FTS5_DEFAULT_USERMERGE = 4 FTS5_DETAIL_COLUMNS = 2 FTS5_DETAIL_FULL = 0 FTS5_DETAIL_NONE = 1 FTS5_EOF = 0 FTS5_LCP = 7 FTS5_LP = 10 FTS5_MAIN_PREFIX = 48 FTS5_MAX_LEVEL = 64 FTS5_MAX_PAGE_SIZE = 65536 FTS5_MAX_PREFIX_INDEXES = 31 FTS5_MAX_SEGMENT = 2000 FTS5_MAX_TOKEN_SIZE = 32768 FTS5_MERGE_NLIST = 16 FTS5_MINUS = 6 FTS5_MIN_DLIDX_SIZE = 4 FTS5_NOT = 3 FTS5_OPT_WORK_UNIT = 1000 FTS5_OR = 1 FTS5_PATTERN_GLOB = 66 FTS5_PATTERN_LIKE = 65 FTS5_PATTERN_NONE = 0 FTS5_PLAN_MATCH = 1 FTS5_PLAN_ROWID = 6 FTS5_PLAN_SCAN = 5 FTS5_PLAN_SORTED_MATCH = 4 FTS5_PLAN_SOURCE = 2 FTS5_PLAN_SPECIAL = 3 FTS5_PLUS = 14 FTS5_PORTER_MAX_TOKEN = 64 FTS5_RANK_NAME = "rank" FTS5_RCP = 8 FTS5_REMOVE_DIACRITICS_COMPLEX = 2 FTS5_REMOVE_DIACRITICS_NONE = 0 FTS5_REMOVE_DIACRITICS_SIMPLE = 1 FTS5_ROWID_NAME = "rowid" FTS5_RP = 11 FTS5_SEGITER_ONETERM = 0x01 FTS5_SEGITER_REVERSE = 0x02 FTS5_STAR = 15 FTS5_STMT_DELETE_CONTENT = 5 FTS5_STMT_DELETE_DOCSIZE = 7 FTS5_STMT_INSERT_CONTENT = 3 FTS5_STMT_LOOKUP = 2 FTS5_STMT_LOOKUP_DOCSIZE = 8 FTS5_STMT_REPLACE_CONFIG = 9 FTS5_STMT_REPLACE_CONTENT = 4 FTS5_STMT_REPLACE_DOCSIZE = 6 FTS5_STMT_SCAN = 10 FTS5_STMT_SCAN_ASC = 0 FTS5_STMT_SCAN_DESC = 1 FTS5_STRING = 9 FTS5_STRUCTURE_ROWID = 10 FTS5_TERM = 4 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 FTS5_TOKENIZE_QUERY = 0x0001 FTS5_TOKEN_COLOCATED = 0x0001 FTS5_VOCAB_COL = 0 FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" FTS5_VOCAB_INSTANCE = 2 FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" FTS5_VOCAB_ROW = 1 FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" FTS5_VOCAB_TERM_EQ = 0x01 FTS5_VOCAB_TERM_GE = 0x02 FTS5_VOCAB_TERM_LE = 0x04 FTS5_WORK_UNIT = 64 FULLY_WITHIN = 2 FUNC_PERFECT_MATCH = 6 FWRITE = 0x0002 F_DUPFD = 0 F_DUPFD_CLOEXEC = 10 F_GETFD = 1 F_GETFL = 3 F_GETLK = 7 F_GETOWN = 5 F_ISATTY = 11 F_LOCK = 1 F_OK = 0 F_RDLCK = 1 F_SETFD = 2 F_SETFL = 4 F_SETLK = 8 F_SETLKW = 9 F_SETOWN = 6 F_TEST = 3 F_TLOCK = 2 F_ULOCK = 0 F_UNLCK = 2 F_WRLCK = 3 GCC_VERSION = 4002001 GEOPOLY_PI = 3.1415926535897932385 GID_MAX = 4294967295 HASHSIZE = 97 HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 HAVE_FCHMOD = 0 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 HAVE_LSTAT = 1 HAVE_MREMAP = 0 HAVE_READLINK = 1 HAVE_USLEEP = 1 INCRINIT_NORMAL = 0 INCRINIT_ROOT = 2 INCRINIT_TASK = 1 INITFLAG_AlterAdd = 0x0003 INITFLAG_AlterDrop = 0x0002 INITFLAG_AlterMask = 0x0003 INITFLAG_AlterRename = 0x0001 INLINEFUNC_affinity = 4 INLINEFUNC_coalesce = 0 INLINEFUNC_expr_compare = 3 INLINEFUNC_expr_implies_expr = 2 INLINEFUNC_iif = 5 INLINEFUNC_implies_nonnull_row = 1 INLINEFUNC_sqlite_offset = 6 INLINEFUNC_unlikely = 99 INTERFACE = 1 INT_MAX = 0x7fffffff INT_MIN = -2147483648 IN_INDEX_EPH = 2 IN_INDEX_INDEX_ASC = 3 IN_INDEX_INDEX_DESC = 4 IN_INDEX_LOOP = 0x0004 IN_INDEX_MEMBERSHIP = 0x0002 IN_INDEX_NOOP = 5 IN_INDEX_NOOP_OK = 0x0001 IN_INDEX_ROWID = 1 IOCPARM_MASK = 0x1fff ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 IsStat4 = 1 JEACH_ATOM = 3 JEACH_FULLKEY = 6 JEACH_ID = 4 JEACH_JSON = 8 JEACH_KEY = 0 JEACH_PARENT = 5 JEACH_PATH = 7 JEACH_ROOT = 9 JEACH_TYPE = 2 JEACH_VALUE = 1 JNODE_APPEND = 0x20 JNODE_ESCAPE = 0x02 JNODE_LABEL = 0x40 JNODE_PATCH = 0x10 JNODE_RAW = 0x01 JNODE_REMOVE = 0x04 JNODE_REPLACE = 0x08 JSON_ABPATH = 0x03 JSON_ARRAY = 6 JSON_CACHE_ID = -429938 JSON_CACHE_SZ = 4 JSON_FALSE = 2 JSON_INT = 3 JSON_ISSET = 0x04 JSON_JSON = 0x01 JSON_MAX_DEPTH = 2000 JSON_NULL = 0 JSON_OBJECT = 7 JSON_REAL = 4 JSON_SQL = 0x02 JSON_STRING = 5 JSON_SUBTYPE = 74 JSON_TRUE = 1 JT_CROSS = 0x02 JT_ERROR = 0x80 JT_INNER = 0x01 JT_LEFT = 0x08 JT_LTORJ = 0x40 JT_NATURAL = 0x04 JT_OUTER = 0x20 JT_RIGHT = 0x10 KBIND_BLOCK_MAX = 2 KBIND_DATA_MAX = 24 KEYINFO_ORDER_BIGNULL = 0x02 KEYINFO_ORDER_DESC = 0x01 LEGACY_SCHEMA_TABLE = "sqlite_master" LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" LITTLE_ENDIAN = 1234 LLONG_MAX = 0x7fffffffffffffff LLONG_MIN = -9223372036854775808 LOCATE_NOERR = 0x02 LOCATE_VIEW = 0x01 LOCK_EX = 0x02 LOCK_NB = 0x04 LOCK_SH = 0x01 LOCK_UN = 0x08 LONG_BIT = 64 LONG_MAX = 0x7fffffffffffffff LONG_MIN = -9223372036854775808 LOOKASIDE_SMALL = 128 L_INCR = 1 L_SET = 0 L_XTND = 2 L_ctermid = 1024 L_tmpnam = 1024 M10d_Any = 1 M10d_No = 2 M10d_Yes = 0 MADV_DONTNEED = 4 MADV_FREE = 6 MADV_NORMAL = 0 MADV_RANDOM = 1 MADV_SEQUENTIAL = 2 MADV_SPACEAVAIL = 5 MADV_WILLNEED = 3 MAP_ANON = 0x1000 MAP_ANONYMOUS = 4096 MAP_CONCEAL = 0x8000 MAP_COPY = 2 MAP_FILE = 0 MAP_FIXED = 0x0010 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0 MAP_INHERIT = 0 MAP_INHERIT_COPY = 1 MAP_INHERIT_NONE = 2 MAP_INHERIT_SHARE = 0 MAP_INHERIT_ZERO = 3 MAP_NOEXTEND = 0 MAP_NORESERVE = 0 MAP_PRIVATE = 0x0002 MAP_RENAME = 0 MAP_SHARED = 0x0001 MAP_STACK = 0x4000 MAP_TRYFIXED = 0 MATH_ERREXCEPT = 2 MATH_ERRNO = 1 MAX_PATHNAME = 512 MAX_SECTOR_SIZE = 0x10000 MB_LEN_MAX = 4 MCL_CURRENT = 0x01 MCL_FUTURE = 0x02 MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 MEMTYPE_HEAP = 0x01 MEMTYPE_LOOKASIDE = 0x02 MEMTYPE_PCACHE = 0x04 MEM_AffMask = 0x003f MEM_Agg = 0x8000 MEM_Blob = 0x0010 MEM_Cleared = 0x0100 MEM_Dyn = 0x1000 MEM_Ephem = 0x4000 MEM_FromBind = 0x0040 MEM_Int = 0x0004 MEM_IntReal = 0x0020 MEM_Null = 0x0001 MEM_Real = 0x0008 MEM_Static = 0x2000 MEM_Str = 0x0002 MEM_Subtype = 0x0800 MEM_Term = 0x0200 MEM_TypeMask = 0x0dbf MEM_Undefined = 0x0000 MEM_Zero = 0x0400 MSTSDISC = 8 MSVC_VERSION = 0 MS_ASYNC = 0x01 MS_INVALIDATE = 0x04 MS_SYNC = 0x02 NB = 3 NBBY = 8 NC_AllowAgg = 0x000001 NC_AllowWin = 0x004000 NC_Complex = 0x002000 NC_FromDDL = 0x040000 NC_GenCol = 0x000008 NC_HasAgg = 0x000010 NC_HasWin = 0x008000 NC_IdxExpr = 0x000020 NC_InAggFunc = 0x020000 NC_IsCheck = 0x000004 NC_IsDDL = 0x010000 NC_MinMaxAgg = 0x001000 NC_NoSelect = 0x080000 NC_OrderAgg = 0x8000000 NC_PartIdx = 0x000002 NC_SelfRef = 0x00002e NC_Subquery = 0x000040 NC_UAggInfo = 0x000100 NC_UBaseReg = 0x000400 NC_UEList = 0x000080 NC_UUpsert = 0x000200 NDEBUG = 1 NMEADISC = 7 NN = 1 NOT_WITHIN = 0 NO_LOCK = 0 N_OR_COST = 3 N_SORT_BUCKET = 32 N_STATEMENT = 8 OE_Abort = 2 OE_Cascade = 10 OE_Default = 11 OE_Fail = 3 OE_Ignore = 4 OE_None = 0 OE_Replace = 5 OE_Restrict = 7 OE_Rollback = 1 OE_SetDflt = 9 OE_SetNull = 8 OE_Update = 6 OMIT_TEMPDB = 0 ONEPASS_MULTI = 2 ONEPASS_OFF = 0 ONEPASS_SINGLE = 1 OPFLAG_APPEND = 0x08 OPFLAG_AUXDELETE = 0x04 OPFLAG_BULKCSR = 0x01 OPFLAG_EPHEM = 0x01 OPFLAG_FORDELETE = 0x08 OPFLAG_ISNOOP = 0x40 OPFLAG_ISUPDATE = 0x04 OPFLAG_LASTROWID = 0x20
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/sqlite/lib/sqlite_netbsd_amd64.go
vendor/modernc.org/sqlite/lib/sqlite_netbsd_amd64.go
// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_netbsd_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3400000/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1 -D__libc_cond_broadcast=pthread_cond_broadcast -D__libc_cond_destroy=pthread_cond_destroy -D__libc_cond_init=pthread_cond_init -D__libc_cond_signal=pthread_cond_signal -D__libc_cond_wait=pthread_cond_wait -D__libc_mutex_destroy=pthread_mutex_destroy -D__libc_mutex_init=pthread_mutex_init -D__libc_mutex_lock=pthread_mutex_lock -D__libc_mutex_trylock=pthread_mutex_trylock -D__libc_mutex_unlock=pthread_mutex_unlock -D__libc_mutexattr_destroy=pthread_mutexattr_destroy -D__libc_mutexattr_init=pthread_mutexattr_init -D__libc_mutexattr_settype=pthread_mutexattr_settype -D__libc_thr_yield=sched_yield', DO NOT EDIT. package sqlite3 import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ *libc.TLS var _ types.Size_t const ( ACCESSPERMS = 511 ALLPERMS = 4095 ARG_MAX = 262144 AT_EACCESS = 0x100 AT_FDCWD = -100 AT_REMOVEDIR = 0x800 AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x200 BC_BASE_MAX = 2147483647 BC_DIM_MAX = 65535 BC_SCALE_MAX = 2147483647 BC_STRING_MAX = 2147483647 BIG_ENDIAN = 4321 BITVEC_SZ = 512 BITVEC_SZELEM = 8 BTALLOC_ANY = 0 BTALLOC_EXACT = 1 BTALLOC_LE = 2 BTCF_AtLast = 0x08 BTCF_Incrblob = 0x10 BTCF_Multiple = 0x20 BTCF_Pinned = 0x40 BTCF_ValidNKey = 0x02 BTCF_ValidOvfl = 0x04 BTCF_WriteFlag = 0x01 BTCURSOR_MAX_DEPTH = 20 BTREE_APPEND = 0x08 BTREE_APPLICATION_ID = 8 BTREE_AUTOVACUUM_FULL = 1 BTREE_AUTOVACUUM_INCR = 2 BTREE_AUTOVACUUM_NONE = 0 BTREE_AUXDELETE = 0x04 BTREE_BLOBKEY = 2 BTREE_BULKLOAD = 0x00000001 BTREE_DATA_VERSION = 15 BTREE_DEFAULT_CACHE_SIZE = 3 BTREE_FILE_FORMAT = 2 BTREE_FORDELETE = 0x00000008 BTREE_FREE_PAGE_COUNT = 0 BTREE_HINT_RANGE = 0 BTREE_INCR_VACUUM = 7 BTREE_INTKEY = 1 BTREE_LARGEST_ROOT_PAGE = 4 BTREE_MEMORY = 2 BTREE_OMIT_JOURNAL = 1 BTREE_PREFORMAT = 0x80 BTREE_SAVEPOSITION = 0x02 BTREE_SCHEMA_VERSION = 1 BTREE_SEEK_EQ = 0x00000002 BTREE_SINGLE = 4 BTREE_TEXT_ENCODING = 5 BTREE_UNORDERED = 8 BTREE_USER_VERSION = 6 BTREE_WRCSR = 0x00000004 BTS_EXCLUSIVE = 0x0040 BTS_FAST_SECURE = 0x000c BTS_INITIALLY_EMPTY = 0x0010 BTS_NO_WAL = 0x0020 BTS_OVERWRITE = 0x0008 BTS_PAGESIZE_FIXED = 0x0002 BTS_PENDING = 0x0080 BTS_READ_ONLY = 0x0001 BTS_SECURE_DELETE = 0x0004 BUFSIZ = 1024 BYTE_ORDER = 1234 CACHE_STALE = 0 CC_AND = 24 CC_BANG = 15 CC_BOM = 30 CC_COMMA = 23 CC_DIGIT = 3 CC_DOLLAR = 4 CC_DOT = 26 CC_EQ = 14 CC_GT = 13 CC_ID = 27 CC_ILLEGAL = 28 CC_KYWD = 2 CC_KYWD0 = 1 CC_LP = 17 CC_LT = 12 CC_MINUS = 11 CC_NUL = 29 CC_PERCENT = 22 CC_PIPE = 10 CC_PLUS = 20 CC_QUOTE = 8 CC_QUOTE2 = 9 CC_RP = 18 CC_SEMI = 19 CC_SLASH = 16 CC_SPACE = 7 CC_STAR = 21 CC_TILDA = 25 CC_VARALPHA = 5 CC_VARNUM = 6 CC_X = 0 CHARCLASS_NAME_MAX = 14 CHAR_BIT = 8 CHAR_MAX = 127 CHAR_MIN = -128 CHILD_MAX = 160 CKCNSTRNT_COLUMN = 0x01 CKCNSTRNT_ROWID = 0x02 CLOCKS_PER_SEC = 100 CLOCK_MONOTONIC = 3 CLOCK_PROCESS_CPUTIME_ID = 0x40000000 CLOCK_PROF = 2 CLOCK_REALTIME = 0 CLOCK_THREAD_CPUTIME_ID = 0x20000000 CLOCK_VIRTUAL = 1 COLFLAG_BUSY = 0x0100 COLFLAG_GENERATED = 0x0060 COLFLAG_HASCOLL = 0x0200 COLFLAG_HASTYPE = 0x0004 COLFLAG_HIDDEN = 0x0002 COLFLAG_NOEXPAND = 0x0400 COLFLAG_NOINSERT = 0x0062 COLFLAG_NOTAVAIL = 0x0080 COLFLAG_PRIMKEY = 0x0001 COLFLAG_SORTERREF = 0x0010 COLFLAG_STORED = 0x0040 COLFLAG_UNIQUE = 0x0008 COLFLAG_VIRTUAL = 0x0020 COLL_WEIGHTS_MAX = 2 COLNAME_COLUMN = 4 COLNAME_DATABASE = 2 COLNAME_DECLTYPE = 1 COLNAME_N = 5 COLNAME_NAME = 0 COLNAME_TABLE = 3 COLTYPE_ANY = 1 COLTYPE_BLOB = 2 COLTYPE_CUSTOM = 0 COLTYPE_INT = 3 COLTYPE_INTEGER = 4 COLTYPE_REAL = 5 COLTYPE_TEXT = 6 CURSOR_FAULT = 4 CURSOR_INVALID = 1 CURSOR_REQUIRESEEK = 3 CURSOR_SKIPNEXT = 2 CURSOR_VALID = 0 CURTYPE_BTREE = 0 CURTYPE_PSEUDO = 3 CURTYPE_SORTER = 1 CURTYPE_VTAB = 2 DBFLAG_EncodingFixed = 0x0040 DBFLAG_InternalFunc = 0x0020 DBFLAG_PreferBuiltin = 0x0002 DBFLAG_SchemaChange = 0x0001 DBFLAG_SchemaKnownOk = 0x0010 DBFLAG_Vacuum = 0x0004 DBFLAG_VacuumInto = 0x0008 DBL_DIG = 15 DB_ResetWanted = 0x0008 DB_SchemaLoaded = 0x0001 DB_UnresetViews = 0x0002 DEFFILEMODE = 438 DIRECT_MODE = 0 DKCACHE_DPO = 0x040000 DKCACHE_FUA = 0x020000 DKCACHE_RCHANGE = 0x000100 DKCACHE_READ = 0x000001 DKCACHE_SAVE = 0x010000 DKCACHE_WCHANGE = 0x000200 DKCACHE_WRITE = 0x000002 DL_GETERRNO = 1 DL_GETSYMBOL = 2 DL_LAZY = 1 DOMAIN = 1 DOTLOCK_SUFFIX = ".lock" E2BIG = 7 EACCES = 13 EADDRINUSE = 48 EADDRNOTAVAIL = 49 EAFNOSUPPORT = 47 EAGAIN = 35 EALREADY = 37 EAUTH = 80 EBADF = 9 EBADMSG = 88 EBADRPC = 72 EBUSY = 16 ECANCELED = 87 ECHILD = 10 ECONNABORTED = 53 ECONNREFUSED = 61 ECONNRESET = 54 EDEADLK = 11 EDESTADDRREQ = 39 EDOM = 33 EDQUOT = 69 EEXIST = 17 EFAULT = 14 EFBIG = 27 EFTYPE = 79 EHOSTDOWN = 64 EHOSTUNREACH = 65 EIDRM = 82 EILSEQ = 85 EINPROGRESS = 36 EINTR = 4 EINVAL = 22 EIO = 5 EISCONN = 56 EISDIR = 21 ELAST = 96 ELOOP = 62 EMFILE = 24 EMLINK = 31 EMSGSIZE = 40 EMULTIHOP = 94 ENAMETOOLONG = 63 ENAME_NAME = 0 ENAME_SPAN = 1 ENAME_TAB = 2 ENEEDAUTH = 81 ENETDOWN = 50 ENETRESET = 52 ENETUNREACH = 51 ENFILE = 23 ENOATTR = 93 ENOBUFS = 55 ENODATA = 89 ENODEV = 19 ENOENT = 2 ENOEXEC = 8 ENOLCK = 77 ENOLINK = 95 ENOMEM = 12 ENOMSG = 83 ENOPROTOOPT = 42 ENOSPC = 28 ENOSR = 90 ENOSTR = 91 ENOSYS = 78 ENOTBLK = 15 ENOTCONN = 57 ENOTDIR = 20 ENOTEMPTY = 66 ENOTSOCK = 38 ENOTSUP = 86 ENOTTY = 25 ENXIO = 6 EOF = -1 EOPNOTSUPP = 45 EOVERFLOW = 84 EPERM = 1 EPFNOSUPPORT = 46 EPIPE = 32 EPROCLIM = 67 EPROCUNAVAIL = 76 EPROGMISMATCH = 75 EPROGUNAVAIL = 74 EPROTO = 96 EPROTONOSUPPORT = 43 EPROTOTYPE = 41 EP_Agg = 0x000010 EP_CanBeNull = 0x200000 EP_Collate = 0x000200 EP_Commuted = 0x000400 EP_ConstFunc = 0x100000 EP_DblQuoted = 0x000080 EP_Distinct = 0x000004 EP_FixedCol = 0x000020 EP_FromDDL = 0x40000000 EP_HasFunc = 0x000008 EP_IfNullRow = 0x040000 EP_Immutable = 0x02 EP_InfixFunc = 0x000100 EP_InnerON = 0x000002 EP_IntValue = 0x000800 EP_IsFalse = 0x20000000 EP_IsTrue = 0x10000000 EP_Leaf = 0x800000 EP_NoReduce = 0x01 EP_OuterON = 0x000001 EP_Propagate = 4194824 EP_Quoted = 0x4000000 EP_Reduced = 0x004000 EP_Skip = 0x002000 EP_Static = 0x8000000 EP_Subquery = 0x400000 EP_Subrtn = 0x2000000 EP_TokenOnly = 0x010000 EP_Unlikely = 0x080000 EP_VarSelect = 0x000040 EP_Win = 0x008000 EP_WinFunc = 0x1000000 EP_xIsSelect = 0x001000 ERANGE = 34 EREMOTE = 71 EROFS = 30 ERPCMISMATCH = 73 ESHUTDOWN = 58 ESOCKTNOSUPPORT = 44 ESPIPE = 29 ESRCH = 3 ESTALE = 70 ETIME = 92 ETIMEDOUT = 60 ETOOMANYREFS = 59 ETXTBSY = 26 EU4_EXPR = 2 EU4_IDX = 1 EU4_NONE = 0 EUSERS = 68 EWOULDBLOCK = 35 EXCLUDED_TABLE_NUMBER = 2 EXCLUSIVE_LOCK = 4 EXDEV = 18 EXIT_FAILURE = 1 EXIT_SUCCESS = 0 EXPRDUP_REDUCE = 0x0001 EXPR_NEST_MAX = 32 FAPPEND = 8 FASYNC = 64 FDATASYNC = 0x0010 FDISKSYNC = 0x0040 FD_CLOEXEC = 1 FD_SETSIZE = 256 FFILESYNC = 0x0020 FILENAME_MAX = 1024 FLAG_SIGNED = 1 FLAG_STRING = 4 FLT_DIG = 6 FLT_MAX = 0 FLT_MIN = 0 FNDELAY = 4 FOPEN_MAX = 20 FPARSELN_UNESCALL = 0x0f FPARSELN_UNESCCOMM = 0x04 FPARSELN_UNESCCONT = 0x02 FPARSELN_UNESCESC = 0x01 FPARSELN_UNESCREST = 0x08 FP_ILOGB0 = -2147483648 FP_ILOGBNAN = 2147483647 FP_INFINITE = 0x00 FP_NAN = 0x01 FP_NORMAL = 0x02 FP_SUBNORMAL = 0x03 FP_ZERO = 0x04 FREAD = 0x00000001 FTS5CSR_EOF = 0x01 FTS5CSR_FREE_ZRANK = 0x10 FTS5CSR_REQUIRE_CONTENT = 0x02 FTS5CSR_REQUIRE_DOCSIZE = 0x04 FTS5CSR_REQUIRE_INST = 0x08 FTS5CSR_REQUIRE_POSLIST = 0x40 FTS5CSR_REQUIRE_RESEEK = 0x20 FTS5INDEX_QUERY_DESC = 0x0002 FTS5INDEX_QUERY_NOOUTPUT = 0x0020 FTS5INDEX_QUERY_PREFIX = 0x0001 FTS5INDEX_QUERY_SCAN = 0x0008 FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 FTS5_AND = 2 FTS5_AVERAGES_ROWID = 1 FTS5_BI_MATCH = 0x0001 FTS5_BI_ORDER_DESC = 0x0080 FTS5_BI_ORDER_RANK = 0x0020 FTS5_BI_ORDER_ROWID = 0x0040 FTS5_BI_RANK = 0x0002 FTS5_BI_ROWID_EQ = 0x0004 FTS5_BI_ROWID_GE = 0x0010 FTS5_BI_ROWID_LE = 0x0008 FTS5_CARET = 12 FTS5_COLON = 5 FTS5_COMMA = 13 FTS5_CONTENT_EXTERNAL = 2 FTS5_CONTENT_NONE = 1 FTS5_CONTENT_NORMAL = 0 FTS5_CORRUPT = 267 FTS5_CURRENT_VERSION = 4 FTS5_DATA_DLI_B = 1 FTS5_DATA_HEIGHT_B = 5 FTS5_DATA_ID_B = 16 FTS5_DATA_PADDING = 20 FTS5_DATA_PAGE_B = 31 FTS5_DATA_ZERO_PADDING = 8 FTS5_DEFAULT_AUTOMERGE = 4 FTS5_DEFAULT_CRISISMERGE = 16 FTS5_DEFAULT_HASHSIZE = 1048576 FTS5_DEFAULT_NEARDIST = 10 FTS5_DEFAULT_PAGE_SIZE = 4050 FTS5_DEFAULT_RANK = "bm25" FTS5_DEFAULT_USERMERGE = 4 FTS5_DETAIL_COLUMNS = 2 FTS5_DETAIL_FULL = 0 FTS5_DETAIL_NONE = 1 FTS5_EOF = 0 FTS5_LCP = 7 FTS5_LP = 10 FTS5_MAIN_PREFIX = 48 FTS5_MAX_PAGE_SIZE = 65536 FTS5_MAX_PREFIX_INDEXES = 31 FTS5_MAX_SEGMENT = 2000 FTS5_MAX_TOKEN_SIZE = 32768 FTS5_MERGE_NLIST = 16 FTS5_MINUS = 6 FTS5_MIN_DLIDX_SIZE = 4 FTS5_NOT = 3 FTS5_OPT_WORK_UNIT = 1000 FTS5_OR = 1 FTS5_PATTERN_GLOB = 66 FTS5_PATTERN_LIKE = 65 FTS5_PATTERN_NONE = 0 FTS5_PLAN_MATCH = 1 FTS5_PLAN_ROWID = 6 FTS5_PLAN_SCAN = 5 FTS5_PLAN_SORTED_MATCH = 4 FTS5_PLAN_SOURCE = 2 FTS5_PLAN_SPECIAL = 3 FTS5_PLUS = 14 FTS5_PORTER_MAX_TOKEN = 64 FTS5_RANK_NAME = "rank" FTS5_RCP = 8 FTS5_REMOVE_DIACRITICS_COMPLEX = 2 FTS5_REMOVE_DIACRITICS_NONE = 0 FTS5_REMOVE_DIACRITICS_SIMPLE = 1 FTS5_ROWID_NAME = "rowid" FTS5_RP = 11 FTS5_SEGITER_ONETERM = 0x01 FTS5_SEGITER_REVERSE = 0x02 FTS5_STAR = 15 FTS5_STMT_DELETE_CONTENT = 5 FTS5_STMT_DELETE_DOCSIZE = 7 FTS5_STMT_INSERT_CONTENT = 3 FTS5_STMT_LOOKUP = 2 FTS5_STMT_LOOKUP_DOCSIZE = 8 FTS5_STMT_REPLACE_CONFIG = 9 FTS5_STMT_REPLACE_CONTENT = 4 FTS5_STMT_REPLACE_DOCSIZE = 6 FTS5_STMT_SCAN = 10 FTS5_STMT_SCAN_ASC = 0 FTS5_STMT_SCAN_DESC = 1 FTS5_STRING = 9 FTS5_STRUCTURE_ROWID = 10 FTS5_TERM = 4 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 FTS5_TOKENIZE_QUERY = 0x0001 FTS5_TOKEN_COLOCATED = 0x0001 FTS5_VOCAB_COL = 0 FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" FTS5_VOCAB_INSTANCE = 2 FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" FTS5_VOCAB_ROW = 1 FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" FTS5_VOCAB_TERM_EQ = 0x01 FTS5_VOCAB_TERM_GE = 0x02 FTS5_VOCAB_TERM_LE = 0x04 FTS5_WORK_UNIT = 64 FULLY_WITHIN = 2 FUNC_PERFECT_MATCH = 6 FWRITE = 0x00000002 F_CLOSEM = 10 F_DUPFD = 0 F_DUPFD_CLOEXEC = 12 F_GETFD = 1 F_GETFL = 3 F_GETLK = 7 F_GETNOSIGPIPE = 13 F_GETOWN = 5 F_LOCK = 1 F_MAXFD = 11 F_OK = 0 F_PARAM_MASK = 0xfff F_PARAM_MAX = 4095 F_RDLCK = 1 F_SETFD = 2 F_SETFL = 4 F_SETLK = 8 F_SETLKW = 9 F_SETNOSIGPIPE = 14 F_SETOWN = 6 F_TEST = 3 F_TLOCK = 2 F_ULOCK = 0 F_UNLCK = 2 F_WRLCK = 3 GCC_VERSION = 7005000 GEOPOLY_PI = 3.1415926535897932385 GETPASS_7BIT = 0x080 GETPASS_BUF_LIMIT = 0x004 GETPASS_ECHO = 0x020 GETPASS_ECHO_NL = 0x400 GETPASS_ECHO_STAR = 0x040 GETPASS_FAIL_EOF = 0x002 GETPASS_FORCE_LOWER = 0x100 GETPASS_FORCE_UPPER = 0x200 GETPASS_NEED_TTY = 0x001 GETPASS_NO_BEEP = 0x010 GETPASS_NO_SIGNAL = 0x008 GID_MAX = 2147483647 HASHSIZE = 97 HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 HAVE_LSTAT = 1 HAVE_MREMAP = 0 HAVE_READLINK = 1 HAVE_USLEEP = 1 HDLCDISC = 9 HN_AUTOSCALE = 0x20 HN_B = 0x04 HN_DECIMAL = 0x01 HN_DIVISOR_1000 = 0x08 HN_GETSCALE = 0x10 HN_NOSPACE = 0x02 INCRINIT_NORMAL = 0 INCRINIT_ROOT = 2 INCRINIT_TASK = 1 INITFLAG_AlterAdd = 0x0003 INITFLAG_AlterDrop = 0x0002 INITFLAG_AlterMask = 0x0003 INITFLAG_AlterRename = 0x0001 INLINEFUNC_affinity = 4 INLINEFUNC_coalesce = 0 INLINEFUNC_expr_compare = 3 INLINEFUNC_expr_implies_expr = 2 INLINEFUNC_iif = 5 INLINEFUNC_implies_nonnull_row = 1 INLINEFUNC_sqlite_offset = 6 INLINEFUNC_unlikely = 99 INT16_MAX = 32767 INT16_MIN = -32768 INT32_MAX = 2147483647 INT32_MIN = -2147483648 INT64_MAX = 9223372036854775807 INT64_MIN = -9223372036854775808 INT8_MAX = 127 INT8_MIN = -128 INTERFACE = 1 INTMAX_MAX = 9223372036854775807 INTMAX_MIN = -9223372036854775808 INTPTR_MAX = 9223372036854775807 INTPTR_MIN = -9223372036854775808 INT_FAST16_MAX = 2147483647 INT_FAST16_MIN = -2147483648 INT_FAST32_MAX = 2147483647 INT_FAST32_MIN = -2147483648 INT_FAST64_MAX = 9223372036854775807 INT_FAST64_MIN = -9223372036854775808 INT_FAST8_MAX = 2147483647 INT_FAST8_MIN = -2147483648 INT_LEAST16_MAX = 32767 INT_LEAST16_MIN = -32768 INT_LEAST32_MAX = 2147483647 INT_LEAST32_MIN = -2147483648 INT_LEAST64_MAX = 9223372036854775807 INT_LEAST64_MIN = -9223372036854775808 INT_LEAST8_MAX = 127 INT_LEAST8_MIN = -128 INT_MAX = 0x7fffffff INT_MIN = -2147483648 IN_INDEX_EPH = 2 IN_INDEX_INDEX_ASC = 3 IN_INDEX_INDEX_DESC = 4 IN_INDEX_LOOP = 0x0004 IN_INDEX_MEMBERSHIP = 0x0002 IN_INDEX_NOOP = 5 IN_INDEX_NOOP_OK = 0x0001 IN_INDEX_ROWID = 1 IOCGROUP_SHIFT = 8 IOCPARM_MASK = 0x1fff IOCPARM_SHIFT = 16 IOV_MAX = 1024 ITIMER_MONOTONIC = 3 ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 IsStat4 = 1 JEACH_ATOM = 3 JEACH_FULLKEY = 6 JEACH_ID = 4 JEACH_JSON = 8 JEACH_KEY = 0 JEACH_PARENT = 5 JEACH_PATH = 7 JEACH_ROOT = 9 JEACH_TYPE = 2 JEACH_VALUE = 1 JNODE_APPEND = 0x20 JNODE_ESCAPE = 0x02 JNODE_LABEL = 0x40 JNODE_PATCH = 0x10 JNODE_RAW = 0x01 JNODE_REMOVE = 0x04 JNODE_REPLACE = 0x08 JSON_ABPATH = 0x03 JSON_ARRAY = 6 JSON_CACHE_ID = -429938 JSON_CACHE_SZ = 4 JSON_FALSE = 2 JSON_INT = 3 JSON_ISSET = 0x04 JSON_JSON = 0x01 JSON_MAX_DEPTH = 2000 JSON_NULL = 0 JSON_OBJECT = 7 JSON_REAL = 4 JSON_SQL = 0x02 JSON_STRING = 5 JSON_SUBTYPE = 74 JSON_TRUE = 1 JT_CROSS = 0x02 JT_ERROR = 0x80 JT_INNER = 0x01 JT_LEFT = 0x08 JT_LTORJ = 0x40 JT_NATURAL = 0x04 JT_OUTER = 0x20 JT_RIGHT = 0x10 KEYINFO_ORDER_BIGNULL = 0x02 KEYINFO_ORDER_DESC = 0x01 LEGACY_SCHEMA_TABLE = "sqlite_master" LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" LINE_MAX = 2048 LINK_MAX = 32767 LITTLE_ENDIAN = 1234 LLONG_MAX = 0x7fffffffffffffff LLONG_MIN = -9223372036854775808 LOCATE_NOERR = 0x02 LOCATE_VIEW = 0x01 LOCK_EX = 0x02 LOCK_NB = 0x04 LOCK_SH = 0x01 LOCK_UN = 0x08 LOGIN_NAME_MAX = 17 LONG_BIT = 64 LONG_MAX = 0x7fffffffffffffff LONG_MIN = -9223372036854775808 LOOKASIDE_SMALL = 128 L_INCR = 1 L_SET = 0 L_XTND = 2 L_ctermid = 1024 L_cuserid = 9 L_tmpnam = 1024 M10d_Any = 1 M10d_No = 2 M10d_Yes = 0 MADV_DONTNEED = 4 MADV_FREE = 6 MADV_NORMAL = 0 MADV_RANDOM = 1 MADV_SEQUENTIAL = 2 MADV_SPACEAVAIL = 5 MADV_WILLNEED = 3 MAP_ALIGNMENT_SHIFT = 24 MAP_ANON = 4096 MAP_ANONYMOUS = 0x1000 MAP_FILE = 0x0000 MAP_FIXED = 0x0010 MAP_HASSEMAPHORE = 0x0200 MAP_INHERIT = 0x0080 MAP_INHERIT_COPY = 1 MAP_INHERIT_DEFAULT = 1 MAP_INHERIT_DONATE_COPY = 3 MAP_INHERIT_NONE = 2 MAP_INHERIT_SHARE = 0 MAP_INHERIT_ZERO = 4 MAP_NORESERVE = 0x0040 MAP_PRIVATE = 0x0002 MAP_REMAPDUP = 0x0004 MAP_RENAME = 0x0020 MAP_SHARED = 0x0001 MAP_STACK = 0x2000
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_amd64.go
vendor/modernc.org/libc/libc_musl_linux_amd64.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "golang.org/x/sys/unix" ) type long = int64 type ulong = uint64 // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<50 - 1]byte // int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags); func Xrenameat2(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 { if __ccgo_strace { trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v flags=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, flags, origin(2)) } if _, _, err := unix.Syscall6(unix.SYS_RENAMEAT2, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 { t.setErrno(int32(err)) return -1 } return 0 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/mem_musl.go
vendor/modernc.org/libc/mem_musl.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !libc.membrk && !libc.memgrind && linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm) package libc // import "modernc.org/libc" import ( "math" mbits "math/bits" "modernc.org/memory" ) const ( isMemBrk = false ) func Xmalloc(tls *TLS, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("tls=%v n=%v, (%v:)", tls, n, origin(2)) defer func() { trc("-> %v", r) }() } if n > math.MaxInt { tls.setErrno(ENOMEM) return 0 } allocatorMu.Lock() defer allocatorMu.Unlock() if n == 0 { // malloc(0) should return unique pointers // (often expected and gnulib replaces malloc if malloc(0) returns 0) n = 1 } var err error if r, err = allocator.UintptrMalloc(int(n)); err != nil { r = 0 tls.setErrno(ENOMEM) } return r } func Xcalloc(tls *TLS, m Tsize_t, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("tls=%v m=%v n=%v, (%v:)", tls, m, n, origin(2)) defer func() { trc("-> %v", r) }() } hi, rq := mbits.Mul(uint(m), uint(n)) if hi != 0 || rq > math.MaxInt { tls.setErrno(ENOMEM) return 0 } allocatorMu.Lock() defer allocatorMu.Unlock() if rq == 0 { rq = 1 } var err error if r, err = allocator.UintptrCalloc(int(rq)); err != nil { r = 0 tls.setErrno(ENOMEM) } return r } func Xrealloc(tls *TLS, p uintptr, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("tls=%v p=%v n=%v, (%v:)", tls, p, n, origin(2)) defer func() { trc("-> %v", r) }() } allocatorMu.Lock() defer allocatorMu.Unlock() var err error if r, err = allocator.UintptrRealloc(p, int(n)); err != nil { r = 0 tls.setErrno(ENOMEM) } return r } func Xfree(tls *TLS, p uintptr) { if __ccgo_strace { trc("tls=%v p=%v, (%v:)", tls, p, origin(2)) } allocatorMu.Lock() defer allocatorMu.Unlock() allocator.UintptrFree(p) } func Xmalloc_usable_size(tls *TLS, p uintptr) (r Tsize_t) { if __ccgo_strace { trc("tls=%v p=%v, (%v:)", tls, p, origin(2)) defer func() { trc("-> %v", r) }() } if p == 0 { return 0 } allocatorMu.Lock() defer allocatorMu.Unlock() return Tsize_t(memory.UintptrUsableSize(p)) } func MemAudit() (r []*MemAuditError) { return nil } func UsableSize(p uintptr) Tsize_t { allocatorMu.Lock() defer allocatorMu.Unlock() return Tsize_t(memory.UintptrUsableSize(p)) } type MemAllocatorStat struct { Allocs int Bytes int Mmaps int } // MemStat returns the global memory allocator statistics. // should be compiled with the memory.counters build tag for the data to be available. func MemStat() MemAllocatorStat { allocatorMu.Lock() defer allocatorMu.Unlock() return MemAllocatorStat{ Allocs: allocator.Allocs, Bytes: allocator.Bytes, Mmaps: allocator.Mmaps, } } // MemAuditStart locks the memory allocator, initializes and enables memory // auditing. Finaly it unlocks the memory allocator. // // Some memory handling errors, like double free or freeing of unallocated // memory, will panic when memory auditing is enabled. // // This memory auditing functionality has to be enabled using the libc.memgrind // build tag. // // It is intended only for debug/test builds. It slows down memory allocation // routines and it has additional memory costs. func MemAuditStart() {} // MemAuditReport locks the memory allocator, reports memory leaks, if any. // Finally it disables memory auditing and unlocks the memory allocator. // // This memory auditing functionality has to be enabled using the libc.memgrind // build tag. // // It is intended only for debug/test builds. It slows down memory allocation // routines and it has additional memory costs. func MemAuditReport() error { return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/dmesg.go
vendor/modernc.org/libc/dmesg.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build libc.dmesg // +build libc.dmesg package libc // import "modernc.org/libc" import ( "fmt" "os" "path/filepath" "strings" "time" ) const dmesgs = true var ( pid = fmt.Sprintf("[%v %v] ", os.Getpid(), filepath.Base(os.Args[0])) logf *os.File ) func init() { var err error if logf, err = os.OpenFile("/tmp/libc.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_SYNC, 0644); err != nil { panic(err.Error()) } dmesg("%v", time.Now()) } func dmesg(s string, args ...interface{}) { if s == "" { s = strings.Repeat("%v ", len(args)) } s = fmt.Sprintf(pid+s, args...) switch { case len(s) != 0 && s[len(s)-1] == '\n': fmt.Fprint(logf, s) default: fmt.Fprintln(logf, s) } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_openbsd_386.go
vendor/modernc.org/libc/capi_openbsd_386.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_C_ctype_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, "__assert": {}, "__assert13": {}, "__assert2": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_get_mb_cur_max": {}, "__errno": {}, "__errno_location": {}, "__error": {}, "__floatscan": {}, "__h_errno_location": {}, "__inet_aton": {}, "__inet_ntoa": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isspace_l": {}, "__isthreaded": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__mb_sb_limit": {}, "__runes_for_locale": {}, "__sF": {}, "__shgetc": {}, "__shlim": {}, "__srget": {}, "__stderrp": {}, "__stdinp": {}, "__stdoutp": {}, "__swbuf": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, "_ctype_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "_tolower_tab_": {}, "_toupper_tab_": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bswap16": {}, "bswap32": {}, "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chflags": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostname": {}, "getnameinfo": {}, "getpagesize": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isblank": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isspace": {}, "isupper": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "modf": {}, "munmap": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "qsort": {}, "raise": {}, "rand": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlen": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/atomic32.go
vendor/modernc.org/libc/atomic32.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (386 || arm) package libc // import "modernc.org/libc" import ( mbits "math/bits" ) // static inline int a_ctz_l(unsigned long x) func _a_ctz_l(tls *TLS, x ulong) int32 { return int32(mbits.TrailingZeros32(x)) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_386.go
vendor/modernc.org/libc/libc_386.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !linux package libc // import "modernc.org/libc" import ( "fmt" "unsafe" ) // Byte loads are atomic on this CPU. func a_load_8(addr uintptr) uint32 { return uint32(*(*byte)(unsafe.Pointer(addr))) } // int16 loads are atomic on this CPU when properly aligned. func a_load_16(addr uintptr) uint32 { if addr&1 != 0 { panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr)) } return uint32(*(*uint16)(unsafe.Pointer(addr))) } // Byte sores are atomic on this CPU. func a_store_8(addr uintptr, b byte) { *(*byte)(unsafe.Pointer(addr)) = b } // int16 stores are atomic on this CPU when properly aligned. func a_store_16(addr uintptr, n uint16) { if addr&1 != 0 { panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr)) } *(*uint16)(unsafe.Pointer(addr)) = n }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/builtin64.go
vendor/modernc.org/libc/builtin64.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64) package libc // import "modernc.org/libc" import ( mbits "math/bits" ) func X__builtin_ctzl(tls *TLS, x ulong) int32 { return int32(mbits.TrailingZeros64(x)) } func X__builtin_clzl(t *TLS, n ulong) int32 { return int32(mbits.LeadingZeros64(n)) } // int __builtin_popcountl (unsigned long x) func X__builtin_popcountl(t *TLS, x ulong) int32 { return int32(mbits.OnesCount64(x)) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_mips64le.go
vendor/modernc.org/libc/libc_mips64le.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "fmt" "unsafe" ) // Byte loads are atomic on this CPU. func a_load_8(addr uintptr) uint32 { return uint32(*(*byte)(unsafe.Pointer(addr))) } // int16 loads are atomic on this CPU when properly aligned. func a_load_16(addr uintptr) uint32 { if addr&1 != 0 { panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr)) } return uint32(*(*uint16)(unsafe.Pointer(addr))) } // Byte sores are atomic on this CPU. func a_store_8(addr uintptr, b byte) { *(*byte)(unsafe.Pointer(addr)) = b } // int16 stores are atomic on this CPU when properly aligned. func a_store_16(addr uintptr, n uint16) { if addr&1 != 0 { panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr)) } *(*uint16)(unsafe.Pointer(addr)) = n }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_freebsd_386.go
vendor/modernc.org/libc/capi_freebsd_386.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_CurrentRuneLocale": {}, "_DefaultRuneLocale": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, "___tolower": {}, "___toupper": {}, "__assert": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_get_mb_cur_max": {}, "__errno_location": {}, "__error": {}, "__floatscan": {}, "__h_errno_location": {}, "__inet_aton": {}, "__inet_ntoa": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isspace_l": {}, "__isthreaded": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__mb_sb_limit": {}, "__runes_for_locale": {}, "__shgetc": {}, "__shlim": {}, "__srget": {}, "__stderrp": {}, "__stdinp": {}, "__stdoutp": {}, "__swbuf": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bswap16": {}, "bswap32": {}, "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chflags": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostname": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isspace": {}, "isupper": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "modf": {}, "munmap": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "qsort": {}, "raise": {}, "rand": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlen": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/musl_openbsd_amd64.go
vendor/modernc.org/libc/musl_openbsd_amd64.go
// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc import ( "math" "reflect" "sync/atomic" "unsafe" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer // musl as a whole is licensed under the following standard MIT license: // // ---------------------------------------------------------------------- // Copyright © 2005-2020 Rich Felker, et al. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ---------------------------------------------------------------------- // // Authors/contributors include: // // A. Wilcox // Ada Worcester // Alex Dowad // Alex Suykov // Alexander Monakov // Andre McCurdy // Andrew Kelley // Anthony G. Basile // Aric Belsito // Arvid Picciani // Bartosz Brachaczek // Benjamin Peterson // Bobby Bingham // Boris Brezillon // Brent Cook // Chris Spiegel // Clément Vasseur // Daniel Micay // Daniel Sabogal // Daurnimator // David Carlier // David Edelsohn // Denys Vlasenko // Dmitry Ivanov // Dmitry V. Levin // Drew DeVault // Emil Renner Berthing // Fangrui Song // Felix Fietkau // Felix Janda // Gianluca Anzolin // Hauke Mehrtens // He X // Hiltjo Posthuma // Isaac Dunham // Jaydeep Patil // Jens Gustedt // Jeremy Huntwork // Jo-Philipp Wich // Joakim Sindholt // John Spencer // Julien Ramseier // Justin Cormack // Kaarle Ritvanen // Khem Raj // Kylie McClain // Leah Neukirchen // Luca Barbato // Luka Perkov // M Farkas-Dyck (Strake) // Mahesh Bodapati // Markus Wichmann // Masanori Ogino // Michael Clark // Michael Forney // Mikhail Kremnyov // Natanael Copa // Nicholas J. Kain // orc // Pascal Cuoq // Patrick Oppenlander // Petr Hosek // Petr Skocik // Pierre Carrier // Reini Urban // Rich Felker // Richard Pennington // Ryan Fairfax // Samuel Holland // Segev Finer // Shiz // sin // Solar Designer // Stefan Kristiansson // Stefan O'Rear // Szabolcs Nagy // Timo Teräs // Trutz Behn // Valentin Ochs // Will Dietz // William Haddon // William Pitcock // // Portions of this software are derived from third-party works licensed // under terms compatible with the above MIT license: // // The TRE regular expression implementation (src/regex/reg* and // src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed // under a 2-clause BSD license (license text in the source files). The // included version has been heavily modified by Rich Felker in 2012, in // the interests of size, simplicity, and namespace cleanliness. // // Much of the math library code (src/math/* and src/complex/*) is // Copyright © 1993,2004 Sun Microsystems or // Copyright © 2003-2011 David Schultz or // Copyright © 2003-2009 Steven G. Kargl or // Copyright © 2003-2009 Bruce D. Evans or // Copyright © 2008 Stephen L. Moshier or // Copyright © 2017-2018 Arm Limited // and labelled as such in comments in the individual source files. All // have been licensed under extremely permissive terms. // // The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 // The Android Open Source Project and is licensed under a two-clause BSD // license. It was taken from Bionic libc, used on Android. // // The AArch64 memcpy and memset code (src/string/aarch64/*) are // Copyright © 1999-2019, Arm Limited. // // The implementation of DES for crypt (src/crypt/crypt_des.c) is // Copyright © 1994 David Burren. It is licensed under a BSD license. // // The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was // originally written by Solar Designer and placed into the public // domain. The code also comes with a fallback permissive license for use // in jurisdictions that may not recognize the public domain. // // The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 // Valentin Ochs and is licensed under an MIT-style license. // // The x86_64 port was written by Nicholas J. Kain and is licensed under // the standard MIT terms. // // The mips and microblaze ports were originally written by Richard // Pennington for use in the ellcc project. The original code was adapted // by Rich Felker for build system and code conventions during upstream // integration. It is licensed under the standard MIT terms. // // The mips64 port was contributed by Imagination Technologies and is // licensed under the standard MIT terms. // // The powerpc port was also originally written by Richard Pennington, // and later supplemented and integrated by John Spencer. It is licensed // under the standard MIT terms. // // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more // contibutors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. // // In addition, permission is hereby granted for all public header files // (include/* and arch/*/bits/*) and crt files intended to be linked into // applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit // the copyright notice and permission notice otherwise required by the // license, and to use these files without any requirement of // attribution. These files include substantial contributions from: // // Bobby Bingham // John Spencer // Nicholas J. Kain // Rich Felker // Richard Pennington // Stefan Kristiansson // Szabolcs Nagy // // all of whom have explicitly granted such permission. // // This file previously contained text expressing a belief that most of // the files covered by the above exception were sufficiently trivial not // to be subject to copyright, resulting in confusion over whether it // negated the permissions granted in the license. In the spirit of // permissive licensing, and of not having licensing issues being an // obstacle to adoption, that text has been removed. const ( /* copyright.c:194:1: */ __musl__copyright__ = 0 ) const ( /* nameser.h:117:1: */ ns_uop_delete = 0 ns_uop_add = 1 ns_uop_max = 2 ) const ( /* nameser.h:147:1: */ ns_t_invalid = 0 ns_t_a = 1 ns_t_ns = 2 ns_t_md = 3 ns_t_mf = 4 ns_t_cname = 5 ns_t_soa = 6 ns_t_mb = 7 ns_t_mg = 8 ns_t_mr = 9 ns_t_null = 10 ns_t_wks = 11 ns_t_ptr = 12 ns_t_hinfo = 13 ns_t_minfo = 14 ns_t_mx = 15 ns_t_txt = 16 ns_t_rp = 17 ns_t_afsdb = 18 ns_t_x25 = 19 ns_t_isdn = 20 ns_t_rt = 21 ns_t_nsap = 22 ns_t_nsap_ptr = 23 ns_t_sig = 24 ns_t_key = 25 ns_t_px = 26 ns_t_gpos = 27 ns_t_aaaa = 28 ns_t_loc = 29 ns_t_nxt = 30 ns_t_eid = 31 ns_t_nimloc = 32 ns_t_srv = 33 ns_t_atma = 34 ns_t_naptr = 35 ns_t_kx = 36 ns_t_cert = 37 ns_t_a6 = 38 ns_t_dname = 39 ns_t_sink = 40 ns_t_opt = 41 ns_t_apl = 42 ns_t_tkey = 249 ns_t_tsig = 250 ns_t_ixfr = 251 ns_t_axfr = 252 ns_t_mailb = 253 ns_t_maila = 254 ns_t_any = 255 ns_t_zxfr = 256 ns_t_max = 65536 ) const ( /* nameser.h:210:1: */ ns_c_invalid = 0 ns_c_in = 1 ns_c_2 = 2 ns_c_chaos = 3 ns_c_hs = 4 ns_c_none = 254 ns_c_any = 255 ns_c_max = 65536 ) const ( /* nameser.h:221:1: */ ns_kt_rsa = 1 ns_kt_dh = 2 ns_kt_dsa = 3 ns_kt_private = 254 ) const ( /* nameser.h:228:1: */ cert_t_pkix = 1 cert_t_spki = 2 cert_t_pgp = 3 cert_t_url = 253 cert_t_oid = 254 ) const ( /* nameser.h:28:1: */ ns_s_qd = 0 ns_s_zn = 0 ns_s_an = 1 ns_s_pr = 1 ns_s_ns = 2 ns_s_ud = 2 ns_s_ar = 3 ns_s_max = 4 ) const ( /* nameser.h:75:1: */ ns_f_qr = 0 ns_f_opcode = 1 ns_f_aa = 2 ns_f_tc = 3 ns_f_rd = 4 ns_f_ra = 5 ns_f_z = 6 ns_f_ad = 7 ns_f_cd = 8 ns_f_rcode = 9 ns_f_max = 10 ) const ( /* nameser.h:89:1: */ ns_o_query = 0 ns_o_iquery = 1 ns_o_status = 2 ns_o_notify = 4 ns_o_update = 5 ns_o_max = 6 ) const ( /* nameser.h:98:1: */ ns_r_noerror = 0 ns_r_formerr = 1 ns_r_servfail = 2 ns_r_nxdomain = 3 ns_r_notimpl = 4 ns_r_refused = 5 ns_r_yxdomain = 6 ns_r_yxrrset = 7 ns_r_nxrrset = 8 ns_r_notauth = 9 ns_r_notzone = 10 ns_r_max = 11 ns_r_badvers = 16 ns_r_badsig = 16 ns_r_badkey = 17 ns_r_badtime = 18 ) type ptrdiff_t = int64 /* <builtin>:3:26 */ type size_t = uint64 /* <builtin>:9:23 */ type wchar_t = int32 /* <builtin>:15:24 */ // # 1 "lib/libc/gen/ctype_.c" // # 1 "<built-in>" // # 1 "<command-line>" // # 1 "lib/libc/gen/ctype_.c" // # 36 "lib/libc/gen/ctype_.c" // # 1 "./include/ctype.h" 1 // # 43 "./include/ctype.h" // # 1 "./sys/sys/cdefs.h" 1 // # 41 "./sys/sys/cdefs.h" // # 1 "./machine/cdefs.h" 1 // # 42 "./sys/sys/cdefs.h" 2 // # 44 "./include/ctype.h" 2 // # 57 "./include/ctype.h" // typedef void *locale_t; // // // // // // extern const char *_ctype_; // extern const short *_tolower_tab_; // extern const short *_toupper_tab_; // // // int isalnum(int); // int isalpha(int); // int iscntrl(int); // int isdigit(int); // int isgraph(int); // int islower(int); // int isprint(int); // int ispunct(int); // int isspace(int); // int isupper(int); // int isxdigit(int); // int tolower(int); // int toupper(int); // // // // int isblank(int); // // // // int isascii(int); // int toascii(int); // int _tolower(int); // int _toupper(int); // // // // int isalnum_l(int, locale_t); // int isalpha_l(int, locale_t); // int isblank_l(int, locale_t); // int iscntrl_l(int, locale_t); // int isdigit_l(int, locale_t); // int isgraph_l(int, locale_t); // int islower_l(int, locale_t); // int isprint_l(int, locale_t); // int ispunct_l(int, locale_t); // int isspace_l(int, locale_t); // int isupper_l(int, locale_t); // int isxdigit_l(int, locale_t); // int tolower_l(int, locale_t); // int toupper_l(int, locale_t); // // // // // // // extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); // } // // extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); // } // // extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); // } // // extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); // } // // extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); // } // // extern __inline __attribute__((__gnu_inline__)) int islower(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); // } // // extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); // } // // extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); // } // // extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); // } // // extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); // } // // extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); // } // // extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) // { // if ((unsigned int)_c > 255) // return (_c); // return ((_tolower_tab_ + 1)[_c]); // } // // extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) // { // if ((unsigned int)_c > 255) // return (_c); // return ((_toupper_tab_ + 1)[_c]); // } // // // extern __inline __attribute__((__gnu_inline__)) func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return Bool32(_c == ' ' || _c == '\t') } // extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) // { // return ((unsigned int)_c <= 0177); // } // // extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) // { // return (_c & 0177); // } // // extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) // { // return (_c - 'A' + 'a'); // } // // extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) // { // return (_c - 'a' + 'A'); // } // // // // extern __inline __attribute__((__gnu_inline__)) int // isalnum_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isalnum(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isalpha_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isalpha(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isblank_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isblank(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) // { // return iscntrl(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isdigit_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isdigit(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isgraph_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isgraph(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // islower_l(int _c, locale_t _l __attribute__((__unused__))) // { // return islower(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isprint_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isprint(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // ispunct_l(int _c, locale_t _l __attribute__((__unused__))) // { // return ispunct(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isspace_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isspace(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isupper_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isupper(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isxdigit(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // tolower_l(int _c, locale_t _l __attribute__((__unused__))) // { // return tolower(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // toupper_l(int _c, locale_t _l __attribute__((__unused__))) // { // return toupper(_c); // } // // // // // // # 37 "lib/libc/gen/ctype_.c" 2 // # 1 "./lib/libc/include/ctype_private.h" 1 // // // // // // # 5 "./lib/libc/include/ctype_private.h" // #pragma GCC visibility push(hidden) // # 5 "./lib/libc/include/ctype_private.h" // // extern const char _C_ctype_[]; // extern const short _C_toupper_[]; // extern const short _C_tolower_[]; // // # 9 "./lib/libc/include/ctype_private.h" // #pragma GCC visibility pop // # 9 "./lib/libc/include/ctype_private.h" // // # 38 "lib/libc/gen/ctype_.c" 2 var X_C_ctype_ = [257]int8{ int8(0), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), } /* ctype_.c:282:12 */ var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) } type locale_t = uintptr /* alltypes.h:343:32 */ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(func() int32 { if 0 != 0 { return Xisalpha(tls, c) } return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) }() != 0 || func() int32 { if 0 != 0 { return Xisdigit(tls, c) } return Bool32(uint32(c)-uint32('0') < uint32(10)) }() != 0) } func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisalnum(tls, c) } func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisalpha(tls, c) } func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisdigit(tls, c) } func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xislower(tls, c) } func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisprint(tls, c) } func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisspace(tls, c) } func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisupper(tls, c) } func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(func() int32 { if 0 != 0 { return Xisdigit(tls, c) } return Bool32(uint32(c)-uint32('0') < uint32(10)) }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisxdigit(tls, c) } type uintptr_t = uint64 /* alltypes.h:55:24 */ type intptr_t = int64 /* alltypes.h:70:15 */ type int8_t = int8 /* alltypes.h:96:25 */ type int16_t = int16 /* alltypes.h:101:25 */ type int32_t = int32 /* alltypes.h:106:25 */ type int64_t = int64 /* alltypes.h:111:25 */ type intmax_t = int64 /* alltypes.h:116:25 */ type uint8_t = uint8 /* alltypes.h:121:25 */ type uint16_t = uint16 /* alltypes.h:126:25 */ type uint32_t = uint32 /* alltypes.h:131:25 */ type uint64_t = uint64 /* alltypes.h:136:25 */ type uintmax_t = uint64 /* alltypes.h:146:25 */ type int_fast8_t = int8_t /* stdint.h:22:16 */ type int_fast64_t = int64_t /* stdint.h:23:17 */ type int_least8_t = int8_t /* stdint.h:25:17 */ type int_least16_t = int16_t /* stdint.h:26:17 */ type int_least32_t = int32_t /* stdint.h:27:17 */ type int_least64_t = int64_t /* stdint.h:28:17 */ type uint_fast8_t = uint8_t /* stdint.h:30:17 */ type uint_fast64_t = uint64_t /* stdint.h:31:18 */ type uint_least8_t = uint8_t /* stdint.h:33:18 */ type uint_least16_t = uint16_t /* stdint.h:34:18 */ type uint_least32_t = uint32_t /* stdint.h:35:18 */ type uint_least64_t = uint64_t /* stdint.h:36:18 */ type int_fast16_t = int32_t /* stdint.h:1:17 */ type int_fast32_t = int32_t /* stdint.h:2:17 */ type uint_fast16_t = uint32_t /* stdint.h:3:18 */ type uint_fast32_t = uint32_t /* stdint.h:4:18 */ type ssize_t = int64 /* alltypes.h:65:15 */ type off_t = int64 /* alltypes.h:162:16 */ type _IO_FILE = struct { Fflags uint32 F__ccgo_pad1 [4]byte Frpos uintptr Frend uintptr Fclose uintptr Fwend uintptr Fwpos uintptr Fmustbezero_1 uintptr Fwbase uintptr Fread uintptr Fwrite uintptr Fseek uintptr Fbuf uintptr Fbuf_size size_t Fprev uintptr Fnext uintptr Ffd int32 Fpipe_pid int32 Flockcount int64 Fmode int32 Flock int32 Flbf int32 F__ccgo_pad2 [4]byte Fcookie uintptr Foff off_t Fgetln_buf uintptr Fmustbezero_2 uintptr Fshend uintptr Fshlim off_t Fshcnt off_t Fprev_locked uintptr Fnext_locked uintptr Flocale uintptr } /* alltypes.h:320:9 */ type FILE = _IO_FILE /* alltypes.h:320:25 */ type va_list = uintptr /* alltypes.h:326:27 */ type _G_fpos64_t = struct { F__ccgo_pad1 [0]uint64 F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ type float_t = float32 /* alltypes.h:29:15 */ type double_t = float64 /* alltypes.h:34:16 */ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) } func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) } type syscall_arg_t = int64 /* syscall.h:22:14 */ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var c int32 var x int32 var y int64 var neg int32 = 0 c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { return -y } return y } func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ bp := tls.Alloc(512) defer tls.Free(512) // var x [128]uint32_t at bp, 512 var i int32 var j int32 var k int32 var a int32 var z int32 var lrp int64 = int64(0) var dc int64 = int64(0) var e10 int64 = int64(0) var lnz int32 = 0 var gotdig int32 = 0 var gotrad int32 = 0 var rp int32 var e2 int32 var emax int32 = -emin - bits + 3 var denormal int32 = 0 var y float64 var frac float64 = float64(0) var bias float64 = float64(0) j = 0 k = 0 // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { gotdig = 1 } if c == '.' { gotrad = 1 for c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { gotdig = 1 lrp-- } } *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { if c == '.' { if gotrad != 0 { break } gotrad = 1 lrp = dc } else if k < 128-3 { dc++ if c != '0' { lnz = int32(dc) } if j != 0 { *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') } else { *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') } if PreIncInt32(&j, 1) == 9 { k++ j = 0 } gotdig = 1 } else { dc++ if c != '0' { lnz = (128 - 4) * 9 *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) } } } if !(gotrad != 0) { lrp = dc } if gotdig != 0 && c|32 == 'e' { e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { X__shlim(tls, f, int64(0)) return float64(0) } e10 = int64(0) } lrp = lrp + e10 } else if c >= 0 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } if !(gotdig != 0) { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 X__shlim(tls, f, int64(0)) return float64(0) } // Handle zero specially to avoid nasty special cases later if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { return float64(sign) * 0.0 } // Optimize small integers (w/no exponent) and over/under-flow if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) {
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_openbsd_arm64.go
vendor/modernc.org/libc/libc_openbsd_arm64.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" type ( long = int64 ulong = uint64 )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/pthread_all.go
vendor/modernc.org/libc/pthread_all.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !freebsd && !openbsd && !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) package libc // import "modernc.org/libc" import ( "unsafe" "modernc.org/libc/pthread" ) type pthreadAttr struct { detachState int32 } // int pthread_attr_init(pthread_attr_t *attr); func Xpthread_attr_init(t *TLS, pAttr uintptr) int32 { if __ccgo_strace { trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2)) } *(*pthreadAttr)(unsafe.Pointer(pAttr)) = pthreadAttr{} return 0 } // The pthread_mutex_init() function shall initialize the mutex referenced by // mutex with attributes specified by attr. If attr is NULL, the default mutex // attributes are used; the effect shall be the same as passing the address of // a default mutex attributes object. Upon successful initialization, the state // of the mutex becomes initialized and unlocked. // // If successful, the pthread_mutex_destroy() and pthread_mutex_init() // functions shall return zero; otherwise, an error number shall be returned to // indicate the error. // // int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr); func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 { if __ccgo_strace { trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2)) } typ := pthread.PTHREAD_MUTEX_DEFAULT if pAttr != 0 { typ = int(X__ccgo_pthreadMutexattrGettype(t, pAttr)) } mutexesMu.Lock() defer mutexesMu.Unlock() mutexes[pMutex] = newMutex(typ) return 0 } func Xpthread_atfork(tls *TLS, prepare, parent, child uintptr) int32 { // fork(2) not supported. return 0 } // int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict old) func Xpthread_sigmask(tls *TLS, now int32, set, old uintptr) int32 { // ignored return 0 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/musl_freebsd_386.go
vendor/modernc.org/libc/musl_freebsd_386.go
// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc import ( "math" "reflect" "sync/atomic" "unsafe" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer // musl as a whole is licensed under the following standard MIT license: // // ---------------------------------------------------------------------- // Copyright © 2005-2020 Rich Felker, et al. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ---------------------------------------------------------------------- // // Authors/contributors include: // // A. Wilcox // Ada Worcester // Alex Dowad // Alex Suykov // Alexander Monakov // Andre McCurdy // Andrew Kelley // Anthony G. Basile // Aric Belsito // Arvid Picciani // Bartosz Brachaczek // Benjamin Peterson // Bobby Bingham // Boris Brezillon // Brent Cook // Chris Spiegel // Clément Vasseur // Daniel Micay // Daniel Sabogal // Daurnimator // David Carlier // David Edelsohn // Denys Vlasenko // Dmitry Ivanov // Dmitry V. Levin // Drew DeVault // Emil Renner Berthing // Fangrui Song // Felix Fietkau // Felix Janda // Gianluca Anzolin // Hauke Mehrtens // He X // Hiltjo Posthuma // Isaac Dunham // Jaydeep Patil // Jens Gustedt // Jeremy Huntwork // Jo-Philipp Wich // Joakim Sindholt // John Spencer // Julien Ramseier // Justin Cormack // Kaarle Ritvanen // Khem Raj // Kylie McClain // Leah Neukirchen // Luca Barbato // Luka Perkov // M Farkas-Dyck (Strake) // Mahesh Bodapati // Markus Wichmann // Masanori Ogino // Michael Clark // Michael Forney // Mikhail Kremnyov // Natanael Copa // Nicholas J. Kain // orc // Pascal Cuoq // Patrick Oppenlander // Petr Hosek // Petr Skocik // Pierre Carrier // Reini Urban // Rich Felker // Richard Pennington // Ryan Fairfax // Samuel Holland // Segev Finer // Shiz // sin // Solar Designer // Stefan Kristiansson // Stefan O'Rear // Szabolcs Nagy // Timo Teräs // Trutz Behn // Valentin Ochs // Will Dietz // William Haddon // William Pitcock // // Portions of this software are derived from third-party works licensed // under terms compatible with the above MIT license: // // The TRE regular expression implementation (src/regex/reg* and // src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed // under a 2-clause BSD license (license text in the source files). The // included version has been heavily modified by Rich Felker in 2012, in // the interests of size, simplicity, and namespace cleanliness. // // Much of the math library code (src/math/* and src/complex/*) is // Copyright © 1993,2004 Sun Microsystems or // Copyright © 2003-2011 David Schultz or // Copyright © 2003-2009 Steven G. Kargl or // Copyright © 2003-2009 Bruce D. Evans or // Copyright © 2008 Stephen L. Moshier or // Copyright © 2017-2018 Arm Limited // and labelled as such in comments in the individual source files. All // have been licensed under extremely permissive terms. // // The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 // The Android Open Source Project and is licensed under a two-clause BSD // license. It was taken from Bionic libc, used on Android. // // The AArch64 memcpy and memset code (src/string/aarch64/*) are // Copyright © 1999-2019, Arm Limited. // // The implementation of DES for crypt (src/crypt/crypt_des.c) is // Copyright © 1994 David Burren. It is licensed under a BSD license. // // The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was // originally written by Solar Designer and placed into the public // domain. The code also comes with a fallback permissive license for use // in jurisdictions that may not recognize the public domain. // // The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 // Valentin Ochs and is licensed under an MIT-style license. // // The x86_64 port was written by Nicholas J. Kain and is licensed under // the standard MIT terms. // // The mips and microblaze ports were originally written by Richard // Pennington for use in the ellcc project. The original code was adapted // by Rich Felker for build system and code conventions during upstream // integration. It is licensed under the standard MIT terms. // // The mips64 port was contributed by Imagination Technologies and is // licensed under the standard MIT terms. // // The powerpc port was also originally written by Richard Pennington, // and later supplemented and integrated by John Spencer. It is licensed // under the standard MIT terms. // // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more // contibutors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. // // In addition, permission is hereby granted for all public header files // (include/* and arch/*/bits/*) and crt files intended to be linked into // applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit // the copyright notice and permission notice otherwise required by the // license, and to use these files without any requirement of // attribution. These files include substantial contributions from: // // Bobby Bingham // John Spencer // Nicholas J. Kain // Rich Felker // Richard Pennington // Stefan Kristiansson // Szabolcs Nagy // // all of whom have explicitly granted such permission. // // This file previously contained text expressing a belief that most of // the files covered by the above exception were sufficiently trivial not // to be subject to copyright, resulting in confusion over whether it // negated the permissions granted in the license. In the spirit of // permissive licensing, and of not having licensing issues being an // obstacle to adoption, that text has been removed. const ( /* copyright.c:194:1: */ __musl__copyright__ = 0 ) const ( /* nameser.h:117:1: */ ns_uop_delete = 0 ns_uop_add = 1 ns_uop_max = 2 ) const ( /* nameser.h:147:1: */ ns_t_invalid = 0 ns_t_a = 1 ns_t_ns = 2 ns_t_md = 3 ns_t_mf = 4 ns_t_cname = 5 ns_t_soa = 6 ns_t_mb = 7 ns_t_mg = 8 ns_t_mr = 9 ns_t_null = 10 ns_t_wks = 11 ns_t_ptr = 12 ns_t_hinfo = 13 ns_t_minfo = 14 ns_t_mx = 15 ns_t_txt = 16 ns_t_rp = 17 ns_t_afsdb = 18 ns_t_x25 = 19 ns_t_isdn = 20 ns_t_rt = 21 ns_t_nsap = 22 ns_t_nsap_ptr = 23 ns_t_sig = 24 ns_t_key = 25 ns_t_px = 26 ns_t_gpos = 27 ns_t_aaaa = 28 ns_t_loc = 29 ns_t_nxt = 30 ns_t_eid = 31 ns_t_nimloc = 32 ns_t_srv = 33 ns_t_atma = 34 ns_t_naptr = 35 ns_t_kx = 36 ns_t_cert = 37 ns_t_a6 = 38 ns_t_dname = 39 ns_t_sink = 40 ns_t_opt = 41 ns_t_apl = 42 ns_t_tkey = 249 ns_t_tsig = 250 ns_t_ixfr = 251 ns_t_axfr = 252 ns_t_mailb = 253 ns_t_maila = 254 ns_t_any = 255 ns_t_zxfr = 256 ns_t_max = 65536 ) const ( /* nameser.h:210:1: */ ns_c_invalid = 0 ns_c_in = 1 ns_c_2 = 2 ns_c_chaos = 3 ns_c_hs = 4 ns_c_none = 254 ns_c_any = 255 ns_c_max = 65536 ) const ( /* nameser.h:221:1: */ ns_kt_rsa = 1 ns_kt_dh = 2 ns_kt_dsa = 3 ns_kt_private = 254 ) const ( /* nameser.h:228:1: */ cert_t_pkix = 1 cert_t_spki = 2 cert_t_pgp = 3 cert_t_url = 253 cert_t_oid = 254 ) const ( /* nameser.h:28:1: */ ns_s_qd = 0 ns_s_zn = 0 ns_s_an = 1 ns_s_pr = 1 ns_s_ns = 2 ns_s_ud = 2 ns_s_ar = 3 ns_s_max = 4 ) const ( /* nameser.h:75:1: */ ns_f_qr = 0 ns_f_opcode = 1 ns_f_aa = 2 ns_f_tc = 3 ns_f_rd = 4 ns_f_ra = 5 ns_f_z = 6 ns_f_ad = 7 ns_f_cd = 8 ns_f_rcode = 9 ns_f_max = 10 ) const ( /* nameser.h:89:1: */ ns_o_query = 0 ns_o_iquery = 1 ns_o_status = 2 ns_o_notify = 4 ns_o_update = 5 ns_o_max = 6 ) const ( /* nameser.h:98:1: */ ns_r_noerror = 0 ns_r_formerr = 1 ns_r_servfail = 2 ns_r_nxdomain = 3 ns_r_notimpl = 4 ns_r_refused = 5 ns_r_yxdomain = 6 ns_r_yxrrset = 7 ns_r_nxrrset = 8 ns_r_notauth = 9 ns_r_notzone = 10 ns_r_max = 11 ns_r_badvers = 16 ns_r_badsig = 16 ns_r_badkey = 17 ns_r_badtime = 18 ) type ptrdiff_t = int32 /* <builtin>:3:26 */ type size_t = uint32 /* <builtin>:9:23 */ type wchar_t = int32 /* <builtin>:15:24 */ /// typedef __ct_rune_t __wint_t; /// /// /// /// typedef __uint_least16_t __char16_t; /// typedef __uint_least32_t __char32_t; /// /// /// /// /// /// /// /// typedef struct { /// long long __max_align1 __attribute__((__aligned__(_Alignof(long long)))); /// /// long double __max_align2 __attribute__((__aligned__(_Alignof(long double)))); /// /// } __max_align_t; /// /// typedef __uint64_t __dev_t; /// /// typedef __uint32_t __fixpt_t; /// /// /// /// /// /// typedef union { /// char __mbstate8[128]; /// __int64_t _mbstateL; /// } __mbstate_t; /// /// typedef __uintmax_t __rman_res_t; /// /// /// /// /// /// /// typedef __builtin_va_list __va_list; /// /// /// /// /// /// /// typedef __va_list __gnuc_va_list; /// /// /// /// /// unsigned long ___runetype(__ct_rune_t) __attribute__((__pure__)); /// __ct_rune_t ___tolower(__ct_rune_t) __attribute__((__pure__)); /// __ct_rune_t ___toupper(__ct_rune_t) __attribute__((__pure__)); /// /// /// extern int __mb_sb_limit; type _RuneEntry = struct { F__min int32 F__max int32 F__map int32 F__types uintptr } /* table.cpp.c:290:3 */ type _RuneRange = struct { F__nranges int32 F__ranges uintptr } /* table.cpp.c:295:3 */ type _RuneLocale = struct { F__magic [8]int8 F__encoding [32]int8 F__sgetrune uintptr F__sputrune uintptr F__invalid_rune int32 F__runetype [256]uint32 F__maplower [256]int32 F__mapupper [256]int32 F__runetype_ext _RuneRange F__maplower_ext _RuneRange F__mapupper_ext _RuneRange F__variable uintptr F__variable_len int32 } /* table.cpp.c:320:3 */ /// /// extern const _RuneLocale _DefaultRuneLocale; /// extern const _RuneLocale *_CurrentRuneLocale; /// /// /// /// extern _Thread_local const _RuneLocale *_ThreadRuneLocale; /// static __inline const _RuneLocale *__getCurrentRuneLocale(void) /// { /// /// if (_ThreadRuneLocale) /// return _ThreadRuneLocale; /// return _CurrentRuneLocale; /// } /// /// /// /// /// /// static __inline int /// __maskrune(__ct_rune_t _c, unsigned long _f) /// { /// return ((_c < 0 || _c >= (1 <<8 )) ? ___runetype(_c) : /// (__getCurrentRuneLocale())->__runetype[_c]) & _f; /// } /// /// static __inline int /// __sbmaskrune(__ct_rune_t _c, unsigned long _f) /// { /// return (_c < 0 || _c >= __mb_sb_limit) ? 0 : /// (__getCurrentRuneLocale())->__runetype[_c] & _f; /// } /// /// static __inline int /// __istype(__ct_rune_t _c, unsigned long _f) /// { /// return (!!__maskrune(_c, _f)); /// } /// /// static __inline int /// __sbistype(__ct_rune_t _c, unsigned long _f) /// { /// return (!!__sbmaskrune(_c, _f)); /// } /// /// static __inline int /// __isctype(__ct_rune_t _c, unsigned long _f) /// { /// return (_c < 0 || _c >= 128) ? 0 : /// !!(_DefaultRuneLocale.__runetype[_c] & _f); /// } /// /// static __inline __ct_rune_t /// __toupper(__ct_rune_t _c) /// { /// return (_c < 0 || _c >= (1 <<8 )) ? ___toupper(_c) : /// (__getCurrentRuneLocale())->__mapupper[_c]; /// } /// /// static __inline __ct_rune_t /// __sbtoupper(__ct_rune_t _c) /// { /// return (_c < 0 || _c >= __mb_sb_limit) ? _c : /// (__getCurrentRuneLocale())->__mapupper[_c]; /// } /// /// static __inline __ct_rune_t /// __tolower(__ct_rune_t _c) /// { /// return (_c < 0 || _c >= (1 <<8 )) ? ___tolower(_c) : /// (__getCurrentRuneLocale())->__maplower[_c]; /// } /// /// static __inline __ct_rune_t /// __sbtolower(__ct_rune_t _c) /// { /// return (_c < 0 || _c >= __mb_sb_limit) ? _c : /// (__getCurrentRuneLocale())->__maplower[_c]; /// } /// /// static __inline int /// __wcwidth(__ct_rune_t _c) /// { /// unsigned int _x; /// /// if (_c == 0) /// return (0); /// _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); /// if ((_x & 0xe0000000L) != 0) /// return ((_x & 0xe0000000L) >> 30); /// return ((_x & 0x00040000L) != 0 ? 1 : -1); /// } /// /// /// /// int isalnum(int); /// int isalpha(int); /// int iscntrl(int); /// int isdigit(int); /// int isgraph(int); /// int islower(int); /// int isprint(int); /// int ispunct(int); /// int isspace(int); /// int isupper(int); /// int isxdigit(int); /// int tolower(int); /// int toupper(int); /// /// /// int isascii(int); /// int toascii(int); /// /// /// /// int isblank(int); /// /// /// /// int digittoint(int); /// int ishexnumber(int); /// int isideogram(int); /// int isnumber(int); /// int isphonogram(int); /// int isrune(int); /// int isspecial(int); /// /// /// /// /// /// typedef struct _xlocale *locale_t; /// /// /// /// /// unsigned long ___runetype_l(__ct_rune_t, locale_t) __attribute__((__pure__)); /// __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __attribute__((__pure__)); /// __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __attribute__((__pure__)); /// _RuneLocale *__runes_for_locale(locale_t, int*); /// /// inline int /// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); /// inline int /// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); /// /// inline int /// __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) /// { /// int __limit; /// _RuneLocale *runes = __runes_for_locale(__loc, &__limit); /// return (__c < 0 || __c >= __limit) ? 0 : /// runes->__runetype[__c] & __f; /// } /// /// inline int /// __sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) /// { /// return (!!__sbmaskrune_l(__c, __f, __loc)); /// } /// /// /// /// /// /// /// /// inline int isalnum_l(int, locale_t); inline int isalnum_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L|0x00000400L|0x00400000L, __l); } /// inline int isalpha_l(int, locale_t); inline int isalpha_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000100L, __l); } /// inline int isblank_l(int, locale_t); inline int isblank_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00020000L, __l); } /// inline int iscntrl_l(int, locale_t); inline int iscntrl_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000200L, __l); } /// inline int isdigit_l(int, locale_t); inline int isdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L, __l); } /// inline int isgraph_l(int, locale_t); inline int isgraph_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000800L, __l); } /// inline int ishexnumber_l(int, locale_t); inline int ishexnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } /// inline int isideogram_l(int, locale_t); inline int isideogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00080000L, __l); } /// inline int islower_l(int, locale_t); inline int islower_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00001000L, __l); } /// inline int isnumber_l(int, locale_t); inline int isnumber_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00000400L|0x00400000L, __l); } /// inline int isphonogram_l(int, locale_t); inline int isphonogram_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00200000L, __l); } /// inline int isprint_l(int, locale_t); inline int isprint_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00040000L, __l); } /// inline int ispunct_l(int, locale_t); inline int ispunct_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00002000L, __l); } /// inline int isrune_l(int, locale_t); inline int isrune_l(int __c, locale_t __l) { return __sbistype_l(__c, 0xFFFFFF00L, __l); } /// inline int isspace_l(int, locale_t); inline int isspace_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00004000L, __l); } /// inline int isspecial_l(int, locale_t); inline int isspecial_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00100000L, __l); } /// inline int isupper_l(int, locale_t); inline int isupper_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00008000L, __l); } /// inline int isxdigit_l(int, locale_t); inline int isxdigit_l(int __c, locale_t __l) { return __sbistype_l(__c, 0x00010000L, __l); } /// /// inline int digittoint_l(int, locale_t); /// inline int tolower_l(int, locale_t); /// inline int toupper_l(int, locale_t); /// /// inline int digittoint_l(int __c, locale_t __l) /// { return __sbmaskrune_l((__c), 0xFF, __l); } /// /// inline int tolower_l(int __c, locale_t __l) /// { /// int __limit; /// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); /// return (__c < 0 || __c >= __limit) ? __c : /// __runes->__maplower[__c]; /// } /// inline int toupper_l(int __c, locale_t __l) /// { /// int __limit; /// _RuneLocale *__runes = __runes_for_locale(__l, &__limit); /// return (__c < 0 || __c >= __limit) ? __c : /// __runes->__mapupper[__c]; /// } /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// typedef __mbstate_t mbstate_t; /// /// /// /// /// typedef __size_t size_t; /// /// /// /// /// /// typedef __va_list va_list; /// /// /// /// /// /// /// typedef ___wchar_t wchar_t; /// /// /// /// /// /// typedef __wint_t wint_t; /// /// typedef struct __sFILE FILE; /// /// struct tm; /// /// /// wint_t btowc(int); /// wint_t fgetwc(FILE *); /// wchar_t * /// fgetws(wchar_t * restrict, int, FILE * restrict); /// wint_t fputwc(wchar_t, FILE *); /// int fputws(const wchar_t * restrict, FILE * restrict); /// int fwide(FILE *, int); /// int fwprintf(FILE * restrict, const wchar_t * restrict, ...); /// int fwscanf(FILE * restrict, const wchar_t * restrict, ...); /// wint_t getwc(FILE *); /// wint_t getwchar(void); /// size_t mbrlen(const char * restrict, size_t, mbstate_t * restrict); /// size_t mbrtowc(wchar_t * restrict, const char * restrict, size_t, /// mbstate_t * restrict); /// int mbsinit(const mbstate_t *); /// size_t mbsrtowcs(wchar_t * restrict, const char ** restrict, size_t, /// mbstate_t * restrict); /// wint_t putwc(wchar_t, FILE *); /// wint_t putwchar(wchar_t); /// int swprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, /// ...); /// int swscanf(const wchar_t * restrict, const wchar_t * restrict, ...); /// wint_t ungetwc(wint_t, FILE *); /// int vfwprintf(FILE * restrict, const wchar_t * restrict, /// __va_list); /// int vswprintf(wchar_t * restrict, size_t n, const wchar_t * restrict, /// __va_list); /// int vwprintf(const wchar_t * restrict, __va_list); /// size_t wcrtomb(char * restrict, wchar_t, mbstate_t * restrict); /// wchar_t *wcscat(wchar_t * restrict, const wchar_t * restrict); /// wchar_t *wcschr(const wchar_t *, wchar_t) __attribute__((__pure__)); /// int wcscmp(const wchar_t *, const wchar_t *) __attribute__((__pure__)); /// int wcscoll(const wchar_t *, const wchar_t *); /// wchar_t *wcscpy(wchar_t * restrict, const wchar_t * restrict); /// size_t wcscspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); /// size_t wcsftime(wchar_t * restrict, size_t, const wchar_t * restrict, /// const struct tm * restrict); /// size_t wcslen(const wchar_t *) __attribute__((__pure__)); /// wchar_t *wcsncat(wchar_t * restrict, const wchar_t * restrict, /// size_t); /// int wcsncmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); /// wchar_t *wcsncpy(wchar_t * restrict , const wchar_t * restrict, size_t); /// wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __attribute__((__pure__)); /// wchar_t *wcsrchr(const wchar_t *, wchar_t) __attribute__((__pure__)); /// size_t wcsrtombs(char * restrict, const wchar_t ** restrict, size_t, /// mbstate_t * restrict); /// size_t wcsspn(const wchar_t *, const wchar_t *) __attribute__((__pure__)); /// wchar_t *wcsstr(const wchar_t * restrict, const wchar_t * restrict) /// __attribute__((__pure__)); /// size_t wcsxfrm(wchar_t * restrict, const wchar_t * restrict, size_t); /// int wctob(wint_t); /// double wcstod(const wchar_t * restrict, wchar_t ** restrict); /// wchar_t *wcstok(wchar_t * restrict, const wchar_t * restrict, /// wchar_t ** restrict); /// long wcstol(const wchar_t * restrict, wchar_t ** restrict, int); /// unsigned long /// wcstoul(const wchar_t * restrict, wchar_t ** restrict, int); /// wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __attribute__((__pure__)); /// int wmemcmp(const wchar_t *, const wchar_t *, size_t) __attribute__((__pure__)); /// wchar_t *wmemcpy(wchar_t * restrict, const wchar_t * restrict, size_t); /// wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); /// wchar_t *wmemset(wchar_t *, wchar_t, size_t); /// int wprintf(const wchar_t * restrict, ...); /// int wscanf(const wchar_t * restrict, ...); /// /// /// extern FILE *__stdinp; /// extern FILE *__stdoutp; /// extern FILE *__stderrp; /// /// int vfwscanf(FILE * restrict, const wchar_t * restrict, /// __va_list); /// int vswscanf(const wchar_t * restrict, const wchar_t * restrict, /// __va_list); /// int vwscanf(const wchar_t * restrict, __va_list); /// float wcstof(const wchar_t * restrict, wchar_t ** restrict); /// long double /// wcstold(const wchar_t * restrict, wchar_t ** restrict); /// /// /// long long /// wcstoll(const wchar_t * restrict, wchar_t ** restrict, int); /// /// unsigned long long /// wcstoull(const wchar_t * restrict, wchar_t ** restrict, int); /// /// /// /// /// int wcswidth(const wchar_t *, size_t); /// int wcwidth(wchar_t); /// /// /// /// /// size_t mbsnrtowcs(wchar_t * restrict, const char ** restrict, size_t, /// size_t, mbstate_t * restrict); /// FILE *open_wmemstream(wchar_t **, size_t *); /// wchar_t *wcpcpy(wchar_t * restrict, const wchar_t * restrict); /// wchar_t *wcpncpy(wchar_t * restrict, const wchar_t * restrict, size_t); /// wchar_t *wcsdup(const wchar_t *) __attribute__((__malloc__)); /// int wcscasecmp(const wchar_t *, const wchar_t *); /// int wcsncasecmp(const wchar_t *, const wchar_t *, size_t n); /// size_t wcsnlen(const wchar_t *, size_t) __attribute__((__pure__)); /// size_t wcsnrtombs(char * restrict, const wchar_t ** restrict, size_t, /// size_t, mbstate_t * restrict); /// /// /// /// wchar_t *fgetwln(FILE * restrict, size_t * restrict); /// size_t wcslcat(wchar_t *, const wchar_t *, size_t); /// size_t wcslcpy(wchar_t *, const wchar_t *, size_t); /// /// /// /// /// /// int wcscasecmp_l(const wchar_t *, const wchar_t *, /// locale_t); /// int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, /// locale_t); /// int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); /// size_t wcsxfrm_l(wchar_t * restrict, /// const wchar_t * restrict, size_t, locale_t); /// /// /// /// /// /// /// /// /// /// /// /// /// struct lconv { /// char *decimal_point; /// char *thousands_sep; /// char *grouping; /// char *int_curr_symbol; /// char *currency_symbol; /// char *mon_decimal_point; /// char *mon_thousands_sep; /// char *mon_grouping; /// char *positive_sign; /// char *negative_sign; /// char int_frac_digits; /// char frac_digits; /// char p_cs_precedes; /// char p_sep_by_space; /// char n_cs_precedes; /// char n_sep_by_space; /// char p_sign_posn; /// char n_sign_posn; /// char int_p_cs_precedes; /// char int_n_cs_precedes; /// char int_p_sep_by_space; /// char int_n_sep_by_space; /// char int_p_sign_posn; /// char int_n_sign_posn; /// }; /// /// /// struct lconv *localeconv(void); /// char *setlocale(int, const char *); /// /// /// /// /// locale_t duplocale(locale_t base); /// void freelocale(locale_t loc); /// locale_t newlocale(int mask, const char *locale, locale_t base); /// const char *querylocale(int mask, locale_t loc); /// locale_t uselocale(locale_t loc); /// /// /// /// /// /// /// /// /// /// /// /// wint_t btowc_l(int, locale_t); /// wint_t fgetwc_l(FILE *, locale_t); /// wchar_t *fgetws_l(wchar_t * restrict, int, FILE * restrict, /// locale_t); /// wint_t fputwc_l(wchar_t, FILE *, locale_t); /// int fputws_l(const wchar_t * restrict, FILE * restrict, /// locale_t); /// int fwprintf_l(FILE * restrict, locale_t, /// const wchar_t * restrict, ...); /// int fwscanf_l(FILE * restrict, locale_t, /// const wchar_t * restrict, ...); /// wint_t getwc_l(FILE *, locale_t); /// wint_t getwchar_l(locale_t); /// size_t mbrlen_l(const char * restrict, size_t, /// mbstate_t * restrict, locale_t); /// size_t mbrtowc_l(wchar_t * restrict, /// const char * restrict, size_t, /// mbstate_t * restrict, locale_t); /// int mbsinit_l(const mbstate_t *, locale_t); /// size_t mbsrtowcs_l(wchar_t * restrict, /// const char ** restrict, size_t, /// mbstate_t * restrict, locale_t); /// wint_t putwc_l(wchar_t, FILE *, locale_t); /// wint_t putwchar_l(wchar_t, locale_t); /// int swprintf_l(wchar_t * restrict, size_t n, locale_t, /// const wchar_t * restrict, ...); /// int swscanf_l(const wchar_t * restrict, locale_t, /// const wchar_t * restrict, ...); /// wint_t ungetwc_l(wint_t, FILE *, locale_t); /// int vfwprintf_l(FILE * restrict, locale_t, /// const wchar_t * restrict, __va_list); /// int vswprintf_l(wchar_t * restrict, size_t n, locale_t, /// const wchar_t * restrict, __va_list); /// int vwprintf_l(locale_t, const wchar_t * restrict, /// __va_list); /// size_t wcrtomb_l(char * restrict, wchar_t, /// mbstate_t * restrict, locale_t); /// size_t wcsftime_l(wchar_t * restrict, size_t, /// const wchar_t * restrict, /// const struct tm * restrict, locale_t); /// size_t wcsrtombs_l(char * restrict, /// const wchar_t ** restrict, size_t, /// mbstate_t * restrict, locale_t); /// double wcstod_l(const wchar_t * restrict, /// wchar_t ** restrict, locale_t); /// long wcstol_l(const wchar_t * restrict, /// wchar_t ** restrict, int, locale_t); /// unsigned long wcstoul_l(const wchar_t * restrict, /// wchar_t ** restrict, int, locale_t); /// int wcswidth_l(const wchar_t *, size_t, locale_t); /// int wctob_l(wint_t, locale_t); /// int wcwidth_l(wchar_t, locale_t); /// int wprintf_l(locale_t, const wchar_t * restrict, ...); /// int wscanf_l(locale_t, const wchar_t * restrict, ...); /// int vfwscanf_l(FILE * restrict, locale_t, /// const wchar_t * restrict, __va_list); /// int vswscanf_l(const wchar_t * restrict, locale_t, /// const wchar_t *restrict, __va_list); /// int vwscanf_l(locale_t, const wchar_t * restrict, /// __va_list); /// float wcstof_l(const wchar_t * restrict, /// wchar_t ** restrict, locale_t); /// long double wcstold_l(const wchar_t * restrict, /// wchar_t ** restrict, locale_t); /// long long wcstoll_l(const wchar_t * restrict, /// wchar_t ** restrict, int, locale_t); /// unsigned long long wcstoull_l(const wchar_t * restrict, /// wchar_t ** restrict, int, locale_t); /// size_t mbsnrtowcs_l(wchar_t * restrict, /// const char ** restrict, size_t, size_t, /// mbstate_t * restrict, locale_t); /// size_t wcsnrtombs_l(char * restrict, /// const wchar_t ** restrict, size_t, size_t, /// mbstate_t * restrict, locale_t); /// /// /// /// /// /// struct lconv *localeconv_l(locale_t); /// /// /// /// /// /// /// /// /// /// typedef __rune_t rune_t; /// /// typedef struct { /// int quot; /// int rem; /// } div_t; /// /// typedef struct { /// long quot; /// long rem; /// } ldiv_t; /// /// /// /// /// /// double atof_l(const char *, locale_t); /// int atoi_l(const char *, locale_t); /// long atol_l(const char *, locale_t); /// long long atoll_l(const char *, locale_t); /// int mblen_l(const char *, size_t, locale_t); /// size_t mbstowcs_l(wchar_t * restrict, /// const char * restrict, size_t, locale_t); /// int mbtowc_l(wchar_t * restrict, /// const char * restrict, size_t, locale_t); /// double strtod_l(const char *, char **, locale_t); /// float strtof_l(const char *, char **, locale_t); /// long strtol_l(const char *, char **, int, locale_t); /// long double strtold_l(const char *, char **, locale_t); /// long long strtoll_l(const char *, char **, int, locale_t); /// unsigned long strtoul_l(const char *, char **, int, locale_t); /// unsigned long long strtoull_l(const char *, char **, int, locale_t); /// size_t wcstombs_l(char * restrict, /// const wchar_t * restrict, size_t, locale_t); /// int wctomb_l(char *, wchar_t, locale_t); /// /// int ___mb_cur_max_l(locale_t); /// /// /// extern int __mb_cur_max; /// extern int ___mb_cur_max(void); /// /// /// _Noreturn void abort(void); /// int abs(int) __attribute__((__const__)); /// int atexit(void (* )(void)); /// double atof(const char *); /// int atoi(const char *); /// long atol(const char *); /// void *bsearch(const void *, const void *, size_t, /// size_t, int (*)(const void * , const void *)); /// void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) /// __attribute__((__alloc_size__(1, 2))); /// div_t div(int, int) __attribute__((__const__)); /// _Noreturn void exit(int); /// void free(void *); /// char *getenv(const char *); /// long labs(long) __attribute__((__const__)); /// ldiv_t ldiv(long, long) __attribute__((__const__)); /// void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))); /// int mblen(const char *, size_t); /// size_t mbstowcs(wchar_t * restrict , const char * restrict, size_t); /// int mbtowc(wchar_t * restrict, const char * restrict, size_t); /// void qsort(void *, size_t, size_t, /// int (* )(const void *, const void *)); /// int rand(void); /// void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))); /// void srand(unsigned); /// double strtod(const char * restrict, char ** restrict); /// float strtof(const char * restrict, char ** restrict); /// long strtol(const char * restrict, char ** restrict, int); /// long double /// strtold(const char * restrict, char ** restrict); /// unsigned long /// strtoul(const char * restrict, char ** restrict, int); /// int system(const char *); /// int wctomb(char *, wchar_t); /// size_t wcstombs(char * restrict, const wchar_t * restrict, size_t); ///
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/musl_windows_amd64.go
vendor/modernc.org/libc/musl_windows_amd64.go
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_amd64.go -pkgname libc -static-locals-prefix _s -Iarch\x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/stdlib/bsearch.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT. package libc import ( "math" "reflect" "sync/atomic" "unsafe" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer // musl as a whole is licensed under the following standard MIT license: // // ---------------------------------------------------------------------- // Copyright © 2005-2020 Rich Felker, et al. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ---------------------------------------------------------------------- // // Authors/contributors include: // // A. Wilcox // Ada Worcester // Alex Dowad // Alex Suykov // Alexander Monakov // Andre McCurdy // Andrew Kelley // Anthony G. Basile // Aric Belsito // Arvid Picciani // Bartosz Brachaczek // Benjamin Peterson // Bobby Bingham // Boris Brezillon // Brent Cook // Chris Spiegel // Clément Vasseur // Daniel Micay // Daniel Sabogal // Daurnimator // David Carlier // David Edelsohn // Denys Vlasenko // Dmitry Ivanov // Dmitry V. Levin // Drew DeVault // Emil Renner Berthing // Fangrui Song // Felix Fietkau // Felix Janda // Gianluca Anzolin // Hauke Mehrtens // He X // Hiltjo Posthuma // Isaac Dunham // Jaydeep Patil // Jens Gustedt // Jeremy Huntwork // Jo-Philipp Wich // Joakim Sindholt // John Spencer // Julien Ramseier // Justin Cormack // Kaarle Ritvanen // Khem Raj // Kylie McClain // Leah Neukirchen // Luca Barbato // Luka Perkov // M Farkas-Dyck (Strake) // Mahesh Bodapati // Markus Wichmann // Masanori Ogino // Michael Clark // Michael Forney // Mikhail Kremnyov // Natanael Copa // Nicholas J. Kain // orc // Pascal Cuoq // Patrick Oppenlander // Petr Hosek // Petr Skocik // Pierre Carrier // Reini Urban // Rich Felker // Richard Pennington // Ryan Fairfax // Samuel Holland // Segev Finer // Shiz // sin // Solar Designer // Stefan Kristiansson // Stefan O'Rear // Szabolcs Nagy // Timo Teräs // Trutz Behn // Valentin Ochs // Will Dietz // William Haddon // William Pitcock // // Portions of this software are derived from third-party works licensed // under terms compatible with the above MIT license: // // The TRE regular expression implementation (src/regex/reg* and // src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed // under a 2-clause BSD license (license text in the source files). The // included version has been heavily modified by Rich Felker in 2012, in // the interests of size, simplicity, and namespace cleanliness. // // Much of the math library code (src/math/* and src/complex/*) is // Copyright © 1993,2004 Sun Microsystems or // Copyright © 2003-2011 David Schultz or // Copyright © 2003-2009 Steven G. Kargl or // Copyright © 2003-2009 Bruce D. Evans or // Copyright © 2008 Stephen L. Moshier or // Copyright © 2017-2018 Arm Limited // and labelled as such in comments in the individual source files. All // have been licensed under extremely permissive terms. // // The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 // The Android Open Source Project and is licensed under a two-clause BSD // license. It was taken from Bionic libc, used on Android. // // The AArch64 memcpy and memset code (src/string/aarch64/*) are // Copyright © 1999-2019, Arm Limited. // // The implementation of DES for crypt (src/crypt/crypt_des.c) is // Copyright © 1994 David Burren. It is licensed under a BSD license. // // The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was // originally written by Solar Designer and placed into the public // domain. The code also comes with a fallback permissive license for use // in jurisdictions that may not recognize the public domain. // // The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 // Valentin Ochs and is licensed under an MIT-style license. // // The x86_64 port was written by Nicholas J. Kain and is licensed under // the standard MIT terms. // // The mips and microblaze ports were originally written by Richard // Pennington for use in the ellcc project. The original code was adapted // by Rich Felker for build system and code conventions during upstream // integration. It is licensed under the standard MIT terms. // // The mips64 port was contributed by Imagination Technologies and is // licensed under the standard MIT terms. // // The powerpc port was also originally written by Richard Pennington, // and later supplemented and integrated by John Spencer. It is licensed // under the standard MIT terms. // // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more // contibutors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. // // In addition, permission is hereby granted for all public header files // (include/* and arch/*/bits/*) and crt files intended to be linked into // applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit // the copyright notice and permission notice otherwise required by the // license, and to use these files without any requirement of // attribution. These files include substantial contributions from: // // Bobby Bingham // John Spencer // Nicholas J. Kain // Rich Felker // Richard Pennington // Stefan Kristiansson // Szabolcs Nagy // // all of whom have explicitly granted such permission. // // This file previously contained text expressing a belief that most of // the files covered by the above exception were sufficiently trivial not // to be subject to copyright, resulting in confusion over whether it // negated the permissions granted in the license. In the spirit of // permissive licensing, and of not having licensing issues being an // obstacle to adoption, that text has been removed. const ( /* copyright.c:194:1: */ __musl__copyright__ = 0 ) const ( /* pthread_impl.h:58:1: */ DT_EXITING = 0 DT_JOINABLE = 1 DT_DETACHED = 2 ) type ptrdiff_t = int64 /* <builtin>:3:26 */ type size_t = uint64 /* <builtin>:9:23 */ type wchar_t = uint16 /* <builtin>:15:24 */ type va_list = uintptr /* <builtin>:50:27 */ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */ type locale_t = uintptr /* alltypes.h:343:32 */ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(func() int32 { if 0 != 0 { return Xisalpha(tls, c) } return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) }() != 0 || func() int32 { if 0 != 0 { return Xisdigit(tls, c) } return Bool32(uint32(c)-uint32('0') < uint32(10)) }() != 0) } func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisalnum(tls, c) } func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisalpha(tls, c) } func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisdigit(tls, c) } func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xislower(tls, c) } func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisprint(tls, c) } func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisspace(tls, c) } func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(func() int32 { if 0 != 0 { return Xisdigit(tls, c) } return Bool32(uint32(c)-uint32('0') < uint32(10)) }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisxdigit(tls, c) } type div_t = struct { quot int32 rem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { quot int32 rem int32 } /* stdlib.h:63:36 */ type lldiv_t = struct { quot int64 rem int64 } /* stdlib.h:64:41 */ type ssize_t = int32 /* alltypes.h:65:15 */ type intptr_t = int32 /* alltypes.h:70:15 */ type off_t = int32 /* alltypes.h:162:16 */ type pid_t = int32 /* alltypes.h:235:13 */ type uid_t = uint32 /* alltypes.h:245:18 */ type gid_t = uint32 /* alltypes.h:250:18 */ type useconds_t = uint32 /* alltypes.h:260:18 */ func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */ if __ccgo_strace { trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2)) } var i size_t var newenv uintptr var tmp uintptr //TODO for (char **e = __environ; *e; e++, i++) var e uintptr i = uint64(0) if !(Environ() != 0) { goto __1 } //TODO for (char **e = __environ; *e; e++, i++) e = Environ() __2: if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { goto __4 } if !!(Xstrncmp(tls, s, *(*uintptr)(unsafe.Pointer(e)), l+uint64(1)) != 0) { goto __5 } tmp = *(*uintptr)(unsafe.Pointer(e)) *(*uintptr)(unsafe.Pointer(e)) = s X__env_rm_add(tls, tmp, r) return 0 __5: ; goto __3 __3: e += 8 i++ goto __2 goto __4 __4: ; __1: ; if !(Environ() == _soldenv) { goto __6 } newenv = Xrealloc(tls, _soldenv, uint64(unsafe.Sizeof(uintptr(0)))*(i+uint64(2))) if !!(newenv != 0) { goto __8 } goto oom __8: ; goto __7 __6: newenv = Xmalloc(tls, uint64(unsafe.Sizeof(uintptr(0)))*(i+uint64(2))) if !!(newenv != 0) { goto __9 } goto oom __9: ; if !(i != 0) { goto __10 } Xmemcpy(tls, newenv, Environ(), uint64(unsafe.Sizeof(uintptr(0)))*i) __10: ; Xfree(tls, _soldenv) __7: ; *(*uintptr)(unsafe.Pointer(newenv + uintptr(i)*8)) = s *(*uintptr)(unsafe.Pointer(newenv + uintptr(i+uint64(1))*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(EnvironP())) = AssignPtrUintptr(uintptr(unsafe.Pointer(&_soldenv)), newenv) if !(r != 0) { goto __11 } X__env_rm_add(tls, uintptr(0), r) __11: ; return 0 oom: Xfree(tls, r) return -1 } var _soldenv uintptr /* putenv.c:22:14: */ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */ if __ccgo_strace { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) } var l size_t = size_t((int64(X__strchrnul(tls, s, '=')) - int64(s)) / 1) if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) { return Xunsetenv(tls, s) } return X__putenv(tls, s, l, uintptr(0)) } func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */ if __ccgo_strace { trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2)) } //TODO for (size_t i=0; i < env_alloced_n; i++) var i size_t = uint64(0) for ; i < _senv_alloced_n; i++ { if *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8)) == old { *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8)) = new Xfree(tls, old) return } else if !(int32(*(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8))) != 0) && new != 0 { *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8)) = new new = uintptr(0) } } if !(new != 0) { return } var t uintptr = Xrealloc(tls, _senv_alloced, uint64(unsafe.Sizeof(uintptr(0)))*(_senv_alloced_n+uint64(1))) if !(t != 0) { return } *(*uintptr)(unsafe.Pointer(AssignPtrUintptr(uintptr(unsafe.Pointer(&_senv_alloced)), t) + uintptr(PostIncUint64(&_senv_alloced_n, 1))*8)) = new } var _senv_alloced uintptr /* setenv.c:7:14: */ var _senv_alloced_n size_t /* setenv.c:8:16: */ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */ if __ccgo_strace { trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2)) } var s uintptr var l1 size_t var l2 size_t if !(var1 != 0) || !(int32(AssignUint64(&l1, size_t((int64(X__strchrnul(tls, var1, '='))-int64(var1))/1))) != 0) || *(*int8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 return -1 } if !(overwrite != 0) && Xgetenv(tls, var1) != 0 { return 0 } l2 = Xstrlen(tls, value) s = Xmalloc(tls, l1+l2+uint64(2)) if !(s != 0) { return -1 } Xmemcpy(tls, s, var1, l1) *(*int8)(unsafe.Pointer(s + uintptr(l1))) = int8('=') Xmemcpy(tls, s+uintptr(l1)+uintptr(1), value, l2+uint64(1)) return X__putenv(tls, s, l1, s) } func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */ if __ccgo_strace { trc("tls=%v name=%v, (%v:)", tls, name, origin(2)) } var l size_t = size_t((int64(X__strchrnul(tls, name, '=')) - int64(name)) / 1) if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 return -1 } if Environ() != 0 { var e uintptr = Environ() var eo uintptr = e for ; *(*uintptr)(unsafe.Pointer(e)) != 0; e += 8 { //TODO if (!strncmp(name, *e, l) && l[*e] == '=') if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == '=' { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else if eo != e { *(*uintptr)(unsafe.Pointer(PostIncUintptr(&eo, 8))) = *(*uintptr)(unsafe.Pointer(e)) } else { eo += 8 } } if eo != e { *(*uintptr)(unsafe.Pointer(eo)) = uintptr(0) } } return 0 } type wint_t = uint32 /* alltypes.h:198:18 */ type wctype_t = uint32 /* alltypes.h:203:23 */ type __mbstate_t = struct { __opaque1 uint32 __opaque2 uint32 } /* alltypes.h:337:9 */ type mbstate_t = __mbstate_t /* alltypes.h:337:63 */ type tm = struct { tm_sec int32 tm_min int32 tm_hour int32 tm_mday int32 tm_mon int32 tm_year int32 tm_wday int32 tm_yday int32 tm_isdst int32 tm_gmtoff int32 tm_zone uintptr } /* wchar.h:138:1 */ type uintptr_t = uint32 /* alltypes.h:55:24 */ type int8_t = int8 /* alltypes.h:96:25 */ type int16_t = int16 /* alltypes.h:101:25 */ type int32_t = int32 /* alltypes.h:106:25 */ type int64_t = int32 /* alltypes.h:111:25 */ type intmax_t = int32 /* alltypes.h:116:25 */ type uint8_t = uint8 /* alltypes.h:121:25 */ type uint16_t = uint16 /* alltypes.h:126:25 */ type uint32_t = uint32 /* alltypes.h:131:25 */ type uint64_t = uint32 /* alltypes.h:136:25 */ type uintmax_t = uint32 /* alltypes.h:146:25 */ type int_fast8_t = int8_t /* stdint.h:22:16 */ type int_fast64_t = int64_t /* stdint.h:23:17 */ type int_least8_t = int8_t /* stdint.h:25:17 */ type int_least16_t = int16_t /* stdint.h:26:17 */ type int_least32_t = int32_t /* stdint.h:27:17 */ type int_least64_t = int64_t /* stdint.h:28:17 */ type uint_fast8_t = uint8_t /* stdint.h:30:17 */ type uint_fast64_t = uint64_t /* stdint.h:31:18 */ type uint_least8_t = uint8_t /* stdint.h:33:18 */ type uint_least16_t = uint16_t /* stdint.h:34:18 */ type uint_least32_t = uint32_t /* stdint.h:35:18 */ type uint_least64_t = uint64_t /* stdint.h:36:18 */ type int_fast16_t = int32_t /* stdint.h:1:17 */ type int_fast32_t = int32_t /* stdint.h:2:17 */ type uint_fast16_t = uint32_t /* stdint.h:3:18 */ type uint_fast32_t = uint32_t /* stdint.h:4:18 */ // Upper 6 state bits are a negative integer offset to bound-check next byte // equivalent to: ( (b-0x80) | (b+offset) ) & ~0x3f // Interval [a,b). Either a must be 80 or b must be c0, lower 3 bits clear. // Arbitrary encoding for representing code units instead of characters. // Get inline definition of MB_CUR_MAX. type lconv = struct { decimal_point uintptr thousands_sep uintptr grouping uintptr int_curr_symbol uintptr currency_symbol uintptr mon_decimal_point uintptr mon_thousands_sep uintptr mon_grouping uintptr positive_sign uintptr negative_sign uintptr int_frac_digits int8 frac_digits int8 p_cs_precedes int8 p_sep_by_space int8 n_cs_precedes int8 n_sep_by_space int8 p_sign_posn int8 n_sign_posn int8 int_p_cs_precedes int8 int_p_sep_by_space int8 int_n_cs_precedes int8 int_n_sep_by_space int8 int_p_sign_posn int8 int_n_sign_posn int8 _ [2]byte } /* locale.h:24:1 */ type _G_fpos64_t = struct { _ [0]uint64 __opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ // Support signed or unsigned plain-char // Implementation choices... // Arbitrary numbers... // POSIX/SUS requirements follow. These numbers come directly // from SUS and have nothing to do with the host system. type __locale_map = struct { __map uintptr map_size size_t name [24]int8 next uintptr } /* alltypes.h:343:9 */ type tls_module = struct { next uintptr image uintptr len size_t size size_t align size_t offset size_t } /* libc.h:14:1 */ type __libc = struct { can_do_threads int8 threaded int8 secure int8 need_locks int8 threads_minus_1 int32 auxv uintptr tls_head uintptr tls_size size_t tls_align size_t tls_cnt size_t page_size size_t global_locale struct{ cat [6]uintptr } } /* libc.h:20:1 */ type time_t = int32 /* alltypes.h:85:16 */ type clockid_t = int32 /* alltypes.h:214:13 */ type timespec = struct { tv_sec time_t tv_nsec int32 } /* alltypes.h:229:1 */ type __pthread = struct { self uintptr dtv uintptr prev uintptr next uintptr sysinfo uintptr_t canary uintptr_t canary2 uintptr_t tid int32 errno_val int32 detach_state int32 cancel int32 canceldisable uint8 cancelasync uint8 tsd_used uint8 /* unsigned char tsd_used: 1, unsigned char dlerror_flag: 1 */ _ [1]byte map_base uintptr map_size size_t stack uintptr stack_size size_t guard_size size_t result uintptr cancelbuf uintptr tsd uintptr robust_list struct { head uintptr off int32 _ [4]byte pending uintptr } timer_id int32 _ [4]byte locale locale_t killlock [1]int32 _ [4]byte dlerror_buf uintptr stdio_locks uintptr canary_at_end uintptr_t _ [4]byte dtv_copy uintptr } /* alltypes.h:273:9 */ type pthread_t = uintptr /* alltypes.h:273:26 */ type pthread_once_t = int32 /* alltypes.h:279:13 */ type pthread_key_t = uint32 /* alltypes.h:284:18 */ type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ type __sigset_t = struct{ __bits [32]uint32 } /* alltypes.h:349:9 */ type sigset_t = __sigset_t /* alltypes.h:349:71 */ type pthread_attr_t = struct{ __u struct{ __i [9]int32 } } /* alltypes.h:372:147 */ type pthread_mutex_t = struct { __u struct { _ [0]uint64 __i [6]int32 _ [24]byte } } /* alltypes.h:377:157 */ type pthread_cond_t = struct { __u struct { _ [0]uint64 __i [12]int32 } } /* alltypes.h:387:112 */ type pthread_rwlock_t = struct { __u struct { _ [0]uint64 __i [8]int32 _ [32]byte } } /* alltypes.h:397:139 */ type pthread_barrier_t = struct { __u struct { _ [0]uint64 __i [5]int32 _ [20]byte } } /* alltypes.h:402:137 */ type sched_param = struct { sched_priority int32 __reserved1 int32 __reserved2 [2]struct { __reserved1 time_t __reserved2 int32 } __reserved3 int32 } /* sched.h:19:1 */ type timer_t = uintptr /* alltypes.h:209:14 */ type clock_t = int32 /* alltypes.h:219:14 */ type itimerspec = struct { it_interval struct { tv_sec time_t tv_nsec int32 } it_value struct { tv_sec time_t tv_nsec int32 } } /* time.h:80:1 */ type sigevent = struct { sigev_value struct { _ [0]uint64 sival_int int32 _ [4]byte } sigev_signo int32 sigev_notify int32 sigev_notify_function uintptr sigev_notify_attributes uintptr __pad [44]int8 _ [4]byte } /* time.h:107:1 */ type __ptcb = struct { __f uintptr __x uintptr __next uintptr } /* alltypes.h:273:9 */ type sigaltstack = struct { ss_sp uintptr ss_flags int32 _ [4]byte ss_size size_t } /* signal.h:44:9 */ type stack_t = sigaltstack /* signal.h:44:28 */ type greg_t = int64 /* signal.h:59:19 */ type gregset_t = [23]int64 /* signal.h:59:27 */ type _fpstate = struct { cwd uint16 swd uint16 ftw uint16 fop uint16 rip uint64 rdp uint64 mxcsr uint32 mxcr_mask uint32 _st [8]struct { significand [4]uint16 exponent uint16 padding [3]uint16 } _xmm [16]struct{ element [4]uint32 } padding [24]uint32 } /* signal.h:60:9 */ type fpregset_t = uintptr /* signal.h:71:3 */ type sigcontext = struct { r8 uint32 r9 uint32 r10 uint32 r11 uint32 r12 uint32 r13 uint32 r14 uint32 r15 uint32 rdi uint32 rsi uint32 rbp uint32 rbx uint32 rdx uint32 rax uint32 rcx uint32 rsp uint32 rip uint32 eflags uint32 cs uint16 gs uint16 fs uint16 __pad0 uint16 err uint32 trapno uint32 oldmask uint32 cr2 uint32 fpstate uintptr __reserved1 [8]uint32 } /* signal.h:72:1 */ type mcontext_t = struct { gregs gregset_t fpregs fpregset_t __reserved1 [8]uint64 } /* signal.h:84:3 */ type __ucontext = struct { uc_flags uint32 _ [4]byte uc_link uintptr uc_stack stack_t uc_mcontext mcontext_t uc_sigmask sigset_t __fpregs_mem [64]uint32 } /* signal.h:97:9 */ type ucontext_t = __ucontext /* signal.h:104:3 */ type sigval = struct { _ [0]uint64 sival_int int32 _ [4]byte } /* time.h:107:1 */ type siginfo_t = struct { si_signo int32 si_errno int32 si_code int32 _ [4]byte __si_fields struct { _ [0]uint64 __pad [116]int8 _ [4]byte } } /* signal.h:145:3 */ type sigaction = struct { __sa_handler struct{ sa_handler uintptr } sa_mask sigset_t sa_flags int32 _ [4]byte sa_restorer uintptr } /* signal.h:167:1 */ type sig_t = uintptr /* signal.h:251:14 */ type sig_atomic_t = int32 /* signal.h:269:13 */ type mode_t = uint32 /* alltypes.h:152:18 */ type syscall_arg_t = int32 /* syscall.h:22:14 */ func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */ panic(`arch\x86_64\atomic_arch.h:4:2: assembler statements not supported`) return t } func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:46:20: */ panic(`arch\x86_64\atomic_arch.h:48:2: assembler statements not supported`) } func a_or_64(tls *TLS, p uintptr, v uint64_t) { /* atomic_arch.h:62:20: */ panic(`arch\x86_64\atomic_arch.h:64:2: assembler statements not supported`) } func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:112:19: */ panic(`arch\x86_64\atomic_arch.h:114:2: assembler statements not supported`) return int32(x) } func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic.h:256:19: */ return int32(_sdebruijn32[x&-x*uint32_t(0x076be629)>>27]) } var _sdebruijn32 = [32]int8{ int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13), int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14), } /* atomic.h:261:20 */ type __timer = struct { timerid int32 _ [4]byte thread pthread_t } /* pthread_impl.h:64:1 */ func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */ var self uintptr panic(`arch\x86_64\pthread_arch.h:4:2: assembler statements not supported`) return self } func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c:6:8: */ if __ccgo_strace { trc("tls=%v s=%v wc=%v st=%v, (%v:)", tls, s, wc, st, origin(2)) } if !(s != 0) { return uint64(1) } if uint32(wc) < uint32(0x80) { *(*int8)(unsafe.Pointer(s)) = int8(wc) return uint64(1) } else if func() int32 { if !!(int32(*(*uintptr)(unsafe.Pointer((*__pthread)(unsafe.Pointer(__pthread_self(tls))).locale))) != 0) { return 4 } return 1 }() == 1 { if !(uint32(wc)-uint32(0xdf80) < uint32(0x80)) { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84 return Uint64FromInt32(-1) } *(*int8)(unsafe.Pointer(s)) = int8(wc) return uint64(1) } else if uint32(wc) < uint32(0x800) { *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(0xc0 | int32(wc)>>6) *(*int8)(unsafe.Pointer(s)) = int8(0x80 | int32(wc)&0x3f) return uint64(2) } else if uint32(wc) < uint32(0xd800) || uint32(wc)-uint32(0xe000) < uint32(0x2000) { *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(0xe0 | int32(wc)>>12) *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(0x80 | int32(wc)>>6&0x3f) *(*int8)(unsafe.Pointer(s)) = int8(0x80 | int32(wc)&0x3f) return uint64(3) } else if uint32(wc)-uint32(0x10000) < uint32(0x100000) { *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(0xf0 | int32(wc)>>18) *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(0x80 | int32(wc)>>12&0x3f) *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(0x80 | int32(wc)>>6&0x3f) *(*int8)(unsafe.Pointer(s)) = int8(0x80 | int32(wc)&0x3f) return uint64(4) } *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84 return Uint64FromInt32(-1) } func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t { /* wcsrtombs.c:3:8: */ if __ccgo_strace { trc("tls=%v s=%v ws=%v n=%v st=%v, (%v:)", tls, s, ws, n, st, origin(2)) } bp := tls.Alloc(4) defer tls.Free(4) var ws2 uintptr // var buf [4]int8 at bp, 4 var N size_t = n var l size_t if !(s != 0) { n = uint64(0) ws2 = *(*uintptr)(unsafe.Pointer(ws)) for ; *(*wchar_t)(unsafe.Pointer(ws2)) != 0; ws2 += 2 { if uint32(*(*wchar_t)(unsafe.Pointer(ws2))) >= 0x80 { l = Xwcrtomb(tls, bp, *(*wchar_t)(unsafe.Pointer(ws2)), uintptr(0)) if !(l+uint64(1) != 0) { return Uint64FromInt32(-1) } n = n + l } else { n++ } } return n } for n >= uint64(4) { if uint32(*(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-1 >= 0x7f { if !(int32(*(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) != 0) { *(*int8)(unsafe.Pointer(s)) = int8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) return N - n } l = Xwcrtomb(tls, s, *(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+uint64(1) != 0) { return Uint64FromInt32(-1) } s += uintptr(l) n = n - l } else { *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(*(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 2 } for n != 0 { if uint32(*(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))))-1 >= 0x7f { if !(int32(*(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) != 0) { *(*int8)(unsafe.Pointer(s)) = int8(0) *(*uintptr)(unsafe.Pointer(ws)) = uintptr(0) return N - n } l = Xwcrtomb(tls, bp, *(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) if !(l+uint64(1) != 0) { return Uint64FromInt32(-1) } if l > n { return N - n } Xwcrtomb(tls, s, *(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws)))), uintptr(0)) s += uintptr(l) n = n - l } else { *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8(*(*wchar_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ws))))) n-- } *(*uintptr)(unsafe.Pointer(ws)) += 2 } return N } func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c:4:8: */ if __ccgo_strace { trc("tls=%v s=%v ws=%v n=%v, (%v:)", tls, s, ws, n, origin(2)) } bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = ws //TODO return wcsrtombs(s, &(const wchar_t *){ws}, n, 0); return Xwcsrtombs(tls, s, bp, n, uintptr(0)) } func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */ if __ccgo_strace { trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2)) } var try uintptr var sign int32 for nel > uint64(0) { try = base + uintptr(width*(nel/uint64(2))) sign = (*struct { f func(*TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try) if sign < 0 { nel = nel / uint64(2) } else if sign > 0 { base = try + uintptr(width) nel = nel - (nel/uint64(2) + uint64(1)) } else { return try } } return uintptr(0) } // Support signed or unsigned plain-char // Implementation choices... // Arbitrary numbers... // POSIX/SUS requirements follow. These numbers come directly // from SUS and have nothing to do with the host system. func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: */ if __ccgo_strace { trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2)) } c = int32(uint8(c)) if !(c != 0) { return s + uintptr(Xstrlen(tls, s)) } var w uintptr for ; uint64(s)%uint64(unsafe.Sizeof(size_t(0))) != 0; s++ { if !(int32(*(*int8)(unsafe.Pointer(s))) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c { return s } } var k size_t = Uint64(Uint64FromInt32(-1)) / uint64(255) * size_t(c)
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/sync.go
vendor/modernc.org/libc/sync.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) package libc // import "modernc.org/libc" import ( "sync/atomic" ) var __sync_synchronize_dummy int32 // __sync_synchronize(); func X__sync_synchronize(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } // Attempt to implement a full memory barrier without assembler. atomic.StoreInt32(&__sync_synchronize_dummy, atomic.LoadInt32(&__sync_synchronize_dummy)+1) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_arm.go
vendor/modernc.org/libc/libc_musl_linux_arm.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "math/bits" "sync/atomic" "unsafe" ) type long = int32 type ulong = uint32 var ( ___a_barrier_ptr ulong ) // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<31 - 1]byte // void *memcpy(void *dest, const void *src, size_t n); func Xmemcpy(t *TLS, dest, src uintptr, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2)) defer func() { trc("-> %v", r) }() } return _memcpy(t, dest, src, n) } func _memcpy(t *TLS, dest, src uintptr, n Tsize_t) (r uintptr) { if n != 0 { copy((*RawMem)(unsafe.Pointer(dest))[:n:n], (*RawMem)(unsafe.Pointer(src))[:n:n]) } return dest } func _fetestexcept(t *TLS, _ int32) int32 { return 0 } func _feclearexcept(t *TLS, _ int32) int32 { return 0 } func _a_crash(tls *TLS) { panic("crash") } var atomicBarrier atomic.Int32 func _a_barrier(tls *TLS) { atomicBarrier.Add(1) } // static inline int a_sc(volatile int *p, int v) func _a_sc(*TLS, uintptr, int32) int32 { panic(todo("")) } // static inline int a_ll(volatile int *p) func _a_ll(tls *TLS, p uintptr) int32 { return atomic.LoadInt32((*int32)(unsafe.Pointer(p))) } func _a_clz_32(tls *TLS, x uint32) int32 { return int32(bits.LeadingZeros32(x)) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/nofsync.go
vendor/modernc.org/libc/nofsync.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build libc.nofsync // +build libc.nofsync package libc // import "modernc.org/libc" const noFsync = true
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_windows.go
vendor/modernc.org/libc/libc_windows.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "errors" "fmt" "golang.org/x/sys/windows" "math" mbits "math/bits" "os" "os/exec" "os/user" "path/filepath" "runtime/debug" "strings" "sync" "sync/atomic" gotime "time" "unicode" "unicode/utf16" "unsafe" "github.com/ncruces/go-strftime" "modernc.org/libc/errno" "modernc.org/libc/fcntl" "modernc.org/libc/limits" "modernc.org/libc/stdio" "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" "modernc.org/libc/time" "modernc.org/libc/unistd" ) // Keep these outside of the var block otherwise go generate will miss them. var X__imp__environ = EnvironP() var X__imp__wenviron = uintptr(unsafe.Pointer(&wenviron)) var X_imp___environ = EnvironP() var X_imp___wenviron = uintptr(unsafe.Pointer(&wenviron)) var X_iob [stdio.X_IOB_ENTRIES]stdio.FILE var Xin6addr_any [16]byte var Xtimezone long // extern long timezone; type Tsize_t = types.Size_t var ( iobMap = map[uintptr]int32{} // &_iob[fd] -> fd wenvValid bool wenviron uintptr // &winEnviron[0] winEnviron = []uintptr{0} ) func init() { for i := range X_iob { iobMap[uintptr(unsafe.Pointer(&X_iob[i]))] = int32(i) } } func X__p__wenviron(t *TLS) uintptr { if !wenvValid { bootWinEnviron(t) } return uintptr(unsafe.Pointer(&wenviron)) } func winGetObject(stream uintptr) interface{} { if fd, ok := iobMap[stream]; ok { f, _ := fdToFile(fd) return f } return getObject(stream) } type ( syscallErrno = windows.Errno long = int32 ulong = uint32 ) var ( modkernel32 = windows.NewLazySystemDLL("kernel32.dll") //-- procAreFileApisANSI = modkernel32.NewProc("AreFileApisANSI") procCopyFileW = modkernel32.NewProc("CopyFileW") procCreateEventA = modkernel32.NewProc("CreateEventA") procCreateEventW = modkernel32.NewProc("CreateEventW") procCreateFileA = modkernel32.NewProc("CreateFileA") procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW") procCreateFileW = modkernel32.NewProc("CreateFileW") procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW") procCreatePipe = modkernel32.NewProc("CreatePipe") procCreateProcessA = modkernel32.NewProc("CreateProcessA") procCreateProcessW = modkernel32.NewProc("CreateProcessW") procCreateThread = modkernel32.NewProc("CreateThread") procDeleteCriticalSection = modkernel32.NewProc("DeleteCriticalSection") procDeviceIoControl = modkernel32.NewProc("DeviceIoControl") procDuplicateHandle = modkernel32.NewProc("DuplicateHandle") procEnterCriticalSection = modkernel32.NewProc("EnterCriticalSection") procFindClose = modkernel32.NewProc("FindClose") procFindFirstFileExW = modkernel32.NewProc("FindFirstFileExW") procFindFirstFileW = modkernel32.NewProc("FindFirstFileW") procFindNextFileW = modkernel32.NewProc("FindNextFileW") procFormatMessageW = modkernel32.NewProc("FormatMessageW") procGetACP = modkernel32.NewProc("GetACP") procGetCommState = modkernel32.NewProc("GetCommState") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procGetConsoleCP = modkernel32.NewProc("GetConsoleCP") procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") procGetCurrentThread = modkernel32.NewProc("GetCurrentThread") procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId") procGetEnvironmentVariableA = modkernel32.NewProc("GetEnvironmentVariableA") procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW") procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess") procGetExitCodeThread = modkernel32.NewProc("GetExitCodeThread") procGetFileAttributesA = modkernel32.NewProc("GetFileAttributesA") procGetFileAttributesExA = modkernel32.NewProc("GetFileAttributesExA") procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW") procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle") procGetFileSize = modkernel32.NewProc("GetFileSize") procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") procGetLastError = modkernel32.NewProc("GetLastError") procGetLogicalDriveStringsA = modkernel32.NewProc("GetLogicalDriveStringsA") procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW") procGetModuleHandleA = modkernel32.NewProc("GetModuleHandleA") procGetModuleHandleW = modkernel32.NewProc("GetModuleHandleW") procGetPrivateProfileStringA = modkernel32.NewProc("GetPrivateProfileStringA") procGetProcAddress = modkernel32.NewProc("GetProcAddress") procGetProcessHeap = modkernel32.NewProc("GetProcessHeap") procGetSystemInfo = modkernel32.NewProc("GetSystemInfo") procGetSystemTime = modkernel32.NewProc("GetSystemTime") procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime") procGetTempFileNameW = modkernel32.NewProc("GetTempFileNameW") procGetTickCount = modkernel32.NewProc("GetTickCount") procGetVersionExA = modkernel32.NewProc("GetVersionExA") procGetVersionExW = modkernel32.NewProc("GetVersionExW") procGetVolumeInformationA = modkernel32.NewProc("GetVolumeInformationA") procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW") procHeapAlloc = modkernel32.NewProc("HeapAlloc") procHeapFree = modkernel32.NewProc("HeapFree") procInitializeCriticalSection = modkernel32.NewProc("InitializeCriticalSection") procLeaveCriticalSection = modkernel32.NewProc("LeaveCriticalSection") procLockFile = modkernel32.NewProc("LockFile") procLockFileEx = modkernel32.NewProc("LockFileEx") procLstrlenW = modkernel32.NewProc("lstrlenW") procMapViewOfFile = modkernel32.NewProc("MapViewOfFile") procMoveFileW = modkernel32.NewProc("MoveFileW") procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar") procOpenEventA = modkernel32.NewProc("OpenEventA") procOpenProcessToken = modkernel32.NewProc("OpenProcessToken") procPeekConsoleInputW = modkernel32.NewProc("PeekConsoleInputW") procPeekNamedPipe = modkernel32.NewProc("PeekNamedPipe") procQueryPerformanceCounter = modkernel32.NewProc("QueryPerformanceCounter") procQueryPerformanceFrequency = modkernel32.NewProc("QueryPerformanceFrequency") procReadConsoleW = modkernel32.NewProc("ReadConsoleW") procReadFile = modkernel32.NewProc("ReadFile") procResetEvent = modkernel32.NewProc("ResetEvent") procSearchPathW = modkernel32.NewProc("SearchPathW") procSetConsoleCtrlHandler = modkernel32.NewProc("SetConsoleCtrlHandler") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") procSetConsoleTextAttribute = modkernel32.NewProc("SetConsoleTextAttribute") procSetEvent = modkernel32.NewProc("SetEvent") procSetFilePointer = modkernel32.NewProc("SetFilePointer") procSetFileTime = modkernel32.NewProc("SetFileTime") procSleepEx = modkernel32.NewProc("SleepEx") procSystemTimeToFileTime = modkernel32.NewProc("SystemTimeToFileTime") procTerminateThread = modkernel32.NewProc("TerminateThread") procTryEnterCriticalSection = modkernel32.NewProc("TryEnterCriticalSection") procUnlockFile = modkernel32.NewProc("UnlockFile") procUnlockFileEx = modkernel32.NewProc("UnlockFileEx") procWaitForSingleObjectEx = modkernel32.NewProc("WaitForSingleObjectEx") procWideCharToMultiByte = modkernel32.NewProc("WideCharToMultiByte") procWriteConsoleA = modkernel32.NewProc("WriteConsoleA") procWriteConsoleW = modkernel32.NewProc("WriteConsoleW") procWriteFile = modkernel32.NewProc("WriteFile") // procSetConsoleCP = modkernel32.NewProc("SetConsoleCP") // procSetThreadPriority = modkernel32.NewProc("SetThreadPriority") //-- modadvapi = windows.NewLazySystemDLL("advapi32.dll") //-- procAccessCheck = modadvapi.NewProc("AccessCheck") procAddAce = modadvapi.NewProc("AddAce") procEqualSid = modadvapi.NewProc("EqualSid") procGetAce = modadvapi.NewProc("GetAce") procGetAclInformation = modadvapi.NewProc("GetAclInformation") procGetFileSecurityA = modadvapi.NewProc("GetFileSecurityA") procGetFileSecurityW = modadvapi.NewProc("GetFileSecurityW") procGetLengthSid = modadvapi.NewProc("GetLengthSid") procGetNamedSecurityInfoW = modadvapi.NewProc("GetNamedSecurityInfoW") procGetSecurityDescriptorDacl = modadvapi.NewProc("GetSecurityDescriptorDacl") procGetSecurityDescriptorOwner = modadvapi.NewProc("GetSecurityDescriptorOwner") procGetSidIdentifierAuthority = modadvapi.NewProc("GetSidIdentifierAuthority") procGetSidLengthRequired = modadvapi.NewProc("GetSidLengthRequired") procGetSidSubAuthority = modadvapi.NewProc("GetSidSubAuthority") procGetTokenInformation = modadvapi.NewProc("GetTokenInformation") procImpersonateSelf = modadvapi.NewProc("ImpersonateSelf") procInitializeAcl = modadvapi.NewProc("InitializeAcl") procInitializeSid = modadvapi.NewProc("InitializeSid") procOpenThreadToken = modadvapi.NewProc("OpenThreadToken") procRevertToSelf = modadvapi.NewProc("RevertToSelf") //-- modws2_32 = windows.NewLazySystemDLL("ws2_32.dll") //-- procWSAStartup = modws2_32.NewProc("WSAStartup") //-- moduser32 = windows.NewLazySystemDLL("user32.dll") //-- procCharLowerW = moduser32.NewProc("CharLowerW") procCreateWindowExW = moduser32.NewProc("CreateWindowExW") procMsgWaitForMultipleObjectsEx = moduser32.NewProc("MsgWaitForMultipleObjectsEx") procPeekMessageW = moduser32.NewProc("PeekMessageW") procRegisterClassW = moduser32.NewProc("RegisterClassW") procUnregisterClassW = moduser32.NewProc("UnregisterClassW") procWaitForInputIdle = moduser32.NewProc("WaitForInputIdle") //-- netapi = windows.NewLazySystemDLL("netapi32.dll") procNetGetDCName = netapi.NewProc("NetGetDCName") procNetUserGetInfo = netapi.NewProc("NetUserGetInfo") userenvapi = windows.NewLazySystemDLL("userenv.dll") procGetProfilesDirectoryW = userenvapi.NewProc("GetProfilesDirectoryW") modcrt = windows.NewLazySystemDLL("msvcrt.dll") procAccess = modcrt.NewProc("_access") procChmod = modcrt.NewProc("_chmod") procCtime64 = modcrt.NewProc("ctime64") procGmtime = modcrt.NewProc("gmtime") procGmtime32 = modcrt.NewProc("_gmtime32") procGmtime64 = modcrt.NewProc("_gmtime64") procStati64 = modcrt.NewProc("_stati64") procStrftime = modcrt.NewProc("strftime") procStrnicmp = modcrt.NewProc("_strnicmp") procStrtod = modcrt.NewProc("strtod") procTime64 = modcrt.NewProc("time64") procWcsncpy = modcrt.NewProc("wcsncpy") procWcsrchr = modcrt.NewProc("wcsrchr") moducrt = windows.NewLazySystemDLL("ucrtbase.dll") procFindfirst32 = moducrt.NewProc("_findfirst32") procFindnext32 = moducrt.NewProc("_findnext32") procStat64i32 = moducrt.NewProc("_stat64i32") procWchmod = moducrt.NewProc("_wchmod") procWfindfirst32 = moducrt.NewProc("_wfindfirst32") procWfindfirst64i32 = moducrt.NewProc("_wfindfirst64i32") procWfindnext32 = moducrt.NewProc("_wfindnext32") procWfindnext64i32 = moducrt.NewProc("_wfindnext64i32") procWmkdir = moducrt.NewProc("_wmkdir") procWstat32 = moducrt.NewProc("_wstat32") procWstat64i32 = moducrt.NewProc("_wstat64i32") ) var ( threadCallback uintptr ) func init() { isWindows = true threadCallback = windows.NewCallback(ThreadProc) } // --------------------------------- // Windows filehandle-to-fd mapping // so the lib-c interface contract looks // like normal fds being passed around // but we're mapping them back and forth to // native windows file handles (windows.Handle) // var EBADF = errors.New("EBADF") var w_nextFd int32 = 42 var w_fdLock sync.Mutex var w_fd_to_file = map[int32]*file{} type file struct { _fd int32 hadErr bool t uintptr windows.Handle } func addFile(hdl windows.Handle, fd int32) uintptr { var f = file{_fd: fd, Handle: hdl} w_fdLock.Lock() defer w_fdLock.Unlock() w_fd_to_file[fd] = &f f.t = addObject(&f) return f.t } func remFile(f *file) { removeObject(f.t) w_fdLock.Lock() defer w_fdLock.Unlock() delete(w_fd_to_file, f._fd) } func fdToFile(fd int32) (*file, bool) { w_fdLock.Lock() defer w_fdLock.Unlock() f, ok := w_fd_to_file[fd] return f, ok } // Wrap the windows handle up tied to a unique fd func wrapFdHandle(hdl windows.Handle) (uintptr, int32) { newFd := atomic.AddInt32(&w_nextFd, 1) return addFile(hdl, newFd), newFd } func (f *file) err() bool { return f.hadErr } func (f *file) setErr() { f.hadErr = true } func (tls *TLS) SetLastError(_dwErrCode uint32) { if tls != nil { tls.lastError = _dwErrCode } } // https://github.com/golang/go/issues/41220 func (tls *TLS) GetLastError() (r uint32) { if tls == nil { return 0 } return tls.lastError } // ----------------------------------- // On windows we have to fetch these // // stdout, stdin, sterr // // Using the windows specific GetStdHandle // they're mapped to the standard fds (0,1,2) // Note: it's possible they don't exist // if the app has been built for a GUI only // target in windows. If that's the case // panic seems like the only reasonable option // ------------------------------ func newFile(t *TLS, fd int32) uintptr { if fd == unistd.STDIN_FILENO { h, err := windows.GetStdHandle(windows.STD_INPUT_HANDLE) if err != nil { panic("no console") } return addFile(h, fd) } if fd == unistd.STDOUT_FILENO { h, err := windows.GetStdHandle(windows.STD_OUTPUT_HANDLE) if err != nil { panic("no console") } return addFile(h, fd) } if fd == unistd.STDERR_FILENO { h, err := windows.GetStdHandle(windows.STD_ERROR_HANDLE) if err != nil { panic("no console") } return addFile(h, fd) } // should not get here -- unless newFile // is being used from somewhere we don't know about // to originate fds. panic("unknown fd source") return 0 } func (f *file) close(t *TLS) int32 { remFile(f) err := windows.Close(f.Handle) if err != nil { return (-1) // EOF } return 0 } func fwrite(fd int32, b []byte) (int, error) { if fd == unistd.STDOUT_FILENO { return write(b) } f, ok := fdToFile(fd) if !ok { return -1, EBADF } if dmesgs { dmesg("%v: fd %v: %s", origin(1), fd, b) } return windows.Write(f.Handle, b) } // int fprintf(FILE *stream, const char *format, ...); func Xfprintf(t *TLS, stream, format, args uintptr) int32 { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } f, ok := winGetObject(stream).(*file) if !ok { t.setErrno(errno.EBADF) return -1 } n, _ := fwrite(f._fd, printf(format, args)) return int32(n) } // int usleep(useconds_t usec); func Xusleep(t *TLS, usec types.Useconds_t) int32 { if __ccgo_strace { trc("t=%v usec=%v, (%v:)", t, usec, origin(2)) } gotime.Sleep(gotime.Microsecond * gotime.Duration(usec)) return 0 } // int getrusage(int who, struct rusage *usage); func Xgetrusage(t *TLS, who int32, usage uintptr) int32 { if __ccgo_strace { trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xlstat64(t, pathname, statbuf) } // int stat(const char *pathname, struct stat *statbuf); func Xstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xstat64(t, pathname, statbuf) } // int chdir(const char *path); func Xchdir(t *TLS, path uintptr) int32 { if __ccgo_strace { trc("t=%v path=%v, (%v:)", t, path, origin(2)) } err := windows.Chdir(GoString(path)) if err != nil { t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(path)) } return 0 } var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) localtime.Ftm_min = int32(t.Minute()) localtime.Ftm_hour = int32(t.Hour()) localtime.Ftm_mday = int32(t.Day()) localtime.Ftm_mon = int32(t.Month() - 1) localtime.Ftm_year = int32(t.Year() - 1900) localtime.Ftm_wday = int32(t.Weekday()) localtime.Ftm_yday = int32(t.YearDay()) localtime.Ftm_isdst = Bool32(isTimeDST(t)) return uintptr(unsafe.Pointer(&localtime)) } // struct tm *localtime(const time_t *timep); func X_localtime64(_ *TLS, timep uintptr) uintptr { return Xlocaltime(nil, timep) } // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { panic(todo("")) // loc := getLocalLocation() // ut := *(*unix.Time_t)(unsafe.Pointer(timep)) // t := gotime.Unix(int64(ut), 0).In(loc) // (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) // (*time.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute()) // (*time.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour()) // (*time.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day()) // (*time.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1) // (*time.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900) // (*time.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday()) // (*time.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay()) // (*time.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t)) // return result } // int _wopen( // // const wchar_t *filename, // int oflag [, // int pmode] // // ); func X_wopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } var mode types.Mode_t if args != 0 { mode = *(*types.Mode_t)(unsafe.Pointer(args)) } s := goWideString(pathname) h, err := windows.Open(GoString(pathname), int(flags), uint32(mode)) if err != nil { if dmesgs { dmesg("%v: %q %#x: %v", origin(1), s, flags, err) } t.setErrno(err) return 0 } _, n := wrapFdHandle(h) if dmesgs { dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), s, flags, mode, n) } return n } // int open(const char *pathname, int flags, ...); func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } return Xopen64(t, pathname, flags, args) } // int open(const char *pathname, int flags, ...); func Xopen64(t *TLS, pathname uintptr, flags int32, cmode uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v cmode=%v, (%v:)", t, pathname, flags, cmode, origin(2)) } var mode types.Mode_t if cmode != 0 { mode = (types.Mode_t)(VaUint32(&cmode)) } // fdcwd := fcntl.AT_FDCWD h, err := windows.Open(GoString(pathname), int(flags), uint32(mode)) if err != nil { if dmesgs { dmesg("%v: %q %#x: %v", origin(1), GoString(pathname), flags, err) } t.setErrno(err) return -1 } _, n := wrapFdHandle(h) if dmesgs { dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, n) } return n } // off_t lseek(int fd, off_t offset, int whence); func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } return types.Off_t(Xlseek64(t, fd, offset, whence)) } func whenceStr(whence int32) string { switch whence { case windows.FILE_CURRENT: return "SEEK_CUR" case windows.FILE_END: return "SEEK_END" case windows.FILE_BEGIN: return "SEEK_SET" default: return fmt.Sprintf("whence(%d)", whence) } } var fsyncStatbuf stat.Stat // int fsync(int fd); func Xfsync(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(errno.EBADF) return -1 } err := windows.FlushFileBuffers(f.Handle) if err != nil { t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d: ok", origin(1), fd) } return 0 } // long sysconf(int name); func Xsysconf(t *TLS, name int32) long { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } panic(todo("")) // switch name { // case unistd.X_SC_PAGESIZE: // return long(unix.Getpagesize()) // } // panic(todo("")) } // int close(int fd); func Xclose(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(errno.EBADF) return -1 } err := windows.Close(f.Handle) if err != nil { t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d: ok", origin(1), fd) } return 0 } // char *getcwd(char *buf, size_t size); func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } b := make([]uint16, size) n, err := windows.GetCurrentDirectory(uint32(len(b)), &b[0]) if err != nil { t.setErrno(err) return 0 } // to bytes var wd = []byte(string(utf16.Decode(b[0:n]))) if types.Size_t(len(wd)) > size { t.setErrno(errno.ERANGE) return 0 } copy((*RawMem)(unsafe.Pointer(buf))[:], wd) (*RawMem)(unsafe.Pointer(buf))[len(wd)] = 0 if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(buf)) } return buf } // int fstat(int fd, struct stat *statbuf); func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } return Xfstat64(t, fd, statbuf) } // int ftruncate(int fd, off_t length); func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 { if __ccgo_strace { trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) } return Xftruncate64(t, fd, length) } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } return Xfcntl64(t, fd, cmd, args) } // int _read( // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/read?view=msvc-160 // // int const fd, // void * const buffer, // unsigned const buffer_size // // ); func Xread(t *TLS, fd int32, buf uintptr, count uint32) int32 { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(errno.EBADF) return -1 } var obuf = ((*RawMem)(unsafe.Pointer(buf)))[:count] n, err := windows.Read(f.Handle, obuf) if err != nil { t.setErrno(err) return -1 } if dmesgs { // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) } return int32(n) } func X_read(t *TLS, fd int32, buf uintptr, count uint32) int32 { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } return Xread(t, fd, buf, count) } // int _write( // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/write?view=msvc-160 // // int fd, // const void *buffer, // unsigned int count // // ); func Xwrite(t *TLS, fd int32, buf uintptr, count uint32) int32 { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(errno.EBADF) return -1 } var obuf = ((*RawMem)(unsafe.Pointer(buf)))[:count] n, err := windows.Write(f.Handle, obuf) if err != nil { if dmesgs { dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) } t.setErrno(err) return -1 } if dmesgs { // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) } return int32(n) } func X_write(t *TLS, fd int32, buf uintptr, count uint32) int32 { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } return Xwrite(t, fd, buf, count) } // int fchmod(int fd, mode_t mode); func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 { // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %d %#o: ok", origin(1), fd, mode) // } // return 0 } // // int fchown(int fd, uid_t owner, gid_t group); // func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 { // if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 // } // // uid_t geteuid(void); // func Xgeteuid(t *TLS) types.Uid_t { // n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0) // return types.Uid_t(n) // } // int munmap(void *addr, size_t length); func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 { if __ccgo_strace { trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } type Timeval = struct { Ftv_sec int32 Ftv_usec int32 } // int gettimeofday(struct timeval *tv, struct timezone *tz); func Xgettimeofday(t *TLS, tv, tz uintptr) int32 { if __ccgo_strace { trc("t=%v tz=%v, (%v:)", t, tz, origin(2)) } if tv == 0 { return 0 } // This seems to work as well // var u64 uint64 // procGetSystemTimeAsFileTime.Call(uintptr(unsafe.Pointer(&u64)), 0, 0) // u64 /= 10 // u64 -= 11644473600000000 // (*Timeval)(unsafe.Pointer(tv)).Ftv_sec = int32(u64/1e6) // (*Timeval)(unsafe.Pointer(tv)).Ftv_usec = int32(u64%1e6) // return 0 // But let's use the golang.org/x/sys version windows.Gettimeofday((*windows.Timeval)(unsafe.Pointer(tv))) return 0 } type Timespec = struct { Ftv_sec time.Time_t Ftv_nsec int32 } // int clock_gettime(clockid_t clk_id, struct timespec *tp); func Xclock_gettime(t *TLS, clk_id int32, tp uintptr) int32 { if __ccgo_strace { trc("t=%v clk_id=%v tp=%v, (%v:)", t, clk_id, tp, origin(2)) } var u64 uint64 // [100ns] procGetSystemTimeAsFileTime.Call(uintptr(unsafe.Pointer(&u64)), 0, 0) (*Timespec)(unsafe.Pointer(tp)).Ftv_sec = time.Time_t((u64/10 - 11644473600000000) / 1e6) (*Timespec)(unsafe.Pointer(tp)).Ftv_nsec = int32((u64 * 100) % 1e9) return 0 } // int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); func Xgetsockopt(t *TLS, _ ...interface{}) int32 { panic(todo("")) // if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // // int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); func Xsetsockopt(t *TLS, _ ...interface{}) int32 { panic(todo("")) } // int ioctl(int fd, unsigned long request, ...); func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2)) } panic(todo("")) // var argp uintptr // if va != 0 { // argp = VaUintptr(&va) // } // n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 { if __ccgo_strace { trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2)) } panic(todo("")) // n, err := unix.Select( // int(nfds), // (*unix.FdSet)(unsafe.Pointer(readfds)), // (*unix.FdSet)(unsafe.Pointer(writefds)), // (*unix.FdSet)(unsafe.Pointer(exceptfds)), // (*unix.Timeval)(unsafe.Pointer(timeout)), // ) // if err != nil { // t.setErrno(err) // return -1 // } // return int32(n) } // int mkfifo(const char *pathname, mode_t mode); func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } panic(todo("")) // if err := unix.Mkfifo(GoString(pathname), mode); err != nil { // t.setErrno(err) // return -1 // } // // return 0 } // mode_t umask(mode_t mask); func Xumask(t *TLS, mask types.Mode_t) types.Mode_t { if __ccgo_strace { trc("t=%v mask=%v, (%v:)", t, mask, origin(2)) } panic(todo("")) // n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0) // return types.Mode_t(n) } // int execvp(const char *file, char *const argv[]); func Xexecvp(t *TLS, file, argv uintptr) int32 { if __ccgo_strace { trc("t=%v argv=%v, (%v:)", t, argv, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // pid_t waitpid(pid_t pid, int *wstatus, int options); func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t { if __ccgo_strace { trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // // return types.Pid_t(n) } // int uname(struct utsname *buf); func Xuname(t *TLS, buf uintptr) int32 { if __ccgo_strace { trc("t=%v buf=%v, (%v:)", t, buf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_UNAME, buf, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xgetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xsetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // // uid_t getuid(void); // func Xgetuid(t *TLS) types.Uid_t { // return types.Uid_t(os.Getuid()) // } // pid_t getpid(void); func Xgetpid(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return int32(os.Getpid()) } // int system(const char *command); func Xsystem(t *TLS, command uintptr) int32 { if __ccgo_strace { trc("t=%v command=%v, (%v:)", t, command, origin(2)) } s := GoString(command) if command == 0 { panic(todo("")) } cmd := exec.Command("sh", "-c", s) cmd.Stdout = os.Stdout
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_windows_amd64.go
vendor/modernc.org/libc/libc_windows_amd64.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "golang.org/x/sys/windows" "modernc.org/libc/errno" "modernc.org/libc/sys/types" "os" "strings" "unsafe" ) // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { if __ccgo_strace { trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2)) } panic(todo("")) // musl/arch/x86_64/ksigaction.h // // struct k_sigaction { // void (*handler)(int); // unsigned long flags; // void (*restorer)(void); // unsigned mask[2]; // }; // type k_sigaction struct { // handler uintptr // flags ulong // restorer uintptr // mask [2]uint32 // } // var kact, koldact uintptr // if act != 0 { // kact = t.Alloc(int(unsafe.Sizeof(k_sigaction{}))) // defer Xfree(t, kact) // *(*k_sigaction)(unsafe.Pointer(kact)) = k_sigaction{ // handler: (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_handler.Fsa_handler, // flags: ulong((*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags), // restorer: (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_restorer, // } // Xmemcpy(t, kact+unsafe.Offsetof(k_sigaction{}.mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(k_sigaction{}.mask))) // } // if oldact != 0 { // panic(todo("")) // } // if _, _, err := unix.Syscall6(unix.SYS_RT_SIGACTION, uintptr(signal.SIGABRT), kact, koldact, unsafe.Sizeof(k_sigaction{}.mask), 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // if oldact != 0 { // panic(todo("")) // } // return 0 } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } panic(todo("")) // var arg uintptr // if args != 0 { // arg = *(*uintptr)(unsafe.Pointer(args)) // } // n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) // if err != 0 { // if dmesgs { // dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) // } // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) // } // return int32(n) } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) // } // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(pathname)) // } // return 0 } // int stat(const char *pathname, struct stat *statbuf); func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) // } // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(pathname)) // } // return 0 } // int fstat(int fd, struct stat *statbuf); func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: fd %d: %v", origin(1), fd, err) // } // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf))) // } // return 0 } func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { if __ccgo_strace { trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) } return Xmmap64(t, addr, length, prot, flags, fd, offset) } // void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { if __ccgo_strace { trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) } panic(todo("")) // data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) // if err != 0 { // if dmesgs { // dmesg("%v: %v", origin(1), err) // } // t.setErrno(err) // return ^uintptr(0) // (void*)-1 // } // if dmesgs { // dmesg("%v: %#x", origin(1), data) // } // return data } // void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */); func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr { if __ccgo_strace { trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2)) } panic(todo("")) // var arg uintptr // if args != 0 { // arg = *(*uintptr)(unsafe.Pointer(args)) // } // data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0) // if err != 0 { // if dmesgs { // dmesg("%v: %v", origin(1), err) // } // t.setErrno(err) // return ^uintptr(0) // (void*)-1 // } // if dmesgs { // dmesg("%v: %#x", origin(1), data) // } // return data } // int ftruncate(int fd, off_t length); func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 { if __ccgo_strace { trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 { // if dmesgs { // dmesg("%v: fd %d: %v", origin(1), fd, err) // } // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %d %#x: ok", origin(1), fd, length) // } // return 0 } // off64_t lseek64(int fd, off64_t offset, int whence); func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(errno.EBADF) return -1 } n, err := windows.Seek(f.Handle, offset, int(whence)) if err != nil { if dmesgs { dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), f._fd, offset, whenceStr(whence), n) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: fd %v, off %#x, whence %v: ok", origin(1), f._fd, offset, whenceStr(whence)) } return n } // int utime(const char *filename, const struct utimbuf *times); func Xutime(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // unsigned int alarm(unsigned int seconds); func Xalarm(t *TLS, seconds uint32) uint32 { if __ccgo_strace { trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) // if err != 0 { // panic(todo("")) // } // return uint32(n) } // time_t time(time_t *tloc); func Xtime(t *TLS, tloc uintptr) types.Time_t { if __ccgo_strace { trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0) // if err != 0 { // t.setErrno(err) // return types.Time_t(-1) // } // if tloc != 0 { // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) // } // return types.Time_t(n) } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int mkdir(const char *path, mode_t mode); func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 { // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(path)) // } // return 0 } // int symlink(const char *target, const char *linkpath); func Xsymlink(t *TLS, target, linkpath uintptr) int32 { if __ccgo_strace { trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 { // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath)) // } // return 0 } // int utimes(const char *filename, const struct timeval times[2]); func Xutimes(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 { // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(filename)) // } // return 0 } // int unlink(const char *pathname); func Xunlink(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } err := windows.DeleteFile((*uint16)(unsafe.Pointer(pathname))) if err != nil { t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int rmdir(const char *pathname); func Xrmdir(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(pathname)) // } // return 0 } // int mknod(const char *pathname, mode_t mode, dev_t dev); func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // // int chown(const char *pathname, uid_t owner, gid_t group); // func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { // panic(todo("")) // // if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { // // t.setErrno(err) // // return -1 // // } // // // return 0 // } // int link(const char *oldpath, const char *newpath); func Xlink(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int pipe(int pipefd[2]); func Xpipe(t *TLS, pipefd uintptr) int32 { if __ccgo_strace { trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int dup2(int oldfd, int newfd); func Xdup2(t *TLS, oldfd, newfd int32) int32 { if __ccgo_strace { trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize)) // if err != 0 { // t.setErrno(err) // return -1 // } // return types.Ssize_t(n) } // FILE *fopen64(const char *pathname, const char *mode); func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { if __ccgo_strace { trc("t=%v mode=%v, (%v:)", t, mode, origin(2)) } m := strings.ReplaceAll(GoString(mode), "b", "") var flags int switch m { case "r": flags = os.O_RDONLY case "r+": flags = os.O_RDWR case "w": flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC case "w+": flags = os.O_RDWR | os.O_CREATE | os.O_TRUNC case "a": flags = os.O_WRONLY | os.O_CREATE | os.O_APPEND case "a+": flags = os.O_RDWR | os.O_CREATE | os.O_APPEND default: panic(m) } //TODO- flags |= fcntl.O_LARGEFILE h, err := windows.Open(GoString(pathname), int(flags), uint32(0666)) if err != nil { t.setErrno(err) return 0 } p, _ := wrapFdHandle(h) if p != 0 { return p } _ = windows.Close(h) t.setErrno(errno.ENOMEM) return 0 } func Xrecv(t *TLS, sockfd uint64, buf uintptr, len, flags int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2)) } panic(todo("")) } func Xsend(t *TLS, sockfd uint64, buf uintptr, len, flags int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2)) } panic(todo("")) } func Xshutdown(t *TLS, sockfd uint64, how int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v how=%v, (%v:)", t, sockfd, how, origin(2)) } panic(todo("")) } func Xgetpeername(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } func Xgetsockname(t *TLS, sockfd uint64, addr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2)) } panic(todo("")) } func Xsocket(t *TLS, domain, type1, protocol int32) uint64 { if __ccgo_strace { trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2)) } panic(todo("")) } func Xbind(t *TLS, sockfd uint64, addr uintptr, addrlen int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } func Xconnect(t *TLS, sockfd uint64, addr uintptr, addrlen int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } func Xlisten(t *TLS, sockfd uint64, backlog int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v backlog=%v, (%v:)", t, sockfd, backlog, origin(2)) } panic(todo("")) } func Xaccept(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) uint64 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } // LRESULT LRESULT DefWindowProcW( // // HWND hWnd, // UINT Msg, // WPARAM wParam, // LPARAM lParam // // ); func XDefWindowProcW(t *TLS, _ ...interface{}) int64 { panic(todo("")) } func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int64 { panic(todo("")) } func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ if __ccgo_strace { trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2)) } bp := tls.Alloc(32) defer tls.Free(32) var a uintptr = s *(*[4]size_t)(unsafe.Pointer(bp /* byteset */)) = [4]size_t{0: uint64(0)} if !(int32(*(*int8)(unsafe.Pointer(c))) != 0) { return uint64(0) } if !(int32(*(*int8)(unsafe.Pointer(c + 1))) != 0) { for ; int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(c))); s++ { } return size_t((int64(s) - int64(a)) / 1) } for ; *(*int8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint64(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8, size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; c++ { } for ; *(*int8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8))&(size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; s++ { } return size_t((int64(s) - int64(a)) / 1) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc.go
vendor/modernc.org/libc/libc.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !linux || mips64le ///go.generate echo package libc > ccgo.go ///go:generate go fmt -l -s -w ./... package libc // import "modernc.org/libc" //TODO use O_RDONLY etc. from fcntl header //TODO use t.Alloc/Free where appropriate import ( "bufio" crand "crypto/rand" "fmt" "math" mbits "math/bits" "math/rand" "os" "runtime" "runtime/debug" "sort" "strings" "sync" "sync/atomic" gotime "time" "unsafe" "github.com/mattn/go-isatty" "modernc.org/libc/errno" "modernc.org/libc/stdio" "modernc.org/libc/sys/types" "modernc.org/libc/time" "modernc.org/libc/unistd" "modernc.org/mathutil" ) const ( ENOENT = errno.ENOENT ) type ( // RawMem64 represents the biggest uint64 array the runtime can handle. RawMem64 [unsafe.Sizeof(RawMem{}) / unsafe.Sizeof(uint64(0))]uint64 ) var ( allocMu sync.Mutex environInitialized bool isWindows bool ungetcMu sync.Mutex ungetc = map[uintptr]byte{} ) // Keep these outside of the var block otherwise go generate will miss them. var Xenviron uintptr var Xstdin = newFile(nil, unistd.STDIN_FILENO) var Xstdout = newFile(nil, unistd.STDOUT_FILENO) var Xstderr = newFile(nil, unistd.STDERR_FILENO) func setEnviron() { SetEnviron(nil, os.Environ()) } func Environ() uintptr { if !environInitialized { SetEnviron(nil, os.Environ()) } return Xenviron } func EnvironP() uintptr { if !environInitialized { SetEnviron(nil, os.Environ()) } return uintptr(unsafe.Pointer(&Xenviron)) } func X___errno_location(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return X__errno_location(t) } // int * __errno_location(void); func X__errno_location(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return t.errnop } func Start(main func(*TLS, int32, uintptr) int32) { if dmesgs { wd, err := os.Getwd() dmesg("%v: %v, wd %v, %v", origin(1), os.Args, wd, err) defer func() { if err := recover(); err != nil { dmesg("%v: CRASH: %v\n%s", origin(1), err, debug.Stack()) } }() } runtime.LockOSThread() t := &TLS{errnop: uintptr(unsafe.Pointer(&errno0))} argv := Xcalloc(t, 1, types.Size_t((len(os.Args)+1)*int(uintptrSize))) if argv == 0 { panic("OOM") } p := argv for _, v := range os.Args { s := Xcalloc(t, 1, types.Size_t(len(v)+1)) if s == 0 { panic("OOM") } copy((*RawMem)(unsafe.Pointer(s))[:len(v):len(v)], v) *(*uintptr)(unsafe.Pointer(p)) = s p += uintptrSize } SetEnviron(t, os.Environ()) audit := false if memgrind { if s := os.Getenv("LIBC_MEMGRIND_START"); s != "0" { MemAuditStart() audit = true } } t = NewTLS() rc := main(t, int32(len(os.Args)), argv) exit(t, rc, audit) } func Xexit(t *TLS, status int32) { if __ccgo_strace { trc("t=%v status=%v, (%v:)", t, status, origin(2)) } exit(t, status, false) } func exit(t *TLS, status int32, audit bool) { if len(Covered) != 0 { buf := bufio.NewWriter(os.Stdout) CoverReport(buf) buf.Flush() } if len(CoveredC) != 0 { buf := bufio.NewWriter(os.Stdout) CoverCReport(buf) buf.Flush() } for _, v := range atExit { v() } if audit { t.Close() if tlsBalance != 0 { fmt.Fprintf(os.Stderr, "non zero TLS balance: %d\n", tlsBalance) status = 1 } } X_exit(nil, status) } // void _exit(int status); func X_exit(_ *TLS, status int32) { if dmesgs { dmesg("%v: EXIT %v", origin(1), status) } os.Exit(int(status)) } func SetEnviron(t *TLS, env []string) { if environInitialized { return } environInitialized = true p := Xcalloc(t, 1, types.Size_t((len(env)+1)*(int(uintptrSize)))) if p == 0 { panic("OOM") } Xenviron = p for _, v := range env { s := Xcalloc(t, 1, types.Size_t(len(v)+1)) if s == 0 { panic("OOM") } copy((*(*RawMem)(unsafe.Pointer(s)))[:len(v):len(v)], v) *(*uintptr)(unsafe.Pointer(p)) = s p += uintptrSize } } // void setbuf(FILE *stream, char *buf); func Xsetbuf(t *TLS, stream, buf uintptr) { if __ccgo_strace { trc("t=%v buf=%v, (%v:)", t, buf, origin(2)) } //TODO panic(todo("")) } // size_t confstr(int name, char *buf, size_t len); func Xconfstr(t *TLS, name int32, buf uintptr, len types.Size_t) types.Size_t { if __ccgo_strace { trc("t=%v name=%v buf=%v len=%v, (%v:)", t, name, buf, len, origin(2)) } panic(todo("")) } // int puts(const char *s); func Xputs(t *TLS, s uintptr) int32 { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } n, err := fmt.Printf("%s\n", GoString(s)) if err != nil { return stdio.EOF } return int32(n) } var ( randomMu sync.Mutex randomGen = rand.New(rand.NewSource(42)) ) // long int random(void); func Xrandom(t *TLS) long { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } randomMu.Lock() r := randomGen.Int63n(math.MaxInt32 + 1) randomMu.Unlock() return long(r) } func write(b []byte) (int, error) { // if dmesgs { // dmesg("%v: %s", origin(1), b) // } if _, err := os.Stdout.Write(b); err != nil { return -1, err } return len(b), nil } func X__builtin_bzero(t *TLS, s uintptr, n types.Size_t) { if __ccgo_strace { trc("t=%v s=%v n=%v, (%v:)", t, s, n, origin(2)) } Xbzero(t, s, n) } func X__builtin_abort(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } Xabort(t) } func X__builtin_abs(t *TLS, j int32) int32 { if __ccgo_strace { trc("t=%v j=%v, (%v:)", t, j, origin(2)) } return Xabs(t, j) } func X__builtin_clz(t *TLS, n uint32) int32 { if __ccgo_strace { trc("t=%v n=%v, (%v:)", t, n, origin(2)) } return int32(mbits.LeadingZeros32(n)) } func X__builtin_clzl(t *TLS, n ulong) int32 { if __ccgo_strace { trc("t=%v n=%v, (%v:)", t, n, origin(2)) } return int32(mbits.LeadingZeros64(uint64(n))) } func X__builtin_clzll(t *TLS, n uint64) int32 { if __ccgo_strace { trc("t=%v n=%v, (%v:)", t, n, origin(2)) } return int32(mbits.LeadingZeros64(n)) } func X__builtin_constant_p_impl() { panic(todo("internal error: should never be called")) } func X__builtin_copysign(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return Xcopysign(t, x, y) } func X__builtin_copysignf(t *TLS, x, y float32) float32 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return Xcopysignf(t, x, y) } func X__builtin_copysignl(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return Xcopysign(t, x, y) } func X__builtin_exit(t *TLS, status int32) { if __ccgo_strace { trc("t=%v status=%v, (%v:)", t, status, origin(2)) } Xexit(t, status) } func X__builtin_expect(t *TLS, exp, c long) long { if __ccgo_strace { trc("t=%v c=%v, (%v:)", t, c, origin(2)) } return exp } func X__builtin_fabs(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return Xfabs(t, x) } func X__builtin_fabsf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return Xfabsf(t, x) } func X__builtin_fabsl(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return Xfabsl(t, x) } func X__builtin_free(t *TLS, ptr uintptr) { if __ccgo_strace { trc("t=%v ptr=%v, (%v:)", t, ptr, origin(2)) } Xfree(t, ptr) } func X__builtin_getentropy(t *TLS, buf uintptr, n types.Size_t) int32 { if __ccgo_strace { trc("t=%v buf=%v n=%v, (%v:)", t, buf, n, origin(2)) } return Xgetentropy(t, buf, n) } func X__builtin_huge_val(t *TLS) float64 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return math.Inf(1) } func X__builtin_huge_valf(t *TLS) float32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return float32(math.Inf(1)) } func X__builtin_inf(t *TLS) float64 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return math.Inf(1) } func X__builtin_inff(t *TLS) float32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return float32(math.Inf(1)) } func X__builtin_infl(t *TLS) float64 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return math.Inf(1) } func X__builtin_malloc(t *TLS, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v size=%v, (%v:)", t, size, origin(2)) } return Xmalloc(t, size) } func X__builtin_memcmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 { if __ccgo_strace { trc("t=%v s2=%v n=%v, (%v:)", t, s2, n, origin(2)) } return Xmemcmp(t, s1, s2, n) } func X__builtin_nan(t *TLS, s uintptr) float64 { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } return math.NaN() } func X__builtin_nanf(t *TLS, s uintptr) float32 { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } return float32(math.NaN()) } func X__builtin_nanl(t *TLS, s uintptr) float64 { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } return math.NaN() } func X__builtin_prefetch(t *TLS, addr, args uintptr) { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } } func X__builtin_printf(t *TLS, s, args uintptr) int32 { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } return Xprintf(t, s, args) } func X__builtin_strchr(t *TLS, s uintptr, c int32) uintptr { if __ccgo_strace { trc("t=%v s=%v c=%v, (%v:)", t, s, c, origin(2)) } return Xstrchr(t, s, c) } func X__builtin_strcmp(t *TLS, s1, s2 uintptr) int32 { if __ccgo_strace { trc("t=%v s2=%v, (%v:)", t, s2, origin(2)) } return Xstrcmp(t, s1, s2) } func X__builtin_strcpy(t *TLS, dest, src uintptr) uintptr { if __ccgo_strace { trc("t=%v src=%v, (%v:)", t, src, origin(2)) } return Xstrcpy(t, dest, src) } func X__builtin_strlen(t *TLS, s uintptr) types.Size_t { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } return Xstrlen(t, s) } func X__builtin_trap(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } Xabort(t) } func X__isnan(t *TLS, arg float64) int32 { if __ccgo_strace { trc("t=%v arg=%v, (%v:)", t, arg, origin(2)) } return X__builtin_isnan(t, arg) } func X__isnanf(t *TLS, arg float32) int32 { if __ccgo_strace { trc("t=%v arg=%v, (%v:)", t, arg, origin(2)) } return Xisnanf(t, arg) } func X__isnanl(t *TLS, arg float64) int32 { if __ccgo_strace { trc("t=%v arg=%v, (%v:)", t, arg, origin(2)) } return Xisnanl(t, arg) } func Xvfprintf(t *TLS, stream, format, ap uintptr) int32 { if __ccgo_strace { trc("t=%v ap=%v, (%v:)", t, ap, origin(2)) } return Xfprintf(t, stream, format, ap) } // int __builtin_popcount (unsigned int x) func X__builtin_popcount(t *TLS, x uint32) int32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return int32(mbits.OnesCount32(x)) } // int __builtin_popcountl (unsigned long x) func X__builtin_popcountl(t *TLS, x ulong) int32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return int32(mbits.OnesCount64(uint64(x))) } // char * __builtin___strcpy_chk (char *dest, const char *src, size_t os); func X__builtin___strcpy_chk(t *TLS, dest, src uintptr, os types.Size_t) uintptr { if __ccgo_strace { trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2)) } return Xstrcpy(t, dest, src) } func X__builtin_mmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { if __ccgo_strace { trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) } return Xmmap(t, addr, length, prot, flags, fd, offset) } // uint16_t __builtin_bswap16 (uint32_t x) func X__builtin_bswap16(t *TLS, x uint16) uint16 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return x<<8 | x>>8 } // uint32_t __builtin_bswap32 (uint32_t x) func X__builtin_bswap32(t *TLS, x uint32) uint32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return x<<24 | x&0xff00<<8 | x&0xff0000>>8 | x>>24 } // uint64_t __builtin_bswap64 (uint64_t x) func X__builtin_bswap64(t *TLS, x uint64) uint64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return x<<56 | x&0xff00<<40 | x&0xff0000<<24 | x&0xff000000<<8 | x&0xff00000000>>8 | x&0xff0000000000>>24 | x&0xff000000000000>>40 | x>>56 } // bool __builtin_add_overflow (type1 a, type2 b, type3 *res) func X__builtin_add_overflowInt64(t *TLS, a, b int64, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } r, ovf := mathutil.AddOverflowInt64(a, b) *(*int64)(unsafe.Pointer(res)) = r return Bool32(ovf) } // bool __builtin_add_overflow (type1 a, type2 b, type3 *res) func X__builtin_add_overflowUint32(t *TLS, a, b uint32, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } r := a + b *(*uint32)(unsafe.Pointer(res)) = r return Bool32(r < a) } // bool __builtin_add_overflow (type1 a, type2 b, type3 *res) func X__builtin_add_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } r := a + b *(*uint64)(unsafe.Pointer(res)) = r return Bool32(r < a) } // bool __builtin_sub_overflow (type1 a, type2 b, type3 *res) func X__builtin_sub_overflowInt64(t *TLS, a, b int64, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } r, ovf := mathutil.SubOverflowInt64(a, b) *(*int64)(unsafe.Pointer(res)) = r return Bool32(ovf) } // bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) func X__builtin_mul_overflowInt64(t *TLS, a, b int64, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } r, ovf := mathutil.MulOverflowInt64(a, b) *(*int64)(unsafe.Pointer(res)) = r return Bool32(ovf) } // bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) func X__builtin_mul_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } hi, lo := mbits.Mul64(a, b) *(*uint64)(unsafe.Pointer(res)) = lo return Bool32(hi != 0) } // bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) func X__builtin_mul_overflowUint128(t *TLS, a, b Uint128, res uintptr) int32 { if __ccgo_strace { trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2)) } r, ovf := a.mulOvf(b) *(*Uint128)(unsafe.Pointer(res)) = r return Bool32(ovf) } func X__builtin_unreachable(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } fmt.Fprintf(os.Stderr, "unrechable\n") os.Stderr.Sync() Xexit(t, 1) } func X__builtin_snprintf(t *TLS, str uintptr, size types.Size_t, format, args uintptr) int32 { if __ccgo_strace { trc("t=%v str=%v size=%v args=%v, (%v:)", t, str, size, args, origin(2)) } return Xsnprintf(t, str, size, format, args) } func X__builtin_sprintf(t *TLS, str, format, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) defer func() { trc("-> %v", r) }() } return Xsprintf(t, str, format, args) } func X__builtin_memcpy(t *TLS, dest, src uintptr, n types.Size_t) (r uintptr) { if __ccgo_strace { trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2)) defer func() { trc("-> %v", r) }() } return Xmemcpy(t, dest, src, n) } // void * __builtin___memcpy_chk (void *dest, const void *src, size_t n, size_t os); func X__builtin___memcpy_chk(t *TLS, dest, src uintptr, n, os types.Size_t) (r uintptr) { if __ccgo_strace { trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2)) defer func() { trc("-> %v", r) }() } if os != ^types.Size_t(0) && n < os { Xabort(t) } return Xmemcpy(t, dest, src, n) } func X__builtin_memset(t *TLS, s uintptr, c int32, n types.Size_t) uintptr { if __ccgo_strace { trc("t=%v s=%v c=%v n=%v, (%v:)", t, s, c, n, origin(2)) } return Xmemset(t, s, c, n) } // void * __builtin___memset_chk (void *s, int c, size_t n, size_t os); func X__builtin___memset_chk(t *TLS, s uintptr, c int32, n, os types.Size_t) uintptr { if __ccgo_strace { trc("t=%v s=%v c=%v os=%v, (%v:)", t, s, c, os, origin(2)) } if os < n { Xabort(t) } return Xmemset(t, s, c, n) } // size_t __builtin_object_size (const void * ptr, int type) func X__builtin_object_size(t *TLS, p uintptr, typ int32) types.Size_t { if __ccgo_strace { trc("t=%v p=%v typ=%v, (%v:)", t, p, typ, origin(2)) } switch typ { case 0, 1: return ^types.Size_t(0) default: return 0 } } var atomicLoadStore16 sync.Mutex func AtomicStoreNUint8(ptr uintptr, val uint8, memorder int32) { a_store_8(ptr, val) } func AtomicStoreNUint16(ptr uintptr, val uint16, memorder int32) { a_store_16(ptr, val) } // int sprintf(char *str, const char *format, ...); func Xsprintf(t *TLS, str, format, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) defer func() { trc("-> %v", r) }() } b := printf(format, args) r = int32(len(b)) copy((*RawMem)(unsafe.Pointer(str))[:r:r], b) *(*byte)(unsafe.Pointer(str + uintptr(r))) = 0 return int32(len(b)) } // int __builtin___sprintf_chk (char *s, int flag, size_t os, const char *fmt, ...); func X__builtin___sprintf_chk(t *TLS, s uintptr, flag int32, os types.Size_t, format, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v s=%v flag=%v os=%v args=%v, (%v:)", t, s, flag, os, args, origin(2)) defer func() { trc("-> %v", r) }() } return Xsprintf(t, s, format, args) } // void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); func Xqsort(t *TLS, base uintptr, nmemb, size types.Size_t, compar uintptr) { if __ccgo_strace { trc("t=%v base=%v size=%v compar=%v, (%v:)", t, base, size, compar, origin(2)) } sort.Sort(&sorter{ len: int(nmemb), base: base, sz: uintptr(size), f: (*struct { f func(*TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{compar})).f, t: t, }) } // void __assert_fail(const char * assertion, const char * file, unsigned int line, const char * function); func X__assert_fail(t *TLS, assertion, file uintptr, line uint32, function uintptr) { if __ccgo_strace { trc("t=%v file=%v line=%v function=%v, (%v:)", t, file, line, function, origin(2)) } fmt.Fprintf(os.Stderr, "assertion failure: %s:%d.%s: %s\n", GoString(file), line, GoString(function), GoString(assertion)) if memgrind { fmt.Fprintf(os.Stderr, "%s\n", debug.Stack()) } os.Stderr.Sync() Xexit(t, 1) } // int vprintf(const char *format, va_list ap); func Xvprintf(t *TLS, s, ap uintptr) int32 { if __ccgo_strace { trc("t=%v ap=%v, (%v:)", t, ap, origin(2)) } return Xprintf(t, s, ap) } // int vsprintf(char *str, const char *format, va_list ap); func Xvsprintf(t *TLS, str, format, va uintptr) int32 { if __ccgo_strace { trc("t=%v va=%v, (%v:)", t, va, origin(2)) } return Xsprintf(t, str, format, va) } // int vsnprintf(char *str, size_t size, const char *format, va_list ap); func Xvsnprintf(t *TLS, str uintptr, size types.Size_t, format, va uintptr) int32 { if __ccgo_strace { trc("t=%v str=%v size=%v va=%v, (%v:)", t, str, size, va, origin(2)) } return Xsnprintf(t, str, size, format, va) } func X__builtin_vsnprintf(t *TLS, str uintptr, size types.Size_t, format, va uintptr) int32 { if __ccgo_strace { trc("t=%v str=%v size=%v va=%v, (%v:)", t, str, size, va, origin(2)) } return Xvsnprintf(t, str, size, format, va) } // int obstack_vprintf (struct obstack *obstack, const char *template, va_list ap) func Xobstack_vprintf(t *TLS, obstack, template, va uintptr) int32 { if __ccgo_strace { trc("t=%v va=%v, (%v:)", t, va, origin(2)) } panic(todo("")) } // extern void _obstack_newchunk(struct obstack *, int); func X_obstack_newchunk(t *TLS, obstack uintptr, length int32) int32 { if __ccgo_strace { trc("t=%v obstack=%v length=%v, (%v:)", t, obstack, length, origin(2)) } panic(todo("")) } // int _obstack_begin (struct obstack *h, _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment, void *(*chunkfun) (size_t), void (*freefun) (void *)) func X_obstack_begin(t *TLS, obstack uintptr, size, alignment int32, chunkfun, freefun uintptr) int32 { if __ccgo_strace { trc("t=%v obstack=%v alignment=%v freefun=%v, (%v:)", t, obstack, alignment, freefun, origin(2)) } panic(todo("")) } // void obstack_free (struct obstack *h, void *obj) func Xobstack_free(t *TLS, obstack, obj uintptr) { if __ccgo_strace { trc("t=%v obj=%v, (%v:)", t, obj, origin(2)) } panic(todo("")) } // unsigned int sleep(unsigned int seconds); func Xsleep(t *TLS, seconds uint32) uint32 { if __ccgo_strace { trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) } gotime.Sleep(gotime.Second * gotime.Duration(seconds)) return 0 } // size_t strcspn(const char *s, const char *reject); func Xstrcspn(t *TLS, s, reject uintptr) (r types.Size_t) { if __ccgo_strace { trc("t=%v reject=%v, (%v:)", t, reject, origin(2)) defer func() { trc("-> %v", r) }() } bits := newBits(256) for { c := *(*byte)(unsafe.Pointer(reject)) if c == 0 { break } reject++ bits.set(int(c)) } for { c := *(*byte)(unsafe.Pointer(s)) if c == 0 || bits.has(int(c)) { return r } s++ r++ } } // int printf(const char *format, ...); func Xprintf(t *TLS, format, args uintptr) int32 { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } n, _ := write(printf(format, args)) return int32(n) } // int snprintf(char *str, size_t size, const char *format, ...); func Xsnprintf(t *TLS, str uintptr, size types.Size_t, format, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v str=%v size=%v args=%v, (%v:)", t, str, size, args, origin(2)) defer func() { trc("-> %v", r) }() } if format == 0 { return 0 } b := printf(format, args) r = int32(len(b)) if size == 0 { return r } if len(b)+1 > int(size) { b = b[:size-1] } n := len(b) copy((*RawMem)(unsafe.Pointer(str))[:n:n], b) *(*byte)(unsafe.Pointer(str + uintptr(n))) = 0 return r } // int __builtin___snprintf_chk(char * str, size_t maxlen, int flag, size_t os, const char * format, ...); func X__builtin___snprintf_chk(t *TLS, str uintptr, maxlen types.Size_t, flag int32, os types.Size_t, format, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v str=%v maxlen=%v flag=%v os=%v args=%v, (%v:)", t, str, maxlen, flag, os, args, origin(2)) defer func() { trc("-> %v", r) }() } if os != ^types.Size_t(0) && maxlen > os { Xabort(t) } return Xsnprintf(t, str, maxlen, format, args) } // int __builtin___vsnprintf_chk (char *s, size_t maxlen, int flag, size_t os, const char *fmt, va_list ap); func X__builtin___vsnprintf_chk(t *TLS, str uintptr, maxlen types.Size_t, flag int32, os types.Size_t, format, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v str=%v maxlen=%v flag=%v os=%v args=%v, (%v:)", t, str, maxlen, flag, os, args, origin(2)) defer func() { trc("-> %v", r) }() } if os != ^types.Size_t(0) && maxlen > os { Xabort(t) } return Xsnprintf(t, str, maxlen, format, args) } // int abs(int j); func Xabs(t *TLS, j int32) int32 { if __ccgo_strace { trc("t=%v j=%v, (%v:)", t, j, origin(2)) } if j >= 0 { return j } return -j } // long abs(long j); func Xlabs(t *TLS, j long) long { if __ccgo_strace { trc("t=%v j=%v, (%v:)", t, j, origin(2)) } if j >= 0 { return j } return -j } func Xllabs(tls *TLS, a int64) int64 { if __ccgo_strace { trc("tls=%v a=%v, (%v:)", tls, a, origin(2)) } if a >= int64(0) { return a } return -a } func X__builtin_isnan(t *TLS, x float64) int32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return Bool32(math.IsNaN(x)) } func X__builtin_llabs(tls *TLS, a int64) int64 { if __ccgo_strace { trc("tls=%v a=%v, (%v:)", tls, a, origin(2)) } return Xllabs(tls, a) } func Xacos(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Acos(x) } func Xacosf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Acos(float64(x))) } func Xacosh(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Acosh(x) } func Xacoshf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Acosh(float64(x))) } func Xasin(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Asin(x) } func Xasinf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Asin(float64(x))) } func Xasinh(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Asinh(x) } func Xasinhf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Asinh(float64(x))) } func Xatan(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Atan(x) } func Xatanf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Atan(float64(x))) } func Xatan2(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return math.Atan2(x, y) } func Xatan2f(t *TLS, x, y float32) float32 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return float32(math.Atan2(float64(x), float64(y))) } func Xatanh(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Atanh(x) } func Xatanhf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Atanh(float64(x))) } func Xceil(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Ceil(x) } func Xceilf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Ceil(float64(x))) } func Xcopysign(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return math.Copysign(x, y) } func Xcopysignf(t *TLS, x, y float32) float32 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return float32(math.Copysign(float64(x), float64(y))) } func Xcos(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Cos(x) } func Xcosf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Cos(float64(x))) } func Xcosh(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Cosh(x) } func Xcoshf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Cosh(float64(x))) } func Xexp(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Exp(x) } func Xexpf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Exp(float64(x))) } func Xfabs(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Abs(x) } func Xfabsf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Abs(float64(x))) } func Xfloor(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Floor(x) } func Xfloorf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Floor(float64(x))) } func Xfmod(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return math.Mod(x, y) } func Xfmodf(t *TLS, x, y float32) float32 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return float32(math.Mod(float64(x), float64(y))) } func X__builtin_hypot(t *TLS, x float64, y float64) (r float64) { return Xhypot(t, x, y) } func Xhypot(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return math.Hypot(x, y) } func Xhypotf(t *TLS, x, y float32) float32 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } return float32(math.Hypot(float64(x), float64(y))) } func Xisnan(t *TLS, x float64) int32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return X__builtin_isnan(t, x) } func Xisnanf(t *TLS, x float32) int32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return Bool32(math.IsNaN(float64(x))) } func Xisnanl(t *TLS, x float64) int32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return Bool32(math.IsNaN(x)) } // ccgo has to handle long double as double as Go does not support long double. func Xldexp(t *TLS, x float64, exp int32) float64 { if __ccgo_strace { trc("t=%v x=%v exp=%v, (%v:)", t, x, exp, origin(2)) } return math.Ldexp(x, int(exp)) } func Xlog(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Log(x) } func Xlogf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Log(float64(x))) } func Xlog10(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Log10(x) } func Xlog10f(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Log10(float64(x))) } func X__builtin_log2(t *TLS, x float64) float64 { return Xlog2(t, x) } func Xlog2(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Log2(x) } func Xlog2f(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Log2(float64(x))) } func Xround(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Round(x) } func Xroundf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Round(float64(x))) } func X__builtin_round(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Round(x) } func X__builtin_roundf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Round(float64(x))) } func Xsin(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Sin(x) } func Xsinf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Sin(float64(x))) } func Xsinh(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Sinh(x) } func Xsinhf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Sinh(float64(x))) } func Xsqrt(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Sqrt(x) } func Xsqrtf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Sqrt(float64(x))) } func Xtan(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Tan(x) } func Xtanf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Tan(float64(x))) } func Xtanh(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Tanh(x) } func Xtanhf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Tanh(float64(x))) } func Xtrunc(t *TLS, x float64) float64 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return math.Trunc(x) } func Xtruncf(t *TLS, x float32) float32 { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } return float32(math.Trunc(float64(x))) } var nextRand = uint64(1) // int rand(void); func Xrand(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } nextRand = nextRand*1103515245 + 12345 return int32(uint32(nextRand / (math.MaxUint32 + 1) % math.MaxInt32)) } func Xpow(t *TLS, x, y float64) float64 { if __ccgo_strace { trc("t=%v y=%v, (%v:)", t, y, origin(2)) } r := math.Pow(x, y) if x > 0 && r == 1 && y >= -1.0000000000000000715e-18 && y < -1e-30 {
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_windows_386.go
vendor/modernc.org/libc/libc_windows_386.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "golang.org/x/sys/windows" "os" "strings" gotime "time" "unsafe" "modernc.org/libc/errno" "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" "modernc.org/libc/time" ) // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { if __ccgo_strace { trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2)) } panic(todo("")) // // musl/arch/x32/ksigaction.h // // // // struct k_sigaction { // // void (*handler)(int); // // unsigned long flags; // // void (*restorer)(void); // // unsigned mask[2]; // // }; // type k_sigaction struct { // handler uintptr // flags ulong // restorer uintptr // mask [2]uint32 // } // var kact, koldact uintptr // if act != 0 { // kact = t.Alloc(int(unsafe.Sizeof(k_sigaction{}))) // defer Xfree(t, kact) // *(*k_sigaction)(unsafe.Pointer(kact)) = k_sigaction{ // handler: (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_handler.Fsa_handler, // flags: ulong((*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags), // restorer: (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_restorer, // } // Xmemcpy(t, kact+unsafe.Offsetof(k_sigaction{}.mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(k_sigaction{}.mask))) // } // if oldact != 0 { // panic(todo("")) // } // if _, _, err := unix.Syscall6(unix.SYS_RT_SIGACTION, uintptr(signal.SIGABRT), kact, koldact, unsafe.Sizeof(k_sigaction{}.mask), 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // if oldact != 0 { // panic(todo("")) // } // return 0 } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } panic(todo("")) // var arg uintptr // if args != 0 { // arg = *(*uintptr)(unsafe.Pointer(args)) // } // n, _, err := unix.Syscall(unix.SYS_FCNTL64, uintptr(fd), uintptr(cmd), arg) // if err != 0 { // if dmesgs { // dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) // } // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) // } // return int32(n) } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LSTAT64, pathname, statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) // } // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(pathname)) // } // return 0 } // int stat(const char *pathname, struct stat *statbuf); func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_STAT64, pathname, statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) // } // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(pathname)) // } // return 0 } // int fstat(int fd, struct stat *statbuf); func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FSTAT64, uintptr(fd), statbuf, 0); err != 0 { // if dmesgs { // dmesg("%v: fd %d: %v", origin(1), fd, err) // } // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %d, size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf))) // } // return 0 } // void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */); func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr { if __ccgo_strace { trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2)) } panic(todo("")) // var arg uintptr // if args != 0 { // arg = *(*uintptr)(unsafe.Pointer(args)) // } // data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0) // if err != 0 { // if dmesgs { // dmesg("%v: %v", origin(1), err) // } // t.setErrno(err) // return ^uintptr(0) // (void*)-1 // } // // if dmesgs { // dmesg("%v: %#x", origin(1), data) // } // return data } func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { if __ccgo_strace { trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) } return Xmmap64(t, addr, length, prot, flags, fd, offset) } // void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { if __ccgo_strace { trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2)) } panic(todo("")) // data, _, err := unix.Syscall6(unix.SYS_MMAP2, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset>>12)) // if err != 0 { // if dmesgs { // dmesg("%v: %v", origin(1), err) // } // t.setErrno(err) // return ^uintptr(0) // (void*)-1 // } // // if dmesgs { // dmesg("%v: %#x", origin(1), data) // } // return data } // int ftruncate(int fd, off_t length); func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 { if __ccgo_strace { trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)); err != 0 { // if dmesgs { // dmesg("%v: fd %d: %v", origin(1), fd, err) // } // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %d %#x: ok", origin(1), fd, length) // } // return 0 } // off64_t lseek64(int fd, off64_t offset, int whence); func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(errno.EBADF) return -1 } n, err := windows.Seek(f.Handle, offset, int(whence)) if err != nil { if dmesgs { dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), f._fd, offset, whenceStr(whence), n) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: fd %v, off %#x, whence %v: ok", origin(1), f._fd, offset, whenceStr(whence)) } return n } // int utime(const char *filename, const struct utimbuf *times); func Xutime(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // unsigned int alarm(unsigned int seconds); func Xalarm(t *TLS, seconds uint32) uint32 { if __ccgo_strace { trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) // if err != 0 { // panic(todo("")) // } // // return uint32(n) } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // time_t time(time_t *tloc); func Xtime(t *TLS, tloc uintptr) types.Time_t { if __ccgo_strace { trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0) // if err != 0 { // t.setErrno(err) // return types.Time_t(-1) // } // // if tloc != 0 { // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) // } // return types.Time_t(n) } // int mkdir(const char *path, mode_t mode); func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(path)) // } // return 0 } // int symlink(const char *target, const char *linkpath); func Xsymlink(t *TLS, target, linkpath uintptr) int32 { if __ccgo_strace { trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath)) // } // return 0 } // int utimes(const char *filename, const struct timeval times[2]); func Xutimes(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(filename)) // } // return 0 } // int unlink(const char *pathname); func Xunlink(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } err := windows.DeleteFile((*uint16)(unsafe.Pointer(pathname))) if err != nil { t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int rmdir(const char *pathname); func Xrmdir(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(pathname)) // } // return 0 } // int mknod(const char *pathname, mode_t mode, dev_t dev); func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // // int chown(const char *pathname, uid_t owner, gid_t group); // func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { // panic(todo("")) // // if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { // // t.setErrno(err) // // return -1 // // } // // // // return 0 // } // int link(const char *oldpath, const char *newpath); func Xlink(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // int pipe(int pipefd[2]); func Xpipe(t *TLS, pipefd uintptr) int32 { if __ccgo_strace { trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } // int dup2(int oldfd, int newfd); func Xdup2(t *TLS, oldfd, newfd int32) int32 { if __ccgo_strace { trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) // if err != 0 { // t.setErrno(err) // return -1 // } // // return int32(n) } // ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize)) // if err != 0 { // t.setErrno(err) // return -1 // } // // return types.Ssize_t(n) } // FILE *fopen64(const char *pathname, const char *mode); func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { if __ccgo_strace { trc("t=%v mode=%v, (%v:)", t, mode, origin(2)) } m := strings.ReplaceAll(GoString(mode), "b", "") var flags int switch m { case "r": flags = os.O_RDONLY case "r+": flags = os.O_RDWR case "w": flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC case "w+": flags = os.O_RDWR | os.O_CREATE | os.O_TRUNC case "a": flags = os.O_WRONLY | os.O_CREATE | os.O_APPEND case "a+": flags = os.O_RDWR | os.O_CREATE | os.O_APPEND default: panic(m) } //TODO- flags |= fcntl.O_LARGEFILE h, err := windows.Open(GoString(pathname), int(flags), uint32(0666)) if err != nil { t.setErrno(err) return 0 } p, _ := wrapFdHandle(h) if p != 0 { return p } _ = windows.Close(h) t.setErrno(errno.ENOMEM) return 0 } func Xrecv(t *TLS, sockfd uint32, buf uintptr, len, flags int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2)) } panic(todo("")) } func Xsend(t *TLS, sockfd uint32, buf uintptr, len, flags int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2)) } panic(todo("")) } func Xshutdown(t *TLS, sockfd uint32, how int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v how=%v, (%v:)", t, sockfd, how, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 } func Xgetpeername(t *TLS, sockfd uint32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } func Xgetsockname(t *TLS, sockfd uint32, addr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2)) } panic(todo("")) } func Xsocket(t *TLS, domain, type1, protocol int32) uint32 { if __ccgo_strace { trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2)) } panic(todo("")) } func Xbind(t *TLS, sockfd uint32, addr uintptr, addrlen int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } func Xconnect(t *TLS, sockfd uint32, addr uintptr, addrlen int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } func Xlisten(t *TLS, sockfd uint32, backlog int32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v backlog=%v, (%v:)", t, sockfd, backlog, origin(2)) } panic(todo("")) } func Xaccept(t *TLS, sockfd uint32, addr uintptr, addrlen uintptr) uint32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) } // struct tm *_localtime32( const __time32_t *sourceTime ); func X_localtime32(_ *TLS, sourceTime uintptr) uintptr { loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(sourceTime)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) localtime.Ftm_min = int32(t.Minute()) localtime.Ftm_hour = int32(t.Hour()) localtime.Ftm_mday = int32(t.Day()) localtime.Ftm_mon = int32(t.Month() - 1) localtime.Ftm_year = int32(t.Year() - 1900) localtime.Ftm_wday = int32(t.Weekday()) localtime.Ftm_yday = int32(t.YearDay()) localtime.Ftm_isdst = Bool32(isTimeDST(t)) return uintptr(unsafe.Pointer(&localtime)) } // struct tm *_gmtime32( const __time32_t *sourceTime ); func X_gmtime32(t *TLS, sourceTime uintptr) uintptr { r0, _, err := procGmtime32.Call(uintptr(sourceTime)) if err != windows.NOERROR { t.setErrno(err) } return uintptr(r0) } // LONG SetWindowLongW( // // HWND hWnd, // int nIndex, // LONG dwNewLong // // ); func XSetWindowLongW(t *TLS, hwnd uintptr, nIndex int32, dwNewLong long) long { if __ccgo_strace { trc("t=%v hwnd=%v nIndex=%v dwNewLong=%v, (%v:)", t, hwnd, nIndex, dwNewLong, origin(2)) } panic(todo("")) } // LONG GetWindowLongW( // // HWND hWnd, // int nIndex // // ); func XGetWindowLongW(t *TLS, hwnd uintptr, nIndex int32) long { if __ccgo_strace { trc("t=%v hwnd=%v nIndex=%v, (%v:)", t, hwnd, nIndex, origin(2)) } panic(todo("")) } // LRESULT LRESULT DefWindowProcW( // // HWND hWnd, // UINT Msg, // WPARAM wParam, // LPARAM lParam // // ); func XDefWindowProcW(t *TLS, _ ...interface{}) int32 { panic(todo("")) } func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int32 { panic(todo("")) } // int _fstat( // // int fd, // struct __stat *buffer // // ); func X_fstat(t *TLS, fd int32, buffer uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v buffer=%v, (%v:)", t, fd, buffer, origin(2)) } f, ok := fdToFile(fd) if !ok { t.setErrno(EBADF) return -1 } var d windows.ByHandleFileInformation err := windows.GetFileInformationByHandle(f.Handle, &d) if err != nil { t.setErrno(EBADF) return -1 } var bStat32 = (*stat.X_stat32)(unsafe.Pointer(buffer)) var accessTime = int64(d.LastAccessTime.HighDateTime)<<32 + int64(d.LastAccessTime.LowDateTime) bStat32.Fst_atime = int32(WindowsTickToUnixSeconds(accessTime)) var modTime = int64(d.LastWriteTime.HighDateTime)<<32 + int64(d.LastWriteTime.LowDateTime) bStat32.Fst_mtime = int32(WindowsTickToUnixSeconds(modTime)) var crTime = int64(d.CreationTime.HighDateTime)<<32 + int64(d.CreationTime.LowDateTime) bStat32.Fst_ctime = int32(WindowsTickToUnixSeconds(crTime)) var fSz = int64(d.FileSizeHigh)<<32 + int64(d.FileSizeLow) bStat32.Fst_size = int32(fSz) bStat32.Fst_mode = WindowsAttrbiutesToStat(d.FileAttributes) return 0 } func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ if __ccgo_strace { trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2)) } bp := tls.Alloc(32) defer tls.Free(32) var a uintptr = s *(*[8]size_t)(unsafe.Pointer(bp /* byteset */)) = [8]size_t{0: size_t(0)} if !(int32(*(*int8)(unsafe.Pointer(c))) != 0) { return size_t(0) } if !(int32(*(*int8)(unsafe.Pointer(c + 1))) != 0) { for ; int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(c))); s++ { } return size_t((int32(s) - int32(a)) / 1) } for ; *(*int8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint32(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4, size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; c++ { } for ; *(*int8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))*4))&(size_t(size_t(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint32(8)*uint32(unsafe.Sizeof(size_t(0)))))) != 0; s++ { } return size_t((int32(s) - int32(a)) / 1) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/tls_linux_amd64.go
vendor/modernc.org/libc/tls_linux_amd64.go
// Copyright 2025 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" //go:noescape func TLSAlloc(p0 *TLS, p1 int) uintptr //go:noescape func TLSFree(p0 *TLS, p1 int) //go:noescape func TLSAllocaEntry(p0 *TLS) //go:noescape func TLSAllocaExit(p0 *TLS) func tlsAlloc(tls *TLS, n int) uintptr { return tls.Alloc(n) } func tlsFree(tls *TLS, n int) { tls.Free(n) } func tlsAllocaEntry(tls *TLS) { tls.AllocaEntry() } func tlsAllocaExit(tls *TLS) { tls.AllocaExit() }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/ccgo.go
vendor/modernc.org/libc/ccgo.go
// Code generated by 'go generate' - DO NOT EDIT. //go:build !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) package libc // import "modernc.org/libc" import ( "sync/atomic" "unsafe" ) func AtomicStoreNInt32(ptr uintptr, val int32, memorder int32) { atomic.StoreInt32((*int32)(unsafe.Pointer(ptr)), val) } func AtomicStoreNInt64(ptr uintptr, val int64, memorder int32) { atomic.StoreInt64((*int64)(unsafe.Pointer(ptr)), val) } func AtomicStoreNUint32(ptr uintptr, val uint32, memorder int32) { atomic.StoreUint32((*uint32)(unsafe.Pointer(ptr)), val) } func AtomicStoreNUint64(ptr uintptr, val uint64, memorder int32) { atomic.StoreUint64((*uint64)(unsafe.Pointer(ptr)), val) } func AtomicStoreNUintptr(ptr uintptr, val uintptr, memorder int32) { atomic.StoreUintptr((*uintptr)(unsafe.Pointer(ptr)), val) } func AtomicLoadNInt32(ptr uintptr, memorder int32) int32 { return atomic.LoadInt32((*int32)(unsafe.Pointer(ptr))) } func AtomicLoadNInt64(ptr uintptr, memorder int32) int64 { return atomic.LoadInt64((*int64)(unsafe.Pointer(ptr))) } func AtomicLoadNUint32(ptr uintptr, memorder int32) uint32 { return atomic.LoadUint32((*uint32)(unsafe.Pointer(ptr))) } func AtomicLoadNUint64(ptr uintptr, memorder int32) uint64 { return atomic.LoadUint64((*uint64)(unsafe.Pointer(ptr))) } func AtomicLoadNUintptr(ptr uintptr, memorder int32) uintptr { return atomic.LoadUintptr((*uintptr)(unsafe.Pointer(ptr))) } func AssignInt8(p *int8, v int8) int8 { *p = v; return v } func AssignInt16(p *int16, v int16) int16 { *p = v; return v } func AssignInt32(p *int32, v int32) int32 { *p = v; return v } func AssignInt64(p *int64, v int64) int64 { *p = v; return v } func AssignUint8(p *uint8, v uint8) uint8 { *p = v; return v } func AssignUint16(p *uint16, v uint16) uint16 { *p = v; return v } func AssignUint32(p *uint32, v uint32) uint32 { *p = v; return v } func AssignUint64(p *uint64, v uint64) uint64 { *p = v; return v } func AssignFloat32(p *float32, v float32) float32 { *p = v; return v } func AssignFloat64(p *float64, v float64) float64 { *p = v; return v } func AssignComplex64(p *complex64, v complex64) complex64 { *p = v; return v } func AssignComplex128(p *complex128, v complex128) complex128 { *p = v; return v } func AssignUintptr(p *uintptr, v uintptr) uintptr { *p = v; return v } func AssignPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) = v; return v } func AssignPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) = v; return v } func AssignPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) = v; return v } func AssignPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) = v; return v } func AssignPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) = v; return v } func AssignPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) = v; return v } func AssignPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) = v return v } func AssignPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) = v return v } func AssignPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) = v; return v } func AssignMulInt8(p *int8, v int8) int8 { *p *= v; return *p } func AssignMulInt16(p *int16, v int16) int16 { *p *= v; return *p } func AssignMulInt32(p *int32, v int32) int32 { *p *= v; return *p } func AssignMulInt64(p *int64, v int64) int64 { *p *= v; return *p } func AssignMulUint8(p *uint8, v uint8) uint8 { *p *= v; return *p } func AssignMulUint16(p *uint16, v uint16) uint16 { *p *= v; return *p } func AssignMulUint32(p *uint32, v uint32) uint32 { *p *= v; return *p } func AssignMulUint64(p *uint64, v uint64) uint64 { *p *= v; return *p } func AssignMulFloat32(p *float32, v float32) float32 { *p *= v; return *p } func AssignMulFloat64(p *float64, v float64) float64 { *p *= v; return *p } func AssignMulComplex64(p *complex64, v complex64) complex64 { *p *= v; return *p } func AssignMulComplex128(p *complex128, v complex128) complex128 { *p *= v; return *p } func AssignMulUintptr(p *uintptr, v uintptr) uintptr { *p *= v; return *p } func AssignDivInt8(p *int8, v int8) int8 { *p /= v; return *p } func AssignDivInt16(p *int16, v int16) int16 { *p /= v; return *p } func AssignDivInt32(p *int32, v int32) int32 { *p /= v; return *p } func AssignDivInt64(p *int64, v int64) int64 { *p /= v; return *p } func AssignDivUint8(p *uint8, v uint8) uint8 { *p /= v; return *p } func AssignDivUint16(p *uint16, v uint16) uint16 { *p /= v; return *p } func AssignDivUint32(p *uint32, v uint32) uint32 { *p /= v; return *p } func AssignDivUint64(p *uint64, v uint64) uint64 { *p /= v; return *p } func AssignDivFloat32(p *float32, v float32) float32 { *p /= v; return *p } func AssignDivFloat64(p *float64, v float64) float64 { *p /= v; return *p } func AssignDivComplex64(p *complex64, v complex64) complex64 { *p /= v; return *p } func AssignDivComplex128(p *complex128, v complex128) complex128 { *p /= v; return *p } func AssignDivUintptr(p *uintptr, v uintptr) uintptr { *p /= v; return *p } func AssignRemInt8(p *int8, v int8) int8 { *p %= v; return *p } func AssignRemInt16(p *int16, v int16) int16 { *p %= v; return *p } func AssignRemInt32(p *int32, v int32) int32 { *p %= v; return *p } func AssignRemInt64(p *int64, v int64) int64 { *p %= v; return *p } func AssignRemUint8(p *uint8, v uint8) uint8 { *p %= v; return *p } func AssignRemUint16(p *uint16, v uint16) uint16 { *p %= v; return *p } func AssignRemUint32(p *uint32, v uint32) uint32 { *p %= v; return *p } func AssignRemUint64(p *uint64, v uint64) uint64 { *p %= v; return *p } func AssignRemUintptr(p *uintptr, v uintptr) uintptr { *p %= v; return *p } func AssignAddInt8(p *int8, v int8) int8 { *p += v; return *p } func AssignAddInt16(p *int16, v int16) int16 { *p += v; return *p } func AssignAddInt32(p *int32, v int32) int32 { *p += v; return *p } func AssignAddInt64(p *int64, v int64) int64 { *p += v; return *p } func AssignAddUint8(p *uint8, v uint8) uint8 { *p += v; return *p } func AssignAddUint16(p *uint16, v uint16) uint16 { *p += v; return *p } func AssignAddUint32(p *uint32, v uint32) uint32 { *p += v; return *p } func AssignAddUint64(p *uint64, v uint64) uint64 { *p += v; return *p } func AssignAddFloat32(p *float32, v float32) float32 { *p += v; return *p } func AssignAddFloat64(p *float64, v float64) float64 { *p += v; return *p } func AssignAddComplex64(p *complex64, v complex64) complex64 { *p += v; return *p } func AssignAddComplex128(p *complex128, v complex128) complex128 { *p += v; return *p } func AssignAddUintptr(p *uintptr, v uintptr) uintptr { *p += v; return *p } func AssignSubInt8(p *int8, v int8) int8 { *p -= v; return *p } func AssignSubInt16(p *int16, v int16) int16 { *p -= v; return *p } func AssignSubInt32(p *int32, v int32) int32 { *p -= v; return *p } func AssignSubInt64(p *int64, v int64) int64 { *p -= v; return *p } func AssignSubUint8(p *uint8, v uint8) uint8 { *p -= v; return *p } func AssignSubUint16(p *uint16, v uint16) uint16 { *p -= v; return *p } func AssignSubUint32(p *uint32, v uint32) uint32 { *p -= v; return *p } func AssignSubUint64(p *uint64, v uint64) uint64 { *p -= v; return *p } func AssignSubFloat32(p *float32, v float32) float32 { *p -= v; return *p } func AssignSubFloat64(p *float64, v float64) float64 { *p -= v; return *p } func AssignSubComplex64(p *complex64, v complex64) complex64 { *p -= v; return *p } func AssignSubComplex128(p *complex128, v complex128) complex128 { *p -= v; return *p } func AssignSubUintptr(p *uintptr, v uintptr) uintptr { *p -= v; return *p } func AssignAndInt8(p *int8, v int8) int8 { *p &= v; return *p } func AssignAndInt16(p *int16, v int16) int16 { *p &= v; return *p } func AssignAndInt32(p *int32, v int32) int32 { *p &= v; return *p } func AssignAndInt64(p *int64, v int64) int64 { *p &= v; return *p } func AssignAndUint8(p *uint8, v uint8) uint8 { *p &= v; return *p } func AssignAndUint16(p *uint16, v uint16) uint16 { *p &= v; return *p } func AssignAndUint32(p *uint32, v uint32) uint32 { *p &= v; return *p } func AssignAndUint64(p *uint64, v uint64) uint64 { *p &= v; return *p } func AssignAndUintptr(p *uintptr, v uintptr) uintptr { *p &= v; return *p } func AssignXorInt8(p *int8, v int8) int8 { *p ^= v; return *p } func AssignXorInt16(p *int16, v int16) int16 { *p ^= v; return *p } func AssignXorInt32(p *int32, v int32) int32 { *p ^= v; return *p } func AssignXorInt64(p *int64, v int64) int64 { *p ^= v; return *p } func AssignXorUint8(p *uint8, v uint8) uint8 { *p ^= v; return *p } func AssignXorUint16(p *uint16, v uint16) uint16 { *p ^= v; return *p } func AssignXorUint32(p *uint32, v uint32) uint32 { *p ^= v; return *p } func AssignXorUint64(p *uint64, v uint64) uint64 { *p ^= v; return *p } func AssignXorUintptr(p *uintptr, v uintptr) uintptr { *p ^= v; return *p } func AssignOrInt8(p *int8, v int8) int8 { *p |= v; return *p } func AssignOrInt16(p *int16, v int16) int16 { *p |= v; return *p } func AssignOrInt32(p *int32, v int32) int32 { *p |= v; return *p } func AssignOrInt64(p *int64, v int64) int64 { *p |= v; return *p } func AssignOrUint8(p *uint8, v uint8) uint8 { *p |= v; return *p } func AssignOrUint16(p *uint16, v uint16) uint16 { *p |= v; return *p } func AssignOrUint32(p *uint32, v uint32) uint32 { *p |= v; return *p } func AssignOrUint64(p *uint64, v uint64) uint64 { *p |= v; return *p } func AssignOrUintptr(p *uintptr, v uintptr) uintptr { *p |= v; return *p } func AssignMulPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) *= v return *(*int8)(unsafe.Pointer(p)) } func AssignMulPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) *= v return *(*int16)(unsafe.Pointer(p)) } func AssignMulPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) *= v return *(*int32)(unsafe.Pointer(p)) } func AssignMulPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) *= v return *(*int64)(unsafe.Pointer(p)) } func AssignMulPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) *= v return *(*uint8)(unsafe.Pointer(p)) } func AssignMulPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) *= v return *(*uint16)(unsafe.Pointer(p)) } func AssignMulPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) *= v return *(*uint32)(unsafe.Pointer(p)) } func AssignMulPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) *= v return *(*uint64)(unsafe.Pointer(p)) } func AssignMulPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) *= v return *(*float32)(unsafe.Pointer(p)) } func AssignMulPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) *= v return *(*float64)(unsafe.Pointer(p)) } func AssignMulPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) *= v return *(*complex64)(unsafe.Pointer(p)) } func AssignMulPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) *= v return *(*complex128)(unsafe.Pointer(p)) } func AssignMulPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) *= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignDivPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) /= v return *(*int8)(unsafe.Pointer(p)) } func AssignDivPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) /= v return *(*int16)(unsafe.Pointer(p)) } func AssignDivPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) /= v return *(*int32)(unsafe.Pointer(p)) } func AssignDivPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) /= v return *(*int64)(unsafe.Pointer(p)) } func AssignDivPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) /= v return *(*uint8)(unsafe.Pointer(p)) } func AssignDivPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) /= v return *(*uint16)(unsafe.Pointer(p)) } func AssignDivPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) /= v return *(*uint32)(unsafe.Pointer(p)) } func AssignDivPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) /= v return *(*uint64)(unsafe.Pointer(p)) } func AssignDivPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) /= v return *(*float32)(unsafe.Pointer(p)) } func AssignDivPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) /= v return *(*float64)(unsafe.Pointer(p)) } func AssignDivPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) /= v return *(*complex64)(unsafe.Pointer(p)) } func AssignDivPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) /= v return *(*complex128)(unsafe.Pointer(p)) } func AssignDivPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) /= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignRemPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) %= v return *(*int8)(unsafe.Pointer(p)) } func AssignRemPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) %= v return *(*int16)(unsafe.Pointer(p)) } func AssignRemPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) %= v return *(*int32)(unsafe.Pointer(p)) } func AssignRemPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) %= v return *(*int64)(unsafe.Pointer(p)) } func AssignRemPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) %= v return *(*uint8)(unsafe.Pointer(p)) } func AssignRemPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) %= v return *(*uint16)(unsafe.Pointer(p)) } func AssignRemPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) %= v return *(*uint32)(unsafe.Pointer(p)) } func AssignRemPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) %= v return *(*uint64)(unsafe.Pointer(p)) } func AssignRemPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) %= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignAddPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) += v return *(*int8)(unsafe.Pointer(p)) } func AssignAddPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) += v return *(*int16)(unsafe.Pointer(p)) } func AssignAddPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) += v return *(*int32)(unsafe.Pointer(p)) } func AssignAddPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) += v return *(*int64)(unsafe.Pointer(p)) } func AssignAddPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) += v return *(*uint8)(unsafe.Pointer(p)) } func AssignAddPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) += v return *(*uint16)(unsafe.Pointer(p)) } func AssignAddPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) += v return *(*uint32)(unsafe.Pointer(p)) } func AssignAddPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) += v return *(*uint64)(unsafe.Pointer(p)) } func AssignAddPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) += v return *(*float32)(unsafe.Pointer(p)) } func AssignAddPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) += v return *(*float64)(unsafe.Pointer(p)) } func AssignAddPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) += v return *(*complex64)(unsafe.Pointer(p)) } func AssignAddPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) += v return *(*complex128)(unsafe.Pointer(p)) } func AssignAddPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) += v return *(*uintptr)(unsafe.Pointer(p)) } func AssignSubPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) -= v return *(*int8)(unsafe.Pointer(p)) } func AssignSubPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) -= v return *(*int16)(unsafe.Pointer(p)) } func AssignSubPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) -= v return *(*int32)(unsafe.Pointer(p)) } func AssignSubPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) -= v return *(*int64)(unsafe.Pointer(p)) } func AssignSubPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) -= v return *(*uint8)(unsafe.Pointer(p)) } func AssignSubPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) -= v return *(*uint16)(unsafe.Pointer(p)) } func AssignSubPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) -= v return *(*uint32)(unsafe.Pointer(p)) } func AssignSubPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) -= v return *(*uint64)(unsafe.Pointer(p)) } func AssignSubPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) -= v return *(*float32)(unsafe.Pointer(p)) } func AssignSubPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) -= v return *(*float64)(unsafe.Pointer(p)) } func AssignSubPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) -= v return *(*complex64)(unsafe.Pointer(p)) } func AssignSubPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) -= v return *(*complex128)(unsafe.Pointer(p)) } func AssignSubPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) -= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignAndPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) &= v return *(*int8)(unsafe.Pointer(p)) } func AssignAndPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) &= v return *(*int16)(unsafe.Pointer(p)) } func AssignAndPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) &= v return *(*int32)(unsafe.Pointer(p)) } func AssignAndPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) &= v return *(*int64)(unsafe.Pointer(p)) } func AssignAndPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) &= v return *(*uint8)(unsafe.Pointer(p)) } func AssignAndPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) &= v return *(*uint16)(unsafe.Pointer(p)) } func AssignAndPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) &= v return *(*uint32)(unsafe.Pointer(p)) } func AssignAndPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) &= v return *(*uint64)(unsafe.Pointer(p)) } func AssignAndPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) &= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignXorPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) ^= v return *(*int8)(unsafe.Pointer(p)) } func AssignXorPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) ^= v return *(*int16)(unsafe.Pointer(p)) } func AssignXorPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) ^= v return *(*int32)(unsafe.Pointer(p)) } func AssignXorPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) ^= v return *(*int64)(unsafe.Pointer(p)) } func AssignXorPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) ^= v return *(*uint8)(unsafe.Pointer(p)) } func AssignXorPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) ^= v return *(*uint16)(unsafe.Pointer(p)) } func AssignXorPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) ^= v return *(*uint32)(unsafe.Pointer(p)) } func AssignXorPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) ^= v return *(*uint64)(unsafe.Pointer(p)) } func AssignXorPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) ^= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignOrPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) |= v return *(*int8)(unsafe.Pointer(p)) } func AssignOrPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) |= v return *(*int16)(unsafe.Pointer(p)) } func AssignOrPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) |= v return *(*int32)(unsafe.Pointer(p)) } func AssignOrPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) |= v return *(*int64)(unsafe.Pointer(p)) } func AssignOrPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) |= v return *(*uint8)(unsafe.Pointer(p)) } func AssignOrPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) |= v return *(*uint16)(unsafe.Pointer(p)) } func AssignOrPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) |= v return *(*uint32)(unsafe.Pointer(p)) } func AssignOrPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) |= v return *(*uint64)(unsafe.Pointer(p)) } func AssignOrPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) |= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignShlPtrInt8(p uintptr, v int) int8 { *(*int8)(unsafe.Pointer(p)) <<= v return *(*int8)(unsafe.Pointer(p)) } func AssignShlPtrInt16(p uintptr, v int) int16 { *(*int16)(unsafe.Pointer(p)) <<= v return *(*int16)(unsafe.Pointer(p)) } func AssignShlPtrInt32(p uintptr, v int) int32 { *(*int32)(unsafe.Pointer(p)) <<= v return *(*int32)(unsafe.Pointer(p)) } func AssignShlPtrInt64(p uintptr, v int) int64 { *(*int64)(unsafe.Pointer(p)) <<= v return *(*int64)(unsafe.Pointer(p)) } func AssignShlPtrUint8(p uintptr, v int) uint8 { *(*uint8)(unsafe.Pointer(p)) <<= v return *(*uint8)(unsafe.Pointer(p)) } func AssignShlPtrUint16(p uintptr, v int) uint16 { *(*uint16)(unsafe.Pointer(p)) <<= v return *(*uint16)(unsafe.Pointer(p)) } func AssignShlPtrUint32(p uintptr, v int) uint32 { *(*uint32)(unsafe.Pointer(p)) <<= v return *(*uint32)(unsafe.Pointer(p)) } func AssignShlPtrUint64(p uintptr, v int) uint64 { *(*uint64)(unsafe.Pointer(p)) <<= v return *(*uint64)(unsafe.Pointer(p)) } func AssignShlPtrUintptr(p uintptr, v int) uintptr { *(*uintptr)(unsafe.Pointer(p)) <<= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignShrPtrInt8(p uintptr, v int) int8 { *(*int8)(unsafe.Pointer(p)) >>= v return *(*int8)(unsafe.Pointer(p)) } func AssignShrPtrInt16(p uintptr, v int) int16 { *(*int16)(unsafe.Pointer(p)) >>= v return *(*int16)(unsafe.Pointer(p)) } func AssignShrPtrInt32(p uintptr, v int) int32 { *(*int32)(unsafe.Pointer(p)) >>= v return *(*int32)(unsafe.Pointer(p)) } func AssignShrPtrInt64(p uintptr, v int) int64 { *(*int64)(unsafe.Pointer(p)) >>= v return *(*int64)(unsafe.Pointer(p)) } func AssignShrPtrUint8(p uintptr, v int) uint8 { *(*uint8)(unsafe.Pointer(p)) >>= v return *(*uint8)(unsafe.Pointer(p)) } func AssignShrPtrUint16(p uintptr, v int) uint16 { *(*uint16)(unsafe.Pointer(p)) >>= v return *(*uint16)(unsafe.Pointer(p)) } func AssignShrPtrUint32(p uintptr, v int) uint32 { *(*uint32)(unsafe.Pointer(p)) >>= v return *(*uint32)(unsafe.Pointer(p)) } func AssignShrPtrUint64(p uintptr, v int) uint64 { *(*uint64)(unsafe.Pointer(p)) >>= v return *(*uint64)(unsafe.Pointer(p)) } func AssignShrPtrUintptr(p uintptr, v int) uintptr { *(*uintptr)(unsafe.Pointer(p)) >>= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignShlInt8(p *int8, v int) int8 { *p <<= v; return *p } func AssignShlInt16(p *int16, v int) int16 { *p <<= v; return *p } func AssignShlInt32(p *int32, v int) int32 { *p <<= v; return *p } func AssignShlInt64(p *int64, v int) int64 { *p <<= v; return *p } func AssignShlUint8(p *uint8, v int) uint8 { *p <<= v; return *p } func AssignShlUint16(p *uint16, v int) uint16 { *p <<= v; return *p } func AssignShlUint32(p *uint32, v int) uint32 { *p <<= v; return *p } func AssignShlUint64(p *uint64, v int) uint64 { *p <<= v; return *p } func AssignShlUintptr(p *uintptr, v int) uintptr { *p <<= v; return *p } func AssignShrInt8(p *int8, v int) int8 { *p >>= v; return *p } func AssignShrInt16(p *int16, v int) int16 { *p >>= v; return *p } func AssignShrInt32(p *int32, v int) int32 { *p >>= v; return *p } func AssignShrInt64(p *int64, v int) int64 { *p >>= v; return *p } func AssignShrUint8(p *uint8, v int) uint8 { *p >>= v; return *p } func AssignShrUint16(p *uint16, v int) uint16 { *p >>= v; return *p } func AssignShrUint32(p *uint32, v int) uint32 { *p >>= v; return *p } func AssignShrUint64(p *uint64, v int) uint64 { *p >>= v; return *p } func AssignShrUintptr(p *uintptr, v int) uintptr { *p >>= v; return *p } func PreIncInt8(p *int8, d int8) int8 { *p += d; return *p } func PreIncInt16(p *int16, d int16) int16 { *p += d; return *p } func PreIncInt32(p *int32, d int32) int32 { *p += d; return *p } func PreIncInt64(p *int64, d int64) int64 { *p += d; return *p } func PreIncUint8(p *uint8, d uint8) uint8 { *p += d; return *p } func PreIncUint16(p *uint16, d uint16) uint16 { *p += d; return *p } func PreIncUint32(p *uint32, d uint32) uint32 { *p += d; return *p } func PreIncUint64(p *uint64, d uint64) uint64 { *p += d; return *p } func PreIncFloat32(p *float32, d float32) float32 { *p += d; return *p } func PreIncFloat64(p *float64, d float64) float64 { *p += d; return *p } func PreIncComplex64(p *complex64, d complex64) complex64 { *p += d; return *p } func PreIncComplex128(p *complex128, d complex128) complex128 { *p += d; return *p } func PreIncUintptr(p *uintptr, d uintptr) uintptr { *p += d; return *p } func PreIncAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, d) } func PreIncAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, d) } func PreIncAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, d) } func PreIncAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, d) } func PreIncAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, d) } func PreDecInt8(p *int8, d int8) int8 { *p -= d; return *p } func PreDecInt16(p *int16, d int16) int16 { *p -= d; return *p } func PreDecInt32(p *int32, d int32) int32 { *p -= d; return *p } func PreDecInt64(p *int64, d int64) int64 { *p -= d; return *p } func PreDecUint8(p *uint8, d uint8) uint8 { *p -= d; return *p } func PreDecUint16(p *uint16, d uint16) uint16 { *p -= d; return *p } func PreDecUint32(p *uint32, d uint32) uint32 { *p -= d; return *p } func PreDecUint64(p *uint64, d uint64) uint64 { *p -= d; return *p } func PreDecFloat32(p *float32, d float32) float32 { *p -= d; return *p } func PreDecFloat64(p *float64, d float64) float64 { *p -= d; return *p } func PreDecComplex64(p *complex64, d complex64) complex64 { *p -= d; return *p } func PreDecComplex128(p *complex128, d complex128) complex128 { *p -= d; return *p } func PreDecUintptr(p *uintptr, d uintptr) uintptr { *p -= d; return *p } func PreDecAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, -d) } func PreDecAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, -d) } func PreDecAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, -d) } func PreDecAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, -d) } func PreDecAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, -d) } func PostIncInt8(p *int8, d int8) int8 { r := *p; *p += d; return r } func PostIncInt16(p *int16, d int16) int16 { r := *p; *p += d; return r } func PostIncInt32(p *int32, d int32) int32 { r := *p; *p += d; return r } func PostIncInt64(p *int64, d int64) int64 { r := *p; *p += d; return r } func PostIncUint8(p *uint8, d uint8) uint8 { r := *p; *p += d; return r } func PostIncUint16(p *uint16, d uint16) uint16 { r := *p; *p += d; return r } func PostIncUint32(p *uint32, d uint32) uint32 { r := *p; *p += d; return r } func PostIncUint64(p *uint64, d uint64) uint64 { r := *p; *p += d; return r } func PostIncFloat32(p *float32, d float32) float32 { r := *p; *p += d; return r } func PostIncFloat64(p *float64, d float64) float64 { r := *p; *p += d; return r } func PostIncComplex64(p *complex64, d complex64) complex64 { r := *p; *p += d; return r } func PostIncComplex128(p *complex128, d complex128) complex128 { r := *p; *p += d; return r } func PostIncUintptr(p *uintptr, d uintptr) uintptr { r := *p; *p += d; return r } func PostIncAtomicInt32(p *int32, d int32) int32 { return atomic.AddInt32(p, d) - d } func PostIncAtomicInt64(p *int64, d int64) int64 { return atomic.AddInt64(p, d) - d } func PostIncAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint32(p, d) - d } func PostIncAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, d) - d } func PostIncAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, d) - d } func PostIncAtomicInt32P(p uintptr, d int32) int32 { return atomic.AddInt32((*int32)(unsafe.Pointer(p)), d) - d } func PostIncAtomicInt64P(p uintptr, d int64) int64 { return atomic.AddInt64((*int64)(unsafe.Pointer(p)), d) - d } func PostIncAtomicUint32P(p uintptr, d uint32) uint32 { return atomic.AddUint32((*uint32)(unsafe.Pointer(p)), d) - d } func PostIncAtomicUint64P(p uintptr, d uint64) uint64 { return atomic.AddUint64((*uint64)(unsafe.Pointer(p)), d) - d } func PostIncAtomicUintptrP(p uintptr, d uintptr) uintptr { return atomic.AddUintptr((*uintptr)(unsafe.Pointer(p)), d) - d } func PostDecInt8(p *int8, d int8) int8 { r := *p; *p -= d; return r } func PostDecInt16(p *int16, d int16) int16 { r := *p; *p -= d; return r } func PostDecInt32(p *int32, d int32) int32 { r := *p; *p -= d; return r } func PostDecInt64(p *int64, d int64) int64 { r := *p; *p -= d; return r } func PostDecUint8(p *uint8, d uint8) uint8 { r := *p; *p -= d; return r } func PostDecUint16(p *uint16, d uint16) uint16 { r := *p; *p -= d; return r } func PostDecUint32(p *uint32, d uint32) uint32 { r := *p; *p -= d; return r } func PostDecUint64(p *uint64, d uint64) uint64 { r := *p; *p -= d; return r } func PostDecFloat32(p *float32, d float32) float32 { r := *p; *p -= d; return r } func PostDecFloat64(p *float64, d float64) float64 { r := *p; *p -= d; return r } func PostDecComplex64(p *complex64, d complex64) complex64 { r := *p; *p -= d; return r } func PostDecComplex128(p *complex128, d complex128) complex128 { r := *p; *p -= d; return r }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_openbsd_arm64.go
vendor/modernc.org/libc/capi_openbsd_arm64.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_C_ctype_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, "__assert": {}, "__assert13": {}, "__assert2": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isblank": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_get_mb_cur_max": {}, "__errno": {}, "__errno_location": {}, "__error": {}, "__floatscan": {}, "__h_errno_location": {}, "__inet_aton": {}, "__inet_ntoa": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isspace_l": {}, "__isthreaded": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__mb_sb_limit": {}, "__runes_for_locale": {}, "__sF": {}, "__shgetc": {}, "__shlim": {}, "__srget": {}, "__stderrp": {}, "__stdinp": {}, "__stdoutp": {}, "__swbuf": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, "_ctype_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "_tolower_tab_": {}, "_toupper_tab_": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bswap16": {}, "bswap32": {}, "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chflags": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostname": {}, "getnameinfo": {}, "getpagesize": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isblank": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isspace": {}, "isupper": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "modf": {}, "munmap": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "qsort": {}, "raise": {}, "rand": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlen": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_arm64.go
vendor/modernc.org/libc/libc_musl_linux_arm64.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "golang.org/x/sys/unix" ) type long = int64 type ulong = uint64 // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<50 - 1]byte // int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags); func Xrenameat2(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 { if __ccgo_strace { trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v flags=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, flags, origin(2)) } if _, _, err := unix.Syscall6(unix.SYS_RENAMEAT2, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 { t.setErrno(int32(err)) return -1 } return 0 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/atomic.go
vendor/modernc.org/libc/atomic.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm) package libc // import "modernc.org/libc" import ( "math" mbits "math/bits" "sync/atomic" "unsafe" ) func a_store_8(addr uintptr, val int8) int8 { *(*int8)(unsafe.Pointer(addr)) = val return val } func a_load_8(addr uintptr) (val int8) { return *(*int8)(unsafe.Pointer(addr)) } func a_load_16(addr uintptr) (val int16) { if addr&1 != 0 { panic("unaligned atomic access") } return *(*int16)(unsafe.Pointer(addr)) } func a_store_16(addr uintptr, val uint16) { if addr&1 != 0 { panic("unaligned atomic access") } *(*uint16)(unsafe.Pointer(addr)) = val } // static inline int a_ctz_64(uint64_t x) func _a_ctz_64(tls *TLS, x uint64) int32 { return int32(mbits.TrailingZeros64(x)) } func AtomicAddFloat32(addr *float32, delta float32) (new float32) { v := AtomicLoadFloat32(addr) + delta AtomicStoreFloat32(addr, v) return v } func AtomicLoadFloat32(addr *float32) (val float32) { return math.Float32frombits(atomic.LoadUint32((*uint32)(unsafe.Pointer(addr)))) } func AtomicStoreFloat32(addr *float32, val float32) { atomic.StoreUint32((*uint32)(unsafe.Pointer(addr)), math.Float32bits(val)) } func AtomicAddFloat64(addr *float64, delta float64) (new float64) { v := AtomicLoadFloat64(addr) + delta AtomicStoreFloat64(addr, v) return v } func AtomicLoadFloat64(addr *float64) (val float64) { return math.Float64frombits(atomic.LoadUint64((*uint64)(unsafe.Pointer(addr)))) } func AtomicStoreFloat64(addr *float64, val float64) { atomic.StoreUint64((*uint64)(unsafe.Pointer(addr)), math.Float64bits(val)) } func AtomicAddInt32(addr *int32, delta int32) (new int32) { return atomic.AddInt32(addr, delta) } func AtomicAddInt64(addr *int64, delta int64) (new int64) { return atomic.AddInt64(addr, delta) } func AtomicAddUint32(addr *uint32, delta uint32) (new uint32) { return atomic.AddUint32(addr, delta) } func AtomicAddUint64(addr *uint64, delta uint64) (new uint64) { return atomic.AddUint64(addr, delta) } func AtomicAddUintptr(addr *uintptr, delta uintptr) (new uintptr) { return atomic.AddUintptr(addr, delta) } func AtomicLoadInt32(addr *int32) (val int32) { return atomic.LoadInt32(addr) } func AtomicLoadInt64(addr *int64) (val int64) { return atomic.LoadInt64(addr) } func AtomicLoadUint32(addr *uint32) (val uint32) { return atomic.LoadUint32(addr) } func AtomicLoadUint64(addr *uint64) (val uint64) { return atomic.LoadUint64(addr) } func AtomicLoadUintptr(addr *uintptr) (val uintptr) { return atomic.LoadUintptr(addr) } func AtomicStoreInt32(addr *int32, val int32) { atomic.StoreInt32(addr, val) } func AtomicStoreUint32(addr *uint32, val uint32) { atomic.StoreUint32(addr, val) } func AtomicStoreUint64(addr *uint64, val uint64) { atomic.StoreUint64(addr, val) } func AtomicStoreUintptr(addr *uintptr, val uintptr) { atomic.StoreUintptr(addr, val) } func AtomicStoreInt64(addr *int64, val int64) { atomic.StoreInt64(addr, val) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_illumos.go
vendor/modernc.org/libc/libc_illumos.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( // "encoding/hex" "fmt" "io" "os" "os/exec" "path/filepath" "runtime" // "runtime/debug" "time" "unsafe" guuid "github.com/google/uuid" "golang.org/x/sys/unix" "modernc.org/libc/errno" "modernc.org/libc/fcntl" "modernc.org/libc/fts" gonetdb "modernc.org/libc/honnef.co/go/netdb" "modernc.org/libc/langinfo" "modernc.org/libc/limits" "modernc.org/libc/netdb" "modernc.org/libc/netinet/in" // "modernc.org/libc/signal" "modernc.org/libc/stdio" "modernc.org/libc/sys/socket" "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" "modernc.org/libc/termios" ctime "modernc.org/libc/time" "modernc.org/libc/unistd" "modernc.org/libc/uuid/uuid" ) const ( // musl/src/internal/stdio_impl.h:16:#define F_EOF 16 m_F_EOF = 16 ) var ( in6_addr_any in.In6_addr _ = X__ctype_b_loc ) type ( syscallErrno = unix.Errno long = int ulong = uint ) type file uintptr type Tsize_t = types.Size_t func (f file) fd() int32 { panic(todo("")) // return (*stdio.FILE)(unsafe.Pointer(f)).F_fileno } func (f file) setFd(fd int32) { panic(todo("")) // (*stdio.FILE)(unsafe.Pointer(f)).F_fileno = fd } func (f file) err() bool { panic(todo("")) // return (*stdio.FILE)(unsafe.Pointer(f)).F_flags2&stdio.X_IO_ERR_SEEN != 0 } func (f file) setErr() { panic(todo("")) // (*stdio.FILE)(unsafe.Pointer(f)).F_flags2 |= stdio.X_IO_ERR_SEEN } func (f file) flags() int32 { panic(todo("")) // return (*stdio.FILE)(unsafe.Pointer(f)).F_flags } func (f file) orFlags(n int32) { panic(todo("")) // (*stdio.FILE)(unsafe.Pointer(f)).F_flags |= n } func (f file) xorFlags(n int32) { panic(todo("")) // (*stdio.FILE)(unsafe.Pointer(f)).F_flags ^= n } func (f file) close(t *TLS) int32 { r := Xclose(t, f.fd()) Xfree(t, uintptr(f)) if r < 0 { return stdio.EOF } return 0 } func newFile(t *TLS, fd int32) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(stdio.FILE{}))) if p == 0 { return 0 } file(p).setFd(fd) return p } func fwrite(fd int32, b []byte) (int, error) { if fd == unistd.STDOUT_FILENO { return write(b) } // if dmesgs { // dmesg("%v: fd %v: %s", origin(1), fd, b) // } return unix.Write(int(fd), b) //TODO use Xwrite } // int fprintf(FILE *stream, const char *format, ...); func Xfprintf(t *TLS, stream, format, args uintptr) int32 { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } panic(todo("")) // n, _ := fwrite((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno, printf(format, args)) // return int32(n) } // int usleep(useconds_t usec); func Xusleep(t *TLS, usec uint) int32 { if __ccgo_strace { trc("t=%v usec=%v, (%v:)", t, usec, origin(2)) } panic(todo("")) // time.Sleep(time.Microsecond * time.Duration(usec)) // return 0 } // int getrusage(int who, struct rusage *usage); func Xgetrusage(t *TLS, who int32, usage uintptr) int32 { if __ccgo_strace { trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xlstat64(t, pathname, statbuf) } // int stat(const char *pathname, struct stat *statbuf); func Xstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xstat64(t, pathname, statbuf) } // int chdir(const char *path); func Xchdir(t *TLS, path uintptr) int32 { if __ccgo_strace { trc("t=%v path=%v, (%v:)", t, path, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // // dmesg("%v: %q: ok", origin(1), GoString(path)) // // } // return 0 } var localtime ctime.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { panic(todo("")) // loc := getLocalLocation() // ut := *(*unix.Time_t)(unsafe.Pointer(timep)) // t := time.Unix(int64(ut), 0).In(loc) // localtime.Ftm_sec = int32(t.Second()) // localtime.Ftm_min = int32(t.Minute()) // localtime.Ftm_hour = int32(t.Hour()) // localtime.Ftm_mday = int32(t.Day()) // localtime.Ftm_mon = int32(t.Month() - 1) // localtime.Ftm_year = int32(t.Year() - 1900) // localtime.Ftm_wday = int32(t.Weekday()) // localtime.Ftm_yday = int32(t.YearDay()) // localtime.Ftm_isdst = Bool32(isTimeDST(t)) // return uintptr(unsafe.Pointer(&localtime)) } // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { panic(todo("")) // loc := getLocalLocation() // ut := *(*unix.Time_t)(unsafe.Pointer(timep)) // t := time.Unix(int64(ut), 0).In(loc) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute()) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour()) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day()) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday()) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay()) // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t)) // return result } // int open(const char *pathname, int flags, ...); func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } return Xopen64(t, pathname, flags, args) } // int open(const char *pathname, int flags, ...); func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } panic(todo("")) // //TODO- flags |= fcntl.O_LARGEFILE // var mode types.Mode_t // if args != 0 { // mode = (types.Mode_t)(VaUint32(&args)) // } // fdcwd := fcntl.AT_FDCWD // n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), pathname, uintptr(flags|unix.O_LARGEFILE), uintptr(mode), 0, 0) // if err != 0 { // // if dmesgs { // // dmesg("%v: %q %#x: %v", origin(1), GoString(pathname), flags, err) // // } // t.setErrno(err) // return -1 // } // // if dmesgs { // // dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, n) // // } // return int32(n) } // int openat(int dirfd, const char *pathname, int flags, mode_t mode); func Xopenat(t *TLS, dirfd int32, pathname uintptr, flags int32, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v dirfd=%v pathname=%v flags=%v mode=%v, (%v:)", t, dirfd, pathname, flags, mode, origin(2)) } panic(todo("")) // // From golang.org/x/sys/unix/zsyscall_linux.go // fd, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(dirfd), pathname, uintptr(flags), uintptr(mode), 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(fd) } // off_t lseek(int fd, off_t offset, int whence); func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } return types.Off_t(Xlseek64(t, fd, offset, whence)) } func whenceStr(whence int32) string { panic(todo("")) // switch whence { // case fcntl.SEEK_CUR: // // return "SEEK_CUR" // // case fcntl.SEEK_END: // // return "SEEK_END" // // case fcntl.SEEK_SET: // // return "SEEK_SET" // // default: // // return fmt.Sprintf("whence(%d)", whence) // } } var fsyncStatbuf stat.Stat // int fsync(int fd); func Xfsync(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } if noFsync { // Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf))) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FSYNC, uintptr(fd), 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // // dmesg("%v: %d: ok", origin(1), fd) // // } // return 0 } // long sysconf(int name); func Xsysconf(t *TLS, name int32) long { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } switch name { case unistd.X_SC_PAGESIZE: return long(unix.Getpagesize()) case unistd.X_SC_GETPW_R_SIZE_MAX: return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 case unistd.X_SC_NPROCESSORS_ONLN: return long(runtime.NumCPU()) } panic(todo("", name)) } // int close(int fd); func Xclose(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // // dmesg("%v: %d: ok", origin(1), fd) // // } // return 0 } // char *getcwd(char *buf, size_t size); func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_GETCWD, buf, uintptr(size), 0) // if err != 0 { // t.setErrno(err) // return 0 // } // // if dmesgs { // // dmesg("%v: %q: ok", origin(1), GoString(buf)) // // } // return n } // int fstat(int fd, struct stat *statbuf); func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } return Xfstat64(t, fd, statbuf) } // int ftruncate(int fd, off_t length); func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 { if __ccgo_strace { trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) } return Xftruncate64(t, fd, length) } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } return Xfcntl64(t, fd, cmd, args) } // ssize_t read(int fd, void *buf, size_t count); func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count)) // if err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // // } // return types.Ssize_t(n) } // ssize_t write(int fd, const void *buf, size_t count); func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } panic(todo("")) // const retry = 5 // var err syscallErrno // for i := 0; i < retry; i++ { // var n uintptr // switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err { // case 0: // // if dmesgs { // // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // // } // return types.Ssize_t(n) // case errno.EAGAIN: // // nop // } // } // // if dmesgs { // // dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) // // } // t.setErrno(err) // return -1 } // int fchmod(int fd, mode_t mode); func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 { // t.setErrno(err) // return -1 // } // // if dmesgs { // // dmesg("%v: %d %#o: ok", origin(1), fd, mode) // // } // return 0 } // int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags); func Xfchmodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, flags int32) int32 { if __ccgo_strace { trc("t=%v dirfd=%v pathname=%v mode=%v flags=%v, (%v:)", t, dirfd, pathname, mode, flags, origin(2)) } panic(todo("")) // // From golang.org/x/sys/unix/syscall_linux.go // // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior // // and check the flags. Otherwise the mode would be applied to the symlink // // destination which is not what the user expects. // if flags&^unix.AT_SYMLINK_NOFOLLOW != 0 { // t.setErrno(unix.EINVAL) // return -1 // } else if flags&unix.AT_SYMLINK_NOFOLLOW != 0 { // t.setErrno(unix.EOPNOTSUPP) // return -1 // } // // From golang.org/x/sys/unix/zsyscall_linux.go // if _, _, err := unix.Syscall(unix.SYS_FCHMODAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int fchown(int fd, uid_t owner, gid_t group); func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 { if __ccgo_strace { trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // uid_t geteuid(void); func Xgeteuid(t *TLS) types.Uid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) // n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0) // return types.Uid_t(n) } // int munmap(void *addr, size_t length); func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 { if __ccgo_strace { trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int gettimeofday(struct timeval *tv, struct timezone *tz); func Xgettimeofday(t *TLS, tv, tz uintptr) int32 { if __ccgo_strace { trc("t=%v tz=%v, (%v:)", t, tz, origin(2)) } if tz != 0 { panic(todo("")) } var tvs unix.Timeval err := unix.Gettimeofday(&tvs) if err != nil { t.setErrno(err) return -1 } *(*unix.Timeval)(unsafe.Pointer(tv)) = tvs return 0 } // int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 { if __ccgo_strace { trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 { if __ccgo_strace { trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int ioctl(int fd, unsigned long request, ...); func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2)) } panic(todo("")) // var argp uintptr // if va != 0 { // argp = VaUintptr(&va) // } // n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 { // // if dmesgs { // // dmesg("%v: fd %v: %v", origin(1), sockfd, err) // // } // t.setErrno(err) // return -1 // } // return 0 } // int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 { if __ccgo_strace { trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2)) } n, err := unix.Select( int(nfds), (*unix.FdSet)(unsafe.Pointer(readfds)), (*unix.FdSet)(unsafe.Pointer(writefds)), (*unix.FdSet)(unsafe.Pointer(exceptfds)), (*unix.Timeval)(unsafe.Pointer(timeout)), ) if err != nil { t.setErrno(err) return -1 } return int32(n) } // int mkfifo(const char *pathname, mode_t mode); func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Mkfifo(GoString(pathname), mode); err != nil { t.setErrno(err) return -1 } return 0 } // mode_t umask(mode_t mask); func Xumask(t *TLS, mask types.Mode_t) types.Mode_t { if __ccgo_strace { trc("t=%v mask=%v, (%v:)", t, mask, origin(2)) } panic(todo("")) // n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0) // return types.Mode_t(n) } // int execvp(const char *file, char *const argv[]); func Xexecvp(t *TLS, file, argv uintptr) int32 { if __ccgo_strace { trc("t=%v argv=%v, (%v:)", t, argv, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // pid_t waitpid(pid_t pid, int *wstatus, int options); func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t { if __ccgo_strace { trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return types.Pid_t(n) } // int uname(struct utsname *buf); func Xuname(t *TLS, buf uintptr) int32 { if __ccgo_strace { trc("t=%v buf=%v, (%v:)", t, buf, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_UNAME, buf, 0, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // ssize_t recv(int sockfd, void *buf, size_t len, int flags); func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return types.Ssize_t(n) } // ssize_t send(int sockfd, const void *buf, size_t len, int flags); func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return types.Ssize_t(n) } // int shutdown(int sockfd, int how); func Xshutdown(t *TLS, sockfd, how int32) int32 { if __ccgo_strace { trc("t=%v how=%v, (%v:)", t, how, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int socket(int domain, int type, int protocol); func Xsocket(t *TLS, domain, type1, protocol int32) int32 { if __ccgo_strace { trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol)) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen)) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int listen(int sockfd, int backlog); func Xlisten(t *TLS, sockfd, backlog int32) int32 { if __ccgo_strace { trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xgetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xsetrlimit64(t, resource, rlim) } // uid_t getuid(void); func Xgetuid(t *TLS) types.Uid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return types.Uid_t(os.Getuid()) } // pid_t getpid(void); func Xgetpid(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return int32(os.Getpid()) } // int system(const char *command); func Xsystem(t *TLS, command uintptr) int32 { if __ccgo_strace { trc("t=%v command=%v, (%v:)", t, command, origin(2)) } s := GoString(command) if command == 0 { panic(todo("")) } cmd := exec.Command("sh", "-c", s) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { ps := err.(*exec.ExitError) return int32(ps.ExitCode()) } return 0 } // int setvbuf(FILE *stream, char *buf, int mode, size_t size); func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 { if __ccgo_strace { trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2)) } return 0 //TODO } // int raise(int sig); func Xraise(t *TLS, sig int32) int32 { if __ccgo_strace { trc("t=%v sig=%v, (%v:)", t, sig, origin(2)) } panic(todo("")) } // int backtrace(void **buffer, int size); func Xbacktrace(t *TLS, buf uintptr, size int32) int32 { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } panic(todo("")) } // void backtrace_symbols_fd(void *const *buffer, int size, int fd); func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) { if __ccgo_strace { trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2)) } panic(todo("")) } // int fileno(FILE *stream); func Xfileno(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } panic(todo("")) // if stream == 0 { // t.setErrno(errno.EBADF) // return -1 // } // // if fd := (*stdio.FILE)(unsafe.Pointer(stream)).F_fileno; fd >= 0 { // return fd // } // // t.setErrno(errno.EBADF) // return -1 } func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscallErrno) (r *fts.FTSENT) { panic(todo("")) // var statp uintptr // if stat != nil { // statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) // if statp == 0 { // panic("OOM") // } // // *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat // } // csp, errx := CString(path) // if errx != nil { // panic("OOM") // } // // return &fts.FTSENT{ // Ffts_info: uint16(info), // Ffts_path: csp, // Ffts_pathlen: uint16(len(path)), // Ffts_statp: statp, // Ffts_errno: int32(err), // } } func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscallErrno) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{}))) if p == 0 { panic("OOM") } *(*fts.FTSENT)(unsafe.Pointer(p)) = *newFtsent(t, info, path, stat, err) return p } func ftsentClose(t *TLS, p uintptr) { Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_path) Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_statp) } type ftstream struct { s []uintptr x int } func (f *ftstream) close(t *TLS) { for _, p := range f.s { ftsentClose(t, p) Xfree(t, p) } *f = ftstream{} } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { if __ccgo_strace { trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2)) } return Xfts64_open(t, path_argv, options, compar) } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { if __ccgo_strace { trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2)) } f := &ftstream{} var walk func(string) walk = func(path string) { var fi os.FileInfo var err error switch { case options&fts.FTS_LOGICAL != 0: fi, err = os.Stat(path) case options&fts.FTS_PHYSICAL != 0: fi, err = os.Lstat(path) default: panic(todo("")) } if err != nil { return } var statp *unix.Stat_t if options&fts.FTS_NOSTAT == 0 { var stat unix.Stat_t switch { case options&fts.FTS_LOGICAL != 0: if err := unix.Stat(path, &stat); err != nil { panic(todo("")) } case options&fts.FTS_PHYSICAL != 0: if err := unix.Lstat(path, &stat); err != nil { panic(todo("")) } default: panic(todo("")) } statp = &stat } out: switch { case fi.IsDir(): f.s = append(f.s, newCFtsent(t, fts.FTS_D, path, statp, 0)) g, err := os.Open(path) switch x := err.(type) { case nil: // ok case *os.PathError: f.s = append(f.s, newCFtsent(t, fts.FTS_DNR, path, statp, errno.EACCES)) break out default: panic(todo("%q: %v %T", path, x, x)) } names, err := g.Readdirnames(-1) g.Close() if err != nil { panic(todo("")) } for _, name := range names { walk(path + "/" + name) if f == nil { break out } } f.s = append(f.s, newCFtsent(t, fts.FTS_DP, path, statp, 0)) default: info := fts.FTS_F if fi.Mode()&os.ModeSymlink != 0 { info = fts.FTS_SL } switch { case statp != nil: f.s = append(f.s, newCFtsent(t, info, path, statp, 0)) case options&fts.FTS_NOSTAT != 0: f.s = append(f.s, newCFtsent(t, fts.FTS_NSOK, path, nil, 0)) default: panic(todo("")) } } } for { p := *(*uintptr)(unsafe.Pointer(path_argv)) if p == 0 { if f == nil { return 0 } if compar != 0 { panic(todo("")) } return addObject(f) } walk(GoString(p)) path_argv += unsafe.Sizeof(uintptr(0)) } } // FTSENT *fts_read(FTS *ftsp); func Xfts_read(t *TLS, ftsp uintptr) uintptr { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } return Xfts64_read(t, ftsp) } // FTSENT *fts_read(FTS *ftsp); func Xfts64_read(t *TLS, ftsp uintptr) uintptr { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } f := getObject(ftsp).(*ftstream) if f.x == len(f.s) { t.setErrno(0) return 0 } r := f.s[f.x] if e := (*fts.FTSENT)(unsafe.Pointer(r)).Ffts_errno; e != 0 { t.setErrno(e) } f.x++ return r } // int fts_close(FTS *ftsp); func Xfts_close(t *TLS, ftsp uintptr) int32 { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } return Xfts64_close(t, ftsp) } // int fts_close(FTS *ftsp); func Xfts64_close(t *TLS, ftsp uintptr) int32 { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } getObject(ftsp).(*ftstream).close(t) removeObject(ftsp) return 0 } // void tzset (void); func Xtzset(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } //TODO } var strerrorBuf [100]byte // char *strerror(int errnum); func Xstrerror(t *TLS, errnum int32) uintptr { if __ccgo_strace { trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2)) } // if dmesgs { // dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack()) // } copy(strerrorBuf[:], fmt.Sprintf("strerror(%d)\x00", errnum)) return uintptr(unsafe.Pointer(&strerrorBuf[0])) } // void *dlopen(const char *filename, int flags); func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr { if __ccgo_strace { trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2)) } panic(todo("%q", GoString(filename))) } // char *dlerror(void); func Xdlerror(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) } // int dlclose(void *handle); func Xdlclose(t *TLS, handle uintptr) int32 { if __ccgo_strace { trc("t=%v handle=%v, (%v:)", t, handle, origin(2)) } panic(todo("")) } // void *dlsym(void *handle, const char *symbol); func Xdlsym(t *TLS, handle, symbol uintptr) uintptr { if __ccgo_strace { trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2)) } panic(todo("")) } // void perror(const char *s); func Xperror(t *TLS, s uintptr) { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } panic(todo("")) } // int pclose(FILE *stream); func Xpclose(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } panic(todo("")) } var gai_strerrorBuf [100]byte // const char *gai_strerror(int errcode); func Xgai_strerror(t *TLS, errcode int32) uintptr { if __ccgo_strace { trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2)) } copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode)) return uintptr(unsafe.Pointer(&gai_strerrorBuf)) } // int tcgetattr(int fd, struct termios *termios_p); func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2)) } panic(todo("")) } // int tcsetattr(int fd, int optional_actions, const struct termios *termios_p); func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 { if __ccgo_strace { trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2)) } panic(todo("")) } // speed_t cfgetospeed(const struct termios *termios_p); func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t { if __ccgo_strace { trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2)) } panic(todo("")) } // int cfsetospeed(struct termios *termios_p, speed_t speed); func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 { if __ccgo_strace {
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/musl_openbsd_386.go
vendor/modernc.org/libc/musl_openbsd_386.go
// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_openbsd_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../openbsd/ctype_.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT. package libc import ( "math" "reflect" "sync/atomic" "unsafe" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer // musl as a whole is licensed under the following standard MIT license: // // ---------------------------------------------------------------------- // Copyright © 2005-2020 Rich Felker, et al. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ---------------------------------------------------------------------- // // Authors/contributors include: // // A. Wilcox // Ada Worcester // Alex Dowad // Alex Suykov // Alexander Monakov // Andre McCurdy // Andrew Kelley // Anthony G. Basile // Aric Belsito // Arvid Picciani // Bartosz Brachaczek // Benjamin Peterson // Bobby Bingham // Boris Brezillon // Brent Cook // Chris Spiegel // Clément Vasseur // Daniel Micay // Daniel Sabogal // Daurnimator // David Carlier // David Edelsohn // Denys Vlasenko // Dmitry Ivanov // Dmitry V. Levin // Drew DeVault // Emil Renner Berthing // Fangrui Song // Felix Fietkau // Felix Janda // Gianluca Anzolin // Hauke Mehrtens // He X // Hiltjo Posthuma // Isaac Dunham // Jaydeep Patil // Jens Gustedt // Jeremy Huntwork // Jo-Philipp Wich // Joakim Sindholt // John Spencer // Julien Ramseier // Justin Cormack // Kaarle Ritvanen // Khem Raj // Kylie McClain // Leah Neukirchen // Luca Barbato // Luka Perkov // M Farkas-Dyck (Strake) // Mahesh Bodapati // Markus Wichmann // Masanori Ogino // Michael Clark // Michael Forney // Mikhail Kremnyov // Natanael Copa // Nicholas J. Kain // orc // Pascal Cuoq // Patrick Oppenlander // Petr Hosek // Petr Skocik // Pierre Carrier // Reini Urban // Rich Felker // Richard Pennington // Ryan Fairfax // Samuel Holland // Segev Finer // Shiz // sin // Solar Designer // Stefan Kristiansson // Stefan O'Rear // Szabolcs Nagy // Timo Teräs // Trutz Behn // Valentin Ochs // Will Dietz // William Haddon // William Pitcock // // Portions of this software are derived from third-party works licensed // under terms compatible with the above MIT license: // // The TRE regular expression implementation (src/regex/reg* and // src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed // under a 2-clause BSD license (license text in the source files). The // included version has been heavily modified by Rich Felker in 2012, in // the interests of size, simplicity, and namespace cleanliness. // // Much of the math library code (src/math/* and src/complex/*) is // Copyright © 1993,2004 Sun Microsystems or // Copyright © 2003-2011 David Schultz or // Copyright © 2003-2009 Steven G. Kargl or // Copyright © 2003-2009 Bruce D. Evans or // Copyright © 2008 Stephen L. Moshier or // Copyright © 2017-2018 Arm Limited // and labelled as such in comments in the individual source files. All // have been licensed under extremely permissive terms. // // The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 // The Android Open Source Project and is licensed under a two-clause BSD // license. It was taken from Bionic libc, used on Android. // // The AArch64 memcpy and memset code (src/string/aarch64/*) are // Copyright © 1999-2019, Arm Limited. // // The implementation of DES for crypt (src/crypt/crypt_des.c) is // Copyright © 1994 David Burren. It is licensed under a BSD license. // // The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was // originally written by Solar Designer and placed into the public // domain. The code also comes with a fallback permissive license for use // in jurisdictions that may not recognize the public domain. // // The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 // Valentin Ochs and is licensed under an MIT-style license. // // The x86_64 port was written by Nicholas J. Kain and is licensed under // the standard MIT terms. // // The mips and microblaze ports were originally written by Richard // Pennington for use in the ellcc project. The original code was adapted // by Rich Felker for build system and code conventions during upstream // integration. It is licensed under the standard MIT terms. // // The mips64 port was contributed by Imagination Technologies and is // licensed under the standard MIT terms. // // The powerpc port was also originally written by Richard Pennington, // and later supplemented and integrated by John Spencer. It is licensed // under the standard MIT terms. // // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more // contibutors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. // // In addition, permission is hereby granted for all public header files // (include/* and arch/*/bits/*) and crt files intended to be linked into // applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit // the copyright notice and permission notice otherwise required by the // license, and to use these files without any requirement of // attribution. These files include substantial contributions from: // // Bobby Bingham // John Spencer // Nicholas J. Kain // Rich Felker // Richard Pennington // Stefan Kristiansson // Szabolcs Nagy // // all of whom have explicitly granted such permission. // // This file previously contained text expressing a belief that most of // the files covered by the above exception were sufficiently trivial not // to be subject to copyright, resulting in confusion over whether it // negated the permissions granted in the license. In the spirit of // permissive licensing, and of not having licensing issues being an // obstacle to adoption, that text has been removed. const ( /* copyright.c:194:1: */ __musl__copyright__ = 0 ) const ( /* nameser.h:117:1: */ ns_uop_delete = 0 ns_uop_add = 1 ns_uop_max = 2 ) const ( /* nameser.h:147:1: */ ns_t_invalid = 0 ns_t_a = 1 ns_t_ns = 2 ns_t_md = 3 ns_t_mf = 4 ns_t_cname = 5 ns_t_soa = 6 ns_t_mb = 7 ns_t_mg = 8 ns_t_mr = 9 ns_t_null = 10 ns_t_wks = 11 ns_t_ptr = 12 ns_t_hinfo = 13 ns_t_minfo = 14 ns_t_mx = 15 ns_t_txt = 16 ns_t_rp = 17 ns_t_afsdb = 18 ns_t_x25 = 19 ns_t_isdn = 20 ns_t_rt = 21 ns_t_nsap = 22 ns_t_nsap_ptr = 23 ns_t_sig = 24 ns_t_key = 25 ns_t_px = 26 ns_t_gpos = 27 ns_t_aaaa = 28 ns_t_loc = 29 ns_t_nxt = 30 ns_t_eid = 31 ns_t_nimloc = 32 ns_t_srv = 33 ns_t_atma = 34 ns_t_naptr = 35 ns_t_kx = 36 ns_t_cert = 37 ns_t_a6 = 38 ns_t_dname = 39 ns_t_sink = 40 ns_t_opt = 41 ns_t_apl = 42 ns_t_tkey = 249 ns_t_tsig = 250 ns_t_ixfr = 251 ns_t_axfr = 252 ns_t_mailb = 253 ns_t_maila = 254 ns_t_any = 255 ns_t_zxfr = 256 ns_t_max = 65536 ) const ( /* nameser.h:210:1: */ ns_c_invalid = 0 ns_c_in = 1 ns_c_2 = 2 ns_c_chaos = 3 ns_c_hs = 4 ns_c_none = 254 ns_c_any = 255 ns_c_max = 65536 ) const ( /* nameser.h:221:1: */ ns_kt_rsa = 1 ns_kt_dh = 2 ns_kt_dsa = 3 ns_kt_private = 254 ) const ( /* nameser.h:228:1: */ cert_t_pkix = 1 cert_t_spki = 2 cert_t_pgp = 3 cert_t_url = 253 cert_t_oid = 254 ) const ( /* nameser.h:28:1: */ ns_s_qd = 0 ns_s_zn = 0 ns_s_an = 1 ns_s_pr = 1 ns_s_ns = 2 ns_s_ud = 2 ns_s_ar = 3 ns_s_max = 4 ) const ( /* nameser.h:75:1: */ ns_f_qr = 0 ns_f_opcode = 1 ns_f_aa = 2 ns_f_tc = 3 ns_f_rd = 4 ns_f_ra = 5 ns_f_z = 6 ns_f_ad = 7 ns_f_cd = 8 ns_f_rcode = 9 ns_f_max = 10 ) const ( /* nameser.h:89:1: */ ns_o_query = 0 ns_o_iquery = 1 ns_o_status = 2 ns_o_notify = 4 ns_o_update = 5 ns_o_max = 6 ) const ( /* nameser.h:98:1: */ ns_r_noerror = 0 ns_r_formerr = 1 ns_r_servfail = 2 ns_r_nxdomain = 3 ns_r_notimpl = 4 ns_r_refused = 5 ns_r_yxdomain = 6 ns_r_yxrrset = 7 ns_r_nxrrset = 8 ns_r_notauth = 9 ns_r_notzone = 10 ns_r_max = 11 ns_r_badvers = 16 ns_r_badsig = 16 ns_r_badkey = 17 ns_r_badtime = 18 ) type ptrdiff_t = int32 /* <builtin>:3:26 */ type size_t = uint32 /* <builtin>:9:23 */ type wchar_t = int32 /* <builtin>:15:24 */ // # 1 "lib/libc/gen/ctype_.c" // # 1 "<built-in>" // # 1 "<command-line>" // # 1 "lib/libc/gen/ctype_.c" // # 36 "lib/libc/gen/ctype_.c" // # 1 "./include/ctype.h" 1 // # 43 "./include/ctype.h" // # 1 "./sys/sys/cdefs.h" 1 // # 41 "./sys/sys/cdefs.h" // # 1 "./machine/cdefs.h" 1 // # 42 "./sys/sys/cdefs.h" 2 // # 44 "./include/ctype.h" 2 // # 57 "./include/ctype.h" // typedef void *locale_t; // // // // // // extern const char *_ctype_; // extern const short *_tolower_tab_; // extern const short *_toupper_tab_; // // // int isalnum(int); // int isalpha(int); // int iscntrl(int); // int isdigit(int); // int isgraph(int); // int islower(int); // int isprint(int); // int ispunct(int); // int isspace(int); // int isupper(int); // int isxdigit(int); // int tolower(int); // int toupper(int); // // // // int isblank(int); // // // // int isascii(int); // int toascii(int); // int _tolower(int); // int _toupper(int); // // // // int isalnum_l(int, locale_t); // int isalpha_l(int, locale_t); // int isblank_l(int, locale_t); // int iscntrl_l(int, locale_t); // int isdigit_l(int, locale_t); // int isgraph_l(int, locale_t); // int islower_l(int, locale_t); // int isprint_l(int, locale_t); // int ispunct_l(int, locale_t); // int isspace_l(int, locale_t); // int isupper_l(int, locale_t); // int isxdigit_l(int, locale_t); // int tolower_l(int, locale_t); // int toupper_l(int, locale_t); // // // // // // // extern __inline __attribute__((__gnu_inline__)) int isalnum(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02|0x04))); // } // // extern __inline __attribute__((__gnu_inline__)) int isalpha(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x01|0x02))); // } // // extern __inline __attribute__((__gnu_inline__)) int iscntrl(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x20)); // } // // extern __inline __attribute__((__gnu_inline__)) int isdigit(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x04)); // } // // extern __inline __attribute__((__gnu_inline__)) int isgraph(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04))); // } // // extern __inline __attribute__((__gnu_inline__)) int islower(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x02)); // } // // extern __inline __attribute__((__gnu_inline__)) int isprint(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x10|0x01|0x02|0x04|0x80))); // } // // extern __inline __attribute__((__gnu_inline__)) int ispunct(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x10)); // } // // extern __inline __attribute__((__gnu_inline__)) int isspace(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x08)); // } // // extern __inline __attribute__((__gnu_inline__)) int isupper(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & 0x01)); // } // // extern __inline __attribute__((__gnu_inline__)) int isxdigit(int _c) // { // return (_c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)_c] & (0x04|0x40))); // } // // extern __inline __attribute__((__gnu_inline__)) int tolower(int _c) // { // if ((unsigned int)_c > 255) // return (_c); // return ((_tolower_tab_ + 1)[_c]); // } // // extern __inline __attribute__((__gnu_inline__)) int toupper(int _c) // { // if ((unsigned int)_c > 255) // return (_c); // return ((_toupper_tab_ + 1)[_c]); // } // // // extern __inline __attribute__((__gnu_inline__)) func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return Bool32(_c == ' ' || _c == '\t') } // extern __inline __attribute__((__gnu_inline__)) int isascii(int _c) // { // return ((unsigned int)_c <= 0177); // } // // extern __inline __attribute__((__gnu_inline__)) int toascii(int _c) // { // return (_c & 0177); // } // // extern __inline __attribute__((__gnu_inline__)) int _tolower(int _c) // { // return (_c - 'A' + 'a'); // } // // extern __inline __attribute__((__gnu_inline__)) int _toupper(int _c) // { // return (_c - 'a' + 'A'); // } // // // // extern __inline __attribute__((__gnu_inline__)) int // isalnum_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isalnum(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isalpha_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isalpha(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isblank_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isblank(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // iscntrl_l(int _c, locale_t _l __attribute__((__unused__))) // { // return iscntrl(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isdigit_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isdigit(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isgraph_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isgraph(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // islower_l(int _c, locale_t _l __attribute__((__unused__))) // { // return islower(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isprint_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isprint(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // ispunct_l(int _c, locale_t _l __attribute__((__unused__))) // { // return ispunct(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isspace_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isspace(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isupper_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isupper(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // isxdigit_l(int _c, locale_t _l __attribute__((__unused__))) // { // return isxdigit(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // tolower_l(int _c, locale_t _l __attribute__((__unused__))) // { // return tolower(_c); // } // // extern __inline __attribute__((__gnu_inline__)) int // toupper_l(int _c, locale_t _l __attribute__((__unused__))) // { // return toupper(_c); // } // // // // // // # 37 "lib/libc/gen/ctype_.c" 2 // # 1 "./lib/libc/include/ctype_private.h" 1 // // // // // // # 5 "./lib/libc/include/ctype_private.h" // #pragma GCC visibility push(hidden) // # 5 "./lib/libc/include/ctype_private.h" // // extern const char _C_ctype_[]; // extern const short _C_toupper_[]; // extern const short _C_tolower_[]; // // # 9 "./lib/libc/include/ctype_private.h" // #pragma GCC visibility pop // # 9 "./lib/libc/include/ctype_private.h" // // # 38 "lib/libc/gen/ctype_.c" 2 var X_C_ctype_ = [257]int8{ int8(0), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20 | 0x08), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x20), int8(0x08 | int32(Int8FromInt32(0x80))), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x04), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01 | 0x40), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x01), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02 | 0x40), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x02), int8(0x10), int8(0x10), int8(0x10), int8(0x10), int8(0x20), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), } /* ctype_.c:282:12 */ var X_ctype_ uintptr = 0 /* ctype_.c:319:12 */ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) } type locale_t = uintptr /* alltypes.h:366:32 */ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(func() int32 { if 0 != 0 { return Xisalpha(tls, c) } return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) }() != 0 || func() int32 { if 0 != 0 { return Xisdigit(tls, c) } return Bool32(uint32(c)-uint32('0') < uint32(10)) }() != 0) } func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisalnum(tls, c) } func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) } func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisalpha(tls, c) } func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('0') < uint32(10)) } func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisdigit(tls, c) } func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('a') < uint32(26)) } func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xislower(tls, c) } func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f)) } func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisprint(tls, c) } func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5)) } func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisspace(tls, c) } func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(uint32(c)-uint32('A') < uint32(26)) } func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisupper(tls, c) } func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Bool32(func() int32 { if 0 != 0 { return Xisdigit(tls, c) } return Bool32(uint32(c)-uint32('0') < uint32(10)) }() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6)) } func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */ if __ccgo_strace { trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2)) } return Xisxdigit(tls, c) } type uintptr_t = uint32 /* alltypes.h:78:24 */ type intptr_t = int32 /* alltypes.h:93:15 */ type int8_t = int8 /* alltypes.h:119:25 */ type int16_t = int16 /* alltypes.h:124:25 */ type int32_t = int32 /* alltypes.h:129:25 */ type int64_t = int64 /* alltypes.h:134:25 */ type intmax_t = int64 /* alltypes.h:139:25 */ type uint8_t = uint8 /* alltypes.h:144:25 */ type uint16_t = uint16 /* alltypes.h:149:25 */ type uint32_t = uint32 /* alltypes.h:154:25 */ type uint64_t = uint64 /* alltypes.h:159:25 */ type uintmax_t = uint64 /* alltypes.h:169:25 */ type int_fast8_t = int8_t /* stdint.h:22:16 */ type int_fast64_t = int64_t /* stdint.h:23:17 */ type int_least8_t = int8_t /* stdint.h:25:17 */ type int_least16_t = int16_t /* stdint.h:26:17 */ type int_least32_t = int32_t /* stdint.h:27:17 */ type int_least64_t = int64_t /* stdint.h:28:17 */ type uint_fast8_t = uint8_t /* stdint.h:30:17 */ type uint_fast64_t = uint64_t /* stdint.h:31:18 */ type uint_least8_t = uint8_t /* stdint.h:33:18 */ type uint_least16_t = uint16_t /* stdint.h:34:18 */ type uint_least32_t = uint32_t /* stdint.h:35:18 */ type uint_least64_t = uint64_t /* stdint.h:36:18 */ type int_fast16_t = int32_t /* stdint.h:1:17 */ type int_fast32_t = int32_t /* stdint.h:2:17 */ type uint_fast16_t = uint32_t /* stdint.h:3:18 */ type uint_fast32_t = uint32_t /* stdint.h:4:18 */ type ssize_t = int32 /* alltypes.h:88:15 */ type off_t = int64 /* alltypes.h:185:16 */ type _IO_FILE = struct { Fflags uint32 Frpos uintptr Frend uintptr Fclose uintptr Fwend uintptr Fwpos uintptr Fmustbezero_1 uintptr Fwbase uintptr Fread uintptr Fwrite uintptr Fseek uintptr Fbuf uintptr Fbuf_size size_t Fprev uintptr Fnext uintptr Ffd int32 Fpipe_pid int32 Flockcount int32 Fmode int32 Flock int32 Flbf int32 Fcookie uintptr Foff off_t Fgetln_buf uintptr Fmustbezero_2 uintptr Fshend uintptr Fshlim off_t Fshcnt off_t Fprev_locked uintptr Fnext_locked uintptr Flocale uintptr } /* alltypes.h:343:9 */ type FILE = _IO_FILE /* alltypes.h:343:25 */ type va_list = uintptr /* alltypes.h:349:27 */ type _G_fpos64_t = struct { F__ccgo_pad1 [0]uint32 F__opaque [16]int8 } /* stdio.h:54:9 */ type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ type float_t = float64 /* alltypes.h:38:21 */ type double_t = float64 /* alltypes.h:43:21 */ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ bp := tls.Alloc(4) defer tls.Free(4) // var __u struct {F__f float32;} at bp, 4 *(*float32)(unsafe.Pointer(bp)) = __f return *(*uint32)(unsafe.Pointer(bp)) } func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ bp := tls.Alloc(8) defer tls.Free(8) // var __u struct {F__f float64;} at bp, 8 *(*float64)(unsafe.Pointer(bp)) = __f return *(*uint64)(unsafe.Pointer(bp)) } type syscall_arg_t = int32 /* syscall.h:22:14 */ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ var c int32 var x int32 var y int64 var neg int32 = 0 c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if c == '+' || c == '-' { neg = Bool32(c == '-') c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() if uint32(c-'0') >= 10 && pok != 0 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } } if uint32(c-'0') >= 10 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } return -0x7fffffffffffffff - int64(1) } for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { x = 10*x + c - '0' } for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < 10; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { } if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } if neg != 0 { return -y } return y } func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ bp := tls.Alloc(512) defer tls.Free(512) // var x [128]uint32_t at bp, 512 var i int32 var j int32 var k int32 var a int32 var z int32 var lrp int64 = int64(0) var dc int64 = int64(0) var e10 int64 = int64(0) var lnz int32 = 0 var gotdig int32 = 0 var gotrad int32 = 0 var rp int32 var e2 int32 var emax int32 = -emin - bits + 3 var denormal int32 = 0 var y float64 var frac float64 = float64(0) var bias float64 = float64(0) j = 0 k = 0 // Don't let leading zeros consume buffer space for ; c == '0'; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { gotdig = 1 } if c == '.' { gotrad = 1 for c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }(); c == '0'; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { gotdig = 1 lrp-- } } *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend { return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1)))) } return X__shgetc(tls, f) }() { if c == '.' { if gotrad != 0 { break } gotrad = 1 lrp = dc } else if k < 128-3 { dc++ if c != '0' { lnz = int32(dc) } if j != 0 { *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') } else { *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') } if PreIncInt32(&j, 1) == 9 { k++ j = 0 } gotdig = 1 } else { dc++ if c != '0' { lnz = (128 - 4) * 9 *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) } } } if !(gotrad != 0) { lrp = dc } if gotdig != 0 && c|32 == 'e' { e10 = scanexp(tls, f, pok) if e10 == -0x7fffffffffffffff-int64(1) { if pok != 0 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } else { X__shlim(tls, f, int64(0)) return float64(0) } e10 = int64(0) } lrp = lrp + e10 } else if c >= 0 { if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) { (*FILE)(unsafe.Pointer(f)).Frpos-- } else { } } if !(gotdig != 0) { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 X__shlim(tls, f, int64(0)) return float64(0) } // Handle zero specially to avoid nasty special cases later if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { return float64(sign) * 0.0 } // Optimize small integers (w/no exponent) and over/under-flow if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_windows_386.go
vendor/modernc.org/libc/capi_windows_386.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "AccessCheck": {}, "AddAccessDeniedAce": {}, "AddAce": {}, "AreFileApisANSI": {}, "BuildCommDCBW": {}, "CancelSynchronousIo": {}, "CharLowerW": {}, "ClearCommError": {}, "CloseHandle": {}, "CopyFileW": {}, "CreateDirectoryW": {}, "CreateEventA": {}, "CreateEventW": {}, "CreateFileA": {}, "CreateFileMappingA": {}, "CreateFileMappingW": {}, "CreateFileW": {}, "CreateHardLinkW": {}, "CreateMutexW": {}, "CreatePipe": {}, "CreateProcessA": {}, "CreateProcessW": {}, "CreateThread": {}, "CreateWindowExW": {}, "DdeAbandonTransaction": {}, "DdeAccessData": {}, "DdeClientTransaction": {}, "DdeConnect": {}, "DdeCreateDataHandle": {}, "DdeCreateStringHandleW": {}, "DdeDisconnect": {}, "DdeFreeDataHandle": {}, "DdeFreeStringHandle": {}, "DdeGetData": {}, "DdeGetLastError": {}, "DdeInitializeW": {}, "DdeNameService": {}, "DdeQueryStringW": {}, "DdeUnaccessData": {}, "DdeUninitialize": {}, "DebugBreak": {}, "DefWindowProcW": {}, "DeleteCriticalSection": {}, "DeleteFileA": {}, "DeleteFileW": {}, "DestroyWindow": {}, "DeviceIoControl": {}, "DispatchMessageW": {}, "DuplicateHandle": {}, "EnterCriticalSection": {}, "EnumWindows": {}, "EqualSid": {}, "EscapeCommFunction": {}, "ExitProcess": {}, "FindClose": {}, "FindFirstFileExW": {}, "FindFirstFileW": {}, "FindNextFileW": {}, "FlushFileBuffers": {}, "FlushViewOfFile": {}, "FormatMessageA": {}, "FormatMessageW": {}, "FreeLibrary": {}, "GetACP": {}, "GetAce": {}, "GetAclInformation": {}, "GetCommModemStatus": {}, "GetCommState": {}, "GetCommandLineW": {}, "GetComputerNameExW": {}, "GetComputerNameW": {}, "GetConsoleCP": {}, "GetConsoleMode": {}, "GetConsoleScreenBufferInfo": {}, "GetCurrentDirectoryW": {}, "GetCurrentProcess": {}, "GetCurrentProcessId": {}, "GetCurrentThread": {}, "GetCurrentThreadId": {}, "GetDiskFreeSpaceA": {}, "GetDiskFreeSpaceW": {}, "GetEnvironmentVariableA": {}, "GetEnvironmentVariableW": {}, "GetExitCodeProcess": {}, "GetExitCodeThread": {}, "GetFileAttributesA": {}, "GetFileAttributesExW": {}, "GetFileAttributesW": {}, "GetFileInformationByHandle": {}, "GetFileSecurityA": {}, "GetFileSecurityW": {}, "GetFileSize": {}, "GetFileType": {}, "GetFullPathNameA": {}, "GetFullPathNameW": {}, "GetLastError": {}, "GetLengthSid": {}, "GetLogicalDriveStringsA": {}, "GetMessageW": {}, "GetModuleFileNameA": {}, "GetModuleFileNameW": {}, "GetModuleHandleA": {}, "GetModuleHandleW": {}, "GetNamedSecurityInfoW": {}, "GetOverlappedResult": {}, "GetPrivateProfileStringA": {}, "GetProcAddress": {}, "GetProcessHeap": {}, "GetProfilesDirectoryW": {}, "GetSecurityDescriptorDacl": {}, "GetSecurityDescriptorOwner": {}, "GetShortPathNameW": {}, "GetSidIdentifierAuthority": {}, "GetSidLengthRequired": {}, "GetSidSubAuthority": {}, "GetStdHandle": {}, "GetSystemInfo": {}, "GetSystemTime": {}, "GetSystemTimeAsFileTime": {}, "GetTempFileNameW": {}, "GetTempPathA": {}, "GetTempPathW": {}, "GetTickCount": {}, "GetTokenInformation": {}, "GetUserNameW": {}, "GetVersionExA": {}, "GetVersionExW": {}, "GetVolumeInformationA": {}, "GetVolumeInformationW": {}, "GetVolumeNameForVolumeMountPointW": {}, "GetWindowLongPtrW": {}, "GetWindowLongW": {}, "GetWindowsDirectoryA": {}, "GlobalAddAtomW": {}, "GlobalDeleteAtom": {}, "GlobalGetAtomNameW": {}, "HeapAlloc": {}, "HeapCompact": {}, "HeapCreate": {}, "HeapDestroy": {}, "HeapFree": {}, "HeapReAlloc": {}, "HeapSize": {}, "HeapValidate": {}, "IN6_ADDR_EQUAL": {}, "IN6_IS_ADDR_V4MAPPED": {}, "ImpersonateSelf": {}, "InitializeAcl": {}, "InitializeCriticalSection": {}, "InitializeSid": {}, "IsDebuggerPresent": {}, "IsWindow": {}, "KillTimer": {}, "LeaveCriticalSection": {}, "LoadLibraryA": {}, "LoadLibraryExW": {}, "LoadLibraryW": {}, "LocalFree": {}, "LockFile": {}, "LockFileEx": {}, "MapViewOfFile": {}, "MessageBeep": {}, "MessageBoxW": {}, "MoveFileW": {}, "MsgWaitForMultipleObjectsEx": {}, "MultiByteToWideChar": {}, "NetApiBufferFree": {}, "NetGetDCName": {}, "NetUserGetInfo": {}, "OpenEventA": {}, "OpenProcessToken": {}, "OpenThreadToken": {}, "OutputDebugStringA": {}, "OutputDebugStringW": {}, "PeekConsoleInputW": {}, "PeekMessageW": {}, "PeekNamedPipe": {}, "PostMessageW": {}, "PostQuitMessage": {}, "PurgeComm": {}, "QueryPerformanceCounter": {}, "QueryPerformanceFrequency": {}, "RaiseException": {}, "ReadConsoleW": {}, "ReadFile": {}, "RegCloseKey": {}, "RegConnectRegistryW": {}, "RegCreateKeyExW": {}, "RegDeleteKeyW": {}, "RegDeleteValueW": {}, "RegEnumKeyExW": {}, "RegEnumValueW": {}, "RegOpenKeyExW": {}, "RegQueryValueExW": {}, "RegSetValueExW": {}, "RegisterClassExW": {}, "RegisterClassW": {}, "RemoveDirectoryW": {}, "ResetEvent": {}, "RevertToSelf": {}, "RtlGetVersion": {}, "SearchPathW": {}, "SendMessageTimeoutW": {}, "SendMessageW": {}, "SetCommState": {}, "SetCommTimeouts": {}, "SetConsoleCtrlHandler": {}, "SetConsoleMode": {}, "SetConsoleTextAttribute": {}, "SetCurrentDirectoryW": {}, "SetEndOfFile": {}, "SetErrorMode": {}, "SetEvent": {}, "SetFileAttributesW": {}, "SetFilePointer": {}, "SetFileTime": {}, "SetHandleInformation": {}, "SetNamedSecurityInfoA": {}, "SetThreadPriority": {}, "SetTimer": {}, "SetWindowLongPtrW": {}, "SetWindowLongW": {}, "SetupComm": {}, "Sleep": {}, "SleepEx": {}, "SystemTimeToFileTime": {}, "TerminateThread": {}, "TranslateMessage": {}, "UnlockFile": {}, "UnlockFileEx": {}, "UnmapViewOfFile": {}, "UnregisterClassW": {}, "WSAAsyncSelect": {}, "WSAGetLastError": {}, "WSAStartup": {}, "WaitForInputIdle": {}, "WaitForSingleObject": {}, "WaitForSingleObjectEx": {}, "WideCharToMultiByte": {}, "WriteConsoleW": {}, "WriteFile": {}, "WspiapiFreeAddrInfo": {}, "WspiapiGetAddrInfo": {}, "WspiapiGetNameInfo": {}, "_IO_putc": {}, "_InterlockedCompareExchange": {}, "_InterlockedExchange": {}, "___errno_location": {}, "__acrt_iob_func": {}, "__assert_fail": {}, "__atomic_load_n": {}, "__atomic_store_n": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflow": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflow": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflow": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__ctype_get_mb_cur_max": {}, "__env_rm_add": {}, "__errno_location": {}, "__imp__environ": {}, "__imp__wenviron": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isspace_l": {}, "__isxdigit_l": {}, "__mingw_vfprintf": {}, "__mingw_vfscanf": {}, "__mingw_vfwprintf": {}, "__mingw_vfwscanf": {}, "__mingw_vprintf": {}, "__mingw_vsnprintf": {}, "__mingw_vsnwprintf": {}, "__mingw_vsprintf": {}, "__mingw_vsscanf": {}, "__mingw_vswscanf": {}, "__ms_vfscanf": {}, "__ms_vfwscanf": {}, "__ms_vscanf": {}, "__ms_vsnprintf": {}, "__ms_vsscanf": {}, "__ms_vswscanf": {}, "__ms_vwscanf": {}, "__putenv": {}, "__stdio_common_vfprintf": {}, "__stdio_common_vfprintf_p": {}, "__stdio_common_vfprintf_s": {}, "__stdio_common_vfscanf": {}, "__stdio_common_vfwprintf_s": {}, "__stdio_common_vfwscanf": {}, "__stdio_common_vsnprintf_s": {}, "__stdio_common_vsnwprintf_s": {}, "__stdio_common_vsprintf": {}, "__stdio_common_vsprintf_p": {}, "__stdio_common_vsprintf_s": {}, "__stdio_common_vsscanf": {}, "__stdio_common_vswprintf": {}, "__stdio_common_vswprintf_s": {}, "__stdio_common_vswscanf": {}, "__strchrnul": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "_access": {}, "_assert": {}, "_beginthread": {}, "_beginthreadex": {}, "_byteswap_uint64": {}, "_byteswap_ulong": {}, "_chmod": {}, "_chsize": {}, "_commit": {}, "_controlfp": {}, "_copysign": {}, "_endthreadex": {}, "_errno": {}, "_exit": {}, "_fileno": {}, "_findclose": {}, "_findfirst32": {}, "_findfirst64i32": {}, "_findnext32": {}, "_findnext64i32": {}, "_fstat": {}, "_fstat64": {}, "_fstati64": {}, "_ftime": {}, "_ftime64": {}, "_gmtime32": {}, "_gmtime64": {}, "_imp___environ": {}, "_iob": {}, "_isatty": {}, "_localtime32": {}, "_localtime64": {}, "_longjmp": {}, "_mkdir": {}, "_mktime64": {}, "_msize": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_pclose": {}, "_popen": {}, "_putchar": {}, "_set_abort_behavior": {}, "_setjmp": {}, "_setmode": {}, "_snprintf": {}, "_snwprintf": {}, "_stat64": {}, "_stati64": {}, "_strdup": {}, "_stricmp": {}, "_strnicmp": {}, "_unlink": {}, "_vsnwprintf": {}, "_wcsicmp": {}, "_wcsnicmp": {}, "_wgetenv": {}, "_wopen": {}, "_wputenv": {}, "_wtoi": {}, "_wunlink": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chmod": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "closesocket": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "cos": {}, "cosf": {}, "cosh": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "ftruncate64": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "gai_strerrorA": {}, "gai_strerrorW": {}, "getc": {}, "getcwd": {}, "getentropy": {}, "getenv": {}, "gethostname": {}, "getpeername": {}, "getpid": {}, "getpwuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "gmtime": {}, "gmtime_r": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "ioctl": {}, "ioctlsocket": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isspace": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "lstrcmpiA": {}, "lstrlenW": {}, "malloc": {}, "mblen": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "mmap64": {}, "modf": {}, "mremap": {}, "munmap": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pclose": {}, "perror": {}, "pipe": {}, "popen": {}, "pow": {}, "printf": {}, "pselect": {}, "putc": {}, "putchar": {}, "putenv": {}, "puts": {}, "qsort": {}, "raise": {}, "rand": {}, "random": {}, "read": {}, "readdir": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "sched_yield": {}, "select": {}, "send": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setmode": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setvbuf": {}, "shutdown": {}, "sigaction": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strlen": {}, "strncmp": {}, "strncpy": {}, "strpbrk": {}, "strrchr": {}, "strstr": {}, "strtod": {}, "strtol": {}, "strtoul": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "timezone": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "vasprintf": {}, "vfprintf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "waitpid": {}, "wcrtomb": {}, "wcschr": {}, "wcscmp": {}, "wcscpy": {}, "wcsicmp": {}, "wcslen": {}, "wcsncmp": {}, "wcsrtombs": {}, "wcstombs": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "wsprintfA": {}, "wsprintfW": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_unix2.go
vendor/modernc.org/libc/libc_unix2.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build illumos package libc // import "modernc.org/libc" import ( "modernc.org/libc/sys/types" ) // ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags); func Xrecvmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v msg=%v flags=%v, (%v:)", t, sockfd, msg, flags, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_RECVMSG, uintptr(sockfd), msg, uintptr(flags)) // if err != 0 { // t.setErrno(err) // return -1 // } // // return types.Ssize_t(n) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/ioutil_illumos.go
vendor/modernc.org/libc/ioutil_illumos.go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE-GO file. // Modifications Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "fmt" "os" "sync" "time" "unsafe" // "golang.org/x/sys/unix" // "modernc.org/libc/errno" // "modernc.org/libc/fcntl" ) // Random number state. // We generate random temporary file names so that there's a good // chance the file doesn't exist yet - keeps the number of tries in // TempFile to a minimum. var randState uint32 var randStateMu sync.Mutex func reseed() uint32 { return uint32(time.Now().UnixNano() + int64(os.Getpid())) } func nextRandom(x uintptr) { randStateMu.Lock() r := randState if r == 0 { r = reseed() } r = r*1664525 + 1013904223 // constants from Numerical Recipes randState = r randStateMu.Unlock() copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6)) } func tempFile(s, x uintptr, flags int32) (fd int, err error) { panic(todo("")) // const maxTry = 10000 // nconflict := 0 // flags |= int32(os.O_RDWR | os.O_CREATE | os.O_EXCL | unix.O_LARGEFILE) // for i := 0; i < maxTry; i++ { // nextRandom(x) // fdcwd := fcntl.AT_FDCWD // n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), s, uintptr(flags), 0600, 0, 0) // if err == 0 { // return int(n), nil // } // if err != errno.EEXIST { // return -1, err // } // if nconflict++; nconflict > 10 { // randStateMu.Lock() // randState = reseed() // nconflict = 0 // randStateMu.Unlock() // } // } // return -1, unix.Errno(errno.EEXIST) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/musl_darwin_arm64.go
vendor/modernc.org/libc/musl_darwin_arm64.go
// Code generated by 'ccgo -D__environ=environ -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT. package libc import ( "math" "reflect" "sync/atomic" "unsafe" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer // musl as a whole is licensed under the following standard MIT license: // // ---------------------------------------------------------------------- // Copyright © 2005-2020 Rich Felker, et al. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ---------------------------------------------------------------------- // // Authors/contributors include: // // A. Wilcox // Ada Worcester // Alex Dowad // Alex Suykov // Alexander Monakov // Andre McCurdy // Andrew Kelley // Anthony G. Basile // Aric Belsito // Arvid Picciani // Bartosz Brachaczek // Benjamin Peterson // Bobby Bingham // Boris Brezillon // Brent Cook // Chris Spiegel // Clément Vasseur // Daniel Micay // Daniel Sabogal // Daurnimator // David Carlier // David Edelsohn // Denys Vlasenko // Dmitry Ivanov // Dmitry V. Levin // Drew DeVault // Emil Renner Berthing // Fangrui Song // Felix Fietkau // Felix Janda // Gianluca Anzolin // Hauke Mehrtens // He X // Hiltjo Posthuma // Isaac Dunham // Jaydeep Patil // Jens Gustedt // Jeremy Huntwork // Jo-Philipp Wich // Joakim Sindholt // John Spencer // Julien Ramseier // Justin Cormack // Kaarle Ritvanen // Khem Raj // Kylie McClain // Leah Neukirchen // Luca Barbato // Luka Perkov // M Farkas-Dyck (Strake) // Mahesh Bodapati // Markus Wichmann // Masanori Ogino // Michael Clark // Michael Forney // Mikhail Kremnyov // Natanael Copa // Nicholas J. Kain // orc // Pascal Cuoq // Patrick Oppenlander // Petr Hosek // Petr Skocik // Pierre Carrier // Reini Urban // Rich Felker // Richard Pennington // Ryan Fairfax // Samuel Holland // Segev Finer // Shiz // sin // Solar Designer // Stefan Kristiansson // Stefan O'Rear // Szabolcs Nagy // Timo Teräs // Trutz Behn // Valentin Ochs // Will Dietz // William Haddon // William Pitcock // // Portions of this software are derived from third-party works licensed // under terms compatible with the above MIT license: // // The TRE regular expression implementation (src/regex/reg* and // src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed // under a 2-clause BSD license (license text in the source files). The // included version has been heavily modified by Rich Felker in 2012, in // the interests of size, simplicity, and namespace cleanliness. // // Much of the math library code (src/math/* and src/complex/*) is // Copyright © 1993,2004 Sun Microsystems or // Copyright © 2003-2011 David Schultz or // Copyright © 2003-2009 Steven G. Kargl or // Copyright © 2003-2009 Bruce D. Evans or // Copyright © 2008 Stephen L. Moshier or // Copyright © 2017-2018 Arm Limited // and labelled as such in comments in the individual source files. All // have been licensed under extremely permissive terms. // // The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 // The Android Open Source Project and is licensed under a two-clause BSD // license. It was taken from Bionic libc, used on Android. // // The AArch64 memcpy and memset code (src/string/aarch64/*) are // Copyright © 1999-2019, Arm Limited. // // The implementation of DES for crypt (src/crypt/crypt_des.c) is // Copyright © 1994 David Burren. It is licensed under a BSD license. // // The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was // originally written by Solar Designer and placed into the public // domain. The code also comes with a fallback permissive license for use // in jurisdictions that may not recognize the public domain. // // The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 // Valentin Ochs and is licensed under an MIT-style license. // // The x86_64 port was written by Nicholas J. Kain and is licensed under // the standard MIT terms. // // The mips and microblaze ports were originally written by Richard // Pennington for use in the ellcc project. The original code was adapted // by Rich Felker for build system and code conventions during upstream // integration. It is licensed under the standard MIT terms. // // The mips64 port was contributed by Imagination Technologies and is // licensed under the standard MIT terms. // // The powerpc port was also originally written by Richard Pennington, // and later supplemented and integrated by John Spencer. It is licensed // under the standard MIT terms. // // All other files which have no copyright comments are original works // produced specifically for use as part of this library, written either // by Rich Felker, the main author of the library, or by one or more // contibutors listed above. Details on authorship of individual files // can be found in the git version control history of the project. The // omission of copyright and license comments in each file is in the // interest of source tree size. // // In addition, permission is hereby granted for all public header files // (include/* and arch/*/bits/*) and crt files intended to be linked into // applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit // the copyright notice and permission notice otherwise required by the // license, and to use these files without any requirement of // attribution. These files include substantial contributions from: // // Bobby Bingham // John Spencer // Nicholas J. Kain // Rich Felker // Richard Pennington // Stefan Kristiansson // Szabolcs Nagy // // all of whom have explicitly granted such permission. // // This file previously contained text expressing a belief that most of // the files covered by the above exception were sufficiently trivial not // to be subject to copyright, resulting in confusion over whether it // negated the permissions granted in the license. In the spirit of // permissive licensing, and of not having licensing issues being an // obstacle to adoption, that text has been removed. const ( /* copyright.c:194:1: */ __musl__copyright__ = 0 ) const ( /* nameser.h:117:1: */ ns_uop_delete = 0 ns_uop_add = 1 ns_uop_max = 2 ) const ( /* nameser.h:147:1: */ ns_t_invalid = 0 ns_t_a = 1 ns_t_ns = 2 ns_t_md = 3 ns_t_mf = 4 ns_t_cname = 5 ns_t_soa = 6 ns_t_mb = 7 ns_t_mg = 8 ns_t_mr = 9 ns_t_null = 10 ns_t_wks = 11 ns_t_ptr = 12 ns_t_hinfo = 13 ns_t_minfo = 14 ns_t_mx = 15 ns_t_txt = 16 ns_t_rp = 17 ns_t_afsdb = 18 ns_t_x25 = 19 ns_t_isdn = 20 ns_t_rt = 21 ns_t_nsap = 22 ns_t_nsap_ptr = 23 ns_t_sig = 24 ns_t_key = 25 ns_t_px = 26 ns_t_gpos = 27 ns_t_aaaa = 28 ns_t_loc = 29 ns_t_nxt = 30 ns_t_eid = 31 ns_t_nimloc = 32 ns_t_srv = 33 ns_t_atma = 34 ns_t_naptr = 35 ns_t_kx = 36 ns_t_cert = 37 ns_t_a6 = 38 ns_t_dname = 39 ns_t_sink = 40 ns_t_opt = 41 ns_t_apl = 42 ns_t_tkey = 249 ns_t_tsig = 250 ns_t_ixfr = 251 ns_t_axfr = 252 ns_t_mailb = 253 ns_t_maila = 254 ns_t_any = 255 ns_t_zxfr = 256 ns_t_max = 65536 ) const ( /* nameser.h:210:1: */ ns_c_invalid = 0 ns_c_in = 1 ns_c_2 = 2 ns_c_chaos = 3 ns_c_hs = 4 ns_c_none = 254 ns_c_any = 255 ns_c_max = 65536 ) const ( /* nameser.h:221:1: */ ns_kt_rsa = 1 ns_kt_dh = 2 ns_kt_dsa = 3 ns_kt_private = 254 ) const ( /* nameser.h:228:1: */ cert_t_pkix = 1 cert_t_spki = 2 cert_t_pgp = 3 cert_t_url = 253 cert_t_oid = 254 ) const ( /* nameser.h:28:1: */ ns_s_qd = 0 ns_s_zn = 0 ns_s_an = 1 ns_s_pr = 1 ns_s_ns = 2 ns_s_ud = 2 ns_s_ar = 3 ns_s_max = 4 ) const ( /* nameser.h:75:1: */ ns_f_qr = 0 ns_f_opcode = 1 ns_f_aa = 2 ns_f_tc = 3 ns_f_rd = 4 ns_f_ra = 5 ns_f_z = 6 ns_f_ad = 7 ns_f_cd = 8 ns_f_rcode = 9 ns_f_max = 10 ) const ( /* nameser.h:89:1: */ ns_o_query = 0 ns_o_iquery = 1 ns_o_status = 2 ns_o_notify = 4 ns_o_update = 5 ns_o_max = 6 ) const ( /* nameser.h:98:1: */ ns_r_noerror = 0 ns_r_formerr = 1 ns_r_servfail = 2 ns_r_nxdomain = 3 ns_r_notimpl = 4 ns_r_refused = 5 ns_r_yxdomain = 6 ns_r_yxrrset = 7 ns_r_nxrrset = 8 ns_r_notauth = 9 ns_r_notzone = 10 ns_r_max = 11 ns_r_badvers = 16 ns_r_badsig = 16 ns_r_badkey = 17 ns_r_badtime = 18 ) type ptrdiff_t = int64 /* <builtin>:3:26 */ type size_t = uint64 /* <builtin>:9:23 */ type wchar_t = int32 /* <builtin>:15:24 */ var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */ // pthread opaque structures type __darwin_pthread_handler_rec = struct { F__routine uintptr F__arg uintptr F__next uintptr } /* table.c:1396:1 */ type _opaque_pthread_attr_t = struct { F__sig int64 F__opaque [56]int8 } /* table.c:1402:1 */ type _opaque_pthread_cond_t = struct { F__sig int64 F__opaque [40]int8 } /* table.c:1407:1 */ type _opaque_pthread_condattr_t = struct { F__sig int64 F__opaque [8]int8 } /* table.c:1412:1 */ type _opaque_pthread_mutex_t = struct { F__sig int64 F__opaque [56]int8 } /* table.c:1417:1 */ type _opaque_pthread_mutexattr_t = struct { F__sig int64 F__opaque [8]int8 } /* table.c:1422:1 */ type _opaque_pthread_once_t = struct { F__sig int64 F__opaque [8]int8 } /* table.c:1427:1 */ type _opaque_pthread_rwlock_t = struct { F__sig int64 F__opaque [192]int8 } /* table.c:1432:1 */ type _opaque_pthread_rwlockattr_t = struct { F__sig int64 F__opaque [16]int8 } /* table.c:1437:1 */ type _opaque_pthread_t = struct { F__sig int64 F__cleanup_stack uintptr F__opaque [8176]int8 } /* table.c:1442:1 */ type ct_rune_t = int32 /* table.c:1527:28 */ type rune_t = int32 /* table.c:1536:25 */ type wint_t = int32 /* table.c:1558:25 */ type _RuneEntry = struct { F__min int32 F__max int32 F__map int32 F__ccgo_pad1 [4]byte F__types uintptr } /* table.c:1575:3 */ type _RuneRange = struct { F__nranges int32 F__ccgo_pad1 [4]byte F__ranges uintptr } /* table.c:1580:3 */ type _RuneCharClass = struct { F__name [14]int8 F__ccgo_pad1 [2]byte F__mask uint32 } /* table.c:1585:3 */ type _RuneLocale = struct { F__magic [8]int8 F__encoding [32]int8 F__sgetrune uintptr F__sputrune uintptr F__invalid_rune int32 F__runetype [256]uint32 F__maplower [256]int32 F__mapupper [256]int32 F__ccgo_pad1 [4]byte F__runetype_ext _RuneRange F__maplower_ext _RuneRange F__mapupper_ext _RuneRange F__variable uintptr F__variable_len int32 F__ncharclasses int32 F__charclasses uintptr } /* table.c:1616:3 */ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */ if __ccgo_strace { trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2)) } return func() int32 { if Xisascii(tls, _c) != 0 { return BoolInt32(!!(uint64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c)*4)))&_f != 0)) } return BoolInt32(!!(X__maskrune(tls, _c, _f) != 0)) }() } func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */ if __ccgo_strace { trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2)) } if _c < 0 || _c >= int32(1)<<8 { return 0 } return BoolInt32(!!(uint64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c)*4)))&_f != 0)) } func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } var _x uint32 if _c == 0 { return 0 } _x = uint32(X__maskrune(tls, _c, uint64(0xe0000000|0x00040000))) if int64(_x)&0xe0000000 != int64(0) { return int32(int64(_x) & 0xe0000000 >> 30) } return func() int32 { if int64(_x)&0x00040000 != int64(0) { return 1 } return -1 }() } func Xisalnum(tls *TLS, _c int32) int32 { /* table.c:1718:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00000100|0x00000400)) } func Xisalpha(tls *TLS, _c int32) int32 { /* table.c:1724:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00000100)) } func Xisblank(tls *TLS, _c int32) int32 { /* table.c:1730:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00020000)) } func Xiscntrl(tls *TLS, _c int32) int32 { /* table.c:1736:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00000200)) } func Xisdigit(tls *TLS, _c int32) int32 { /* table.c:1743:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__isctype(tls, _c, uint64(0x00000400)) } func Xisgraph(tls *TLS, _c int32) int32 { /* table.c:1749:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00000800)) } func Xislower(tls *TLS, _c int32) int32 { /* table.c:1755:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00001000)) } func Xisprint(tls *TLS, _c int32) int32 { /* table.c:1761:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00040000)) } func Xispunct(tls *TLS, _c int32) int32 { /* table.c:1767:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00002000)) } func Xisupper(tls *TLS, _c int32) int32 { /* table.c:1779:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00008000)) } func Xisxdigit(tls *TLS, _c int32) int32 { /* table.c:1786:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__isctype(tls, _c, uint64(0x00010000)) } func Xtoascii(tls *TLS, _c int32) int32 { /* table.c:1792:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return _c & 0x7F } func Xdigittoint(tls *TLS, _c int32) int32 { /* table.c:1811:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__maskrune(tls, _c, uint64(0x0F)) } func Xishexnumber(tls *TLS, _c int32) int32 { /* table.c:1817:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00010000)) } func Xisideogram(tls *TLS, _c int32) int32 { /* table.c:1823:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00080000)) } func Xisnumber(tls *TLS, _c int32) int32 { /* table.c:1829:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00000400)) } func Xisphonogram(tls *TLS, _c int32) int32 { /* table.c:1835:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00200000)) } func Xisrune(tls *TLS, _c int32) int32 { /* table.c:1841:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0xFFFFFFF0)) } func Xisspecial(tls *TLS, _c int32) int32 { /* table.c:1847:1: */ if __ccgo_strace { trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2)) } return X__istype(tls, _c, uint64(0x00100000)) } func X__maskrune(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1871:2: */ if __ccgo_strace { trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2)) } return int32(uint32(int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c&0xff)*4)))) & uint32(_f)) } func X__toupper(tls *TLS, c int32) int32 { /* table.c:1876:20: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Xtoupper(tls, c) } func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */ if __ccgo_strace { trc("tls=%v c=%v, (%v:)", tls, c, origin(2)) } return Xtolower(tls, c) } var X_DefaultRuneLocale = _RuneLocale{F__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, F__encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, F__invalid_rune: 0xfffd, F__runetype: [256]uint32{ uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x50c00), uint32(0x50c01), uint32(0x50c02), uint32(0x50c03), uint32(0x50c04), uint32(0x50c05), uint32(0x50c06), uint32(0x50c07), uint32(0x50c08), uint32(0x50c09), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x5890a), uint32(0x5890b), uint32(0x5890c), uint32(0x5890d), uint32(0x5890e), uint32(0x5890f), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x5190a), uint32(0x5190b), uint32(0x5190c), uint32(0x5190d), uint32(0x5190e), uint32(0x5190f), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x200), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), }, F__maplower: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, }, F__mapupper: [256]int32{ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, }, } /* table.c:1879:13 */ var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */ type div_t = struct { Fquot int32 Frem int32 } /* stdlib.h:62:35 */ type ldiv_t = struct { Fquot int64 Frem int64 } /* stdlib.h:63:36 */ type lldiv_t = struct { Fquot int64 Frem int64 } /* stdlib.h:64:41 */ type locale_t = uintptr /* alltypes.h:351:32 */ type ssize_t = int64 /* alltypes.h:73:15 */ type intptr_t = int64 /* alltypes.h:78:15 */ type off_t = int64 /* alltypes.h:170:16 */ type pid_t = int32 /* alltypes.h:243:13 */ type uid_t = uint32 /* alltypes.h:253:18 */ type gid_t = uint32 /* alltypes.h:258:18 */ type useconds_t = uint32 /* alltypes.h:268:18 */ func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */ if __ccgo_strace { trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2)) } var i size_t var newenv uintptr var tmp uintptr //TODO for (char **e = __environ; *e; e++, i++) var e uintptr i = uint64(0) if !(Environ() != 0) { goto __1 } //TODO for (char **e = __environ; *e; e++, i++) e = Environ() __2: if !(*(*uintptr)(unsafe.Pointer(e)) != 0) { goto __4 } if !!(Xstrncmp(tls, s, *(*uintptr)(unsafe.Pointer(e)), l+uint64(1)) != 0) { goto __5 } tmp = *(*uintptr)(unsafe.Pointer(e)) *(*uintptr)(unsafe.Pointer(e)) = s X__env_rm_add(tls, tmp, r) return 0 __5: ; goto __3 __3: e += 8 i++ goto __2 goto __4 __4: ; __1: ; if !(Environ() == _soldenv) { goto __6 } newenv = Xrealloc(tls, _soldenv, uint64(unsafe.Sizeof(uintptr(0)))*(i+uint64(2))) if !!(newenv != 0) { goto __8 } goto oom __8: ; goto __7 __6: newenv = Xmalloc(tls, uint64(unsafe.Sizeof(uintptr(0)))*(i+uint64(2))) if !!(newenv != 0) { goto __9 } goto oom __9: ; if !(i != 0) { goto __10 } Xmemcpy(tls, newenv, Environ(), uint64(unsafe.Sizeof(uintptr(0)))*i) __10: ; Xfree(tls, _soldenv) __7: ; *(*uintptr)(unsafe.Pointer(newenv + uintptr(i)*8)) = s *(*uintptr)(unsafe.Pointer(newenv + uintptr(i+uint64(1))*8)) = uintptr(0) *(*uintptr)(unsafe.Pointer(EnvironP())) = AssignPtrUintptr(uintptr(unsafe.Pointer(&_soldenv)), newenv) if !(r != 0) { goto __11 } X__env_rm_add(tls, uintptr(0), r) __11: ; return 0 oom: Xfree(tls, r) return -1 } var _soldenv uintptr /* putenv.c:22:14: */ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */ if __ccgo_strace { trc("tls=%v s=%v, (%v:)", tls, s, origin(2)) } var l size_t = size_t((int64(X__strchrnul(tls, s, '=')) - int64(s)) / 1) if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) { return Xunsetenv(tls, s) } return X__putenv(tls, s, l, uintptr(0)) } func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */ if __ccgo_strace { trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2)) } //TODO for (size_t i=0; i < env_alloced_n; i++) var i size_t = uint64(0) for ; i < _senv_alloced_n; i++ { if *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8)) == old { *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8)) = new Xfree(tls, old) return } else if !(int32(*(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8))) != 0) && new != 0 { *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*8)) = new new = uintptr(0) } } if !(new != 0) { return } var t uintptr = Xrealloc(tls, _senv_alloced, uint64(unsafe.Sizeof(uintptr(0)))*(_senv_alloced_n+uint64(1))) if !(t != 0) { return } *(*uintptr)(unsafe.Pointer(AssignPtrUintptr(uintptr(unsafe.Pointer(&_senv_alloced)), t) + uintptr(PostIncUint64(&_senv_alloced_n, 1))*8)) = new } var _senv_alloced uintptr /* setenv.c:7:14: */ var _senv_alloced_n size_t /* setenv.c:8:16: */ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */ if __ccgo_strace { trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2)) } var s uintptr var l1 size_t var l2 size_t if !(var1 != 0) || !(int32(AssignUint64(&l1, size_t((int64(X__strchrnul(tls, var1, '='))-int64(var1))/1))) != 0) || *(*int8)(unsafe.Pointer(var1 + uintptr(l1))) != 0 { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 return -1 } if !(overwrite != 0) && Xgetenv(tls, var1) != 0 { return 0 } l2 = Xstrlen(tls, value) s = Xmalloc(tls, l1+l2+uint64(2)) if !(s != 0) { return -1 } Xmemcpy(tls, s, var1, l1) *(*int8)(unsafe.Pointer(s + uintptr(l1))) = int8('=') Xmemcpy(tls, s+uintptr(l1)+uintptr(1), value, l2+uint64(1)) return X__putenv(tls, s, l1, s) } func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */ if __ccgo_strace { trc("tls=%v name=%v, (%v:)", tls, name, origin(2)) } var l size_t = size_t((int64(X__strchrnul(tls, name, '=')) - int64(name)) / 1) if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 { *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 return -1 } if Environ() != 0 { var e uintptr = Environ() var eo uintptr = e for ; *(*uintptr)(unsafe.Pointer(e)) != 0; e += 8 { //TODO if (!strncmp(name, *e, l) && l[*e] == '=') if !(Xstrncmp(tls, name, *(*uintptr)(unsafe.Pointer(e)), l) != 0) && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(e)) + uintptr(l)))) == '=' { X__env_rm_add(tls, *(*uintptr)(unsafe.Pointer(e)), uintptr(0)) } else if eo != e { *(*uintptr)(unsafe.Pointer(PostIncUintptr(&eo, 8))) = *(*uintptr)(unsafe.Pointer(e)) } else { eo += 8 } } if eo != e { *(*uintptr)(unsafe.Pointer(eo)) = uintptr(0) } } return 0 } type uintptr_t = uint64 /* alltypes.h:63:24 */ type int8_t = int8 /* alltypes.h:104:25 */ type int16_t = int16 /* alltypes.h:109:25 */ type int32_t = int32 /* alltypes.h:114:25 */ type int64_t = int64 /* alltypes.h:119:25 */ type intmax_t = int64 /* alltypes.h:124:25 */ type uint8_t = uint8 /* alltypes.h:129:25 */ type uint16_t = uint16 /* alltypes.h:134:25 */ type uint32_t = uint32 /* alltypes.h:139:25 */ type uint64_t = uint64 /* alltypes.h:144:25 */ type uintmax_t = uint64 /* alltypes.h:154:25 */ type int_fast8_t = int8_t /* stdint.h:22:16 */ type int_fast64_t = int64_t /* stdint.h:23:17 */ type int_least8_t = int8_t /* stdint.h:25:17 */ type int_least16_t = int16_t /* stdint.h:26:17 */ type int_least32_t = int32_t /* stdint.h:27:17 */ type int_least64_t = int64_t /* stdint.h:28:17 */ type uint_fast8_t = uint8_t /* stdint.h:30:17 */ type uint_fast64_t = uint64_t /* stdint.h:31:18 */ type uint_least8_t = uint8_t /* stdint.h:33:18 */ type uint_least16_t = uint16_t /* stdint.h:34:18 */ type uint_least32_t = uint32_t /* stdint.h:35:18 */ type uint_least64_t = uint64_t /* stdint.h:36:18 */ type int_fast16_t = int32_t /* stdint.h:1:17 */ type int_fast32_t = int32_t /* stdint.h:2:17 */
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_riscv64.go
vendor/modernc.org/libc/libc_musl_linux_riscv64.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" type long = int64 type ulong = uint64 // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<50 - 1]byte
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_openbsd_amd64.go
vendor/modernc.org/libc/libc_openbsd_amd64.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" type ( long = int64 ulong = uint64 )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_linux_amd64.go
vendor/modernc.org/libc/capi_linux_amd64.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_IO_putc": {}, "___errno_location": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_b_loc": {}, "__ctype_get_mb_cur_max": {}, "__errno_location": {}, "__floatscan": {}, "__fpclassify": {}, "__fpclassifyf": {}, "__fpclassifyl": {}, "__fsmu8": {}, "__h_errno_location": {}, "__inet_aton": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lockfile": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__shgetc": {}, "__shlim": {}, "__strncasecmp_l": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__unlockfile": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "dup3": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "faccessat": {}, "fchmod": {}, "fchmodat": {}, "fchown": {}, "fchownat": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fstatfs": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "ftruncate64": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostbyname_r": {}, "gethostname": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getrandom": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isupper": {}, "iswalnum": {}, "iswspace": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "linkat": {}, "listen": {}, "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbrtowc": {}, "mbsinit": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkdirat": {}, "mkfifo": {}, "mknod": {}, "mknodat": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "mmap64": {}, "modf": {}, "mremap": {}, "munmap": {}, "nanf": {}, "nanosleep": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "openat": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "pipe2": {}, "poll": {}, "popen": {}, "posix_fadvise": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "pwrite": {}, "qsort": {}, "raise": {}, "rand": {}, "rand_r": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readlinkat": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "renameat2": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlcat": {}, "strlcpy": {}, "strlen": {}, "strncasecmp": {}, "strncat": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtok": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "symlinkat": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unlinkat": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimensat": {}, "utimes": {}, "uuid_copy": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vfscanf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "vsscanf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_netbsd.go
vendor/modernc.org/libc/libc_netbsd.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "fmt" "io" "os" "os/exec" "path/filepath" "runtime" "runtime/debug" "strings" gotime "time" "unsafe" guuid "github.com/google/uuid" "golang.org/x/sys/unix" "modernc.org/libc/errno" "modernc.org/libc/fcntl" "modernc.org/libc/fts" gonetdb "modernc.org/libc/honnef.co/go/netdb" "modernc.org/libc/langinfo" "modernc.org/libc/limits" "modernc.org/libc/netdb" "modernc.org/libc/netinet/in" "modernc.org/libc/stdio" "modernc.org/libc/sys/socket" "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" "modernc.org/libc/termios" "modernc.org/libc/time" "modernc.org/libc/unistd" "modernc.org/libc/uuid" ) var ( in6_addr_any in.In6_addr ) type syscallErrno = unix.Errno // // Keep these outside of the var block otherwise go generate will miss them. var X__stderrp = Xstdout var X__stdinp = Xstdin var X__stdoutp = Xstdout var X__sF [3]stdio.FILE var X_tolower_tab_ = Xmalloc(nil, 2*65537) var X_toupper_tab_ = Xmalloc(nil, 2*65537) func init() { for c := rune(0); c < 0xffff; c++ { y := c s := strings.ToLower(string(c)) a := []rune(s) if len(a) != 0 { y = a[0] } (*[65536]uint16)(unsafe.Pointer(X_tolower_tab_))[c+1] = uint16(y) y = c s = strings.ToUpper(string(c)) a = []rune(s) if len(a) != 0 { y = a[0] } (*[65536]uint16)(unsafe.Pointer(X_toupper_tab_))[c+1] = uint16(y) } } // include/stdio.h:486:extern int __isthreaded; var X__isthreaded int32 // lib/libc/locale/mblocal.h:62: int __mb_sb_limit; var X__mb_sb_limit int32 = 128 // UTF-8 // include/runetype.h:94:extern _Thread_local const _RuneLocale *_ThreadRuneLocale; var X_ThreadRuneLocale uintptr //TODO initialize and implement _Thread_local semantics. // include/xlocale/_ctype.h:54:_RuneLocale *__runes_for_locale(locale_t, int*); func X__runes_for_locale(t *TLS, l locale_t, p uintptr) uintptr { if __ccgo_strace { trc("t=%v l=%v p=%v, (%v:)", t, l, p, origin(2)) } panic(todo("")) } type Tsize_t = types.Size_t type file uintptr func (f file) fd() int32 { return int32((*stdio.FILE)(unsafe.Pointer(f)).F_file) } func (f file) setFd(fd int32) { (*stdio.FILE)(unsafe.Pointer(f)).F_file = int16(fd) } func (f file) err() bool { return (*stdio.FILE)(unsafe.Pointer(f)).F_flags&1 != 0 } func (f file) setErr() { (*stdio.FILE)(unsafe.Pointer(f)).F_flags |= 1 } func (f file) close(t *TLS) int32 { fd := f.fd() r := Xclose(t, fd) switch fd { case unistd.STDIN_FILENO, unistd.STDOUT_FILENO, unistd.STDERR_FILENO: X__sF[fd] = stdio.FILE{} default: Xfree(t, uintptr(f)) } if r < 0 { return stdio.EOF } return 0 } func newFile(t *TLS, fd int32) uintptr { var p uintptr switch fd { case unistd.STDIN_FILENO: p = uintptr(unsafe.Pointer(&X__sF[0])) case unistd.STDOUT_FILENO: p = uintptr(unsafe.Pointer(&X__sF[1])) case unistd.STDERR_FILENO: p = uintptr(unsafe.Pointer(&X__sF[2])) default: if p = Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(stdio.FILE{}))); p == 0 { return 0 } } file(p).setFd(fd) return p } func fwrite(fd int32, b []byte) (int, error) { if fd == unistd.STDOUT_FILENO { return write(b) } // if dmesgs { // dmesg("%v: fd %v: %s", origin(1), fd, b) // } return unix.Write(int(fd), b) //TODO use Xwrite } // unsigned long ___runetype(__ct_rune_t) __pure; func X___runetype(t *TLS, x int32) ulong { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } panic(todo("")) } // int fprintf(FILE *stream, const char *format, ...); func Xfprintf(t *TLS, stream, format, args uintptr) int32 { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } n, _ := fwrite(int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file), printf(format, args)) return int32(n) } // int usleep(useconds_t usec); func Xusleep(t *TLS, usec uint32) int32 { if __ccgo_strace { trc("t=%v usec=%v, (%v:)", t, usec, origin(2)) } gotime.Sleep(gotime.Microsecond * gotime.Duration(usec)) return 0 } // int getrusage(int who, struct rusage *usage); func Xgetrusage(t *TLS, who int32, usage uintptr) int32 { if __ccgo_strace { trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int fgetc(FILE *stream); func Xfgetc(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_file) var buf [1]byte if n, _ := unix.Read(fd, buf[:]); n != 0 { return int32(buf[0]) } return stdio.EOF } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xlstat64(t, pathname, statbuf) } // int stat(const char *pathname, struct stat *statbuf); func Xstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xstat64(t, pathname, statbuf) } // int chdir(const char *path); func Xchdir(t *TLS, path uintptr) int32 { if __ccgo_strace { trc("t=%v path=%v, (%v:)", t, path, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(path)) // } return 0 } var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) localtime.Ftm_min = int32(t.Minute()) localtime.Ftm_hour = int32(t.Hour()) localtime.Ftm_mday = int32(t.Day()) localtime.Ftm_mon = int32(t.Month() - 1) localtime.Ftm_year = int32(t.Year() - 1900) localtime.Ftm_wday = int32(t.Weekday()) localtime.Ftm_yday = int32(t.YearDay()) localtime.Ftm_isdst = Bool32(isTimeDST(t)) return uintptr(unsafe.Pointer(&localtime)) } // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) (*time.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute()) (*time.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour()) (*time.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day()) (*time.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1) (*time.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900) (*time.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday()) (*time.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay()) (*time.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t)) return result } // int open(const char *pathname, int flags, ...); func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } return Xopen64(t, pathname, flags, args) } // int open(const char *pathname, int flags, ...); func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } var mode types.Mode_t if args != 0 { mode = (types.Mode_t)(VaUint32(&args)) } fdcwd := fcntl.AT_FDCWD n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), pathname, uintptr(flags), uintptr(mode), 0, 0) if err != 0 { // if dmesgs { // dmesg("%v: %q %#x: %v", origin(1), GoString(pathname), flags, err) // } t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, n) // } return int32(n) } // off_t lseek(int fd, off_t offset, int whence); func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } return types.Off_t(Xlseek64(t, fd, offset, whence)) } func whenceStr(whence int32) string { panic(todo("")) } var fsyncStatbuf stat.Stat // int fsync(int fd); func Xfsync(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } if noFsync { // Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf))) } if _, _, err := unix.Syscall(unix.SYS_FSYNC, uintptr(fd), 0, 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %d: ok", origin(1), fd) // } return 0 } // long sysconf(int name); func Xsysconf(t *TLS, name int32) long { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } switch name { case unistd.X_SC_PAGESIZE: return long(unix.Getpagesize()) case unistd.X_SC_GETPW_R_SIZE_MAX: return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 case unistd.X_SC_NPROCESSORS_ONLN: return long(runtime.NumCPU()) } panic(todo("", name)) } // int close(int fd); func Xclose(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %d: ok", origin(1), fd) // } return 0 } // char *getcwd(char *buf, size_t size); func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } if _, err := unix.Getcwd((*RawMem)(unsafe.Pointer(buf))[:size:size]); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return 0 } if dmesgs { dmesg("%v: ok", origin(1)) } return buf } // int fstat(int fd, struct stat *statbuf); func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } return Xfstat64(t, fd, statbuf) } // int ftruncate(int fd, off_t length); func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 { if __ccgo_strace { trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) } if err := unix.Ftruncate(int(fd), int64(length)); err != nil { if dmesgs { dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d %#x: ok", origin(1), fd, length) } return 0 } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } return Xfcntl64(t, fd, cmd, args) } // ssize_t read(int fd, void *buf, size_t count); func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count)) if err != 0 { t.setErrno(err) return -1 } // if dmesgs { // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // } return types.Ssize_t(n) } // ssize_t write(int fd, const void *buf, size_t count); func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } const retry = 5 var err syscallErrno for i := 0; i < retry; i++ { var n uintptr switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err { case 0: // if dmesgs { // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // } return types.Ssize_t(n) case errno.EAGAIN: // nop } } // if dmesgs { // dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) // } t.setErrno(err) return -1 } // int fchmod(int fd, mode_t mode); func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %d %#o: ok", origin(1), fd, mode) // } return 0 } // int fchown(int fd, uid_t owner, gid_t group); func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 { if __ccgo_strace { trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 { t.setErrno(err) return -1 } return 0 } // uid_t geteuid(void); func Xgeteuid(t *TLS) types.Uid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0) return types.Uid_t(n) } // int munmap(void *addr, size_t length); func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 { if __ccgo_strace { trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int gettimeofday(struct timeval *tv, struct timezone *tz); func Xgettimeofday(t *TLS, tv, tz uintptr) int32 { if __ccgo_strace { trc("t=%v tz=%v, (%v:)", t, tz, origin(2)) } if tz != 0 { panic(todo("")) } var tvs unix.Timeval err := unix.Gettimeofday(&tvs) if err != nil { t.setErrno(err) return -1 } *(*unix.Timeval)(unsafe.Pointer(tv)) = tvs return 0 } // int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 { if __ccgo_strace { trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2)) } if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 { if __ccgo_strace { trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2)) } if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int ioctl(int fd, unsigned long request, ...); func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2)) } var argp uintptr if va != 0 { argp = VaUintptr(&va) } n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 { // if dmesgs { // dmesg("%v: fd %v: %v", origin(1), sockfd, err) // } t.setErrno(err) return -1 } return 0 } // int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 { if __ccgo_strace { trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2)) } n, err := unix.Select( int(nfds), (*unix.FdSet)(unsafe.Pointer(readfds)), (*unix.FdSet)(unsafe.Pointer(writefds)), (*unix.FdSet)(unsafe.Pointer(exceptfds)), (*unix.Timeval)(unsafe.Pointer(timeout)), ) if err != nil { t.setErrno(err) return -1 } return int32(n) } // int mkfifo(const char *pathname, mode_t mode); func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil { t.setErrno(err) return -1 } return 0 } // mode_t umask(mode_t mask); func Xumask(t *TLS, mask types.Mode_t) types.Mode_t { if __ccgo_strace { trc("t=%v mask=%v, (%v:)", t, mask, origin(2)) } n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0) return types.Mode_t(n) } // int execvp(const char *file, char *const argv[]); func Xexecvp(t *TLS, file, argv uintptr) int32 { if __ccgo_strace { trc("t=%v argv=%v, (%v:)", t, argv, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 { t.setErrno(err) return -1 } return 0 } // pid_t waitpid(pid_t pid, int *wstatus, int options); func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t { if __ccgo_strace { trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0) if err != 0 { t.setErrno(err) return -1 } return types.Pid_t(n) } // int uname(struct utsname *buf); func Xuname(t *TLS, buf uintptr) int32 { if __ccgo_strace { trc("t=%v buf=%v, (%v:)", t, buf, origin(2)) } if err := unix.Uname((*unix.Utsname)(unsafe.Pointer(buf))); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // ssize_t recv(int sockfd, void *buf, size_t len, int flags); func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0) if err != 0 { t.setErrno(err) return -1 } return types.Ssize_t(n) } // ssize_t send(int sockfd, const void *buf, size_t len, int flags); func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0) if err != 0 { t.setErrno(err) return -1 } return types.Ssize_t(n) } // int shutdown(int sockfd, int how); func Xshutdown(t *TLS, sockfd, how int32) int32 { if __ccgo_strace { trc("t=%v how=%v, (%v:)", t, how, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 { t.setErrno(err) return -1 } return 0 } // int socket(int domain, int type, int protocol); func Xsocket(t *TLS, domain, type1, protocol int32) int32 { if __ccgo_strace { trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2)) } n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol)) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen)) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 { t.setErrno(err) return -1 } return 0 } // int listen(int sockfd, int backlog); func Xlisten(t *TLS, sockfd, backlog int32) int32 { if __ccgo_strace { trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xgetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xsetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // uid_t getuid(void); func Xgetuid(t *TLS) types.Uid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return types.Uid_t(os.Getuid()) } // pid_t getpid(void); func Xgetpid(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return int32(os.Getpid()) } // int system(const char *command); func Xsystem(t *TLS, command uintptr) int32 { if __ccgo_strace { trc("t=%v command=%v, (%v:)", t, command, origin(2)) } s := GoString(command) if command == 0 { panic(todo("")) } cmd := exec.Command("sh", "-c", s) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { ps := err.(*exec.ExitError) return int32(ps.ExitCode()) } return 0 } // int setvbuf(FILE *stream, char *buf, int mode, size_t size); func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 { if __ccgo_strace { trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2)) } return 0 //TODO } // int raise(int sig); func Xraise(t *TLS, sig int32) int32 { if __ccgo_strace { trc("t=%v sig=%v, (%v:)", t, sig, origin(2)) } panic(todo("")) } // int backtrace(void **buffer, int size); func Xbacktrace(t *TLS, buf uintptr, size int32) int32 { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } panic(todo("")) } // void backtrace_symbols_fd(void *const *buffer, int size, int fd); func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) { if __ccgo_strace { trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2)) } panic(todo("")) } // int fileno(FILE *stream); func Xfileno(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } panic(todo("")) } func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscallErrno) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{}))) if p == 0 { panic("OOM") } *(*fts.FTSENT)(unsafe.Pointer(p)) = *newFtsent(t, info, path, stat, err) return p } func ftsentClose(t *TLS, p uintptr) { Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_path) Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_statp) } type ftstream struct { s []uintptr x int } func (f *ftstream) close(t *TLS) { for _, p := range f.s { ftsentClose(t, p) Xfree(t, p) } *f = ftstream{} } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { if __ccgo_strace { trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2)) } return Xfts64_open(t, path_argv, options, compar) } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { if __ccgo_strace { trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2)) } f := &ftstream{} var walk func(string) walk = func(path string) { var fi os.FileInfo var err error switch { case options&fts.FTS_LOGICAL != 0: fi, err = os.Stat(path) case options&fts.FTS_PHYSICAL != 0: fi, err = os.Lstat(path) default: panic(todo("")) } if err != nil { return } var statp *unix.Stat_t if options&fts.FTS_NOSTAT == 0 { var stat unix.Stat_t switch { case options&fts.FTS_LOGICAL != 0: if err := unix.Stat(path, &stat); err != nil { panic(todo("")) } case options&fts.FTS_PHYSICAL != 0: if err := unix.Lstat(path, &stat); err != nil { panic(todo("")) } default: panic(todo("")) } statp = &stat } out: switch { case fi.IsDir(): f.s = append(f.s, newCFtsent(t, fts.FTS_D, path, statp, 0)) g, err := os.Open(path) switch x := err.(type) { case nil: // ok case *os.PathError: f.s = append(f.s, newCFtsent(t, fts.FTS_DNR, path, statp, errno.EACCES)) break out default: panic(todo("%q: %v %T", path, x, x)) } names, err := g.Readdirnames(-1) g.Close() if err != nil { panic(todo("")) } for _, name := range names { walk(path + "/" + name) if f == nil { break out } } f.s = append(f.s, newCFtsent(t, fts.FTS_DP, path, statp, 0)) default: info := fts.FTS_F if fi.Mode()&os.ModeSymlink != 0 { info = fts.FTS_SL } switch { case statp != nil: f.s = append(f.s, newCFtsent(t, info, path, statp, 0)) case options&fts.FTS_NOSTAT != 0: f.s = append(f.s, newCFtsent(t, fts.FTS_NSOK, path, nil, 0)) default: panic(todo("")) } } } for { p := *(*uintptr)(unsafe.Pointer(path_argv)) if p == 0 { if f == nil { return 0 } if compar != 0 { panic(todo("")) } return addObject(f) } walk(GoString(p)) path_argv += unsafe.Sizeof(uintptr(0)) } } // FTSENT *fts_read(FTS *ftsp); func Xfts_read(t *TLS, ftsp uintptr) uintptr { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } return Xfts64_read(t, ftsp) } // FTSENT *fts_read(FTS *ftsp); func Xfts64_read(t *TLS, ftsp uintptr) uintptr { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } f := getObject(ftsp).(*ftstream) if f.x == len(f.s) { t.setErrno(0) return 0 } r := f.s[f.x] if e := (*fts.FTSENT)(unsafe.Pointer(r)).Ffts_errno; e != 0 { t.setErrno(e) } f.x++ return r } // int fts_close(FTS *ftsp); func Xfts_close(t *TLS, ftsp uintptr) int32 { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } return Xfts64_close(t, ftsp) } // int fts_close(FTS *ftsp); func Xfts64_close(t *TLS, ftsp uintptr) int32 { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } getObject(ftsp).(*ftstream).close(t) removeObject(ftsp) return 0 } // void tzset (void); func Xtzset(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } //TODO } var strerrorBuf [100]byte // char *strerror(int errnum); func Xstrerror(t *TLS, errnum int32) uintptr { if __ccgo_strace { trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2)) } if dmesgs { dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack()) } copy(strerrorBuf[:], fmt.Sprintf("strerror(%d)\x00", errnum)) return uintptr(unsafe.Pointer(&strerrorBuf[0])) } // void *dlopen(const char *filename, int flags); func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr { if __ccgo_strace { trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2)) } panic(todo("")) } // char *dlerror(void); func Xdlerror(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) } // int dlclose(void *handle); func Xdlclose(t *TLS, handle uintptr) int32 { if __ccgo_strace { trc("t=%v handle=%v, (%v:)", t, handle, origin(2)) } panic(todo("")) } // void *dlsym(void *handle, const char *symbol); func Xdlsym(t *TLS, handle, symbol uintptr) uintptr { if __ccgo_strace { trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2)) } panic(todo("")) } // void perror(const char *s); func Xperror(t *TLS, s uintptr) { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } panic(todo("")) } // int pclose(FILE *stream); func Xpclose(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } panic(todo("")) } var gai_strerrorBuf [100]byte // const char *gai_strerror(int errcode); func Xgai_strerror(t *TLS, errcode int32) uintptr { if __ccgo_strace { trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2)) } copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode)) return uintptr(unsafe.Pointer(&gai_strerrorBuf)) } // int tcgetattr(int fd, struct termios *termios_p); func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2)) } panic(todo("")) } // int tcsetattr(int fd, int optional_actions, const struct termios *termios_p); func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 { if __ccgo_strace { trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2)) } panic(todo("")) } // speed_t cfgetospeed(const struct termios *termios_p); func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t { if __ccgo_strace { trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2)) } panic(todo("")) } // int cfsetospeed(struct termios *termios_p, speed_t speed); func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 { if __ccgo_strace { trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2)) } panic(todo("")) } // int cfsetispeed(struct termios *termios_p, speed_t speed); func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 { if __ccgo_strace { trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2)) } panic(todo("")) } // pid_t fork(void); func Xfork(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } t.setErrno(errno.ENOSYS) return -1 } var emptyStr = [1]byte{} // char *setlocale(int category, const char *locale); func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr { if __ccgo_strace { trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2)) } return uintptr(unsafe.Pointer(&emptyStr)) //TODO } // char *nl_langinfo(nl_item item); func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr { if __ccgo_strace { trc("t=%v item=%v, (%v:)", t, item, origin(2)) } return uintptr(unsafe.Pointer(&emptyStr)) //TODO } // FILE *popen(const char *command, const char *type); func Xpopen(t *TLS, command, type1 uintptr) uintptr { if __ccgo_strace { trc("t=%v type1=%v, (%v:)", t, type1, origin(2)) } panic(todo("")) } // char *realpath(const char *path, char *resolved_path); func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr { if __ccgo_strace { trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2)) } s, err := filepath.EvalSymlinks(GoString(path)) if err != nil { if os.IsNotExist(err) { // if dmesgs { // dmesg("%v: %q: %v", origin(1), GoString(path), err) // } t.setErrno(errno.ENOENT) return 0 } panic(todo("", err)) } if resolved_path == 0 { panic(todo("")) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_netbsd_arm.go
vendor/modernc.org/libc/capi_netbsd_arm.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_C_ctype_tab_": {}, "_IO_putc": {}, "_ThreadRuneLocale": {}, "___errno_location": {}, "___runetype": {}, "__assert": {}, "__assert13": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_get_mb_cur_max": {}, "__errno": {}, "__errno_location": {}, "__error": {}, "__floatscan": {}, "__h_errno_location": {}, "__inet_aton": {}, "__inet_ntoa": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isthreaded": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__mb_sb_limit": {}, "__runes_for_locale": {}, "__sF": {}, "__shgetc": {}, "__shlim": {}, "__srget": {}, "__stderrp": {}, "__stdinp": {}, "__stdoutp": {}, "__swbuf": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__xuname": {}, "_ctype_tab_": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "_tolower_tab_": {}, "_toupper_tab_": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bswap16": {}, "bswap32": {}, "bswap64": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chflags": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostname": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "modf": {}, "munmap": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "qsort": {}, "raise": {}, "rand": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlen": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_linux_386.go
vendor/modernc.org/libc/capi_linux_386.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_IO_putc": {}, "___errno_location": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_b_loc": {}, "__ctype_get_mb_cur_max": {}, "__errno_location": {}, "__floatscan": {}, "__fpclassify": {}, "__fpclassifyf": {}, "__fpclassifyl": {}, "__fsmu8": {}, "__h_errno_location": {}, "__inet_aton": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lockfile": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__shgetc": {}, "__shlim": {}, "__strncasecmp_l": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__unlockfile": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fstatfs": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "ftruncate64": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostbyname_r": {}, "gethostname": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getrandom": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isupper": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbrtowc": {}, "mbsinit": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "mmap64": {}, "modf": {}, "mremap": {}, "munmap": {}, "nanf": {}, "nanosleep": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "posix_fadvise": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "pwrite": {}, "qsort": {}, "raise": {}, "rand": {}, "rand_r": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlcat": {}, "strlcpy": {}, "strlen": {}, "strncasecmp": {}, "strncat": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtok": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_copy": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vfscanf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "vsscanf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/mem_expvar.go
vendor/modernc.org/libc/mem_expvar.go
//go:build libc.memexpvar package libc import "expvar" func init() { // make sure to build with -tags=memory.counters to have the actual data accumulated in memory allocator expvar.Publish("memory.allocator", expvar.Func(func() interface{} { return MemStat() })) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/int128.go
vendor/modernc.org/libc/int128.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Some code is copied and adjusted from // https://github.com/lukechampine/uint128, the original LICENSE file // reproduced below in full as of 2021-01-19: /* The MIT License (MIT) Copyright (c) 2019 Luke Champine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package libc // import "modernc.org/libc" import ( mbits "math/bits" "modernc.org/mathutil" ) type Int128 mathutil.Int128 var ( int128Minus1 = Int128{-1, -1} int128Plus1 = Int128{Lo: 1} ) func Int128FromFloat32(n float32) Int128 { return Int128(mathutil.NewInt128FromFloat32(n)) } func Int128FromFloat64(n float64) Int128 { return Int128(mathutil.NewInt128FromFloat64(n)) } func Int128FromInt16(n int16) Int128 { return Int128(mathutil.NewInt128FromInt64(int64(n))) } func Int128FromInt32(n int32) Int128 { return Int128(mathutil.NewInt128FromInt64(int64(n))) } func Int128FromInt64(n int64) Int128 { return Int128(mathutil.NewInt128FromInt64(n)) } func Int128FromInt8(n int8) Int128 { return Int128(mathutil.NewInt128FromInt64(int64(n))) } func Int128FromUint16(n uint16) Int128 { return Int128(mathutil.NewInt128FromInt64(int64(n))) } func Int128FromUint32(n uint32) Int128 { return Int128(mathutil.NewInt128FromInt64(int64(n))) } func Int128FromUint64(n uint64) Int128 { return Int128(mathutil.NewInt128FromUint64(n)) } func Int128FromUint8(n uint8) Int128 { return Int128(mathutil.NewInt128FromInt64(int64(n))) } func Int128FromUint128(n Uint128) Int128 { return Int128{Lo: int64(n.Lo), Hi: int64(n.Hi)} } func (n *Int128) LValueDec() { *n = n.Add(int128Minus1) } func (n *Int128) LValueInc() { *n = n.Add(int128Plus1) } func (n *Int128) LValueShl(c int32) { *n = n.Shl(c) } func (n *Int128) LValueShr(c int32) { *n = n.Shr(c) } func (n Int128) And(v Int128) Int128 { return Int128{n.Lo & v.Lo, n.Hi & v.Hi} } func (n Int128) Cmp(y Int128) int { return mathutil.Int128(n).Cmp(mathutil.Int128(y)) } func (n Int128) Int16() int16 { return int16(n.Lo) } func (n Int128) Int32() int32 { return int32(n.Lo) } func (n Int128) Int64() int64 { return n.Lo } func (n Int128) Int8() int8 { return int8(n.Lo) } func (n Int128) Or(v Int128) Int128 { return Int128{n.Lo | v.Lo, n.Hi | v.Hi} } func (n Int128) Uint128() (r Uint128) { return Uint128{uint64(n.Lo), uint64(n.Hi)} } func (n Int128) Uint16() uint16 { return uint16(n.Lo) } func (n Int128) Uint32() uint32 { return uint32(n.Lo) } func (n Int128) Uint64() uint64 { return uint64(n.Lo) } func (n Int128) Uint8() uint8 { return uint8(n.Lo) } func (n Int128) Xor(v Int128) Int128 { return Int128{n.Lo ^ v.Lo, n.Hi ^ v.Hi} } func (n Int128) Neg() Int128 { n.Lo ^= -1 n.Hi ^= -1 return n.Add(int128Plus1) } func (n Int128) Float32() float32 { switch n.Hi { case 0: return float32(uint64(n.Lo)) case -1: return -float32(uint64(n.Lo)) } if n.Hi < 0 { n = n.Neg() return -float32(n.Hi)*(1<<64) + float32(uint64(n.Lo)) } return -float32(n.Hi)*(1<<64) + float32(uint64(n.Lo)) } func (n Int128) Float64() float64 { switch n.Hi { case 0: return float64(uint64(n.Lo)) case -1: return -float64(uint64(n.Lo)) } if n.Hi < 0 { n = n.Neg() return -float64(n.Hi)*(1<<64) + float64(uint64(n.Lo)) } return float64(n.Hi)*(1<<64) + float64(uint64(n.Lo)) } func (n Int128) Add(m Int128) (r Int128) { r.Lo = n.Lo + m.Lo r.Hi = n.Hi + m.Hi if uint64(r.Lo) < uint64(n.Lo) { r.Hi++ } return r } func (n Int128) Mul(m Int128) Int128 { hi, lo := mbits.Mul64(uint64(n.Lo), uint64(m.Lo)) _, p1 := mbits.Mul64(uint64(n.Hi), uint64(m.Lo)) _, p3 := mbits.Mul64(uint64(n.Lo), uint64(m.Hi)) hi, _ = mbits.Add64(hi, p1, 0) hi, _ = mbits.Add64(hi, p3, 0) return Int128{int64(lo), int64(hi)} } func (n Int128) Shl(c int32) (r Int128) { if c > 64 { r.Lo = 0 r.Hi = n.Lo << (c - 64) } else { r.Lo = n.Lo << c r.Hi = n.Hi<<c | n.Lo>>(64-c) } return r } func (n Int128) Shr(c int32) (r Int128) { if c > 64 { r.Lo = n.Hi >> (c - 64) switch { case n.Hi < 0: r.Hi = -1 default: r.Hi = 0 } } else { r.Lo = n.Lo>>c | n.Hi<<(64-c) r.Hi = n.Hi >> c } return r } type Uint128 mathutil.Uint128 func Uint128FromFloat32(n float32) Uint128 { return Uint128(mathutil.NewUint128FromFloat32(n)) } func Uint128FromFloat64(n float64) Uint128 { return Uint128(mathutil.NewUint128FromFloat64(n)) } func Uint128FromInt128(n Int128) Uint128 { return Uint128{Lo: uint64(n.Lo), Hi: uint64(n.Hi)} } func Uint128FromInt16(n int16) Uint128 { return Uint128FromInt64(int64(n)) } func Uint128FromInt32(n int32) Uint128 { return Uint128FromInt64(int64(n)) } func Uint128FromInt8(n int8) Uint128 { return Uint128FromInt64(int64(n)) } func Uint128FromUint16(n uint16) Uint128 { return Uint128{Lo: uint64(n)} } func Uint128FromUint32(n uint32) Uint128 { return Uint128{Lo: uint64(n)} } func Uint128FromUint64(n uint64) Uint128 { return Uint128{Lo: n} } func Uint128FromUint8(n uint8) Uint128 { return Uint128{Lo: uint64(n)} } func Uint128FromInt64(n int64) (r Uint128) { r.Lo = uint64(n) if n < 0 { r.Hi = ^uint64(0) } return r } func (n *Uint128) LValueShl(c int32) { *n = n.Shl(c) } func (n *Uint128) LValueShr(c int32) { *n = n.Shr(c) } func (n Uint128) And(m Uint128) Uint128 { return Uint128{n.Lo & m.Lo, n.Hi & m.Hi} } func (n Uint128) Int128() Int128 { return Int128{int64(n.Lo), int64(n.Hi)} } func (n Uint128) Int16() int16 { return int16(n.Lo) } func (n Uint128) Int32() int32 { return int32(n.Lo) } func (n Uint128) Int64() int64 { return int64(n.Lo) } func (n Uint128) Int8() int8 { return int8(n.Lo) } func (n Uint128) Or(m Uint128) Uint128 { return Uint128{n.Lo | m.Lo, n.Hi | m.Hi} } func (n Uint128) Uint16() uint16 { return uint16(n.Lo) } func (n Uint128) Uint32() uint32 { return uint32(n.Lo) } func (n Uint128) Uint64() uint64 { return n.Lo } func (n Uint128) Uint8() uint8 { return uint8(n.Lo) } func (n Uint128) Xor(m Uint128) Uint128 { return Uint128{n.Lo ^ m.Lo, n.Hi ^ m.Hi} } func (n Uint128) Add(m Uint128) (r Uint128) { var carry uint64 r.Lo, carry = mbits.Add64(n.Lo, m.Lo, 0) r.Hi, _ = mbits.Add64(n.Hi, m.Hi, carry) return r } func (n Uint128) Mul(m Uint128) Uint128 { hi, lo := mbits.Mul64(n.Lo, m.Lo) _, p1 := mbits.Mul64(n.Hi, m.Lo) _, p3 := mbits.Mul64(n.Lo, m.Hi) hi, _ = mbits.Add64(hi, p1, 0) hi, _ = mbits.Add64(hi, p3, 0) return Uint128{lo, hi} } func (n Uint128) Shr(c int32) (r Uint128) { if c > 64 { r.Lo = n.Hi >> (c - 64) r.Hi = 0 } else { r.Lo = n.Lo>>c | n.Hi<<(64-c) r.Hi = n.Hi >> c } return r } func (n Uint128) mulOvf(m Uint128) (_ Uint128, ovf bool) { hi, lo := mbits.Mul64(n.Lo, m.Lo) p0, p1 := mbits.Mul64(n.Hi, m.Lo) p2, p3 := mbits.Mul64(n.Lo, m.Hi) hi, c0 := mbits.Add64(hi, p1, 0) hi, c1 := mbits.Add64(hi, p3, 0) ovf = p0 != 0 || p2 != 0 || c0 != 0 || c1 != 0 return Uint128{lo, hi}, ovf } func (n Uint128) quoRem(m Uint128) (q, r Uint128) { if m.Hi == 0 { var r64 uint64 q, r64 = n.quoRem64(m.Lo) r = Uint128FromUint64(r64) } else { // generate a "trial quotient," guaranteed to be within 1 of the actual // quotient, then adjust. nz := mbits.LeadingZeros64(m.Hi) v1 := m.Shl(int32(nz)) u1 := n.Shr(1) tq, _ := mbits.Div64(u1.Hi, u1.Lo, v1.Hi) tq >>= 63 - nz if tq != 0 { tq-- } q = Uint128FromUint64(tq) // calculate remainder using trial quotient, then adjust if remainder is // greater than divisor r = n.Sub(m.mul64(tq)) if r.Cmp(m) >= 0 { q = q.add64(1) r = r.Sub(m) } } return } func (n Uint128) quoRem64(m uint64) (q Uint128, r uint64) { if n.Hi < m { q.Lo, r = mbits.Div64(n.Hi, n.Lo, m) } else { q.Hi, r = mbits.Div64(0, n.Hi, m) q.Lo, r = mbits.Div64(r, n.Lo, m) } return } func (n Uint128) Div(m Uint128) (r Uint128) { r, _ = n.quoRem(m) return r } func (n Uint128) Shl(c int32) (r Uint128) { if c > 64 { r.Lo = 0 r.Hi = n.Lo << (c - 64) } else { r.Lo = n.Lo << c r.Hi = n.Hi<<c | n.Lo>>(64-c) } return } func (n Uint128) Sub(m Uint128) Uint128 { lo, borrow := mbits.Sub64(n.Lo, m.Lo, 0) hi, _ := mbits.Sub64(n.Hi, m.Hi, borrow) return Uint128{lo, hi} } func (n Uint128) mul64(m uint64) Uint128 { hi, lo := mbits.Mul64(n.Lo, m) _, p1 := mbits.Mul64(n.Hi, m) hi, _ = mbits.Add64(hi, p1, 0) return Uint128{lo, hi} } func (n Uint128) Cmp(m Uint128) int { if n == m { return 0 } else if n.Hi < m.Hi || (n.Hi == m.Hi && n.Lo < m.Lo) { return -1 } else { return 1 } } func (n Uint128) add64(m uint64) Uint128 { lo, carry := mbits.Add64(n.Lo, m, 0) hi, _ := mbits.Add64(n.Hi, 0, carry) return Uint128{lo, hi} } func (n Uint128) Float32() float32 { if n.Hi == 0 { return float32(n.Lo) } return float32(n.Hi)*(1<<64) + float32(n.Lo) } func (n Uint128) Float64() float64 { if n.Hi == 0 { return float64(n.Lo) } return float64(n.Hi)*(1<<64) + float64(n.Lo) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_freebsd_arm.go
vendor/modernc.org/libc/libc_freebsd_arm.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "strings" "unsafe" "golang.org/x/sys/unix" "modernc.org/libc/fcntl" "modernc.org/libc/fts" "modernc.org/libc/sys/types" "modernc.org/libc/time" "modernc.org/libc/utime" ) type ( long = int32 ulong = uint32 ) // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { if __ccgo_strace { trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 { t.setErrno(err) return -1 } return 0 } // FILE *fopen64(const char *pathname, const char *mode); func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { if __ccgo_strace { trc("t=%v mode=%v, (%v:)", t, mode, origin(2)) } m := strings.ReplaceAll(GoString(mode), "b", "") var flags int switch m { case "r": flags = fcntl.O_RDONLY case "r+": flags = fcntl.O_RDWR case "w": flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC case "w+": flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC case "a": flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND case "a+": flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND default: panic(m) } fd, err := unix.Open(GoString(pathname), int(flags), 0666) if err != nil { if dmesgs { dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) } t.setErrno(err) return 0 } if dmesgs { dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) } if p := newFile(t, int32(fd)); p != 0 { return p } panic("OOM") } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int stat(const char *pathname, struct stat *statbuf); func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int mkdir(const char *path, mode_t mode); func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2)) } if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(path)) } return 0 } // int access(const char *pathname, int mode); func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) } return 0 } // int unlink(const char *pathname); func Xunlink(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } if err := unix.Unlink(GoString(pathname)); err != nil { if dmesgs { dmesg("%v: %q: %v", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2)) } var n int var err error switch { case buf == 0 || bufsize == 0: n, err = unix.Readlink(GoString(path), nil) default: n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) } if err != nil { if dmesgs { dmesg("%v: %v FAIL", err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok") } return types.Ssize_t(n) } // int symlink(const char *target, const char *linkpath); func Xsymlink(t *TLS, target, linkpath uintptr) int32 { if __ccgo_strace { trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2)) } if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int chmod(const char *pathname, mode_t mode) func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) } return 0 } // time_t time(time_t *tloc); func Xtime(t *TLS, tloc uintptr) time.Time_t { if __ccgo_strace { trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2)) } panic(todo("")) // n := time.Now().UTC().Unix() // if tloc != 0 { // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) // } // return types.Time_t(n) } // int utimes(const char *filename, const struct timeval times[2]); func Xutimes(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } var a []unix.Timeval if times != 0 { a = make([]unix.Timeval, 2) a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) } if err := unix.Utimes(GoString(filename), a); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int fstat(int fd, struct stat *statbuf); func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: fd %d: ok", origin(1), fd) } return 0 } // off64_t lseek64(int fd, off64_t offset, int whence); func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } n, err := unix.Seek(int(fd), int64(offset), int(whence)) if err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return types.Off_t(n) } func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } var arg uintptr if args != 0 { arg = *(*uintptr)(unsafe.Pointer(args)) } n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg) if err != 0 { if dmesgs { dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n) } return int32(n) } // int rename(const char *oldpath, const char *newpath); func Xrename(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int mknod(const char *pathname, mode_t mode, dev_t dev); func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int utime(const char *filename, const struct utimbuf *times); func Xutime(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } var a []unix.Timeval if times != 0 { a = make([]unix.Timeval, 2) a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime } if err := unix.Utimes(GoString(filename), a); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int chown(const char *pathname, uid_t owner, gid_t group); func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { t.setErrno(err) return -1 } return 0 } // int link(const char *oldpath, const char *newpath); func Xlink(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int dup2(int oldfd, int newfd); func Xdup2(t *TLS, oldfd, newfd int32) int32 { if __ccgo_strace { trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // unsigned int alarm(unsigned int seconds); func Xalarm(t *TLS, seconds uint32) uint32 { if __ccgo_strace { trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) // if err != 0 { // panic(todo("")) // } // return uint32(n) } func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */ if __ccgo_strace { trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2)) } panic(todo("")) //TODO bp := tls.Alloc(347) //TODO defer tls.Free(347) //TODO // var ptr [78]int8 at bp, 78 //TODO // var buf [256]int8 at bp+78, 256 //TODO // var num [13]int8 at bp+334, 13 //TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) //TODO var a uintptr //TODO var scopeid uint32 //TODO switch af { //TODO case 2: //TODO a = (sa1 + 4 /* &.sin_addr */) //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) { //TODO return -6 //TODO } //TODO mkptr4(tls, bp /* &ptr[0] */, a) //TODO scopeid = uint32(0) //TODO break //TODO case 10: //TODO a = (sa1 + 8 /* &.sin6_addr */) //TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) { //TODO return -6 //TODO } //TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 { //TODO mkptr6(tls, bp /* &ptr[0] */, a) //TODO } else { //TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12))) //TODO } //TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id //TODO break //TODO default: //TODO return -6 //TODO } //TODO if (node != 0) && (nodelen != 0) { //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) //TODO if !((flags & 0x01) != 0) { //TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af) //TODO } //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) { //TODO Xabort(tls) //TODO- //TODO // unsigned char query[18+PTR_MAX], reply[512]; //TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, //TODO // 0, 0, 0, query, sizeof query); //TODO // query[3] = 0; /* don't need AD flag */ //TODO // int rlen = __res_send(query, qlen, reply, sizeof reply); //TODO // buf[0] = 0; //TODO // if (rlen > 0) //TODO // __dns_parse(reply, rlen, dns_parse_callback, buf); //TODO } //TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) { //TODO if (flags & 0x08) != 0 { //TODO return -2 //TODO } //TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{}))) //TODO if scopeid != 0 { //TODO Xabort(tls) //TODO- //TODO // char *p = 0, tmp[IF_NAMESIZE+1]; //TODO // if (!(flags & NI_NUMERICSCOPE) && //TODO // (IN6_IS_ADDR_LINKLOCAL(a) || //TODO // IN6_IS_ADDR_MC_LINKLOCAL(a))) //TODO // p = if_indextoname(scopeid, tmp+1); //TODO // if (!p) //TODO // p = itoa(num, scopeid); //TODO // *--p = '%'; //TODO // strcat(buf, p); //TODO } //TODO } //TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) { //TODO return -12 //TODO } //TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */) //TODO } //TODO if (serv != 0) && (servlen != 0) { //TODO var p uintptr = bp + 78 /* buf */ //TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) //TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0) //TODO if !((flags & 0x02) != 0) { //TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10)) //TODO } //TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { //TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port)) //TODO } //TODO if Xstrlen(tls, p) >= size_t(servlen) { //TODO return -12 //TODO } //TODO Xstrcpy(tls, serv, p) //TODO } //TODO return 0 } func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */ if __ccgo_strace { trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2)) } panic(todo("")) //TODO bp := tls.Alloc(28) //TODO defer tls.Free(28) //TODO //TODO union { //TODO //TODO struct sockaddr_in sin; //TODO //TODO struct sockaddr_in6 sin6; //TODO //TODO } sa = { .sin.sin_family = af }; //TODO *(*struct { //TODO sin sockaddr_in //TODO _ [12]byte //TODO })(unsafe.Pointer(bp /* sa1 */)) = struct { //TODO sin sockaddr_in //TODO _ [12]byte //TODO }{} //TODO- //TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO- //TODO var sl socklen_t //TODO if af == 10 { //TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{})) //TODO } else { //TODO sl = uint32(unsafe.Sizeof(sockaddr_in{})) //TODO } //TODO var i int32 //TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) //TODO // Load address argument into sockaddr structure //TODO if (af == 10) && (l == socklen_t(16)) { //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16)) //TODO } else if (af == 2) && (l == socklen_t(4)) { //TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4)) //TODO } else { //TODO *(*int32)(unsafe.Pointer(err)) = 3 //TODO return 22 //TODO } //TODO // Align buffer and check for space for pointers and ip address //TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))) //TODO if !(i != 0) { //TODO i = int32(unsafe.Sizeof(uintptr(0))) //TODO } //TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) { //TODO return 34 //TODO } //TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i))) //TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) //TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) //TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf //TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))) //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf //TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) //TODO buf += uintptr(l) //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf //TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) //TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { //TODO case -3: //TODO *(*int32)(unsafe.Pointer(err)) = 2 //TODO return 11 //TODO case -12: //TODO return 34 //TODO default: //TODO fallthrough //TODO case -10: //TODO fallthrough //TODO case -11: //TODO fallthrough //TODO case -4: //TODO *(*int32)(unsafe.Pointer(err)) = 3 //TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls))) //TODO case 0: //TODO break //TODO } //TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af //TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l) //TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) //TODO *(*uintptr)(unsafe.Pointer(res)) = h //TODO return 0 } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { t.setErrno(err) return -1 } return 0 } func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscallErrno) (r *fts.FTSENT) { var statp uintptr if stat != nil { statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{}))) if statp == 0 { panic("OOM") } *(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat } csp, errx := CString(path) if errx != nil { panic("OOM") } return &fts.FTSENT{ Ffts_info: int32(info), Ffts_path: csp, Ffts_pathlen: uint32(len(path)), Ffts_statp: statp, Ffts_errno: int32(err), } } // DIR *opendir(const char *name); func Xopendir(t *TLS, name uintptr) uintptr { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{}))) if p == 0 { panic("OOM") } fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0)) if fd < 0 { if dmesgs { dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd) } Xfree(t, p) return 0 } if dmesgs { dmesg("%v: ok", origin(1)) } (*darwinDir)(unsafe.Pointer(p)).fd = fd (*darwinDir)(unsafe.Pointer(p)).h = 0 (*darwinDir)(unsafe.Pointer(p)).l = 0 (*darwinDir)(unsafe.Pointer(p)).eof = false return p } // int chflags(const char *path, u_int flags); func Xchflags(t *TLS, path uintptr, flags uint32) int32 { if __ccgo_strace { trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2)) } if err := unix.Chflags(GoString(path), int(flags)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_darwin_amd64.go
vendor/modernc.org/libc/libc_darwin_amd64.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "strings" "time" "unsafe" "golang.org/x/sys/unix" "modernc.org/libc/fcntl" "modernc.org/libc/signal" "modernc.org/libc/stdio" "modernc.org/libc/sys/types" "modernc.org/libc/utime" ) // #define FE_DOWNWARD 0x0400 // #define FE_UPWARD 0x0800 const FE_DOWNWARD = 0x0400 const FE_UPWARD = 0x0800 // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { if __ccgo_strace { trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2)) } var kact, koldact uintptr if act != 0 { sz := int(unsafe.Sizeof(signal.X__sigaction{})) kact = t.Alloc(sz) defer t.Free(sz) (*signal.X__sigaction)(unsafe.Pointer(kact)).F__sigaction_u.F__sa_handler = (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_u.F__sa_handler (*signal.X__sigaction)(unsafe.Pointer(kact)).Fsa_flags = (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags Xmemcpy(t, kact+unsafe.Offsetof(signal.X__sigaction{}.Fsa_mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(signal.Sigset_t(0)))) } if oldact != 0 { panic(todo("")) } if _, _, err := unix.Syscall6(unix.SYS_SIGACTION, uintptr(signum), kact, koldact, unsafe.Sizeof(signal.Sigset_t(0)), 0, 0); err != 0 { t.setErrno(err) return -1 } if oldact != 0 { panic(todo("")) } return 0 } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) defer func() { trc("-> %v", r) }() } var err error var p uintptr var i int switch cmd { case fcntl.F_GETLK, fcntl.F_SETLK: p = *(*uintptr)(unsafe.Pointer(args)) err = unix.FcntlFlock(uintptr(fd), int(cmd), (*unix.Flock_t)(unsafe.Pointer(p))) case fcntl.F_GETFL, fcntl.F_FULLFSYNC: i, err = unix.FcntlInt(uintptr(fd), int(cmd), 0) r = int32(i) case fcntl.F_SETFD, fcntl.F_SETFL: arg := *(*int32)(unsafe.Pointer(args)) _, err = unix.FcntlInt(uintptr(fd), int(cmd), int(arg)) default: panic(todo("%v: %v %v", origin(1), fd, cmd)) } if err != nil { if dmesgs { dmesg("%v: fd %v cmd %v p %#x: %v FAIL", origin(1), fcntlCmdStr(fd), cmd, p, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d %s %#x: ok", origin(1), fd, fcntlCmdStr(cmd), p) } return r } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int stat(const char *pathname, struct stat *statbuf); func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int fstatfs(int fd, struct statfs *buf); func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v buf=%v, (%v:)", t, fd, buf, origin(2)) } if err := unix.Fstatfs(int(fd), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil { if dmesgs { dmesg("%v: %v: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %v: ok", origin(1), fd) } return 0 } // int statfs(const char *path, struct statfs *buf); func Xstatfs(t *TLS, path uintptr, buf uintptr) int32 { if __ccgo_strace { trc("t=%v path=%v buf=%v, (%v:)", t, path, buf, origin(2)) } if err := unix.Statfs(GoString(path), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(path)) } return 0 } // int fstat(int fd, struct stat *statbuf); func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: fd %d: ok", origin(1), fd) } return 0 } // off64_t lseek64(int fd, off64_t offset, int whence); func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } n, err := unix.Seek(int(fd), int64(offset), int(whence)) if err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return types.Off_t(n) } // int utime(const char *filename, const struct utimbuf *times); func Xutime(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } var a []unix.Timeval if times != 0 { a = make([]unix.Timeval, 2) a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime } if err := unix.Utimes(GoString(filename), a); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // unsigned int alarm(unsigned int seconds); func Xalarm(t *TLS, seconds uint32) uint32 { if __ccgo_strace { trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) // if err != 0 { // panic(todo("")) // } // return uint32(n) } // time_t time(time_t *tloc); func Xtime(t *TLS, tloc uintptr) types.Time_t { if __ccgo_strace { trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2)) } n := time.Now().UTC().Unix() if tloc != 0 { *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) } return types.Time_t(n) } // // int getrlimit(int resource, struct rlimit *rlim); // func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { // if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 // } // int mkdir(const char *path, mode_t mode); func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2)) } if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(path)) } return 0 } // int symlink(const char *target, const char *linkpath); func Xsymlink(t *TLS, target, linkpath uintptr) int32 { if __ccgo_strace { trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2)) } if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int chmod(const char *pathname, mode_t mode) func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) } return 0 } // int utimes(const char *filename, const struct timeval times[2]); func Xutimes(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } var a []unix.Timeval if times != 0 { a = make([]unix.Timeval, 2) a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) } if err := unix.Utimes(GoString(filename), a); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int unlink(const char *pathname); func Xunlink(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } if err := unix.Unlink(GoString(pathname)); err != nil { if dmesgs { dmesg("%v: %q: %v", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int access(const char *pathname, int mode); func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) } return 0 } // int rename(const char *oldpath, const char *newpath); func Xrename(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int mknod(const char *pathname, mode_t mode, dev_t dev); func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int chown(const char *pathname, uid_t owner, gid_t group); func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int link(const char *oldpath, const char *newpath); func Xlink(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int dup2(int oldfd, int newfd); func Xdup2(t *TLS, oldfd, newfd int32) int32 { if __ccgo_strace { trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2)) } n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2)) } var n int var err error switch { case buf == 0 || bufsize == 0: n, err = unix.Readlink(GoString(path), nil) default: n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) } if err != nil { if dmesgs { dmesg("%v: %v FAIL", err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok") } return types.Ssize_t(n) } // FILE *fopen64(const char *pathname, const char *mode); func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { if __ccgo_strace { trc("t=%v mode=%v, (%v:)", t, mode, origin(2)) } m := strings.ReplaceAll(GoString(mode), "b", "") var flags int switch m { case "r": flags = fcntl.O_RDONLY case "r+": flags = fcntl.O_RDWR case "w": flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC case "w+": flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC case "a": flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND case "a+": flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND default: panic(m) } fd, err := unix.Open(GoString(pathname), int(flags), 0666) if err != nil { if dmesgs { dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) } t.setErrno(err) return 0 } if dmesgs { dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) } if p := newFile(t, int32(fd)); p != 0 { return p } panic("OOM") } func Xrewinddir(tls *TLS, f uintptr) { if __ccgo_strace { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) } Xfseek(tls, f, 0, stdio.SEEK_SET) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/rtl.go
vendor/modernc.org/libc/rtl.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm) package libc // import "modernc.org/libc" import ( "math" "reflect" "sync/atomic" "unsafe" ) // VaList fills a varargs list at p with args and returns p. The list must // have been allocated by caller and it must not be in Go managed memory, ie. // it must be pinned. Caller is responsible for freeing the list. // // This function supports code generated by ccgo/v4. // // Note: The C translated to Go varargs ABI alignment for all types is 8 on all // architectures. func VaList(p uintptr, args ...interface{}) (r uintptr) { if p&7 != 0 { panic("internal error") } r = p for _, v := range args { switch x := v.(type) { case int: *(*int64)(unsafe.Pointer(p)) = int64(x) case int32: *(*int64)(unsafe.Pointer(p)) = int64(x) case int64: *(*int64)(unsafe.Pointer(p)) = x case uint: *(*uint64)(unsafe.Pointer(p)) = uint64(x) case uint16: *(*uint64)(unsafe.Pointer(p)) = uint64(x) case uint32: *(*uint64)(unsafe.Pointer(p)) = uint64(x) case uint64: *(*uint64)(unsafe.Pointer(p)) = x case float64: *(*float64)(unsafe.Pointer(p)) = x case uintptr: *(*uintptr)(unsafe.Pointer(p)) = x default: sz := reflect.TypeOf(v).Size() copy(unsafe.Slice((*byte)(unsafe.Pointer(p)), sz), unsafe.Slice((*byte)(unsafe.Pointer((*[2]uintptr)(unsafe.Pointer(&v))[1])), sz)) p += roundup(sz, 8) continue } p += 8 } return r } // Bool returns v as a non-constant boolean value. func Bool(v bool) bool { return v } func Bool32(b bool) int32 { if b { return 1 } return 0 } func roundup(n, to uintptr) uintptr { if r := n % to; r != 0 { return n + to - r } return n } func VaOther(app *uintptr, sz uint64) (r uintptr) { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } r = ap ap = roundup(ap+uintptr(sz), 8) *(*uintptr)(unsafe.Pointer(app)) = ap return r } func VaInt32(app *uintptr) int32 { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := int32(*(*int64)(unsafe.Pointer(ap))) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return v } func VaUint32(app *uintptr) uint32 { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := uint32(*(*uint64)(unsafe.Pointer(ap))) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return v } func VaInt64(app *uintptr) int64 { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := *(*int64)(unsafe.Pointer(ap)) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return v } func VaUint64(app *uintptr) uint64 { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := *(*uint64)(unsafe.Pointer(ap)) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return v } func VaFloat32(app *uintptr) float32 { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := *(*float64)(unsafe.Pointer(ap)) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return float32(v) } func VaFloat64(app *uintptr) float64 { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := *(*float64)(unsafe.Pointer(ap)) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return v } func VaUintptr(app *uintptr) uintptr { ap := *(*uintptr)(unsafe.Pointer(app)) if ap == 0 { return 0 } ap = roundup(ap, 8) v := *(*uintptr)(unsafe.Pointer(ap)) ap += 8 *(*uintptr)(unsafe.Pointer(app)) = ap return v } func AtomicStoreNUint8(ptr uintptr, val uint8, memorder int32) { a_store_8(ptr, int8(val)) } func AtomicStorePInt8(addr uintptr, val int8) int8 { a_store_8(addr, val) return val } func AtomicStorePUint8(addr uintptr, val byte) byte { a_store_8(addr, int8(val)) return val } func AtomicStorePInt32(addr uintptr, val int32) int32 { atomic.StoreInt32((*int32)(unsafe.Pointer(addr)), val) return val } func AtomicStorePInt64(addr uintptr, val int64) int64 { atomic.StoreInt64((*int64)(unsafe.Pointer(addr)), val) return val } func AtomicStorePUint32(addr uintptr, val uint32) uint32 { atomic.StoreUint32((*uint32)(unsafe.Pointer(addr)), val) return val } func AtomicStorePUint64(addr uintptr, val uint64) uint64 { atomic.StoreUint64((*uint64)(unsafe.Pointer(addr)), val) return val } func AtomicStorePUintptr(addr uintptr, val uintptr) uintptr { atomic.StoreUintptr((*uintptr)(unsafe.Pointer(addr)), val) return val } func AtomicStorePFloat32(addr uintptr, val float32) float32 { atomic.StoreUint32((*uint32)(unsafe.Pointer(addr)), math.Float32bits(val)) return val } func AtomicStorePFloat64(addr uintptr, val float64) float64 { atomic.StoreUint64((*uint64)(unsafe.Pointer(addr)), math.Float64bits(val)) return val } func AtomicLoadPInt8(addr uintptr) (val int8) { return a_load_8(addr) } func AtomicLoadPInt16(addr uintptr) (val int16) { return a_load_16(addr) } func AtomicLoadPInt32(addr uintptr) (val int32) { return atomic.LoadInt32((*int32)(unsafe.Pointer(addr))) } func AtomicLoadPInt64(addr uintptr) (val int64) { return atomic.LoadInt64((*int64)(unsafe.Pointer(addr))) } func AtomicLoadPUint8(addr uintptr) byte { return byte(a_load_8(addr)) } func AtomicLoadPUint16(addr uintptr) uint16 { return uint16(a_load_16(addr)) } func AtomicLoadPUint32(addr uintptr) (val uint32) { return atomic.LoadUint32((*uint32)(unsafe.Pointer(addr))) } func AtomicLoadPUint64(addr uintptr) (val uint64) { return atomic.LoadUint64((*uint64)(unsafe.Pointer(addr))) } func AtomicLoadPUintptr(addr uintptr) (val uintptr) { return atomic.LoadUintptr((*uintptr)(unsafe.Pointer(addr))) } func AtomicLoadPFloat32(addr uintptr) (val float32) { return math.Float32frombits(atomic.LoadUint32((*uint32)(unsafe.Pointer(addr)))) } func AtomicLoadPFloat64(addr uintptr) (val float64) { return math.Float64frombits(atomic.LoadUint64((*uint64)(unsafe.Pointer(addr)))) } func AtomicStoreNUint16(ptr uintptr, val uint16, memorder int32) { a_store_16(ptr, val) } func AtomicStoreNInt32(ptr uintptr, val int32, memorder int32) { atomic.StoreInt32((*int32)(unsafe.Pointer(ptr)), val) } func AtomicStoreNInt64(ptr uintptr, val int64, memorder int32) { atomic.StoreInt64((*int64)(unsafe.Pointer(ptr)), val) } func AtomicStoreNUint32(ptr uintptr, val uint32, memorder int32) { atomic.StoreUint32((*uint32)(unsafe.Pointer(ptr)), val) } func AtomicStoreNUint64(ptr uintptr, val uint64, memorder int32) { atomic.StoreUint64((*uint64)(unsafe.Pointer(ptr)), val) } func AtomicStoreNUintptr(ptr uintptr, val uintptr, memorder int32) { atomic.StoreUintptr((*uintptr)(unsafe.Pointer(ptr)), val) } func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 { return byte(a_load_8(ptr)) } func AtomicLoadNUint16(ptr uintptr, memorder int32) uint16 { return uint16(a_load_16(ptr)) } func AtomicLoadNInt32(ptr uintptr, memorder int32) int32 { return atomic.LoadInt32((*int32)(unsafe.Pointer(ptr))) } func AtomicLoadNInt64(ptr uintptr, memorder int32) int64 { return atomic.LoadInt64((*int64)(unsafe.Pointer(ptr))) } func AtomicLoadNUint32(ptr uintptr, memorder int32) uint32 { return atomic.LoadUint32((*uint32)(unsafe.Pointer(ptr))) } func AtomicLoadNUint64(ptr uintptr, memorder int32) uint64 { return atomic.LoadUint64((*uint64)(unsafe.Pointer(ptr))) } func AtomicLoadNUintptr(ptr uintptr, memorder int32) uintptr { return atomic.LoadUintptr((*uintptr)(unsafe.Pointer(ptr))) } func AssignInt8(p *int8, v int8) int8 { *p = v; return v } func AssignInt16(p *int16, v int16) int16 { *p = v; return v } func AssignInt32(p *int32, v int32) int32 { *p = v; return v } func AssignInt64(p *int64, v int64) int64 { *p = v; return v } func AssignUint8(p *uint8, v uint8) uint8 { *p = v; return v } func AssignUint16(p *uint16, v uint16) uint16 { *p = v; return v } func AssignUint32(p *uint32, v uint32) uint32 { *p = v; return v } func AssignUint64(p *uint64, v uint64) uint64 { *p = v; return v } func AssignFloat32(p *float32, v float32) float32 { *p = v; return v } func AssignFloat64(p *float64, v float64) float64 { *p = v; return v } func AssignComplex64(p *complex64, v complex64) complex64 { *p = v; return v } func AssignComplex128(p *complex128, v complex128) complex128 { *p = v; return v } func AssignUintptr(p *uintptr, v uintptr) uintptr { *p = v; return v } func AssignPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) = v; return v } func AssignPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) = v; return v } func AssignPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) = v; return v } func AssignPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) = v; return v } func AssignPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) = v; return v } func AssignPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) = v; return v } func AssignPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) = v; return v } func AssignPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) = v return v } func AssignPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) = v return v } func AssignPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) = v; return v } func AssignMulInt8(p *int8, v int8) int8 { *p *= v; return *p } func AssignMulInt16(p *int16, v int16) int16 { *p *= v; return *p } func AssignMulInt32(p *int32, v int32) int32 { *p *= v; return *p } func AssignMulInt64(p *int64, v int64) int64 { *p *= v; return *p } func AssignMulUint8(p *uint8, v uint8) uint8 { *p *= v; return *p } func AssignMulUint16(p *uint16, v uint16) uint16 { *p *= v; return *p } func AssignMulUint32(p *uint32, v uint32) uint32 { *p *= v; return *p } func AssignMulUint64(p *uint64, v uint64) uint64 { *p *= v; return *p } func AssignMulFloat32(p *float32, v float32) float32 { *p *= v; return *p } func AssignMulFloat64(p *float64, v float64) float64 { *p *= v; return *p } func AssignMulComplex64(p *complex64, v complex64) complex64 { *p *= v; return *p } func AssignMulComplex128(p *complex128, v complex128) complex128 { *p *= v; return *p } func AssignMulUintptr(p *uintptr, v uintptr) uintptr { *p *= v; return *p } func AssignDivInt8(p *int8, v int8) int8 { *p /= v; return *p } func AssignDivInt16(p *int16, v int16) int16 { *p /= v; return *p } func AssignDivInt32(p *int32, v int32) int32 { *p /= v; return *p } func AssignDivInt64(p *int64, v int64) int64 { *p /= v; return *p } func AssignDivUint8(p *uint8, v uint8) uint8 { *p /= v; return *p } func AssignDivUint16(p *uint16, v uint16) uint16 { *p /= v; return *p } func AssignDivUint32(p *uint32, v uint32) uint32 { *p /= v; return *p } func AssignDivUint64(p *uint64, v uint64) uint64 { *p /= v; return *p } func AssignDivFloat32(p *float32, v float32) float32 { *p /= v; return *p } func AssignDivFloat64(p *float64, v float64) float64 { *p /= v; return *p } func AssignDivComplex64(p *complex64, v complex64) complex64 { *p /= v; return *p } func AssignDivComplex128(p *complex128, v complex128) complex128 { *p /= v; return *p } func AssignDivUintptr(p *uintptr, v uintptr) uintptr { *p /= v; return *p } func AssignRemInt8(p *int8, v int8) int8 { *p %= v; return *p } func AssignRemInt16(p *int16, v int16) int16 { *p %= v; return *p } func AssignRemInt32(p *int32, v int32) int32 { *p %= v; return *p } func AssignRemInt64(p *int64, v int64) int64 { *p %= v; return *p } func AssignRemUint8(p *uint8, v uint8) uint8 { *p %= v; return *p } func AssignRemUint16(p *uint16, v uint16) uint16 { *p %= v; return *p } func AssignRemUint32(p *uint32, v uint32) uint32 { *p %= v; return *p } func AssignRemUint64(p *uint64, v uint64) uint64 { *p %= v; return *p } func AssignRemUintptr(p *uintptr, v uintptr) uintptr { *p %= v; return *p } func AssignAddInt8(p *int8, v int8) int8 { *p += v; return *p } func AssignAddInt16(p *int16, v int16) int16 { *p += v; return *p } func AssignAddInt32(p *int32, v int32) int32 { *p += v; return *p } func AssignAddInt64(p *int64, v int64) int64 { *p += v; return *p } func AssignAddUint8(p *uint8, v uint8) uint8 { *p += v; return *p } func AssignAddUint16(p *uint16, v uint16) uint16 { *p += v; return *p } func AssignAddUint32(p *uint32, v uint32) uint32 { *p += v; return *p } func AssignAddUint64(p *uint64, v uint64) uint64 { *p += v; return *p } func AssignAddFloat32(p *float32, v float32) float32 { *p += v; return *p } func AssignAddFloat64(p *float64, v float64) float64 { *p += v; return *p } func AssignAddComplex64(p *complex64, v complex64) complex64 { *p += v; return *p } func AssignAddComplex128(p *complex128, v complex128) complex128 { *p += v; return *p } func AssignAddUintptr(p *uintptr, v uintptr) uintptr { *p += v; return *p } func AssignSubInt8(p *int8, v int8) int8 { *p -= v; return *p } func AssignSubInt16(p *int16, v int16) int16 { *p -= v; return *p } func AssignSubInt32(p *int32, v int32) int32 { *p -= v; return *p } func AssignSubInt64(p *int64, v int64) int64 { *p -= v; return *p } func AssignSubUint8(p *uint8, v uint8) uint8 { *p -= v; return *p } func AssignSubUint16(p *uint16, v uint16) uint16 { *p -= v; return *p } func AssignSubUint32(p *uint32, v uint32) uint32 { *p -= v; return *p } func AssignSubUint64(p *uint64, v uint64) uint64 { *p -= v; return *p } func AssignSubFloat32(p *float32, v float32) float32 { *p -= v; return *p } func AssignSubFloat64(p *float64, v float64) float64 { *p -= v; return *p } func AssignSubComplex64(p *complex64, v complex64) complex64 { *p -= v; return *p } func AssignSubComplex128(p *complex128, v complex128) complex128 { *p -= v; return *p } func AssignSubUintptr(p *uintptr, v uintptr) uintptr { *p -= v; return *p } func AssignAndInt8(p *int8, v int8) int8 { *p &= v; return *p } func AssignAndInt16(p *int16, v int16) int16 { *p &= v; return *p } func AssignAndInt32(p *int32, v int32) int32 { *p &= v; return *p } func AssignAndInt64(p *int64, v int64) int64 { *p &= v; return *p } func AssignAndUint8(p *uint8, v uint8) uint8 { *p &= v; return *p } func AssignAndUint16(p *uint16, v uint16) uint16 { *p &= v; return *p } func AssignAndUint32(p *uint32, v uint32) uint32 { *p &= v; return *p } func AssignAndUint64(p *uint64, v uint64) uint64 { *p &= v; return *p } func AssignAndUintptr(p *uintptr, v uintptr) uintptr { *p &= v; return *p } func AssignXorInt8(p *int8, v int8) int8 { *p ^= v; return *p } func AssignXorInt16(p *int16, v int16) int16 { *p ^= v; return *p } func AssignXorInt32(p *int32, v int32) int32 { *p ^= v; return *p } func AssignXorInt64(p *int64, v int64) int64 { *p ^= v; return *p } func AssignXorUint8(p *uint8, v uint8) uint8 { *p ^= v; return *p } func AssignXorUint16(p *uint16, v uint16) uint16 { *p ^= v; return *p } func AssignXorUint32(p *uint32, v uint32) uint32 { *p ^= v; return *p } func AssignXorUint64(p *uint64, v uint64) uint64 { *p ^= v; return *p } func AssignXorUintptr(p *uintptr, v uintptr) uintptr { *p ^= v; return *p } func AssignOrInt8(p *int8, v int8) int8 { *p |= v; return *p } func AssignOrInt16(p *int16, v int16) int16 { *p |= v; return *p } func AssignOrInt32(p *int32, v int32) int32 { *p |= v; return *p } func AssignOrInt64(p *int64, v int64) int64 { *p |= v; return *p } func AssignOrUint8(p *uint8, v uint8) uint8 { *p |= v; return *p } func AssignOrUint16(p *uint16, v uint16) uint16 { *p |= v; return *p } func AssignOrUint32(p *uint32, v uint32) uint32 { *p |= v; return *p } func AssignOrUint64(p *uint64, v uint64) uint64 { *p |= v; return *p } func AssignOrUintptr(p *uintptr, v uintptr) uintptr { *p |= v; return *p } func AssignMulPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) *= v return *(*int8)(unsafe.Pointer(p)) } func AssignMulPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) *= v return *(*int16)(unsafe.Pointer(p)) } func AssignMulPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) *= v return *(*int32)(unsafe.Pointer(p)) } func AssignMulPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) *= v return *(*int64)(unsafe.Pointer(p)) } func AssignMulPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) *= v return *(*uint8)(unsafe.Pointer(p)) } func AssignMulPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) *= v return *(*uint16)(unsafe.Pointer(p)) } func AssignMulPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) *= v return *(*uint32)(unsafe.Pointer(p)) } func AssignMulPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) *= v return *(*uint64)(unsafe.Pointer(p)) } func AssignMulPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) *= v return *(*float32)(unsafe.Pointer(p)) } func AssignMulPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) *= v return *(*float64)(unsafe.Pointer(p)) } func AssignMulPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) *= v return *(*complex64)(unsafe.Pointer(p)) } func AssignMulPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) *= v return *(*complex128)(unsafe.Pointer(p)) } func AssignMulPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) *= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignDivPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) /= v return *(*int8)(unsafe.Pointer(p)) } func AssignDivPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) /= v return *(*int16)(unsafe.Pointer(p)) } func AssignDivPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) /= v return *(*int32)(unsafe.Pointer(p)) } func AssignDivPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) /= v return *(*int64)(unsafe.Pointer(p)) } func AssignDivPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) /= v return *(*uint8)(unsafe.Pointer(p)) } func AssignDivPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) /= v return *(*uint16)(unsafe.Pointer(p)) } func AssignDivPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) /= v return *(*uint32)(unsafe.Pointer(p)) } func AssignDivPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) /= v return *(*uint64)(unsafe.Pointer(p)) } func AssignDivPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) /= v return *(*float32)(unsafe.Pointer(p)) } func AssignDivPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) /= v return *(*float64)(unsafe.Pointer(p)) } func AssignDivPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) /= v return *(*complex64)(unsafe.Pointer(p)) } func AssignDivPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) /= v return *(*complex128)(unsafe.Pointer(p)) } func AssignDivPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) /= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignRemPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) %= v return *(*int8)(unsafe.Pointer(p)) } func AssignRemPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) %= v return *(*int16)(unsafe.Pointer(p)) } func AssignRemPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) %= v return *(*int32)(unsafe.Pointer(p)) } func AssignRemPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) %= v return *(*int64)(unsafe.Pointer(p)) } func AssignRemPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) %= v return *(*uint8)(unsafe.Pointer(p)) } func AssignRemPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) %= v return *(*uint16)(unsafe.Pointer(p)) } func AssignRemPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) %= v return *(*uint32)(unsafe.Pointer(p)) } func AssignRemPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) %= v return *(*uint64)(unsafe.Pointer(p)) } func AssignRemPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) %= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignAddPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) += v return *(*int8)(unsafe.Pointer(p)) } func AssignAddPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) += v return *(*int16)(unsafe.Pointer(p)) } func AssignAddPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) += v return *(*int32)(unsafe.Pointer(p)) } func AssignAddPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) += v return *(*int64)(unsafe.Pointer(p)) } func AssignAddPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) += v return *(*uint8)(unsafe.Pointer(p)) } func AssignAddPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) += v return *(*uint16)(unsafe.Pointer(p)) } func AssignAddPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) += v return *(*uint32)(unsafe.Pointer(p)) } func AssignAddPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) += v return *(*uint64)(unsafe.Pointer(p)) } func AssignAddPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) += v return *(*float32)(unsafe.Pointer(p)) } func AssignAddPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) += v return *(*float64)(unsafe.Pointer(p)) } func AssignAddPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) += v return *(*complex64)(unsafe.Pointer(p)) } func AssignAddPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) += v return *(*complex128)(unsafe.Pointer(p)) } func AssignAddPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) += v return *(*uintptr)(unsafe.Pointer(p)) } func AssignSubPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) -= v return *(*int8)(unsafe.Pointer(p)) } func AssignSubPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) -= v return *(*int16)(unsafe.Pointer(p)) } func AssignSubPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) -= v return *(*int32)(unsafe.Pointer(p)) } func AssignSubPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) -= v return *(*int64)(unsafe.Pointer(p)) } func AssignSubPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) -= v return *(*uint8)(unsafe.Pointer(p)) } func AssignSubPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) -= v return *(*uint16)(unsafe.Pointer(p)) } func AssignSubPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) -= v return *(*uint32)(unsafe.Pointer(p)) } func AssignSubPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) -= v return *(*uint64)(unsafe.Pointer(p)) } func AssignSubPtrFloat32(p uintptr, v float32) float32 { *(*float32)(unsafe.Pointer(p)) -= v return *(*float32)(unsafe.Pointer(p)) } func AssignSubPtrFloat64(p uintptr, v float64) float64 { *(*float64)(unsafe.Pointer(p)) -= v return *(*float64)(unsafe.Pointer(p)) } func AssignSubPtrComplex64(p uintptr, v complex64) complex64 { *(*complex64)(unsafe.Pointer(p)) -= v return *(*complex64)(unsafe.Pointer(p)) } func AssignSubPtrComplex128(p uintptr, v complex128) complex128 { *(*complex128)(unsafe.Pointer(p)) -= v return *(*complex128)(unsafe.Pointer(p)) } func AssignSubPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) -= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignAndPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) &= v return *(*int8)(unsafe.Pointer(p)) } func AssignAndPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) &= v return *(*int16)(unsafe.Pointer(p)) } func AssignAndPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) &= v return *(*int32)(unsafe.Pointer(p)) } func AssignAndPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) &= v return *(*int64)(unsafe.Pointer(p)) } func AssignAndPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) &= v return *(*uint8)(unsafe.Pointer(p)) } func AssignAndPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) &= v return *(*uint16)(unsafe.Pointer(p)) } func AssignAndPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) &= v return *(*uint32)(unsafe.Pointer(p)) } func AssignAndPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) &= v return *(*uint64)(unsafe.Pointer(p)) } func AssignAndPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) &= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignXorPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) ^= v return *(*int8)(unsafe.Pointer(p)) } func AssignXorPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) ^= v return *(*int16)(unsafe.Pointer(p)) } func AssignXorPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) ^= v return *(*int32)(unsafe.Pointer(p)) } func AssignXorPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) ^= v return *(*int64)(unsafe.Pointer(p)) } func AssignXorPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) ^= v return *(*uint8)(unsafe.Pointer(p)) } func AssignXorPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) ^= v return *(*uint16)(unsafe.Pointer(p)) } func AssignXorPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) ^= v return *(*uint32)(unsafe.Pointer(p)) } func AssignXorPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) ^= v return *(*uint64)(unsafe.Pointer(p)) } func AssignXorPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) ^= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignOrPtrInt8(p uintptr, v int8) int8 { *(*int8)(unsafe.Pointer(p)) |= v return *(*int8)(unsafe.Pointer(p)) } func AssignOrPtrInt16(p uintptr, v int16) int16 { *(*int16)(unsafe.Pointer(p)) |= v return *(*int16)(unsafe.Pointer(p)) } func AssignOrPtrInt32(p uintptr, v int32) int32 { *(*int32)(unsafe.Pointer(p)) |= v return *(*int32)(unsafe.Pointer(p)) } func AssignOrPtrInt64(p uintptr, v int64) int64 { *(*int64)(unsafe.Pointer(p)) |= v return *(*int64)(unsafe.Pointer(p)) } func AssignOrPtrUint8(p uintptr, v uint8) uint8 { *(*uint8)(unsafe.Pointer(p)) |= v return *(*uint8)(unsafe.Pointer(p)) } func AssignOrPtrUint16(p uintptr, v uint16) uint16 { *(*uint16)(unsafe.Pointer(p)) |= v return *(*uint16)(unsafe.Pointer(p)) } func AssignOrPtrUint32(p uintptr, v uint32) uint32 { *(*uint32)(unsafe.Pointer(p)) |= v return *(*uint32)(unsafe.Pointer(p)) } func AssignOrPtrUint64(p uintptr, v uint64) uint64 { *(*uint64)(unsafe.Pointer(p)) |= v return *(*uint64)(unsafe.Pointer(p)) } func AssignOrPtrUintptr(p uintptr, v uintptr) uintptr { *(*uintptr)(unsafe.Pointer(p)) |= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignShlPtrInt8(p uintptr, v int) int8 { *(*int8)(unsafe.Pointer(p)) <<= v return *(*int8)(unsafe.Pointer(p)) } func AssignShlPtrInt16(p uintptr, v int) int16 { *(*int16)(unsafe.Pointer(p)) <<= v return *(*int16)(unsafe.Pointer(p)) } func AssignShlPtrInt32(p uintptr, v int) int32 { *(*int32)(unsafe.Pointer(p)) <<= v return *(*int32)(unsafe.Pointer(p)) } func AssignShlPtrInt64(p uintptr, v int) int64 { *(*int64)(unsafe.Pointer(p)) <<= v return *(*int64)(unsafe.Pointer(p)) } func AssignShlPtrUint8(p uintptr, v int) uint8 { *(*uint8)(unsafe.Pointer(p)) <<= v return *(*uint8)(unsafe.Pointer(p)) } func AssignShlPtrUint16(p uintptr, v int) uint16 { *(*uint16)(unsafe.Pointer(p)) <<= v return *(*uint16)(unsafe.Pointer(p)) } func AssignShlPtrUint32(p uintptr, v int) uint32 { *(*uint32)(unsafe.Pointer(p)) <<= v return *(*uint32)(unsafe.Pointer(p)) } func AssignShlPtrUint64(p uintptr, v int) uint64 { *(*uint64)(unsafe.Pointer(p)) <<= v return *(*uint64)(unsafe.Pointer(p)) } func AssignShlPtrUintptr(p uintptr, v int) uintptr { *(*uintptr)(unsafe.Pointer(p)) <<= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignShrPtrInt8(p uintptr, v int) int8 { *(*int8)(unsafe.Pointer(p)) >>= v return *(*int8)(unsafe.Pointer(p)) } func AssignShrPtrInt16(p uintptr, v int) int16 { *(*int16)(unsafe.Pointer(p)) >>= v return *(*int16)(unsafe.Pointer(p)) } func AssignShrPtrInt32(p uintptr, v int) int32 { *(*int32)(unsafe.Pointer(p)) >>= v return *(*int32)(unsafe.Pointer(p)) } func AssignShrPtrInt64(p uintptr, v int) int64 { *(*int64)(unsafe.Pointer(p)) >>= v return *(*int64)(unsafe.Pointer(p)) } func AssignShrPtrUint8(p uintptr, v int) uint8 { *(*uint8)(unsafe.Pointer(p)) >>= v return *(*uint8)(unsafe.Pointer(p)) } func AssignShrPtrUint16(p uintptr, v int) uint16 { *(*uint16)(unsafe.Pointer(p)) >>= v return *(*uint16)(unsafe.Pointer(p)) } func AssignShrPtrUint32(p uintptr, v int) uint32 { *(*uint32)(unsafe.Pointer(p)) >>= v return *(*uint32)(unsafe.Pointer(p)) } func AssignShrPtrUint64(p uintptr, v int) uint64 { *(*uint64)(unsafe.Pointer(p)) >>= v return *(*uint64)(unsafe.Pointer(p)) } func AssignShrPtrUintptr(p uintptr, v int) uintptr { *(*uintptr)(unsafe.Pointer(p)) >>= v return *(*uintptr)(unsafe.Pointer(p)) } func AssignShlInt8(p *int8, v int) int8 { *p <<= v; return *p } func AssignShlInt16(p *int16, v int) int16 { *p <<= v; return *p } func AssignShlInt32(p *int32, v int) int32 { *p <<= v; return *p } func AssignShlInt64(p *int64, v int) int64 { *p <<= v; return *p } func AssignShlUint8(p *uint8, v int) uint8 { *p <<= v; return *p } func AssignShlUint16(p *uint16, v int) uint16 { *p <<= v; return *p } func AssignShlUint32(p *uint32, v int) uint32 { *p <<= v; return *p } func AssignShlUint64(p *uint64, v int) uint64 { *p <<= v; return *p } func AssignShlUintptr(p *uintptr, v int) uintptr { *p <<= v; return *p } func AssignShrInt8(p *int8, v int) int8 { *p >>= v; return *p } func AssignShrInt16(p *int16, v int) int16 { *p >>= v; return *p } func AssignShrInt32(p *int32, v int) int32 { *p >>= v; return *p } func AssignShrInt64(p *int64, v int) int64 { *p >>= v; return *p } func AssignShrUint8(p *uint8, v int) uint8 { *p >>= v; return *p } func AssignShrUint16(p *uint16, v int) uint16 { *p >>= v; return *p } func AssignShrUint32(p *uint32, v int) uint32 { *p >>= v; return *p } func AssignShrUint64(p *uint64, v int) uint64 { *p >>= v; return *p } func AssignShrUintptr(p *uintptr, v int) uintptr { *p >>= v; return *p } func PreIncInt8(p *int8, d int8) int8 { *p += d; return *p } func PreIncInt16(p *int16, d int16) int16 { *p += d; return *p } func PreIncInt32(p *int32, d int32) int32 { *p += d; return *p } func PreIncInt64(p *int64, d int64) int64 { *p += d; return *p }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl.go
vendor/modernc.org/libc/libc_musl.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm) //go:generate go run generator.go // Package libc is the runtime for programs generated by ccgo/v4 or later. // // # Version compatibility // // The API of this package, in particular the bits that directly support the // ccgo compiler, may change in a way that is not backward compatible. If you // have generated some Go code from C you should stick to the version of this // package that you used at that time and was tested with your payload. The // correct way to upgrade to a newer version of this package is to first // recompile (C to Go) your code with a newer version of ccgo that depends on // the new libc version. // // If you use C to Go translated code provided by others, stick to the version // of libc that translated code shows in its go.mod file and do not upgrade the // dependency just because a newer libc is tagged.Vgq // // This is if course unfortunate. However, it's somewhat similar to C code // linked with a specific version of, say GNU libc. When such code asking for // glibc5 is run on a system with glibc6, or vice versa, it will fail. // // As a particular example, if your project imports modernc.org/sqlite you // should use the same libc version as seen in the go.mod file of the sqlite // package. // // tl;dr: It is not always possible to fix ccgo bugs and/or improve performance // of the ccgo transpiled code without occasionally making incompatible changes // to this package. // // # Thread Local Storage // // A TLS instance represents a main thread or a thread created by // Xpthread_create. A TLS instance is not safe for concurrent use by multiple // goroutines. // // If a program starts the C main function, a TLS instance is created // automatically and the goroutine entering main() is locked to the OS thread. // The translated C code then may create other pthreads by calling // Xpthread_create. // // If the translated C code is part of a library package, new TLS instances // must be created manually in user/client code. The first TLS instance created // will be the "main" libc thread, but it will be not locked to OS thread // automatically. Any subsequently manually created TLS instances will call // Xpthread_create, but without spawning a new goroutine. // // A manual call to Xpthread_create will create a new TLS instance automatically // and spawn a new goroutine executing the thread function. // Package libc provides run time support for programs generated by the // [ccgo] C to Go transpiler, version 4 or later. // // # Concurrency // // Many C libc functions are not thread safe. Such functions are not safe // for concurrent use by multiple goroutines in the Go translation as well. // // # Thread Local Storage // // C threads are modeled as Go goroutines. Every such C thread, ie. a Go // goroutine, must use its own Thread Local Storage instance implemented by the // [TLS] type. // // # Signals // // Signal handling in translated C code is not coordinated with the Go runtime. // This is probably the same as when running C code via CGo. // // # Environmental variables // // This package synchronizes its environ with the current Go environ lazily and // only once. // // # libc API documentation copyright // // From [Linux man-pages Copyleft] // // Permission is granted to make and distribute verbatim copies of this // manual provided the copyright notice and this permission notice are // preserved on all copies. // // Permission is granted to copy and distribute modified versions of this // manual under the conditions for verbatim copying, provided that the // entire resulting derived work is distributed under the terms of a // permission notice identical to this one. // // Since the Linux kernel and libraries are constantly changing, this // manual page may be incorrect or out-of-date. The author(s) assume no // responsibility for errors or omissions, or for damages resulting from // the use of the information contained herein. The author(s) may not have // taken the same level of care in the production of this manual, which is // licensed free of charge, as they might when working professionally. // // Formatted or processed versions of this manual, if unaccompanied by the // source, must acknowledge the copyright and authors of this work. // // [Linux man-pages Copyleft]: https://spdx.org/licenses/Linux-man-pages-copyleft.html // [ccgo]: http://modernc.org/ccgo/v4 package libc // import "modernc.org/libc" import ( "fmt" "io" "math" "math/rand" "os" "os/exec" gosignal "os/signal" "path/filepath" "runtime" "sort" "strings" "sync" "sync/atomic" "time" "unsafe" guuid "github.com/google/uuid" "golang.org/x/sys/unix" "modernc.org/libc/uuid/uuid" "modernc.org/memory" ) const ( heapAlign = 16 heapGuard = 16 ) var ( _ error = (*MemAuditError)(nil) allocator memory.Allocator allocatorMu sync.Mutex atExitMu sync.Mutex atExit []func() tid atomic.Int32 // TLS Go ID Covered = map[uintptr]struct{}{} CoveredC = map[string]struct{}{} coverPCs [1]uintptr //TODO not concurrent safe ) func init() { nm, err := os.Executable() if err != nil { return } Xprogram_invocation_name = mustCString(nm) Xprogram_invocation_short_name = mustCString(filepath.Base(nm)) X__libc.Fpage_size = Tsize_t(os.Getpagesize()) } // RawMem64 represents the biggest uint64 array the runtime can handle. type RawMem64 [unsafe.Sizeof(RawMem{}) / unsafe.Sizeof(uint64(0))]uint64 type MemAuditError struct { Caller string Message string } func (e *MemAuditError) Error() string { return fmt.Sprintf("%s: %s", e.Caller, e.Message) } // Start executes C's main. func Start(main func(*TLS, int32, uintptr) int32) { runtime.LockOSThread() if isMemBrk { defer func() { trc("==== PANIC") for _, v := range MemAudit() { trc("", v.Error()) } }() } tls := NewTLS() Xexit(tls, main(tls, int32(len(os.Args)), mustAllocStrings(os.Args))) } func mustAllocStrings(a []string) (r uintptr) { nPtrs := len(a) + 1 pPtrs := mustCalloc(Tsize_t(uintptr(nPtrs) * unsafe.Sizeof(uintptr(0)))) ptrs := unsafe.Slice((*uintptr)(unsafe.Pointer(pPtrs)), nPtrs) nBytes := 0 for _, v := range a { nBytes += len(v) + 1 } pBytes := mustCalloc(Tsize_t(nBytes)) b := unsafe.Slice((*byte)(unsafe.Pointer(pBytes)), nBytes) for i, v := range a { copy(b, v) b = b[len(v)+1:] ptrs[i] = pBytes pBytes += uintptr(len(v)) + 1 } return pPtrs } func mustCString(s string) (r uintptr) { n := len(s) r = mustMalloc(Tsize_t(n + 1)) copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), s) *(*byte)(unsafe.Pointer(r + uintptr(n))) = 0 return r } // CString returns a pointer to a zero-terminated version of s. The caller is // responsible for freeing the allocated memory using Xfree. func CString(s string) (uintptr, error) { n := len(s) p := Xmalloc(nil, Tsize_t(n)+1) if p == 0 { return 0, fmt.Errorf("CString: cannot allocate %d bytes", n+1) } copy(unsafe.Slice((*byte)(unsafe.Pointer(p)), n), s) *(*byte)(unsafe.Pointer(p + uintptr(n))) = 0 return p, nil } func mustMalloc(sz Tsize_t) (r uintptr) { if r = Xmalloc(nil, sz); r != 0 || sz == 0 { return r } panic(todo("OOM")) } func mustCalloc(sz Tsize_t) (r uintptr) { if r := Xcalloc(nil, 1, sz); r != 0 || sz == 0 { return r } panic(todo("OOM")) } type tlsStackSlot struct { p uintptr sz Tsize_t } // TLS emulates thread local storage. TLS is not safe for concurrent use by // multiple goroutines. type TLS struct { allocaStack []int allocas []uintptr jumpBuffers []uintptr pendingSignals chan os.Signal pthread uintptr // *t__pthread pthreadCleanupItems []pthreadCleanupItem pthreadKeyValues map[Tpthread_key_t]uintptr sigHandlers map[int32]uintptr sp int stack []tlsStackSlot ID int32 checkSignals bool ownsPthread bool } var __ccgo_environOnce sync.Once // NewTLS returns a newly created TLS that must be eventually closed to prevent // resource leaks. func NewTLS() (r *TLS) { id := tid.Add(1) if id == 0 { id = tid.Add(1) } __ccgo_environOnce.Do(func() { Xenviron = mustAllocStrings(os.Environ()) }) pthread := mustMalloc(Tsize_t(unsafe.Sizeof(t__pthread{}))) *(*t__pthread)(unsafe.Pointer(pthread)) = t__pthread{ Flocale: uintptr(unsafe.Pointer(&X__libc.Fglobal_locale)), Fself: pthread, Ftid: id, } return &TLS{ ID: id, ownsPthread: true, pthread: pthread, sigHandlers: map[int32]uintptr{}, } } // StackSlots reports the number of tls stack slots currently in use. func (tls *TLS) StackSlots() int { return tls.sp } // int *__errno_location(void) func X__errno_location(tls *TLS) (r uintptr) { return tls.pthread + unsafe.Offsetof(t__pthread{}.Ferrno_val) } // int *__errno_location(void) func X___errno_location(tls *TLS) (r uintptr) { return X__errno_location(tls) } func (tls *TLS) setErrno(n int32) { if tls == nil { return } *(*int32)(unsafe.Pointer(X__errno_location(tls))) = n } func (tls *TLS) String() string { return fmt.Sprintf("TLS#%v pthread=%x", tls.ID, tls.pthread) } // Alloc allocates n bytes in tls's local storage. Calls to Alloc() must be // strictly paired with calls to TLS.Free on function exit. That also means any // memory from Alloc must not be used after a function returns. // // The order matters. This is ok: // // p := tls.Alloc(11) // q := tls.Alloc(22) // tls.Free(22) // // q is no more usable here. // tls.Free(11) // // p is no more usable here. // // This is not correct: // // tls.Alloc(11) // tls.Alloc(22) // tls.Free(11) // tls.Free(22) func (tls *TLS) Alloc(n0 int) (r uintptr) { // shrink stats speedtest1 // ----------------------------------------------------------------------------------------------- // 0 total 2,544, nallocs 107,553,070, nmallocs 25, nreallocs 107,553,045 10.984s // 1 total 2,544, nallocs 107,553,070, nmallocs 25, nreallocs 38,905,980 9.597s // 2 total 2,616, nallocs 107,553,070, nmallocs 25, nreallocs 18,201,284 9.206s // 3 total 2,624, nallocs 107,553,070, nmallocs 25, nreallocs 16,716,302 9.155s // 4 total 2,624, nallocs 107,553,070, nmallocs 25, nreallocs 16,156,102 9.398s // 8 total 3,408, nallocs 107,553,070, nmallocs 25, nreallocs 14,364,274 9.198s // 16 total 3,976, nallocs 107,553,070, nmallocs 25, nreallocs 6,219,602 8.910s // --------------------------------------------------------------------------------------------- // 32 total 5,120, nallocs 107,553,070, nmallocs 25, nreallocs 1,089,037 8.836s // --------------------------------------------------------------------------------------------- // 64 total 6,520, nallocs 107,553,070, nmallocs 25, nreallocs 1,788 8.420s // 128 total 8,848, nallocs 107,553,070, nmallocs 25, nreallocs 1,098 8.833s // 256 total 8,848, nallocs 107,553,070, nmallocs 25, nreallocs 1,049 9.508s // 512 total 33,336, nallocs 107,553,070, nmallocs 25, nreallocs 88 8.667s // none total 33,336, nallocs 107,553,070, nmallocs 25, nreallocs 88 8.408s const shrinkSegment = 32 n := Tsize_t(n0) if tls.sp < len(tls.stack) { p := tls.stack[tls.sp].p sz := tls.stack[tls.sp].sz if sz >= n /* && sz <= shrinkSegment*n */ { // Segment shrinking is nice to have but Tcl does some dirty hacks in coroutine // handling that require stability of stack addresses, out of the C execution // model. Disabled. tls.sp++ return p } Xfree(tls, p) r = mustMalloc(n) tls.stack[tls.sp] = tlsStackSlot{p: r, sz: Xmalloc_usable_size(tls, r)} tls.sp++ return r } r = mustMalloc(n) tls.stack = append(tls.stack, tlsStackSlot{p: r, sz: Xmalloc_usable_size(tls, r)}) tls.sp++ return r } // Free manages memory of the preceding TLS.Alloc() func (tls *TLS) Free(n int) { //TODO shrink stacks if possible. Tcl is currently against. tls.sp-- if !tls.checkSignals { return } select { case sig := <-tls.pendingSignals: signum := int32(sig.(unix.Signal)) h, ok := tls.sigHandlers[signum] if !ok { break } switch h { case SIG_DFL: // nop case SIG_IGN: // nop default: (*(*func(*TLS, int32))(unsafe.Pointer(&struct{ uintptr }{h})))(tls, signum) } default: // nop } } func (tls *TLS) alloca(n Tsize_t) (r uintptr) { r = mustMalloc(n) tls.allocas = append(tls.allocas, r) return r } // AllocaEntry must be called early on function entry when the function calls // or may call alloca(3). func (tls *TLS) AllocaEntry() { tls.allocaStack = append(tls.allocaStack, len(tls.allocas)) } // AllocaExit must be defer-called on function exit when the function calls or // may call alloca(3). func (tls *TLS) AllocaExit() { n := len(tls.allocaStack) x := tls.allocaStack[n-1] tls.allocaStack = tls.allocaStack[:n-1] for _, v := range tls.allocas[x:] { Xfree(tls, v) } tls.allocas = tls.allocas[:x] } func (tls *TLS) Close() { defer func() { *tls = TLS{} }() for _, v := range tls.allocas { Xfree(tls, v) } for _, v := range tls.stack /* shrink diabled[:tls.sp] */ { Xfree(tls, v.p) } if tls.ownsPthread { Xfree(tls, tls.pthread) } } func (tls *TLS) PushJumpBuffer(jb uintptr) { tls.jumpBuffers = append(tls.jumpBuffers, jb) } type LongjmpRetval int32 func (tls *TLS) PopJumpBuffer(jb uintptr) { n := len(tls.jumpBuffers) if n == 0 || tls.jumpBuffers[n-1] != jb { panic(todo("unsupported setjmp/longjmp usage")) } tls.jumpBuffers = tls.jumpBuffers[:n-1] } func (tls *TLS) Longjmp(jb uintptr, val int32) { tls.PopJumpBuffer(jb) if val == 0 { val = 1 } panic(LongjmpRetval(val)) } // ============================================================================ func Xexit(tls *TLS, code int32) { //TODO atexit finalizers X__stdio_exit(tls) for _, v := range atExit { v() } atExitHandlersMu.Lock() for _, v := range atExitHandlers { (*(*func(*TLS))(unsafe.Pointer(&struct{ uintptr }{v})))(tls) } os.Exit(int(code)) } func _exit(tls *TLS, code int32) { Xexit(tls, code) } var abort Tsigaction func Xabort(tls *TLS) { X__libc_sigaction(tls, SIGABRT, uintptr(unsafe.Pointer(&abort)), 0) unix.Kill(unix.Getpid(), unix.Signal(SIGABRT)) panic(todo("unrechable")) } type lock struct { sync.Mutex waiters int } var ( locksMu sync.Mutex locks = map[uintptr]*lock{} ) /* T1 T2 lock(&foo) // foo: 0 -> 1 lock(&foo) // foo: 1 -> 2 unlock(&foo) // foo: 2 -> 1, non zero means waiter(s) active unlock(&foo) // foo: 1 -> 0 */ func ___lock(tls *TLS, p uintptr) { if atomic.AddInt32((*int32)(unsafe.Pointer(p)), 1) == 1 { return } // foo was already acquired by some other C thread. locksMu.Lock() l := locks[p] if l == nil { l = &lock{} locks[p] = l l.Lock() } l.waiters++ locksMu.Unlock() l.Lock() // Wait for T1 to release foo. (X below) } func ___unlock(tls *TLS, p uintptr) { if atomic.AddInt32((*int32)(unsafe.Pointer(p)), -1) == 0 { return } // Some other C thread is waiting for foo. locksMu.Lock() l := locks[p] if l == nil { // We are T1 and we got the locksMu locked before T2. l = &lock{waiters: 1} l.Lock() } l.Unlock() // Release foo, T2 may now lock it. (X above) l.waiters-- if l.waiters == 0 { // we are T2 delete(locks, p) } locksMu.Unlock() } type lockedFile struct { ch chan struct{} waiters int } var ( lockedFilesMu sync.Mutex lockedFiles = map[uintptr]*lockedFile{} ) func X__lockfile(tls *TLS, file uintptr) int32 { return ___lockfile(tls, file) } // int __lockfile(FILE *f) func ___lockfile(tls *TLS, file uintptr) int32 { panic(todo("")) // lockedFilesMu.Lock() // defer lockedFilesMu.Unlock() // l := lockedFiles[file] // if l == nil { // l = &lockedFile{ch: make(chan struct{}, 1)} // lockedFiles[file] = l // } // l.waiters++ // l.ch <- struct{}{} } func X__unlockfile(tls *TLS, file uintptr) { ___unlockfile(tls, file) } // void __unlockfile(FILE *f) func ___unlockfile(tls *TLS, file uintptr) { panic(todo("")) lockedFilesMu.Lock() defer lockedFilesMu.Unlock() l := lockedFiles[file] l.waiters-- if l.waiters == 0 { delete(lockedFiles, file) } <-l.ch } // void __synccall(void (*func)(void *), void *ctx) func ___synccall(tls *TLS, fn, ctx uintptr) { (*(*func(*TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{fn})))(tls, ctx) } // func ___randname(tls *TLS, template uintptr) (r1 uintptr) { // bp := tls.Alloc(16) // defer tls.Free(16) // var i int32 // var r uint64 // var _ /* ts at bp+0 */ Ttimespec // X__clock_gettime(tls, CLOCK_REALTIME, bp) // goto _2 // _2: // r = uint64((*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_sec+(*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec) + uint64(tls.ID)*uint64(65537) // i = 0 // for { // if !(i < int32(6)) { // break // } // *(*int8)(unsafe.Pointer(template + uintptr(i))) = int8(uint64('A') + r&uint64(15) + r&uint64(16)*uint64(2)) // goto _3 // _3: // i++ // r >>= uint64(5) // } // return template // } // #include <time.h> // #include <stdint.h> // #include "pthread_impl.h" // // /* This assumes that a check for the // // template size has already been made */ // // char *__randname(char *template) // // { // int i; // struct timespec ts; // unsigned long r; // // __clock_gettime(CLOCK_REALTIME, &ts); // r = ts.tv_sec + ts.tv_nsec + __pthread_self()->tid * 65537UL; // for (i=0; i<6; i++, r>>=5) // template[i] = 'A'+(r&15)+(r&16)*2; // // return template; // } func ___randname(tls *TLS, template uintptr) (r1 uintptr) { var i int32 ts := time.Now().UnixNano() r := uint64(ts) + uint64(tls.ID)*65537 i = 0 for { if !(i < int32(6)) { break } *(*int8)(unsafe.Pointer(template + uintptr(i))) = int8(uint64('A') + r&uint64(15) + r&uint64(16)*uint64(2)) goto _3 _3: i++ r >>= uint64(5) } return template } func ___get_tp(tls *TLS) uintptr { return tls.pthread } func Xfork(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } t.setErrno(ENOSYS) return -1 } const SIG_DFL = 0 const SIG_IGN = 1 func Xsignal(tls *TLS, signum int32, handler uintptr) (r uintptr) { r, tls.sigHandlers[signum] = tls.sigHandlers[signum], handler switch handler { case SIG_DFL: gosignal.Reset(unix.Signal(signum)) case SIG_IGN: gosignal.Ignore(unix.Signal(signum)) default: if tls.pendingSignals == nil { tls.pendingSignals = make(chan os.Signal, 3) tls.checkSignals = true } gosignal.Notify(tls.pendingSignals, unix.Signal(signum)) } return r } var ( atExitHandlersMu sync.Mutex atExitHandlers []uintptr ) func Xatexit(tls *TLS, func_ uintptr) (r int32) { atExitHandlersMu.Lock() atExitHandlers = append(atExitHandlers, func_) atExitHandlersMu.Unlock() return 0 } var __sync_synchronize_dummy int32 // __sync_synchronize(); func X__sync_synchronize(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } // Attempt to implement a full memory barrier without assembler. atomic.StoreInt32(&__sync_synchronize_dummy, atomic.LoadInt32(&__sync_synchronize_dummy)+1) } func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr { if __ccgo_strace { trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2)) } return 0 } func Xdlsym(t *TLS, handle, symbol uintptr) uintptr { if __ccgo_strace { trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2)) } return 0 } var dlErrorMsg = []byte("not supported\x00") func Xdlerror(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return uintptr(unsafe.Pointer(&dlErrorMsg[0])) } func Xdlclose(t *TLS, handle uintptr) int32 { if __ccgo_strace { trc("t=%v handle=%v, (%v:)", t, handle, origin(2)) } panic(todo("")) } func Xsystem(t *TLS, command uintptr) int32 { if __ccgo_strace { trc("t=%v command=%v, (%v:)", t, command, origin(2)) } s := GoString(command) if command == 0 { panic(todo("")) } cmd := exec.Command("sh", "-c", s) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { ps := err.(*exec.ExitError) return int32(ps.ExitCode()) } return 0 } func Xsched_yield(tls *TLS) int32 { runtime.Gosched() return 0 } // AtExit will attempt to run f at process exit. The execution cannot be // guaranteed, neither its ordering with respect to any other handlers // registered by AtExit. func AtExit(f func()) { atExitMu.Lock() atExit = append(atExit, f) atExitMu.Unlock() } func Bool64(b bool) int64 { if b { return 1 } return 0 } func Environ() uintptr { __ccgo_environOnce.Do(func() { Xenviron = mustAllocStrings(os.Environ()) }) return Xenviron } func EnvironP() uintptr { __ccgo_environOnce.Do(func() { Xenviron = mustAllocStrings(os.Environ()) }) return uintptr(unsafe.Pointer(&Xenviron)) } // NewVaList is like VaList but automatically allocates the correct amount of // memory for all of the items in args. // // The va_list return value is used to pass the constructed var args to var // args accepting functions. The caller of NewVaList is responsible for freeing // the va_list. func NewVaList(args ...interface{}) (va_list uintptr) { return VaList(NewVaListN(len(args)), args...) } // NewVaListN returns a newly allocated va_list for n items. The caller of // NewVaListN is responsible for freeing the va_list. func NewVaListN(n int) (va_list uintptr) { return Xmalloc(nil, Tsize_t(8*n)) } func SetEnviron(t *TLS, env []string) { __ccgo_environOnce.Do(func() { Xenviron = mustAllocStrings(env) }) } func Dmesg(s string, args ...interface{}) { // nop } func Xalloca(tls *TLS, size Tsize_t) uintptr { return tls.alloca(size) } // struct cmsghdr *CMSG_NXTHDR(struct msghdr *msgh, struct cmsghdr *cmsg); func X__cmsg_nxthdr(t *TLS, msgh, cmsg uintptr) uintptr { panic(todo("")) } func Cover() { runtime.Callers(2, coverPCs[:]) Covered[coverPCs[0]] = struct{}{} } func CoverReport(w io.Writer) error { var a []string pcs := make([]uintptr, 1) for pc := range Covered { pcs[0] = pc frame, _ := runtime.CallersFrames(pcs).Next() a = append(a, fmt.Sprintf("%s:%07d:%s", filepath.Base(frame.File), frame.Line, frame.Func.Name())) } sort.Strings(a) _, err := fmt.Fprintf(w, "%s\n", strings.Join(a, "\n")) return err } func CoverC(s string) { CoveredC[s] = struct{}{} } func CoverCReport(w io.Writer) error { var a []string for k := range CoveredC { a = append(a, k) } sort.Strings(a) _, err := fmt.Fprintf(w, "%s\n", strings.Join(a, "\n")) return err } func X__ccgo_dmesg(t *TLS, fmt uintptr, va uintptr) { panic(todo("")) } func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ panic(todo("")) } func X__ccgo_in6addr_anyp(t *TLS) uintptr { panic(todo("")) } func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */ panic(todo("")) } func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */ panic(todo("")) } // void sqlite3_log(int iErrCode, const char *zFormat, ...); func X__ccgo_sqlite3_log(t *TLS, iErrCode int32, zFormat uintptr, args uintptr) { // nop } // unsigned __sync_add_and_fetch_uint32(*unsigned, unsigned) func X__sync_add_and_fetch_uint32(t *TLS, p uintptr, v uint32) uint32 { return atomic.AddUint32((*uint32)(unsafe.Pointer(p)), v) } // unsigned __sync_sub_and_fetch_uint32(*unsigned, unsigned) func X__sync_sub_and_fetch_uint32(t *TLS, p uintptr, v uint32) uint32 { return atomic.AddUint32((*uint32)(unsafe.Pointer(p)), -v) } var ( randomData = map[uintptr]*rand.Rand{} randomDataMu sync.Mutex ) // The initstate_r() function is like initstate(3) except that it initializes // the state in the object pointed to by buf, rather than initializing the // global state variable. Before calling this function, the buf.state field // must be initialized to NULL. The initstate_r() function records a pointer // to the statebuf argument inside the structure pointed to by buf. Thus, // state‐ buf should not be deallocated so long as buf is still in use. (So, // statebuf should typically be allocated as a static variable, or allocated on // the heap using malloc(3) or similar.) // // char *initstate_r(unsigned int seed, char *statebuf, size_t statelen, struct random_data *buf); func Xinitstate_r(t *TLS, seed uint32, statebuf uintptr, statelen Tsize_t, buf uintptr) int32 { if buf == 0 { panic(todo("")) } randomDataMu.Lock() defer randomDataMu.Unlock() randomData[buf] = rand.New(rand.NewSource(int64(seed))) return 0 } // int random_r(struct random_data *buf, int32_t *result); func Xrandom_r(t *TLS, buf, result uintptr) int32 { randomDataMu.Lock() defer randomDataMu.Unlock() mr := randomData[buf] if RAND_MAX != math.MaxInt32 { panic(todo("")) } *(*int32)(unsafe.Pointer(result)) = mr.Int31() return 0 } // void longjmp(jmp_buf env, int val); func Xlongjmp(t *TLS, env uintptr, val int32) { panic(todo("")) } // void _longjmp(jmp_buf env, int val); func X_longjmp(t *TLS, env uintptr, val int32) { panic(todo("")) } // int _obstack_begin (struct obstack *h, _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment, void *(*chunkfun) (size_t), void (*freefun) (void *)) func X_obstack_begin(t *TLS, obstack uintptr, size, alignment int32, chunkfun, freefun uintptr) int32 { panic(todo("")) } // extern void _obstack_newchunk(struct obstack *, int); func X_obstack_newchunk(t *TLS, obstack uintptr, length int32) int32 { panic(todo("")) } // void obstack_free (struct obstack *h, void *obj) func Xobstack_free(t *TLS, obstack, obj uintptr) { panic(todo("")) } // int obstack_vprintf (struct obstack *obstack, const char *template, va_list ap) func Xobstack_vprintf(t *TLS, obstack, template, va uintptr) int32 { panic(todo("")) } // int _setjmp(jmp_buf env); func X_setjmp(t *TLS, env uintptr) int32 { return 0 //TODO } // int setjmp(jmp_buf env); func Xsetjmp(t *TLS, env uintptr) int32 { panic(todo("")) } // int backtrace(void **buffer, int size); func Xbacktrace(t *TLS, buf uintptr, size int32) int32 { panic(todo("")) } // void backtrace_symbols_fd(void *const *buffer, int size, int fd); func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) { panic(todo("")) } // int fts_close(FTS *ftsp); func Xfts_close(t *TLS, ftsp uintptr) int32 { panic(todo("")) } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { panic(todo("")) } // FTSENT *fts_read(FTS *ftsp); func Xfts64_read(t *TLS, ftsp uintptr) uintptr { panic(todo("")) } // int fts_close(FTS *ftsp); func Xfts64_close(t *TLS, ftsp uintptr) int32 { panic(todo("")) } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { panic(todo("")) } // FTSENT *fts_read(FTS *ftsp); func Xfts_read(t *TLS, ftsp uintptr) uintptr { panic(todo("")) } // FILE *popen(const char *command, const char *type); func Xpopen(t *TLS, command, type1 uintptr) uintptr { panic(todo("")) } // int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen); func Xsysctlbyname(t *TLS, name, oldp, oldlenp, newp uintptr, newlen Tsize_t) int32 { oldlen := *(*Tsize_t)(unsafe.Pointer(oldlenp)) switch GoString(name) { case "hw.ncpu": if oldlen != 4 { panic(todo("")) } *(*int32)(unsafe.Pointer(oldp)) = int32(runtime.GOMAXPROCS(-1)) return 0 default: panic(todo("")) t.setErrno(ENOENT) return -1 } } // void uuid_copy(uuid_t dst, uuid_t src); func Xuuid_copy(t *TLS, dst, src uintptr) { if __ccgo_strace { trc("t=%v src=%v, (%v:)", t, src, origin(2)) } *(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src)) } // int uuid_parse( char *in, uuid_t uu); func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 { if __ccgo_strace { trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2)) } r, err := guuid.Parse(GoString(in)) if err != nil { return -1 } copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:]) return 0 } // void uuid_generate_random(uuid_t out); func Xuuid_generate_random(t *TLS, out uintptr) { if __ccgo_strace { trc("t=%v out=%v, (%v:)", t, out, origin(2)) } x := guuid.New() copy((*RawMem)(unsafe.Pointer(out))[:], x[:]) } // void uuid_unparse(uuid_t uu, char *out); func Xuuid_unparse(t *TLS, uu, out uintptr) { if __ccgo_strace { trc("t=%v out=%v, (%v:)", t, out, origin(2)) } s := (*guuid.UUID)(unsafe.Pointer(uu)).String() copy((*RawMem)(unsafe.Pointer(out))[:], s) *(*byte)(unsafe.Pointer(out + uintptr(len(s)))) = 0 } var Xzero_struct_address Taddress
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_darwin_arm64.go
vendor/modernc.org/libc/libc_darwin_arm64.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "strings" "time" "unsafe" "golang.org/x/sys/unix" "modernc.org/libc/fcntl" "modernc.org/libc/signal" "modernc.org/libc/stdio" "modernc.org/libc/sys/types" "modernc.org/libc/utime" ) // #define FE_UPWARD 0x00400000 // #define FE_DOWNWARD 0x00800000 const FE_UPWARD = 0x00400000 const FE_DOWNWARD = 0x00800000 // int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { if __ccgo_strace { trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2)) } var kact, koldact uintptr if act != 0 { sz := int(unsafe.Sizeof(signal.X__sigaction{})) kact = t.Alloc(sz) defer t.Free(sz) (*signal.X__sigaction)(unsafe.Pointer(kact)).F__sigaction_u.F__sa_handler = (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_u.F__sa_handler (*signal.X__sigaction)(unsafe.Pointer(kact)).Fsa_flags = (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags Xmemcpy(t, kact+unsafe.Offsetof(signal.X__sigaction{}.Fsa_mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(signal.Sigset_t(0)))) } if oldact != 0 { panic(todo("")) } if _, _, err := unix.Syscall6(unix.SYS_SIGACTION, uintptr(signum), kact, koldact, unsafe.Sizeof(signal.Sigset_t(0)), 0, 0); err != 0 { t.setErrno(err) return -1 } if oldact != 0 { panic(todo("")) } return 0 } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) defer func() { trc("-> %v", r) }() } var err error var p uintptr var i int switch cmd { case fcntl.F_GETLK, fcntl.F_SETLK, fcntl.F_SETLKW: p = *(*uintptr)(unsafe.Pointer(args)) err = unix.FcntlFlock(uintptr(fd), int(cmd), (*unix.Flock_t)(unsafe.Pointer(p))) case fcntl.F_GETFL, fcntl.F_FULLFSYNC: i, err = unix.FcntlInt(uintptr(fd), int(cmd), 0) r = int32(i) case fcntl.F_SETFD, fcntl.F_SETFL: arg := *(*int32)(unsafe.Pointer(args)) _, err = unix.FcntlInt(uintptr(fd), int(cmd), int(arg)) default: panic(todo("%v: %v %v", origin(1), fd, cmd)) } if err != nil { if dmesgs { dmesg("%v: fd %v cmd %v p %#x: %v FAIL", origin(1), fcntlCmdStr(fd), cmd, p, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d %s %#x: ok", origin(1), fd, fcntlCmdStr(cmd), p) } return r } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int stat(const char *pathname, struct stat *statbuf); func Xstat64(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(pathname)) } return 0 } // int fstatfs(int fd, struct statfs *buf); func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v buf=%v, (%v:)", t, fd, buf, origin(2)) } if err := unix.Fstatfs(int(fd), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil { if dmesgs { dmesg("%v: %v: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %v: ok", origin(1), fd) } return 0 } // int statfs(const char *path, struct statfs *buf); func Xstatfs(t *TLS, path uintptr, buf uintptr) int32 { if __ccgo_strace { trc("t=%v path=%v buf=%v, (%v:)", t, path, buf, origin(2)) } if err := unix.Statfs(GoString(path), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(path)) } return 0 } // int fstat(int fd, struct stat *statbuf); func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil { if dmesgs { dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: fd %d: ok", origin(1), fd) } return 0 } // off64_t lseek64(int fd, off64_t offset, int whence); func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } n, err := unix.Seek(int(fd), int64(offset), int(whence)) if err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return types.Off_t(n) } // int utime(const char *filename, const struct utimbuf *times); func Xutime(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } var a []unix.Timeval if times != 0 { a = make([]unix.Timeval, 2) a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime } if err := unix.Utimes(GoString(filename), a); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // unsigned int alarm(unsigned int seconds); func Xalarm(t *TLS, seconds uint32) uint32 { if __ccgo_strace { trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0) // if err != 0 { // panic(todo("")) // } // return uint32(n) } // time_t time(time_t *tloc); func Xtime(t *TLS, tloc uintptr) types.Time_t { if __ccgo_strace { trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2)) } n := time.Now().UTC().Unix() if tloc != 0 { *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n) } return types.Time_t(n) } // // int getrlimit(int resource, struct rlimit *rlim); // func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { // if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { // t.setErrno(err) // return -1 // } // // return 0 // } // int mkdir(const char *path, mode_t mode); func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2)) } if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q: ok", origin(1), GoString(path)) } return 0 } // int symlink(const char *target, const char *linkpath); func Xsymlink(t *TLS, target, linkpath uintptr) int32 { if __ccgo_strace { trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2)) } if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int chmod(const char *pathname, mode_t mode) func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) } return 0 } // int utimes(const char *filename, const struct timeval times[2]); func Xutimes(t *TLS, filename, times uintptr) int32 { if __ccgo_strace { trc("t=%v times=%v, (%v:)", t, times, origin(2)) } var a []unix.Timeval if times != 0 { a = make([]unix.Timeval, 2) a[0] = *(*unix.Timeval)(unsafe.Pointer(times)) a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{}))) } if err := unix.Utimes(GoString(filename), a); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int unlink(const char *pathname); func Xunlink(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } if err := unix.Unlink(GoString(pathname)); err != nil { if dmesgs { dmesg("%v: %q: %v", origin(1), GoString(pathname), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int access(const char *pathname, int mode); func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Access(GoString(pathname), uint32(mode)); err != nil { if dmesgs { dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) } return 0 } // int rename(const char *oldpath, const char *newpath); func Xrename(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // int mknod(const char *pathname, mode_t mode, dev_t dev); func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int chown(const char *pathname, uid_t owner, gid_t group); func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2)) } panic(todo("")) // if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 { // t.setErrno(err) // return -1 // } // return 0 } // int link(const char *oldpath, const char *newpath); func Xlink(t *TLS, oldpath, newpath uintptr) int32 { if __ccgo_strace { trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int dup2(int oldfd, int newfd); func Xdup2(t *TLS, oldfd, newfd int32) int32 { if __ccgo_strace { trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2)) } panic(todo("")) // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) // if err != 0 { // t.setErrno(err) // return -1 // } // return int32(n) } // ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2)) } var n int var err error switch { case buf == 0 || bufsize == 0: n, err = unix.Readlink(GoString(path), nil) default: n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize]) } if err != nil { if dmesgs { dmesg("%v: %v FAIL", err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok") } return types.Ssize_t(n) } // FILE *fopen64(const char *pathname, const char *mode); func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { if __ccgo_strace { trc("t=%v mode=%v, (%v:)", t, mode, origin(2)) } m := strings.ReplaceAll(GoString(mode), "b", "") var flags int switch m { case "r": flags = fcntl.O_RDONLY case "r+": flags = fcntl.O_RDWR case "w": flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC case "w+": flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC case "a": flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND case "a+": flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND default: panic(m) } fd, err := unix.Open(GoString(pathname), int(flags), 0666) if err != nil { if dmesgs { dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err) } t.setErrno(err) return 0 } if dmesgs { dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd) } if p := newFile(t, int32(fd)); p != 0 { return p } panic("OOM") } func Xrewinddir(tls *TLS, f uintptr) { if __ccgo_strace { trc("tls=%v f=%v, (%v:)", tls, f, origin(2)) } Xfseek(tls, f, 0, stdio.SEEK_SET) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/printf.go
vendor/modernc.org/libc/printf.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) package libc // import "modernc.org/libc" import ( "bytes" "fmt" "runtime" "strconv" "strings" "unsafe" ) const ( modNone = iota modHH modH modL modLL modLD modQ modCapitalL modJ modZ modCapitalZ modT mod32 mod64 ) // Format of the format string // // The format string is a character string, beginning and ending in its initial // shift state, if any. The format string is composed of zero or more // directives: ordinary characters (not %), which are copied unchanged to // the output stream; and conversion specifications, each of which results in // fetching zero or more subsequent arguments. func printf(format, args uintptr) []byte { // format0 := format // args0 := args buf := bytes.NewBuffer(nil) for { switch c := *(*byte)(unsafe.Pointer(format)); c { case '%': format = printfConversion(buf, format, &args) case 0: // if dmesgs { // dmesg("%v: %q, %#x -> %q", origin(1), GoString(format0), args0, buf.Bytes()) // } return buf.Bytes() default: format++ buf.WriteByte(c) } } } // Each conversion specification is introduced by the character %, and ends // with a conversion specifier. In between there may be (in this order) zero // or more flags, an optional minimum field width, an optional precision and // an optional length modifier. func printfConversion(buf *bytes.Buffer, format uintptr, args *uintptr) uintptr { format++ // '%' spec := "%" // Flags characters // // The character % is followed by zero or more of the following flags: flags: for { switch c := *(*byte)(unsafe.Pointer(format)); c { case '#': // The value should be converted to an "alternate form". For o conversions, // the first character of the output string is made zero (by prefixing a 0 if // it was not zero already). For x and X conversions, a nonzero result has // the string "0x" (or "0X" for X conversions) prepended to it. For a, A, e, // E, f, F, g, and G conversions, the result will always contain a decimal // point, even if no digits follow it (normally, a decimal point appears in the // results of those conversions only if a digit follows). For g and G // conversions, trailing zeros are not removed from the result as they would // otherwise be. For other conversions, the result is undefined. format++ spec += "#" case '0': // The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, // g, and G conversions, the converted value is padded on the left with zeros // rather than blanks. If the 0 and - flags both appear, the 0 flag is // ignored. If a precision is given with a numeric conversion (d, i, o, u, x, // and X), the 0 flag is ignored. For other conversions, the behav‐ ior is // undefined. format++ spec += "0" case '-': // The converted value is to be left adjusted on the field boundary. (The // default is right justification.) The converted value is padded on the right // with blanks, rather than on the left with blanks or zeros. A - overrides a // 0 if both are given. format++ spec += "-" case ' ': // A blank should be left before a positive number (or empty string) produced // by a signed conversion. format++ spec += " " case '+': // A sign (+ or -) should always be placed before a number produced by a signed // conversion. By default, a sign is used only for negative numbers. A + // overrides a space if both are used. format++ spec += "+" default: break flags } } format, width, hasWidth := parseFieldWidth(format, args) if hasWidth { spec += strconv.Itoa(width) } format, prec, hasPrecision := parsePrecision(format, args) format, mod := parseLengthModifier(format) var str string more: // Conversion specifiers // // A character that specifies the type of conversion to be applied. The // conversion specifiers and their meanings are: switch c := *(*byte)(unsafe.Pointer(format)); c { case 'd', 'i': // The int argument is converted to signed decimal notation. The precision, // if any, gives the minimum number of digits that must appear; if the // converted value requires fewer digits, it is padded on the left with zeros. // The default precision is 1. When 0 is printed with an explicit precision 0, // the output is empty. format++ var arg int64 if isWindows && mod == modL { mod = modNone } switch mod { case modL, modLL, mod64, modJ: arg = VaInt64(args) case modH: arg = int64(int16(VaInt32(args))) case modHH: arg = int64(int8(VaInt32(args))) case mod32, modNone: arg = int64(VaInt32(args)) case modT: arg = int64(VaInt64(args)) default: panic(todo("", mod)) } if arg == 0 && hasPrecision && prec == 0 { break } if hasPrecision { panic(todo("", prec)) } f := spec + "d" str = fmt.Sprintf(f, arg) case 'u': // The unsigned int argument is converted to unsigned decimal notation. The // precision, if any, gives the minimum number of digits that must appear; if // the converted value requires fewer digits, it is padded on the left with // zeros. The default precision is 1. When 0 is printed with an explicit // precision 0, the output is empty. format++ var arg uint64 if isWindows && mod == modL { mod = modNone } switch mod { case modNone: arg = uint64(VaUint32(args)) case modL, modLL, mod64: arg = VaUint64(args) case modH: arg = uint64(uint16(VaInt32(args))) case modHH: arg = uint64(uint8(VaInt32(args))) case mod32: arg = uint64(VaInt32(args)) case modZ: arg = uint64(VaInt64(args)) default: panic(todo("", mod)) } if arg == 0 && hasPrecision && prec == 0 { break } if hasPrecision { panic(todo("", prec)) } f := spec + "d" str = fmt.Sprintf(f, arg) case 'o': // The unsigned int argument is converted to unsigned octal notation. The // precision, if any, gives the minimum number of digits that must appear; if // the converted value requires fewer digits, it is padded on the left with // zeros. The default precision is 1. When 0 is printed with an explicit // precision 0, the output is empty. format++ var arg uint64 if isWindows && mod == modL { mod = modNone } switch mod { case modNone: arg = uint64(VaUint32(args)) case modL, modLL, mod64: arg = VaUint64(args) case modH: arg = uint64(uint16(VaInt32(args))) case modHH: arg = uint64(uint8(VaInt32(args))) case mod32: arg = uint64(VaInt32(args)) default: panic(todo("", mod)) } if arg == 0 && hasPrecision && prec == 0 { break } if hasPrecision { panic(todo("", prec)) } f := spec + "o" str = fmt.Sprintf(f, arg) case 'b': // Base 2. format++ var arg uint64 if isWindows && mod == modL { mod = modNone } switch mod { case modNone: arg = uint64(VaUint32(args)) case modL, modLL, mod64: arg = VaUint64(args) case modH: arg = uint64(uint16(VaInt32(args))) case modHH: arg = uint64(uint8(VaInt32(args))) case mod32: arg = uint64(VaInt32(args)) default: panic(todo("", mod)) } if arg == 0 && hasPrecision && prec == 0 { break } if hasPrecision { panic(todo("", prec)) } f := spec + "b" str = fmt.Sprintf(f, arg) case 'I': if !isWindows { panic(todo("%#U", c)) } format++ switch c = *(*byte)(unsafe.Pointer(format)); c { case 'x', 'X': // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-wsprintfa // // Ix, IX // // 64-bit unsigned hexadecimal integer in lowercase or uppercase on 64-bit // platforms, 32-bit unsigned hexadecimal integer in lowercase or uppercase on // 32-bit platforms. if unsafe.Sizeof(int(0)) == 4 { mod = mod32 } case '3': // https://en.wikipedia.org/wiki/Printf_format_string#Length_field // // I32 For integer types, causes printf to expect a 32-bit (double word) integer argument. format++ switch c = *(*byte)(unsafe.Pointer(format)); c { case '2': format++ mod = mod32 goto more default: panic(todo("%#U", c)) } case '6': // https://en.wikipedia.org/wiki/Printf_format_string#Length_field // // I64 For integer types, causes printf to expect a 64-bit (quad word) integer argument. format++ switch c = *(*byte)(unsafe.Pointer(format)); c { case '4': format++ mod = mod64 goto more default: panic(todo("%#U", c)) } default: panic(todo("%#U", c)) } fallthrough case 'X': fallthrough case 'x': // The unsigned int argument is converted to unsigned hexadecimal notation. // The letters abcdef are used for x conversions; the letters ABCDEF are used // for X conversions. The precision, if any, gives the minimum number of // digits that must appear; if the converted value requires fewer digits, it is // padded on the left with zeros. The default precision is 1. When 0 is // printed with an explicit precision 0, the output is empty. format++ var arg uint64 if isWindows && mod == modL { mod = modNone } switch mod { case modNone: arg = uint64(VaUint32(args)) case modL, modLL, mod64: arg = VaUint64(args) case modH: arg = uint64(uint16(VaInt32(args))) case modHH: arg = uint64(uint8(VaInt32(args))) case mod32: arg = uint64(VaInt32(args)) case modZ: arg = uint64(VaInt64(args)) default: panic(todo("", mod)) } if arg == 0 && hasPrecision && prec == 0 { break } if strings.Contains(spec, "#") && arg == 0 { spec = strings.ReplaceAll(spec, "#", "") } var f string switch { case hasPrecision: f = fmt.Sprintf("%s.%d%c", spec, prec, c) default: f = spec + string(c) } str = fmt.Sprintf(f, arg) case 'e', 'E': // The double argument is rounded and converted in the style [-]d.ddde±dd where // there is one digit before the decimal-point character and the number of // digits after it is equal to the precision; if the precision is missing, it // is taken as 6; if the precision is zero, no decimal-point character appears. // An E conversion uses the letter E (rather than e) to intro‐ duce the // exponent. The exponent always contains at least two digits; if the value is // zero, the exponent is 00. format++ arg := VaFloat64(args) if !hasPrecision { prec = 6 } f := fmt.Sprintf("%s.%d%c", spec, prec, c) str = fmt.Sprintf(f, arg) case 'f', 'F': // The double argument is rounded and converted to decimal notation in the // style [-]ddd.ddd, where the number of digits after the decimal-point // character is equal to the precision specification. If the precision // is missing, it is taken as 6; if the precision is explicitly zero, no // decimal-point character appears. If a decimal point appears, at least one // digit appears before it. format++ arg := VaFloat64(args) if !hasPrecision { prec = 6 } f := fmt.Sprintf("%s.%d%c", spec, prec, c) str = fixNanInf(fmt.Sprintf(f, arg)) case 'G': fallthrough case 'g': // The double argument is converted in style f or e (or F or E for G // conversions). The precision specifies the number of significant digits. If // the precision is missing, 6 digits are given; if the precision is zero, it // is treated as 1. Style e is used if the exponent from its conversion is // less than -4 or greater than or equal to the precision. Trailing zeros are // removed from the fractional part of the result; a decimal point appears only // if it is followed by at least one digit. format++ arg := VaFloat64(args) if !hasPrecision { prec = 6 } if prec == 0 { prec = 1 } f := fmt.Sprintf("%s.%d%c", spec, prec, c) str = fixNanInf(fmt.Sprintf(f, arg)) case 's': // If no l modifier is present: the const char * argument is expected to be a // pointer to an array of character type (pointer to a string). Characters // from the array are written up to (but not including) a terminating null byte // ('\0'); if a precision is specified, no more than the number specified are // written. If a precision is given, no null byte need be present; if // the precision is not specified, or is greater than the size of the array, // the array must contain a terminating null byte. // // If an l modifier is present: the const wchar_t * argument is expected // to be a pointer to an array of wide characters. Wide characters from the // array are converted to multibyte characters (each by a call to the // wcrtomb(3) function, with a conversion state starting in the initial state // before the first wide character), up to and including a terminating null // wide character. The resulting multibyte characters are written up to // (but not including) the terminating null byte. If a precision is specified, // no more bytes than the number specified are written, but no partial // multibyte characters are written. Note that the precision determines the // number of bytes written, not the number of wide characters or screen // positions. The array must contain a terminating null wide character, // unless a precision is given and it is so small that the number of bytes // written exceeds it before the end of the array is reached. format++ arg := VaUintptr(args) switch mod { case modNone: var f string switch { case hasPrecision: f = fmt.Sprintf("%s.%ds", spec, prec) str = fmt.Sprintf(f, GoString(arg)) default: f = spec + "s" str = fmt.Sprintf(f, GoString(arg)) } default: panic(todo("")) } case 'p': // The void * pointer argument is printed in hexadecimal (as if by %#x or // %#lx). format++ switch runtime.GOOS { case "windows": switch runtime.GOARCH { case "386", "arm": fmt.Fprintf(buf, "%08X", VaUintptr(args)) default: fmt.Fprintf(buf, "%016X", VaUintptr(args)) } default: fmt.Fprintf(buf, "%#0x", VaUintptr(args)) } case 'c': // If no l modifier is present, the int argument is converted to an unsigned // char, and the resulting character is written. If an l modifier is present, // the wint_t (wide character) ar‐ gument is converted to a multibyte sequence // by a call to the wcrtomb(3) function, with a conversion state starting in // the initial state, and the resulting multibyte string is writ‐ ten. format++ switch mod { case modNone: arg := VaInt32(args) buf.WriteByte(byte(arg)) default: panic(todo("")) } case '%': // A '%' is written. No argument is converted. The complete conversion // specification is '%%'. format++ buf.WriteByte('%') default: panic(todo("%#U", c)) } buf.WriteString(str) return format } // Field width // // An optional decimal digit string (with nonzero first digit) specifying a // minimum field width. If the converted value has fewer characters than the // field width, it will be padded with spa‐ ces on the left (or right, if the // left-adjustment flag has been given). Instead of a decimal digit string one // may write "*" or "*m$" (for some decimal integer m) to specify that the // field width is given in the next argument, or in the m-th argument, // respectively, which must be of type int. A negative field width is taken as // a '-' flag followed by a positive field width. In no case does a // nonexistent or small field width cause truncation of a field; if the result // of a conversion is wider than the field width, the field is expanded to // contain the conversion result. func parseFieldWidth(format uintptr, args *uintptr) (_ uintptr, n int, ok bool) { first := true for { var digit int switch c := *(*byte)(unsafe.Pointer(format)); { case first && c == '0': return format, n, ok case first && c == '*': format++ switch c := *(*byte)(unsafe.Pointer(format)); { case c >= '0' && c <= '9': panic(todo("")) default: return format, int(VaInt32(args)), true } case c >= '0' && c <= '9': format++ ok = true first = false digit = int(c) - '0' default: return format, n, ok } n0 := n n = 10*n + digit if n < n0 { panic(todo("")) } } } // Precision // // An optional precision, in the form of a period ('.') followed by an // optional decimal digit string. Instead of a decimal digit string one may // write "*" or "*m$" (for some decimal integer m) to specify that the // precision is given in the next argument, or in the m-th argument, // respectively, which must be of type int. If the precision is given as just // '.', the precision is taken to be zero. A negative precision is taken // as if the precision were omitted. This gives the minimum number of digits // to appear for d, i, o, u, x, and X conversions, the number of digits to // appear after the radix character for a, A, e, E, f, and F conversions, the // maximum number of significant digits for g and G conversions, or the maximum // number of characters to be printed from a string for s and S conversions. func parsePrecision(format uintptr, args *uintptr) (_ uintptr, n int, ok bool) { for { switch c := *(*byte)(unsafe.Pointer(format)); c { case '.': format++ first := true for { switch c := *(*byte)(unsafe.Pointer(format)); { case first && c == '*': format++ n = int(VaInt32(args)) return format, n, true case c >= '0' && c <= '9': format++ first = false n0 := n n = 10*n + (int(c) - '0') if n < n0 { panic(todo("")) } default: return format, n, true } } default: return format, 0, false } } } // Length modifier // // Here, "integer conversion" stands for d, i, o, u, x, or X conversion. // // hh A following integer conversion corresponds to a signed char or // unsigned char argument, or a following n conversion corresponds to a pointer // to a signed char argument. // // h A following integer conversion corresponds to a short int or unsigned // short int argument, or a following n conversion corresponds to a pointer to // a short int argument. // // l (ell) A following integer conversion corresponds to a long int or // unsigned long int argument, or a following n conversion corresponds to a // pointer to a long int argument, or a fol‐ lowing c conversion corresponds to // a wint_t argument, or a following s conversion corresponds to a pointer to // wchar_t argument. // // ll (ell-ell). A following integer conversion corresponds to a long long // int or unsigned long long int argument, or a following n conversion // corresponds to a pointer to a long long int argument. // // q A synonym for ll. This is a nonstandard extension, derived from BSD; // avoid its use in new code. // // L A following a, A, e, E, f, F, g, or G conversion corresponds to a // long double argument. (C99 allows %LF, but SUSv2 does not.) // // j A following integer conversion corresponds to an intmax_t or // uintmax_t argument, or a following n conversion corresponds to a pointer to // an intmax_t argument. // // z A following integer conversion corresponds to a size_t or ssize_t // argument, or a following n conversion corresponds to a pointer to a size_t // argument. // // Z A nonstandard synonym for z that predates the appearance of z. Do // not use in new code. // // t A following integer conversion corresponds to a ptrdiff_t argument, // or a following n conversion corresponds to a pointer to a ptrdiff_t // argument. func parseLengthModifier(format uintptr) (_ uintptr, n int) { switch c := *(*byte)(unsafe.Pointer(format)); c { case 'h': format++ n = modH switch c := *(*byte)(unsafe.Pointer(format)); c { case 'h': format++ n = modHH } return format, n case 'l': format++ n = modL switch c := *(*byte)(unsafe.Pointer(format)); c { case 'l': format++ n = modLL } return format, n case 'q': panic(todo("")) case 'L': format++ n = modLD return format, n case 'j': format++ n = modJ return format, n case 'z': format++ return format, modZ case 'Z': format++ return format, modCapitalZ case 't': format++ return format, modT default: return format, 0 } } func fixNanInf(s string) string { switch s { case "NaN": return "nan" case "+Inf", "-Inf": return "inf" default: return s } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/builtin.go
vendor/modernc.org/libc/builtin.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm) package libc // import "modernc.org/libc" import ( "fmt" "math" mbits "math/bits" "os" "unsafe" "modernc.org/mathutil" ) func X__builtin_inff(tls *TLS) float32 { return float32(math.Inf(1)) } func X__builtin_nanf(tls *TLS, s uintptr) float32 { return float32(math.NaN()) } func X__builtin_printf(tls *TLS, fmt uintptr, va uintptr) (r int32) { return Xprintf(tls, fmt, va) } func X__builtin_round(tls *TLS, x float64) (r float64) { return Xround(tls, x) } func X__builtin_lround(tls *TLS, x float64) (r long) { return Xlround(tls, x) } func X__builtin_roundf(tls *TLS, x float32) (r float32) { return Xroundf(tls, x) } func X__builtin_expect(t *TLS, exp, c long) long { return exp } func X__builtin_bzero(t *TLS, s uintptr, n Tsize_t) { Xbzero(t, s, n) } func X__builtin_abort(t *TLS) { Xabort(t) } func X__builtin_abs(t *TLS, j int32) int32 { return Xabs(t, j) } func X__builtin_ctz(t *TLS, n uint32) int32 { return int32(mbits.TrailingZeros32(n)) } func X__builtin_clz(t *TLS, n uint32) int32 { return int32(mbits.LeadingZeros32(n)) } func X__builtin_clzll(t *TLS, n uint64) int32 { return int32(mbits.LeadingZeros64(n)) } func X__builtin_constant_p_impl() { panic(todo("internal error: should never be called")) } func X__builtin_copysign(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) } func X__builtin_copysignf(t *TLS, x, y float32) float32 { return Xcopysignf(t, x, y) } func X__builtin_copysignl(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) } func X__builtin_exit(t *TLS, status int32) { Xexit(t, status) } func X__builtin_fabs(t *TLS, x float64) float64 { return Xfabs(t, x) } func X__builtin_fabsf(t *TLS, x float32) float32 { return Xfabsf(t, x) } func X__builtin_fabsl(t *TLS, x float64) float64 { return Xfabsl(t, x) } func X__builtin_free(t *TLS, ptr uintptr) { Xfree(t, ptr) } func X__builtin_getentropy(t *TLS, buf uintptr, n Tsize_t) int32 { return Xgetentropy(t, buf, n) } func X__builtin_huge_val(t *TLS) float64 { return math.Inf(1) } func X__builtin_huge_valf(t *TLS) float32 { return float32(math.Inf(1)) } func X__builtin_inf(t *TLS) float64 { return math.Inf(1) } func X__builtin_infl(t *TLS) float64 { return math.Inf(1) } func X__builtin_malloc(t *TLS, size Tsize_t) uintptr { return Xmalloc(t, size) } func X__builtin_memcmp(t *TLS, s1, s2 uintptr, n Tsize_t) int32 { return Xmemcmp(t, s1, s2, n) } func X__builtin_nan(t *TLS, s uintptr) float64 { return math.NaN() } func X__builtin_nanl(t *TLS, s uintptr) float64 { return math.NaN() } func X__builtin_prefetch(t *TLS, addr, args uintptr) { } func X__builtin_strchr(t *TLS, s uintptr, c int32) uintptr { return Xstrchr(t, s, c) } func X__builtin_strcmp(t *TLS, s1, s2 uintptr) int32 { return Xstrcmp(t, s1, s2) } func X__builtin_strcpy(t *TLS, dest, src uintptr) uintptr { return Xstrcpy(t, dest, src) } func X__builtin_strlen(t *TLS, s uintptr) Tsize_t { return Xstrlen(t, s) } func X__builtin_trap(t *TLS) { Xabort(t) } func X__builtin_popcount(t *TLS, x uint32) int32 { return int32(mbits.OnesCount32(x)) } // char * __builtin___strcpy_chk (char *dest, const char *src, size_t os); func X__builtin___strcpy_chk(t *TLS, dest, src uintptr, os Tsize_t) uintptr { return Xstrcpy(t, dest, src) } func X__builtin_mmap(t *TLS, addr uintptr, length Tsize_t, prot, flags, fd int32, offset Toff_t) uintptr { return Xmmap(t, addr, length, prot, flags, fd, offset) } // uint16_t __builtin_bswap16 (uint32_t x) func X__builtin_bswap16(t *TLS, x uint16) uint16 { return x<<8 | x>>8 } // uint32_t __builtin_bswap32 (uint32_t x) func X__builtin_bswap32(t *TLS, x uint32) uint32 { return x<<24 | x&0xff00<<8 | x&0xff0000>>8 | x>>24 } // uint64_t __builtin_bswap64 (uint64_t x) func X__builtin_bswap64(t *TLS, x uint64) uint64 { return x<<56 | x&0xff00<<40 | x&0xff0000<<24 | x&0xff000000<<8 | x&0xff00000000>>8 | x&0xff0000000000>>24 | x&0xff000000000000>>40 | x>>56 } // bool __builtin_add_overflow (type1 a, type2 b, type3 *res) func X__builtin_add_overflowInt64(t *TLS, a, b int64, res uintptr) int32 { r, ovf := mathutil.AddOverflowInt64(a, b) *(*int64)(unsafe.Pointer(res)) = r return Bool32(ovf) } // bool __builtin_add_overflow (type1 a, type2 b, type3 *res) func X__builtin_add_overflowUint32(t *TLS, a, b uint32, res uintptr) int32 { r := a + b *(*uint32)(unsafe.Pointer(res)) = r return Bool32(r < a) } // bool __builtin_add_overflow (type1 a, type2 b, type3 *res) func X__builtin_add_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 { r := a + b *(*uint64)(unsafe.Pointer(res)) = r return Bool32(r < a) } // bool __builtin_sub_overflow (type1 a, type2 b, type3 *res) func X__builtin_sub_overflowInt64(t *TLS, a, b int64, res uintptr) int32 { r, ovf := mathutil.SubOverflowInt64(a, b) *(*int64)(unsafe.Pointer(res)) = r return Bool32(ovf) } // bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) func X__builtin_mul_overflowInt64(t *TLS, a, b int64, res uintptr) int32 { r, ovf := mathutil.MulOverflowInt64(a, b) *(*int64)(unsafe.Pointer(res)) = r return Bool32(ovf) } // bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) func X__builtin_mul_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 { hi, lo := mbits.Mul64(a, b) *(*uint64)(unsafe.Pointer(res)) = lo return Bool32(hi != 0) } // bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) func X__builtin_mul_overflowUint128(t *TLS, a, b Uint128, res uintptr) int32 { r, ovf := a.mulOvf(b) *(*Uint128)(unsafe.Pointer(res)) = r return Bool32(ovf) } func X__builtin_unreachable(t *TLS) { fmt.Fprintf(os.Stderr, "unrechable\n") os.Stderr.Sync() Xexit(t, 1) } func X__builtin_snprintf(t *TLS, str uintptr, size Tsize_t, format, args uintptr) int32 { return Xsnprintf(t, str, size, format, args) } func X__builtin_sprintf(t *TLS, str, format, args uintptr) (r int32) { return Xsprintf(t, str, format, args) } func X__builtin_memcpy(t *TLS, dest, src uintptr, n Tsize_t) (r uintptr) { return Xmemcpy(t, dest, src, n) } // void * __builtin___memcpy_chk (void *dest, const void *src, size_t n, size_t os); func X__builtin___memcpy_chk(t *TLS, dest, src uintptr, n, os Tsize_t) (r uintptr) { if os != ^Tsize_t(0) && n < os { Xabort(t) } return Xmemcpy(t, dest, src, n) } func X__builtin_memset(t *TLS, s uintptr, c int32, n Tsize_t) uintptr { return Xmemset(t, s, c, n) } // void * __builtin___memset_chk (void *s, int c, size_t n, size_t os); func X__builtin___memset_chk(t *TLS, s uintptr, c int32, n, os Tsize_t) uintptr { if os < n { Xabort(t) } return Xmemset(t, s, c, n) } // size_t __builtin_object_size (const void * ptr, int type) func X__builtin_object_size(t *TLS, p uintptr, typ int32) Tsize_t { switch typ { case 0, 1: return ^Tsize_t(0) default: return 0 } } // int __builtin___sprintf_chk (char *s, int flag, size_t os, const char *fmt, ...); func X__builtin___sprintf_chk(t *TLS, s uintptr, flag int32, os Tsize_t, format, args uintptr) (r int32) { return Xsprintf(t, s, format, args) } func X__builtin_vsnprintf(t *TLS, str uintptr, size Tsize_t, format, va uintptr) int32 { return Xvsnprintf(t, str, size, format, va) } // int __builtin___snprintf_chk(char * str, size_t maxlen, int flag, size_t os, const char * format, ...); func X__builtin___snprintf_chk(t *TLS, str uintptr, maxlen Tsize_t, flag int32, os Tsize_t, format, args uintptr) (r int32) { if os != ^Tsize_t(0) && maxlen > os { Xabort(t) } return Xsnprintf(t, str, maxlen, format, args) } // int __builtin___vsnprintf_chk (char *s, size_t maxlen, int flag, size_t os, const char *fmt, va_list ap); func X__builtin___vsnprintf_chk(t *TLS, str uintptr, maxlen Tsize_t, flag int32, os Tsize_t, format, args uintptr) (r int32) { if os != ^Tsize_t(0) && maxlen > os { Xabort(t) } return Xsnprintf(t, str, maxlen, format, args) } func Xisnan(t *TLS, x float64) int32 { return X__builtin_isnan(t, x) } func X__isnan(t *TLS, x float64) int32 { return X__builtin_isnan(t, x) } func X__builtin_isnan(t *TLS, x float64) int32 { return Bool32(math.IsNaN(x)) } func Xisnanf(t *TLS, arg float32) int32 { return X__builtin_isnanf(t, arg) } func X__isnanf(t *TLS, arg float32) int32 { return X__builtin_isnanf(t, arg) } func X__builtin_isnanf(t *TLS, x float32) int32 { return Bool32(math.IsNaN(float64(x))) } func Xisnanl(t *TLS, arg float64) int32 { return X__builtin_isnanl(t, arg) } func X__isnanl(t *TLS, arg float64) int32 { return X__builtin_isnanl(t, arg) } func X__builtin_isnanl(t *TLS, x float64) int32 { return Bool32(math.IsNaN(x)) } func X__builtin_llabs(tls *TLS, a int64) int64 { return Xllabs(tls, a) } func X__builtin_log2(t *TLS, x float64) float64 { return Xlog2(t, x) } func X__builtin___strncpy_chk(t *TLS, dest, src uintptr, n, os Tsize_t) (r uintptr) { if n != ^Tsize_t(0) && os < n { Xabort(t) } return Xstrncpy(t, dest, src, n) } func X__builtin___strcat_chk(t *TLS, dest, src uintptr, os Tsize_t) (r uintptr) { return Xstrcat(t, dest, src) } func X__builtin___memmove_chk(t *TLS, dest, src uintptr, n, os Tsize_t) uintptr { if os != ^Tsize_t(0) && os < n { Xabort(t) } return Xmemmove(t, dest, src, n) } func X__builtin_isunordered(t *TLS, a, b float64) int32 { return Bool32(math.IsNaN(a) || math.IsNaN(b)) } func X__builtin_ffs(tls *TLS, i int32) (r int32) { return Xffs(tls, i) } func X__builtin_rintf(tls *TLS, x float32) (r float32) { return Xrintf(tls, x) } func X__builtin_lrintf(tls *TLS, x float32) (r long) { return Xlrintf(tls, x) } func X__builtin_lrint(tls *TLS, x float64) (r long) { return Xlrint(tls, x) } // double __builtin_fma(double x, double y, double z); func X__builtin_fma(tls *TLS, x, y, z float64) (r float64) { return math.FMA(x, y, z) } func X__builtin_alloca(tls *TLS, size Tsize_t) uintptr { return Xalloca(tls, size) } func X__builtin_isprint(tls *TLS, c int32) (r int32) { return Xisprint(tls, c) } func X__builtin_isblank(tls *TLS, c int32) (r int32) { return Xisblank(tls, c) } func X__builtin_trunc(tls *TLS, x float64) (r float64) { return Xtrunc(tls, x) } func X__builtin_hypot(tls *TLS, x float64, y float64) (r float64) { return Xhypot(tls, x, y) } func X__builtin_fmax(tls *TLS, x float64, y float64) (r float64) { return Xfmax(tls, x, y) } func X__builtin_fmin(tls *TLS, x float64, y float64) (r float64) { return Xfmin(tls, x, y) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_unix.go
vendor/modernc.org/libc/libc_unix.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build unix && !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) package libc // import "modernc.org/libc" import ( "bufio" // "encoding/hex" "math" "math/rand" "os" gosignal "os/signal" "reflect" "runtime" "strconv" "strings" "sync" "time" "unsafe" guuid "github.com/google/uuid" "github.com/ncruces/go-strftime" "golang.org/x/sys/unix" "modernc.org/libc/errno" "modernc.org/libc/grp" "modernc.org/libc/limits" "modernc.org/libc/poll" "modernc.org/libc/pwd" "modernc.org/libc/signal" "modernc.org/libc/stdio" "modernc.org/libc/stdlib" "modernc.org/libc/sys/types" ctime "modernc.org/libc/time" ) var staticGetpwnam pwd.Passwd func init() { atExit = append(atExit, func() { closePasswd(&staticGetpwnam) }) } // sighandler_t signal(int signum, sighandler_t handler); func Xsignal(t *TLS, signum int32, handler uintptr) uintptr { //TODO use sigaction? if __ccgo_strace { trc("t=%v signum=%v handler=%v, (%v:)", t, signum, handler, origin(2)) } signalsMu.Lock() defer signalsMu.Unlock() r := signals[signum] signals[signum] = handler switch handler { case signal.SIG_DFL: panic(todo("%v %#x", unix.Signal(signum), handler)) case signal.SIG_IGN: switch r { case signal.SIG_DFL: gosignal.Ignore(unix.Signal(signum)) //TODO case signal.SIG_IGN: gosignal.Ignore(unix.Signal(signum)) default: panic(todo("%v %#x", unix.Signal(signum), handler)) } default: switch r { case signal.SIG_DFL: c := make(chan os.Signal, 1) gosignal.Notify(c, unix.Signal(signum)) go func() { //TODO mechanism to stop/cancel for { <-c var f func(*TLS, int32) *(*uintptr)(unsafe.Pointer(&f)) = handler tls := NewTLS() f(tls, signum) tls.Close() } }() case signal.SIG_IGN: panic(todo("%v %#x", unix.Signal(signum), handler)) default: panic(todo("%v %#x", unix.Signal(signum), handler)) } } return r } // void rewind(FILE *stream); func Xrewind(t *TLS, stream uintptr) { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } Xfseek(t, stream, 0, stdio.SEEK_SET) } // int putchar(int c); func Xputchar(t *TLS, c int32) int32 { if __ccgo_strace { trc("t=%v c=%v, (%v:)", t, c, origin(2)) } if _, err := write([]byte{byte(c)}); err != nil { return stdio.EOF } return int32(c) } // int gethostname(char *name, size_t len); func Xgethostname(t *TLS, name uintptr, slen types.Size_t) int32 { if __ccgo_strace { trc("t=%v name=%v slen=%v, (%v:)", t, name, slen, origin(2)) } if slen == 0 { return 0 } s, err := os.Hostname() if err != nil { panic(todo("")) } n := len(s) if len(s) >= int(slen) { n = int(slen) - 1 } sh := (*reflect.StringHeader)(unsafe.Pointer(&s)) copy((*RawMem)(unsafe.Pointer(name))[:n:n], (*RawMem)(unsafe.Pointer(sh.Data))[:n:n]) *(*byte)(unsafe.Pointer(name + uintptr(n))) = 0 return 0 } // int remove(const char *pathname); func Xremove(t *TLS, pathname uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2)) } if err := os.Remove(GoString(pathname)); err != nil { t.setErrno(err) return -1 } return 0 } // long pathconf(const char *path, int name); func Xpathconf(t *TLS, path uintptr, name int32) long { if __ccgo_strace { trc("t=%v path=%v name=%v, (%v:)", t, path, name, origin(2)) } panic(todo("")) } // ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); func Xrecvfrom(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32, src_addr, addrlen uintptr) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v addrlen=%v, (%v:)", t, sockfd, buf, len, flags, addrlen, origin(2)) } panic(todo("")) } // ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); func Xsendto(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32, src_addr uintptr, addrlen socklen_t) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v src_addr=%v addrlen=%v, (%v:)", t, sockfd, buf, len, flags, src_addr, addrlen, origin(2)) } panic(todo("")) } // void srand48(long int seedval); func Xsrand48(t *TLS, seedval long) { if __ccgo_strace { trc("t=%v seedval=%v, (%v:)", t, seedval, origin(2)) } panic(todo("")) } // long int lrand48(void); func Xlrand48(t *TLS) long { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) } // ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); func Xsendmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v msg=%v flags=%v, (%v:)", t, sockfd, msg, flags, origin(2)) } panic(todo("")) } // int poll(struct pollfd *fds, nfds_t nfds, int timeout); func Xpoll(t *TLS, fds uintptr, nfds poll.Nfds_t, timeout int32) int32 { if __ccgo_strace { trc("t=%v fds=%v nfds=%v timeout=%v, (%v:)", t, fds, nfds, timeout, origin(2)) } if nfds == 0 { panic(todo("")) } // if dmesgs { // dmesg("%v: %#x %v %v, %+v", origin(1), fds, nfds, timeout, (*[1000]unix.PollFd)(unsafe.Pointer(fds))[:nfds:nfds]) // } n, err := unix.Poll((*[1000]unix.PollFd)(unsafe.Pointer(fds))[:nfds:nfds], int(timeout)) // if dmesgs { // dmesg("%v: %v %v", origin(1), n, err) // } if err != nil { t.setErrno(err) return -1 } return int32(n) } // struct cmsghdr *CMSG_NXTHDR(struct msghdr *msgh, struct cmsghdr *cmsg); func X__cmsg_nxthdr(t *TLS, msgh, cmsg uintptr) uintptr { if __ccgo_strace { trc("t=%v cmsg=%v, (%v:)", t, cmsg, origin(2)) } panic(todo("")) } // wchar_t *wcschr(const wchar_t *wcs, wchar_t wc); func Xwcschr(t *TLS, wcs uintptr, wc wchar_t) wchar_t { if __ccgo_strace { trc("t=%v wcs=%v wc=%v, (%v:)", t, wcs, wc, origin(2)) } panic(todo("")) } // gid_t getegid(void); func Xgetegid(t *TLS) types.Gid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) } // gid_t getgid(void); func Xgetgid(t *TLS) types.Gid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) } // void *shmat(int shmid, const void *shmaddr, int shmflg); func Xshmat(t *TLS, shmid int32, shmaddr uintptr, shmflg int32) uintptr { if __ccgo_strace { trc("t=%v shmid=%v shmaddr=%v shmflg=%v, (%v:)", t, shmid, shmaddr, shmflg, origin(2)) } panic(todo("")) } // int shmctl(int shmid, int cmd, struct shmid_ds *buf); func Xshmctl(t *TLS, shmid, cmd int32, buf uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v buf=%v, (%v:)", t, cmd, buf, origin(2)) } panic(todo("")) } // int shmdt(const void *shmaddr); func Xshmdt(t *TLS, shmaddr uintptr) int32 { if __ccgo_strace { trc("t=%v shmaddr=%v, (%v:)", t, shmaddr, origin(2)) } panic(todo("")) } // int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); func Xgetresuid(t *TLS, ruid, euid, suid uintptr) int32 { if __ccgo_strace { trc("t=%v suid=%v, (%v:)", t, suid, origin(2)) } panic(todo("")) } // int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); func Xgetresgid(t *TLS, rgid, egid, sgid uintptr) int32 { if __ccgo_strace { trc("t=%v sgid=%v, (%v:)", t, sgid, origin(2)) } panic(todo("")) } // FILE *tmpfile(void); func Xtmpfile(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } f, err := os.CreateTemp("", "tmpfile-") if err != nil { t.setErrno(err) return 0 } cf := newFile(t, int32(f.Fd())) AtExit(func() { nm := f.Name() file(cf).close(t) os.Remove(nm) }) return cf } // FILE *fdopen(int fd, const char *mode); func Xfdopen(t *TLS, fd int32, mode uintptr) uintptr { if __ccgo_strace { trc("t=%v fd=%v mode=%v, (%v:)", t, fd, GoString(mode), origin(2)) } m := strings.ReplaceAll(GoString(mode), "b", "") switch m { case "a", "a+", "r", "r+", "w", "w+": default: t.setErrno(errno.EINVAL) return 0 } p := newFile(t, fd) if p == 0 { t.setErrno(errno.EINVAL) return 0 } return p } // struct passwd *getpwnam(const char *name); func Xgetpwnam(t *TLS, name uintptr) uintptr { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } f, err := os.Open("/etc/passwd") if err != nil { panic(todo("", err)) } defer f.Close() sname := GoString(name) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if s == "" || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:0:root:/root:/bin/bash" a := strings.Split(s, ":") if len(a) < 7 { panic(todo("")) } if a[0] == sname { uid, err := strconv.Atoi(a[2]) if err != nil { panic(todo("")) } gid, err := strconv.Atoi(a[3]) if err != nil { panic(todo("")) } closePasswd(&staticGetpwnam) gecos := a[4] if strings.Contains(gecos, ",") { a := strings.Split(gecos, ",") gecos = a[0] } initPasswd(t, &staticGetpwnam, a[0], a[1], uint32(uid), uint32(gid), gecos, a[5], a[6]) return uintptr(unsafe.Pointer(&staticGetpwnam)) } } if sc.Err() != nil { panic(todo("")) } return 0 } // int getpwnam_r(char *name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result); func Xgetpwnam_r(t *TLS, name, cpwd, buf uintptr, buflen types.Size_t, result uintptr) int32 { if __ccgo_strace { trc("t=%v buf=%v buflen=%v result=%v, (%v:)", t, buf, buflen, result, origin(2)) } f, err := os.Open("/etc/passwd") if err != nil { panic(todo("", err)) } defer f.Close() sname := GoString(name) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if s == "" || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:0:root:/root:/bin/bash" a := strings.Split(s, ":") if len(a) < 7 { panic(todo("%q", s)) } if a[0] == sname { uid, err := strconv.Atoi(a[2]) if err != nil { panic(todo("")) } gid, err := strconv.Atoi(a[3]) if err != nil { panic(todo("")) } gecos := a[4] if strings.Contains(gecos, ",") { a := strings.Split(gecos, ",") gecos = a[0] } var v pwd.Passwd if initPasswd2(t, buf, buflen, &v, a[0], a[1], uint32(uid), uint32(gid), gecos, a[5], a[6]) { *(*pwd.Passwd)(unsafe.Pointer(cpwd)) = v *(*uintptr)(unsafe.Pointer(result)) = cpwd return 0 } *(*uintptr)(unsafe.Pointer(result)) = 0 return errno.ERANGE } } if sc.Err() != nil { panic(todo("")) } *(*uintptr)(unsafe.Pointer(result)) = 0 return 0 } func init() { atExit = append(atExit, func() { closeGroup(&staticGetgrgid) }) } var staticGetgrgid grp.Group // struct group *getgrgid(gid_t gid); func Xgetgrgid(t *TLS, gid uint32) uintptr { if __ccgo_strace { trc("t=%v gid=%v, (%v:)", t, gid, origin(2)) } f, err := os.Open("/etc/group") if err != nil { panic(todo("")) } defer f.Close() sid := strconv.Itoa(int(gid)) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if s == "" || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:" a := strings.Split(s, ":") if len(a) < 4 { panic(todo("%q", s)) } if a[2] == sid { closeGroup(&staticGetgrgid) var names []string if a[3] != "" { names = strings.Split(a[3], ",") } initGroup(t, &staticGetgrgid, a[0], a[1], gid, names) return uintptr(unsafe.Pointer(&staticGetgrgid)) } } if sc.Err() != nil { panic(todo("")) } return 0 } // int getgrgid_r(gid_t gid, struct group *grp, char *buf, size_t buflen, struct group **result); func Xgetgrgid_r(t *TLS, gid uint32, pGrp, buf uintptr, buflen types.Size_t, result uintptr) int32 { if __ccgo_strace { trc("t=%v gid=%v buf=%v buflen=%v result=%v, (%v:)", t, gid, buf, buflen, result, origin(2)) } f, err := os.Open("/etc/group") if err != nil { panic(todo("")) } defer f.Close() sid := strconv.Itoa(int(gid)) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if s == "" || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:" a := strings.Split(s, ":") if len(a) < 4 { panic(todo("%q", s)) } if a[2] == sid { var names []string if a[3] != "" { names = strings.Split(a[3], ",") } var x grp.Group if initGroup2(buf, buflen, &x, a[0], a[1], gid, names) { *(*grp.Group)(unsafe.Pointer(pGrp)) = x *(*uintptr)(unsafe.Pointer(result)) = pGrp return 0 } *(*uintptr)(unsafe.Pointer(result)) = 0 return 0 } } if sc.Err() != nil { panic(todo("")) } *(*uintptr)(unsafe.Pointer(result)) = 0 return 0 } func initPasswd2(t *TLS, buf uintptr, buflen types.Size_t, p *pwd.Passwd, name, pwd string, uid, gid uint32, gecos, dir, shell string) bool { p.Fpw_name, buf, buflen = bufString(buf, buflen, name) if buf == 0 { return false } p.Fpw_passwd, buf, buflen = bufString(buf, buflen, pwd) if buf == 0 { return false } p.Fpw_uid = uid p.Fpw_gid = gid if buf == 0 { return false } p.Fpw_gecos, buf, buflen = bufString(buf, buflen, gecos) if buf == 0 { return false } p.Fpw_dir, buf, buflen = bufString(buf, buflen, dir) if buf == 0 { return false } p.Fpw_shell, buf, buflen = bufString(buf, buflen, shell) return buf != 0 } func bufString(buf uintptr, buflen types.Size_t, s string) (uintptr, uintptr, types.Size_t) { buf0 := buf rq := len(s) + 1 if rq > int(buflen) { return 0, 0, 0 } copy((*RawMem)(unsafe.Pointer(buf))[:len(s):len(s)], s) buf += uintptr(len(s)) *(*byte)(unsafe.Pointer(buf)) = 0 return buf0, buf + 1, buflen - types.Size_t(rq) } func closeGroup(p *grp.Group) { Xfree(nil, p.Fgr_name) Xfree(nil, p.Fgr_passwd) if p := p.Fgr_mem; p != 0 { for { q := *(*uintptr)(unsafe.Pointer(p)) if q == 0 { break } Xfree(nil, q) p += unsafe.Sizeof(uintptr(0)) } } *p = grp.Group{} } func initGroup(t *TLS, p *grp.Group, name, pwd string, gid uint32, names []string) { p.Fgr_name = cString(t, name) p.Fgr_passwd = cString(t, pwd) p.Fgr_gid = gid a := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(uintptr(0)))*types.Size_t((len(names)+1))) if a == 0 { panic("OOM") } for p := a; len(names) != 0; p += unsafe.Sizeof(uintptr(0)) { *(*uintptr)(unsafe.Pointer(p)) = cString(t, names[0]) names = names[1:] } p.Fgr_mem = a } func initGroup2(buf uintptr, buflen types.Size_t, p *grp.Group, name, pwd string, gid uint32, names []string) bool { p.Fgr_name, buf, buflen = bufString(buf, buflen, name) if buf == 0 { return false } p.Fgr_passwd, buf, buflen = bufString(buf, buflen, pwd) if buf == 0 { return false } p.Fgr_gid = gid rq := unsafe.Sizeof(uintptr(0)) * uintptr(len(names)+1) if rq > uintptr(buflen) { return false } a := buf buf += rq for ; len(names) != 0; buf += unsafe.Sizeof(uintptr(0)) { if len(names[0])+1 > int(buflen) { return false } *(*uintptr)(unsafe.Pointer(buf)), buf, buflen = bufString(buf, buflen, names[0]) names = names[1:] } *(*uintptr)(unsafe.Pointer(buf)) = 0 p.Fgr_mem = a return true } func init() { atExit = append(atExit, func() { closeGroup(&staticGetgrgid) }) } var staticGetpwuid pwd.Passwd func init() { atExit = append(atExit, func() { closePasswd(&staticGetpwuid) }) } func closePasswd(p *pwd.Passwd) { Xfree(nil, p.Fpw_name) Xfree(nil, p.Fpw_passwd) Xfree(nil, p.Fpw_gecos) Xfree(nil, p.Fpw_dir) Xfree(nil, p.Fpw_shell) *p = pwd.Passwd{} } var staticGetgrnam grp.Group func init() { atExit = append(atExit, func() { closeGroup(&staticGetgrnam) }) } // struct passwd *getpwuid(uid_t uid); func Xgetpwuid(t *TLS, uid uint32) uintptr { if __ccgo_strace { trc("t=%v uid=%v, (%v:)", t, uid, origin(2)) } f, err := os.Open("/etc/passwd") if err != nil { panic(todo("", err)) } defer f.Close() sid := strconv.Itoa(int(uid)) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if len(s) == 0 || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:0:root:/root:/bin/bash" a := strings.Split(s, ":") if len(a) < 7 { panic(todo("%q", s)) } if a[2] == sid { uid, err := strconv.Atoi(a[2]) if err != nil { panic(todo("")) } gid, err := strconv.Atoi(a[3]) if err != nil { panic(todo("")) } closePasswd(&staticGetpwuid) gecos := a[4] if strings.Contains(gecos, ",") { a := strings.Split(gecos, ",") gecos = a[0] } initPasswd(t, &staticGetpwuid, a[0], a[1], uint32(uid), uint32(gid), gecos, a[5], a[6]) return uintptr(unsafe.Pointer(&staticGetpwuid)) } } if sc.Err() != nil { panic(todo("")) } return 0 } func initPasswd(t *TLS, p *pwd.Passwd, name, pwd string, uid, gid uint32, gecos, dir, shell string) { p.Fpw_name = cString(t, name) p.Fpw_passwd = cString(t, pwd) p.Fpw_uid = uid p.Fpw_gid = gid p.Fpw_gecos = cString(t, gecos) p.Fpw_dir = cString(t, dir) p.Fpw_shell = cString(t, shell) } // struct group *getgrnam(const char *name); func Xgetgrnam(t *TLS, name uintptr) uintptr { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } f, err := os.Open("/etc/group") if err != nil { panic(todo("")) } defer f.Close() sname := GoString(name) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if len(s) == 0 || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:" a := strings.Split(s, ":") if len(a) < 4 { panic(todo("%q", s)) } if a[0] == sname { closeGroup(&staticGetgrnam) gid, err := strconv.Atoi(a[2]) if err != nil { panic(todo("")) } var names []string if a[3] != "" { names = strings.Split(a[3], ",") } initGroup(t, &staticGetgrnam, a[0], a[1], uint32(gid), names) return uintptr(unsafe.Pointer(&staticGetgrnam)) } } if sc.Err() != nil { panic(todo("")) } return 0 } // int getgrnam_r(const char *name, struct group *grp, char *buf, size_t buflen, struct group **result); func Xgetgrnam_r(t *TLS, name, pGrp, buf uintptr, buflen types.Size_t, result uintptr) int32 { if __ccgo_strace { trc("t=%v buf=%v buflen=%v result=%v, (%v:)", t, buf, buflen, result, origin(2)) } f, err := os.Open("/etc/group") if err != nil { panic(todo("")) } defer f.Close() sname := GoString(name) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if len(s) == 0 || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:" a := strings.Split(s, ":") if len(a) < 4 { panic(todo("%q", s)) } if a[0] == sname { gid, err := strconv.Atoi(a[2]) if err != nil { panic(todo("")) } var names []string if a[3] != "" { names = strings.Split(a[3], ",") } var x grp.Group if initGroup2(buf, buflen, &x, a[0], a[1], uint32(gid), names) { *(*grp.Group)(unsafe.Pointer(pGrp)) = x *(*uintptr)(unsafe.Pointer(result)) = pGrp return 0 } *(*uintptr)(unsafe.Pointer(result)) = 0 return 0 } } if sc.Err() != nil { panic(todo("")) } *(*uintptr)(unsafe.Pointer(result)) = 0 return 0 } // int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result); func Xgetpwuid_r(t *TLS, uid types.Uid_t, cpwd, buf uintptr, buflen types.Size_t, result uintptr) int32 { if __ccgo_strace { trc("t=%v uid=%v buf=%v buflen=%v result=%v, (%v:)", t, uid, buf, buflen, result, origin(2)) } f, err := os.Open("/etc/passwd") if err != nil { panic(todo("", err)) } defer f.Close() sid := strconv.Itoa(int(uid)) sc := bufio.NewScanner(f) for sc.Scan() { s := strings.TrimSpace(sc.Text()) if len(s) == 0 || strings.HasPrefix(s, "#") { continue } // eg. "root:x:0:0:root:/root:/bin/bash" a := strings.Split(s, ":") if len(a) < 7 { panic(todo("%q", s)) } if a[2] == sid { uid, err := strconv.Atoi(a[2]) if err != nil { panic(todo("")) } gid, err := strconv.Atoi(a[3]) if err != nil { panic(todo("")) } gecos := a[4] if strings.Contains(gecos, ",") { a := strings.Split(gecos, ",") gecos = a[0] } var v pwd.Passwd if initPasswd2(t, buf, buflen, &v, a[0], a[1], uint32(uid), uint32(gid), gecos, a[5], a[6]) { *(*pwd.Passwd)(unsafe.Pointer(cpwd)) = v *(*uintptr)(unsafe.Pointer(result)) = cpwd return 0 } *(*uintptr)(unsafe.Pointer(result)) = 0 return errno.ERANGE } } if sc.Err() != nil { panic(todo("")) } *(*uintptr)(unsafe.Pointer(result)) = 0 return 0 } // int mkostemp(char *template, int flags); func Xmkostemp(t *TLS, template uintptr, flags int32) int32 { if __ccgo_strace { trc("t=%v template=%v flags=%v, (%v:)", t, template, flags, origin(2)) } len := uintptr(Xstrlen(t, template)) x := template + uintptr(len-6) for i := uintptr(0); i < 6; i++ { if *(*byte)(unsafe.Pointer(x + i)) != 'X' { t.setErrno(errno.EINVAL) return -1 } } fd, err := tempFile(template, x, flags) if err != nil { t.setErrno(err) return -1 } return int32(fd) } // void uuid_generate_random(uuid_t out); func Xuuid_generate_random(t *TLS, out uintptr) { if __ccgo_strace { trc("t=%v out=%v, (%v:)", t, out, origin(2)) } x := guuid.New() copy((*RawMem)(unsafe.Pointer(out))[:], x[:]) } // void uuid_unparse(uuid_t uu, char *out); func Xuuid_unparse(t *TLS, uu, out uintptr) { if __ccgo_strace { trc("t=%v out=%v, (%v:)", t, out, origin(2)) } s := (*guuid.UUID)(unsafe.Pointer(uu)).String() copy((*RawMem)(unsafe.Pointer(out))[:], s) *(*byte)(unsafe.Pointer(out + uintptr(len(s)))) = 0 } // no longer used? // var staticRandomData = &rand.Rand{} // char *initstate(unsigned seed, char *state, size_t size); func Xinitstate(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t) uintptr { if __ccgo_strace { trc("t=%v seed=%v statebuf=%v statelen=%v, (%v:)", t, seed, statebuf, statelen, origin(2)) } // staticRandomData = rand.New(rand.NewSource(int64(seed))) _ = rand.New(rand.NewSource(int64(seed))) return 0 } // char *setstate(const char *state); func Xsetstate(t *TLS, state uintptr) uintptr { if __ccgo_strace { trc("t=%v state=%v, (%v:)", t, state, origin(2)) } t.setErrno(errno.EINVAL) //TODO return 0 } // The initstate_r() function is like initstate(3) except that it initializes // the state in the object pointed to by buf, rather than initializing the // global state variable. Before calling this function, the buf.state field // must be initialized to NULL. The initstate_r() function records a pointer // to the statebuf argument inside the structure pointed to by buf. Thus, // state‐ buf should not be deallocated so long as buf is still in use. (So, // statebuf should typically be allocated as a static variable, or allocated on // the heap using malloc(3) or similar.) // // char *initstate_r(unsigned int seed, char *statebuf, size_t statelen, struct random_data *buf); func Xinitstate_r(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t, buf uintptr) int32 { if __ccgo_strace { trc("t=%v seed=%v statebuf=%v statelen=%v buf=%v, (%v:)", t, seed, statebuf, statelen, buf, origin(2)) } if buf == 0 { panic(todo("")) } randomDataMu.Lock() defer randomDataMu.Unlock() randomData[buf] = rand.New(rand.NewSource(int64(seed))) return 0 } var ( randomData = map[uintptr]*rand.Rand{} randomDataMu sync.Mutex ) // int mkstemps(char *template, int suffixlen); func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 { if __ccgo_strace { trc("t=%v template=%v suffixlen=%v, (%v:)", t, template, suffixlen, origin(2)) } return Xmkstemps64(t, template, suffixlen) } // int mkstemps(char *template, int suffixlen); func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 { if __ccgo_strace { trc("t=%v template=%v suffixlen=%v, (%v:)", t, template, suffixlen, origin(2)) } len := uintptr(Xstrlen(t, template)) x := template + uintptr(len-6) - uintptr(suffixlen) for i := uintptr(0); i < 6; i++ { if *(*byte)(unsafe.Pointer(x + i)) != 'X' { t.setErrno(errno.EINVAL) return -1 } } fd, err := tempFile(template, x, 0) if err != nil { t.setErrno(err) return -1 } return int32(fd) } // int mkstemp(char *template); func Xmkstemp(t *TLS, template uintptr) int32 { if __ccgo_strace { trc("t=%v template=%v, (%v:)", t, template, origin(2)) } return Xmkstemp64(t, template) } // int mkstemp(char *template); func Xmkstemp64(t *TLS, template uintptr) int32 { if __ccgo_strace { trc("t=%v template=%v, (%v:)", t, template, origin(2)) } return Xmkstemps64(t, template, 0) } // int random_r(struct random_data *buf, int32_t *result); func Xrandom_r(t *TLS, buf, result uintptr) int32 { if __ccgo_strace { trc("t=%v result=%v, (%v:)", t, result, origin(2)) } randomDataMu.Lock() defer randomDataMu.Unlock() mr := randomData[buf] if stdlib.RAND_MAX != math.MaxInt32 { panic(todo("")) } *(*int32)(unsafe.Pointer(result)) = mr.Int31() return 0 } // int strerror_r(int errnum, char *buf, size_t buflen); func Xstrerror_r(t *TLS, errnum int32, buf uintptr, buflen size_t) int32 { if __ccgo_strace { trc("t=%v errnum=%v buf=%v buflen=%v, (%v:)", t, errnum, buf, buflen, origin(2)) } panic(todo("")) } // void endpwent(void); func Xendpwent(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } // nop } var ctimeStaticBuf [32]byte // char *ctime(const time_t *timep); func Xctime(t *TLS, timep uintptr) uintptr { if __ccgo_strace { trc("t=%v timep=%v, (%v:)", t, timep, origin(2)) } return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0]))) } // char *ctime_r(const time_t *timep, char *buf); func Xctime_r(t *TLS, timep, buf uintptr) uintptr { if __ccgo_strace { trc("t=%v buf=%v, (%v:)", t, buf, origin(2)) } ut := *(*ctime.Time_t)(unsafe.Pointer(timep)) tm := time.Unix(int64(ut), 0).Local() s := tm.Format(time.ANSIC) + "\n\x00" copy((*RawMem)(unsafe.Pointer(buf))[:26:26], s) return buf } // ssize_t pread(int fd, void *buf, size_t count, off_t offset); func Xpread(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2)) } var n int var err error switch { case count == 0: n, err = unix.Pread(int(fd), nil, int64(offset)) default: n, err = unix.Pread(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset)) // if dmesgs && err == nil { // dmesg("%v: fd %v, off %#x, count %#x, n %#x\n%s", origin(1), fd, offset, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n])) // } } if err != nil { // if dmesgs { // dmesg("%v: %v FAIL", origin(1), err) // } t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: ok", origin(1)) // } return types.Ssize_t(n) } // // malloc_zone_t * malloc_create_zone(vm_size_t start_size, unsigned flags); // func Xmalloc_create_zone(t *TLS, start_size types.Size_t, flags uint32) uintptr { // if __ccgo_strace { // trc("t=%v start_size=%v flags=%v, (%v:)", t, start_size, flags, origin(2)) // } // panic(todo("")) // } // // // void * malloc_zone_malloc(malloc_zone_t *zone, size_t size); // func Xmalloc_zone_malloc(t *TLS, zone uintptr, size types.Size_t) uintptr { // if __ccgo_strace { // trc("t=%v zone=%v size=%v, (%v:)", t, zone, size, origin(2)) // } // if zone == defaultZone { // return Xmalloc(t, size) // } // // panic(todo("")) // } // // // malloc_zone_t * malloc_default_zone(void); // func Xmalloc_default_zone(t *TLS) uintptr { // if __ccgo_strace { // trc("t=%v (%v:)", t, origin(2)) // } // return defaultZone // } // // // void malloc_zone_free(malloc_zone_t *zone, void *ptr); // func Xmalloc_zone_free(t *TLS, zone, ptr uintptr) { // if __ccgo_strace { // trc("t=%v zone=%v ptr=%v, (%v:)", t, zone, ptr, origin(2)) // } // // if zone == defaultZone { // Xfree(t, ptr) // return // } // // panic(todo("")) // } // // // void * malloc_zone_realloc(malloc_zone_t *zone, void *ptr, size_t size); // func Xmalloc_zone_realloc(t *TLS, zone, ptr uintptr, size types.Size_t) uintptr { // if __ccgo_strace { // trc("t=%v zone=%v ptr=%v size=%v, (%v:)", t, zone, ptr, size, origin(2)) // } // panic(todo("")) // } // int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen); func Xsysctlbyname(t *TLS, name, oldp, oldlenp, newp uintptr, newlen types.Size_t) int32 { if __ccgo_strace { trc("t=%v name=%q oldp=%#0x oldlenp=%v newp=%v newlen=%v, (%v:)", t, GoString(name), oldp, *(*types.Size_t)(unsafe.Pointer(oldlenp)), newp, newlen, origin(2)) } oldlen := *(*types.Size_t)(unsafe.Pointer(oldlenp)) switch GoString(name) { case "hw.ncpu": if oldlen != 4 { panic(todo("")) } *(*int32)(unsafe.Pointer(oldp)) = int32(runtime.GOMAXPROCS(-1)) return 0 default: t.setErrno(errno.ENOENT) return -1 } } // type mallocZone struct { // a memory.Allocator // mu sync.Mutex // // isDefault bool // } // // func newMallocZone(isDefault bool) *mallocZone { // return &mallocZone{isDefault: isDefault} // } // // var ( // defaultZone uintptr // ) // // func init() { // defaultZone = addObject(newMallocZone(true)) // } // /tmp/libc/musl-master/src/time/gmtime.c:6:19: var _tm ctime.Tm // /tmp/libc/musl-master/src/time/gmtime.c:4:11: func Xgmtime(tls *TLS, t uintptr) (r uintptr) { // /tmp/libc/musl-master/src/time/gmtime.c:7:2: if __ccgo_strace { trc("tls=%v t=%v, (%v:)", tls, t, origin(2)) defer func() { trc("-> %v", r) }() } return Xgmtime_r(tls, t, uintptr(unsafe.Pointer(&_tm))) } var _days_in_month = [12]int8{ 0: int8(31), 1: int8(30), 2: int8(31), 3: int8(30), 4: int8(31), 5: int8(31), 6: int8(30), 7: int8(31), 8: int8(30), 9: int8(31), 10: int8(31), 11: int8(29), } var x___utc = [4]int8{'U', 'T', 'C'} func Xstrftime(tls *TLS, s uintptr, n size_t, f uintptr, tm uintptr) (r size_t) { if __ccgo_strace { trc("tls=%v s=%v n=%v f=%v tm=%v, (%v:)", tls, s, n, f, tm, origin(2)) defer func() { trc("-> %v", r) }() } tt := time.Date( int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_year+1900), time.Month((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_mon+1), int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_mday), int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_hour), int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_min), int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_sec), 0, time.UTC, ) fmt := GoString(f) var result string if fmt != "" { result = strftime.Format(fmt, tt) } switch r = size_t(len(result)); { case r > n: r = 0 default: copy((*RawMem)(unsafe.Pointer(s))[:r:r], result) *(*byte)(unsafe.Pointer(s + uintptr(r))) = 0 } return r } func x___secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) { var c_cycles, leap, months, q_cycles, qc_cycles, remdays, remsecs, remyears, wday, yday int32 var days, secs, years int64 _, _, _, _, _, _, _, _, _, _, _, _, _ = c_cycles, days, leap, months, q_cycles, qc_cycles, remdays, remsecs, remyears, secs, wday, yday, years /* Reject time_t values whose year would overflow int */ if t < int64(-Int32FromInt32(1)-Int32FromInt32(0x7fffffff))*Int64FromInt64(31622400) || t > Int64FromInt32(limits.INT_MAX)*Int64FromInt64(31622400) { return -int32(1) } secs = t - (Int64FromInt64(946684800) + int64(Int32FromInt32(86400)*(Int32FromInt32(31)+Int32FromInt32(29)))) days = secs / int64(86400) remsecs = int32(secs % int64(86400)) if remsecs < 0 { remsecs += int32(86400) days-- } wday = int32((int64(3) + days) % int64(7)) if wday < 0 { wday += int32(7) } qc_cycles = int32(days / int64(Int32FromInt32(365)*Int32FromInt32(400)+Int32FromInt32(97))) remdays = int32(days % int64(Int32FromInt32(365)*Int32FromInt32(400)+Int32FromInt32(97))) if remdays < 0 { remdays += Int32FromInt32(365)*Int32FromInt32(400) + Int32FromInt32(97) qc_cycles-- } c_cycles = remdays / (Int32FromInt32(365)*Int32FromInt32(100) + Int32FromInt32(24)) if c_cycles == int32(4) { c_cycles-- } remdays -= c_cycles * (Int32FromInt32(365)*Int32FromInt32(100) + Int32FromInt32(24)) q_cycles = remdays / (Int32FromInt32(365)*Int32FromInt32(4) + Int32FromInt32(1)) if q_cycles == int32(25) { q_cycles-- } remdays -= q_cycles * (Int32FromInt32(365)*Int32FromInt32(4) + Int32FromInt32(1)) remyears = remdays / int32(365) if remyears == int32(4) { remyears-- } remdays -= remyears * int32(365) leap = BoolInt32(!(remyears != 0) && (q_cycles != 0 || !(c_cycles != 0))) yday = remdays + int32(31) + int32(28) + leap if yday >= int32(365)+leap { yday -= int32(365) + leap } years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(int64(qc_cycles)) months = 0 for { if !(int32(_days_in_month[months]) <= remdays) { break } remdays -= int32(_days_in_month[months]) goto _1 _1: months++ }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_freebsd.go
vendor/modernc.org/libc/libc_freebsd.go
// Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "errors" "fmt" "io" "io/fs" "math" mbits "math/bits" "os" "os/exec" "path/filepath" "runtime" "runtime/debug" "strings" gotime "time" "unicode" "unsafe" guuid "github.com/google/uuid" "golang.org/x/sys/unix" "modernc.org/libc/errno" "modernc.org/libc/fcntl" "modernc.org/libc/fts" gonetdb "modernc.org/libc/honnef.co/go/netdb" "modernc.org/libc/langinfo" "modernc.org/libc/limits" "modernc.org/libc/netdb" "modernc.org/libc/netinet/in" "modernc.org/libc/pthread" "modernc.org/libc/signal" "modernc.org/libc/stdio" "modernc.org/libc/sys/socket" "modernc.org/libc/sys/stat" "modernc.org/libc/sys/types" "modernc.org/libc/termios" "modernc.org/libc/time" "modernc.org/libc/unistd" "modernc.org/libc/uuid" ) var ( in6_addr_any in.In6_addr ) // // Keep these outside of the var block otherwise go generate will miss them. var X__stderrp = Xstdout var X__stdinp = Xstdin var X__stdoutp = Xstdout // include/stdio.h:486:extern int __isthreaded; var X__isthreaded int32 // lib/libc/locale/mblocal.h:62: int __mb_sb_limit; var X__mb_sb_limit int32 = 128 // UTF-8 // include/runetype.h:94:extern _Thread_local const _RuneLocale *_ThreadRuneLocale; var X_ThreadRuneLocale uintptr //TODO initialize and implement _Thread_local semantics. // include/xlocale/_ctype.h:54:_RuneLocale *__runes_for_locale(locale_t, int*); func X__runes_for_locale(t *TLS, l locale_t, p uintptr) uintptr { if __ccgo_strace { trc("t=%v l=%v p=%v, (%v:)", t, l, p, origin(2)) } panic(todo("")) } type Tsize_t = types.Size_t type syscallErrno = unix.Errno type file uintptr func (f file) fd() int32 { return int32((*stdio.FILE)(unsafe.Pointer(f)).F_file) } func (f file) setFd(fd int32) { (*stdio.FILE)(unsafe.Pointer(f)).F_file = int16(fd) } func (f file) err() bool { return (*stdio.FILE)(unsafe.Pointer(f)).F_flags&1 != 0 } func (f file) setErr() { (*stdio.FILE)(unsafe.Pointer(f)).F_flags |= 1 } func (f file) clearErr() { (*stdio.FILE)(unsafe.Pointer(f)).F_flags &^= 3 } func (f file) eof() bool { return (*stdio.FILE)(unsafe.Pointer(f)).F_flags&2 != 0 } func (f file) setEOF() { (*stdio.FILE)(unsafe.Pointer(f)).F_flags |= 2 } func (f file) close(t *TLS) int32 { r := Xclose(t, f.fd()) Xfree(t, uintptr(f)) if r < 0 { return stdio.EOF } return 0 } func newFile(t *TLS, fd int32) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(stdio.FILE{}))) if p == 0 { return 0 } file(p).setFd(fd) return p } func fwrite(fd int32, b []byte) (int, error) { if fd == unistd.STDOUT_FILENO { return write(b) } // if dmesgs { // dmesg("%v: fd %v: %s", origin(1), fd, b) // } return unix.Write(int(fd), b) //TODO use Xwrite } func Xclearerr(tls *TLS, f uintptr) { file(f).clearErr() } func Xfeof(t *TLS, f uintptr) (r int32) { if __ccgo_strace { trc("t=%v f=%v, (%v:)", t, f, origin(2)) defer func() { trc("-> %v", r) }() } r = BoolInt32(file(f).eof()) return r } // unsigned long ___runetype(__ct_rune_t) __pure; func X___runetype(t *TLS, x types.X__ct_rune_t) ulong { if __ccgo_strace { trc("t=%v x=%v, (%v:)", t, x, origin(2)) } panic(todo("")) } // int fprintf(FILE *stream, const char *format, ...); func Xfprintf(t *TLS, stream, format, args uintptr) int32 { if __ccgo_strace { trc("t=%v args=%v, (%v:)", t, args, origin(2)) } n, _ := fwrite(int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file), printf(format, args)) return int32(n) } // int usleep(useconds_t usec); func Xusleep(t *TLS, usec types.X__useconds_t) int32 { if __ccgo_strace { trc("t=%v usec=%v, (%v:)", t, usec, origin(2)) } gotime.Sleep(gotime.Microsecond * gotime.Duration(usec)) return 0 } // int getrusage(int who, struct rusage *usage); func Xgetrusage(t *TLS, who int32, usage uintptr) int32 { if __ccgo_strace { trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int fgetc(FILE *stream); func Xfgetc(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_file) var buf [1]byte if n, _ := unix.Read(fd, buf[:]); n != 0 { return int32(buf[0]) } return stdio.EOF } // int lstat(const char *pathname, struct stat *statbuf); func Xlstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xlstat64(t, pathname, statbuf) } // int stat(const char *pathname, struct stat *statbuf); func Xstat(t *TLS, pathname, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2)) } return Xstat64(t, pathname, statbuf) } // int chdir(const char *path); func Xchdir(t *TLS, path uintptr) int32 { if __ccgo_strace { trc("t=%v path=%v, (%v:)", t, path, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %q: ok", origin(1), GoString(path)) // } return 0 } var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { // trc("%T timep=%+v", time.Time_t(0), *(*time.Time_t)(unsafe.Pointer(timep))) loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) localtime.Ftm_min = int32(t.Minute()) localtime.Ftm_hour = int32(t.Hour()) localtime.Ftm_mday = int32(t.Day()) localtime.Ftm_mon = int32(t.Month() - 1) localtime.Ftm_year = int32(t.Year() - 1900) localtime.Ftm_wday = int32(t.Weekday()) localtime.Ftm_yday = int32(t.YearDay()) localtime.Ftm_isdst = Bool32(isTimeDST(t)) _, off := t.Zone() localtime.Ftm_gmtoff = int64(off) localtime.Ftm_zone = 0 // trc("%T localtime=%+v", localtime, localtime) return uintptr(unsafe.Pointer(&localtime)) } // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { // trc("%T timep=%+v", time.Time_t(0), *(*time.Time_t)(unsafe.Pointer(timep))) loc := getLocalLocation() ut := *(*unix.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) (*time.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute()) (*time.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour()) (*time.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day()) (*time.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1) (*time.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900) (*time.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday()) (*time.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay()) (*time.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t)) _, off := t.Zone() (*time.Tm)(unsafe.Pointer(result)).Ftm_gmtoff = int64(off) (*time.Tm)(unsafe.Pointer(result)).Ftm_zone = 0 // trc("%T localtime_r=%+v", localtime, (*time.Tm)(unsafe.Pointer(result))) return result } // int open(const char *pathname, int flags, ...); func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } return Xopen64(t, pathname, flags, args) } // int open(const char *pathname, int flags, ...); func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2)) } var mode types.Mode_t if args != 0 { mode = (types.Mode_t)(VaUint32(&args)) } fdcwd := fcntl.AT_FDCWD n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), pathname, uintptr(flags), uintptr(mode), 0, 0) if err != 0 { // if dmesgs { // dmesg("%v: %q %#x: %v", origin(1), GoString(pathname), flags, err) // } t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, n) // } return int32(n) } // off_t lseek(int fd, off_t offset, int whence); func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { if __ccgo_strace { trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2)) } return types.Off_t(Xlseek64(t, fd, offset, whence)) } func whenceStr(whence int32) string { panic(todo("")) } var fsyncStatbuf stat.Stat // int fsync(int fd); func Xfsync(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } if noFsync { // Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf))) } if _, _, err := unix.Syscall(unix.SYS_FSYNC, uintptr(fd), 0, 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %d: ok", origin(1), fd) // } return 0 } // long sysconf(int name); func Xsysconf(t *TLS, name int32) long { if __ccgo_strace { trc("t=%v name=%v, (%v:)", t, name, origin(2)) } switch name { case unistd.X_SC_PAGESIZE: return long(unix.Getpagesize()) case unistd.X_SC_GETPW_R_SIZE_MAX: return -1 case unistd.X_SC_GETGR_R_SIZE_MAX: return -1 case unistd.X_SC_NPROCESSORS_ONLN: return long(runtime.NumCPU()) } panic(todo("", name)) } // int close(int fd); func Xclose(t *TLS, fd int32) int32 { if __ccgo_strace { trc("t=%v fd=%v, (%v:)", t, fd, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %d: ok", origin(1), fd) // } return 0 } // char *getcwd(char *buf, size_t size); func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } if _, err := unix.Getcwd((*RawMem)(unsafe.Pointer(buf))[:size:size]); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return 0 } if dmesgs { dmesg("%v: ok", origin(1)) } return buf } // int fstat(int fd, struct stat *statbuf); func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2)) } return Xfstat64(t, fd, statbuf) } // int ftruncate(int fd, off_t length); func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 { if __ccgo_strace { trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2)) } if err := unix.Ftruncate(int(fd), int64(length)); err != nil { if dmesgs { dmesg("%v: fd %d: %v FAIL", origin(1), fd, err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: %d %#x: ok", origin(1), fd, length) } return 0 } // int fcntl(int fd, int cmd, ... /* arg */ ); func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 { if __ccgo_strace { trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2)) } return Xfcntl64(t, fd, cmd, args) } // ssize_t read(int fd, void *buf, size_t count); func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count)) if err != 0 { t.setErrno(err) return -1 } // if dmesgs { // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // } return types.Ssize_t(n) } // ssize_t write(int fd, const void *buf, size_t count); func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { if __ccgo_strace { trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2)) } const retry = 5 var err syscallErrno for i := 0; i < retry; i++ { var n uintptr switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err { case 0: // if dmesgs { // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) // } return types.Ssize_t(n) case errno.EAGAIN: // nop } } // if dmesgs { // dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) // } t.setErrno(err) return -1 } // int fchmod(int fd, mode_t mode); func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 { t.setErrno(err) return -1 } // if dmesgs { // dmesg("%v: %d %#o: ok", origin(1), fd, mode) // } return 0 } // int fchown(int fd, uid_t owner, gid_t group); func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 { if __ccgo_strace { trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 { t.setErrno(err) return -1 } return 0 } // uid_t geteuid(void); func Xgeteuid(t *TLS) types.Uid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0) return types.Uid_t(n) } // int munmap(void *addr, size_t length); func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 { if __ccgo_strace { trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int gettimeofday(struct timeval *tv, struct timezone *tz); func Xgettimeofday(t *TLS, tv, tz uintptr) int32 { if __ccgo_strace { trc("t=%v tz=%v, (%v:)", t, tz, origin(2)) } if tz != 0 { panic(todo("")) } var tvs unix.Timeval err := unix.Gettimeofday(&tvs) if err != nil { t.setErrno(err) return -1 } //trc("tvs=%+v", tvs) *(*unix.Timeval)(unsafe.Pointer(tv)) = tvs return 0 } // int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 { if __ccgo_strace { trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2)) } if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 { if __ccgo_strace { trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2)) } if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int ioctl(int fd, unsigned long request, ...); func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2)) } var argp uintptr if va != 0 { argp = VaUintptr(&va) } n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 { // if dmesgs { // dmesg("%v: fd %v: %v", origin(1), sockfd, err) // } t.setErrno(err) return -1 } return 0 } // int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 { if __ccgo_strace { trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2)) } n, err := unix.Select( int(nfds), (*unix.FdSet)(unsafe.Pointer(readfds)), (*unix.FdSet)(unsafe.Pointer(writefds)), (*unix.FdSet)(unsafe.Pointer(exceptfds)), (*unix.Timeval)(unsafe.Pointer(timeout)), ) if err != nil { t.setErrno(err) return -1 } return int32(n) } // int mkfifo(const char *pathname, mode_t mode); func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 { if __ccgo_strace { trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2)) } if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil { t.setErrno(err) return -1 } return 0 } // mode_t umask(mode_t mask); func Xumask(t *TLS, mask types.Mode_t) types.Mode_t { if __ccgo_strace { trc("t=%v mask=%v, (%v:)", t, mask, origin(2)) } n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0) return types.Mode_t(n) } // int execvp(const char *file, char *const argv[]); func Xexecvp(t *TLS, file, argv uintptr) int32 { if __ccgo_strace { trc("t=%v argv=%v, (%v:)", t, argv, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 { t.setErrno(err) return -1 } return 0 } // pid_t waitpid(pid_t pid, int *wstatus, int options); func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t { if __ccgo_strace { trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0) if err != 0 { t.setErrno(err) return -1 } return types.Pid_t(n) } // int uname(struct utsname *buf); func Xuname(t *TLS, buf uintptr) int32 { if __ccgo_strace { trc("t=%v buf=%v, (%v:)", t, buf, origin(2)) } if err := unix.Uname((*unix.Utsname)(unsafe.Pointer(buf))); err != nil { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) } t.setErrno(err) return -1 } if dmesgs { dmesg("%v: ok", origin(1)) } return 0 } // ssize_t recv(int sockfd, void *buf, size_t len, int flags); func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0) if err != 0 { t.setErrno(err) return -1 } return types.Ssize_t(n) } // ssize_t send(int sockfd, const void *buf, size_t len, int flags); func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t { if __ccgo_strace { trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0) if err != 0 { t.setErrno(err) return -1 } return types.Ssize_t(n) } // int shutdown(int sockfd, int how); func Xshutdown(t *TLS, sockfd, how int32) int32 { if __ccgo_strace { trc("t=%v how=%v, (%v:)", t, how, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 { t.setErrno(err) return -1 } return 0 } // int socket(int domain, int type, int protocol); func Xsocket(t *TLS, domain, type1, protocol int32) int32 { if __ccgo_strace { trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2)) } n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol)) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen)) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 { t.setErrno(err) return -1 } return 0 } // int listen(int sockfd, int backlog); func Xlisten(t *TLS, sockfd, backlog int32) int32 { if __ccgo_strace { trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 { if __ccgo_strace { trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2)) } n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0) if err != 0 { t.setErrno(err) return -1 } return int32(n) } // int getrlimit(int resource, struct rlimit *rlim); func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xgetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } return Xsetrlimit64(t, resource, rlim) } // int setrlimit(int resource, const struct rlimit *rlim); func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { if __ccgo_strace { trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2)) } if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { t.setErrno(err) return -1 } return 0 } // uid_t getuid(void); func Xgetuid(t *TLS) types.Uid_t { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return types.Uid_t(os.Getuid()) } // pid_t getpid(void); func Xgetpid(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } return int32(os.Getpid()) } // int system(const char *command); func Xsystem(t *TLS, command uintptr) int32 { if __ccgo_strace { trc("t=%v command=%v, (%v:)", t, command, origin(2)) } s := GoString(command) if command == 0 { panic(todo("")) } cmd := exec.Command("sh", "-c", s) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { ps := err.(*exec.ExitError) return int32(ps.ExitCode()) } return 0 } // int setvbuf(FILE *stream, char *buf, int mode, size_t size); func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 { if __ccgo_strace { trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2)) } return 0 //TODO } // int raise(int sig); func Xraise(t *TLS, sig int32) int32 { if __ccgo_strace { trc("t=%v sig=%v, (%v:)", t, sig, origin(2)) } panic(todo("")) } // int backtrace(void **buffer, int size); func Xbacktrace(t *TLS, buf uintptr, size int32) int32 { if __ccgo_strace { trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2)) } panic(todo("")) } // void backtrace_symbols_fd(void *const *buffer, int size, int fd); func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) { if __ccgo_strace { trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2)) } panic(todo("")) } // int fileno(FILE *stream); func Xfileno(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } if stream == 0 { if dmesgs { dmesg("%v: FAIL", origin(1)) } t.setErrno(errno.EBADF) return -1 } if fd := int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file); fd >= 0 { return fd } if dmesgs { dmesg("%v: FAIL", origin(1)) } t.setErrno(errno.EBADF) return -1 } func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscallErrno) uintptr { p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{}))) if p == 0 { panic("OOM") } *(*fts.FTSENT)(unsafe.Pointer(p)) = *newFtsent(t, info, path, stat, err) return p } func ftsentClose(t *TLS, p uintptr) { Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_path) Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_statp) } type ftstream struct { s []uintptr x int } func (f *ftstream) close(t *TLS) { for _, p := range f.s { ftsentClose(t, p) Xfree(t, p) } *f = ftstream{} } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { if __ccgo_strace { trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2)) } return Xfts64_open(t, path_argv, options, compar) } // FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr { if __ccgo_strace { trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2)) } f := &ftstream{} var walk func(string) walk = func(path string) { var fi os.FileInfo var err error switch { case options&fts.FTS_LOGICAL != 0: fi, err = os.Stat(path) case options&fts.FTS_PHYSICAL != 0: fi, err = os.Lstat(path) default: panic(todo("")) } if err != nil { return } var statp *unix.Stat_t if options&fts.FTS_NOSTAT == 0 { var stat unix.Stat_t switch { case options&fts.FTS_LOGICAL != 0: if err := unix.Stat(path, &stat); err != nil { panic(todo("")) } case options&fts.FTS_PHYSICAL != 0: if err := unix.Lstat(path, &stat); err != nil { panic(todo("")) } default: panic(todo("")) } statp = &stat } out: switch { case fi.IsDir(): f.s = append(f.s, newCFtsent(t, fts.FTS_D, path, statp, 0)) g, err := os.Open(path) switch x := err.(type) { case nil: // ok case *os.PathError: f.s = append(f.s, newCFtsent(t, fts.FTS_DNR, path, statp, errno.EACCES)) break out default: panic(todo("%q: %v %T", path, x, x)) } names, err := g.Readdirnames(-1) g.Close() if err != nil { panic(todo("")) } for _, name := range names { walk(path + "/" + name) if f == nil { break out } } f.s = append(f.s, newCFtsent(t, fts.FTS_DP, path, statp, 0)) default: info := fts.FTS_F if fi.Mode()&os.ModeSymlink != 0 { info = fts.FTS_SL } switch { case statp != nil: f.s = append(f.s, newCFtsent(t, info, path, statp, 0)) case options&fts.FTS_NOSTAT != 0: f.s = append(f.s, newCFtsent(t, fts.FTS_NSOK, path, nil, 0)) default: panic(todo("")) } } } for { p := *(*uintptr)(unsafe.Pointer(path_argv)) if p == 0 { if f == nil { return 0 } if compar != 0 { panic(todo("")) } return addObject(f) } walk(GoString(p)) path_argv += unsafe.Sizeof(uintptr(0)) } } // FTSENT *fts_read(FTS *ftsp); func Xfts_read(t *TLS, ftsp uintptr) uintptr { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } return Xfts64_read(t, ftsp) } // FTSENT *fts_read(FTS *ftsp); func Xfts64_read(t *TLS, ftsp uintptr) uintptr { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } f := getObject(ftsp).(*ftstream) if f.x == len(f.s) { t.setErrno(0) return 0 } r := f.s[f.x] if e := (*fts.FTSENT)(unsafe.Pointer(r)).Ffts_errno; e != 0 { t.setErrno(e) } f.x++ return r } // int fts_close(FTS *ftsp); func Xfts_close(t *TLS, ftsp uintptr) int32 { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } return Xfts64_close(t, ftsp) } // int fts_close(FTS *ftsp); func Xfts64_close(t *TLS, ftsp uintptr) int32 { if __ccgo_strace { trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2)) } getObject(ftsp).(*ftstream).close(t) removeObject(ftsp) return 0 } // void tzset (void); func Xtzset(t *TLS) { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } //TODO } var strerrorBuf [100]byte // char *strerror(int errnum); func Xstrerror(t *TLS, errnum int32) uintptr { if __ccgo_strace { trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2)) } if dmesgs { dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack()) } copy(strerrorBuf[:], fmt.Sprintf("strerror(%d)\x00", errnum)) return uintptr(unsafe.Pointer(&strerrorBuf[0])) } // void *dlopen(const char *filename, int flags); func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr { if __ccgo_strace { trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2)) } panic(todo("")) } // char *dlerror(void); func Xdlerror(t *TLS) uintptr { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } panic(todo("")) } // int dlclose(void *handle); func Xdlclose(t *TLS, handle uintptr) int32 { if __ccgo_strace { trc("t=%v handle=%v, (%v:)", t, handle, origin(2)) } panic(todo("")) } // void *dlsym(void *handle, const char *symbol); func Xdlsym(t *TLS, handle, symbol uintptr) uintptr { if __ccgo_strace { trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2)) } panic(todo("")) } // void perror(const char *s); func Xperror(t *TLS, s uintptr) { if __ccgo_strace { trc("t=%v s=%v, (%v:)", t, s, origin(2)) } panic(todo("")) } // int pclose(FILE *stream); func Xpclose(t *TLS, stream uintptr) int32 { if __ccgo_strace { trc("t=%v stream=%v, (%v:)", t, stream, origin(2)) } panic(todo("")) } var gai_strerrorBuf [100]byte // const char *gai_strerror(int errcode); func Xgai_strerror(t *TLS, errcode int32) uintptr { if __ccgo_strace { trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2)) } copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode)) return uintptr(unsafe.Pointer(&gai_strerrorBuf)) } // int tcgetattr(int fd, struct termios *termios_p); func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 { if __ccgo_strace { trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2)) } panic(todo("")) } // int tcsetattr(int fd, int optional_actions, const struct termios *termios_p); func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 { if __ccgo_strace { trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2)) } panic(todo("")) } // speed_t cfgetospeed(const struct termios *termios_p); func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t { if __ccgo_strace { trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2)) } panic(todo("")) } // int cfsetospeed(struct termios *termios_p, speed_t speed); func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 { if __ccgo_strace { trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2)) } panic(todo("")) } // int cfsetispeed(struct termios *termios_p, speed_t speed); func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 { if __ccgo_strace { trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2)) } panic(todo("")) } // pid_t fork(void); func Xfork(t *TLS) int32 { if __ccgo_strace { trc("t=%v, (%v:)", t, origin(2)) } t.setErrno(errno.ENOSYS) return -1 } var emptyStr = [1]byte{} // char *setlocale(int category, const char *locale); func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr { if __ccgo_strace { trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2)) } return uintptr(unsafe.Pointer(&emptyStr)) //TODO } // char *nl_langinfo(nl_item item); func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr { if __ccgo_strace { trc("t=%v item=%v, (%v:)", t, item, origin(2)) } return uintptr(unsafe.Pointer(&emptyStr)) //TODO } // FILE *popen(const char *command, const char *type); func Xpopen(t *TLS, command, type1 uintptr) uintptr { if __ccgo_strace { trc("t=%v type1=%v, (%v:)", t, type1, origin(2)) } panic(todo("")) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_386.go
vendor/modernc.org/libc/libc_musl_linux_386.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "math/bits" "sync/atomic" "unsafe" ) type long = int32 type ulong = uint32 // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<31 - 1]byte func a_crash() func _a_crash(tls *TLS) { a_crash() } func a_cas(p uintptr, t, s int32) int32 func _a_cas(tls *TLS, p uintptr, test, s int32) int32 { return a_cas(p, test, s) } func _a_store(tls *TLS, p uintptr, v int32) { atomic.StoreInt32((*int32)(unsafe.Pointer(p)), v) } func _a_clz_32(tls *TLS, x uint32) int32 { return int32(bits.LeadingZeros32(x)) } func _a_ctz_32(tls *TLS, x uint32) int32 { return X__builtin_ctz(tls, x) } func a_or(p uintptr, v int32) func _a_or(tls *TLS, p uintptr, v int32) { a_or(p, v) } func _a_swap(tls *TLS, p uintptr, v int32) int32 { return atomic.SwapInt32((*int32)(unsafe.Pointer(p)), v) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/memgrind.go
vendor/modernc.org/libc/memgrind.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !libc.membrk && libc.memgrind && !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) // This is a debug-only version of the memory handling functions. When a // program is built with -tags=libc.memgrind the functions MemAuditStart and // MemAuditReport can be used to check for memory leaks. package libc // import "modernc.org/libc" import ( "fmt" "runtime" "sort" "strings" "unsafe" "modernc.org/libc/errno" "modernc.org/libc/sys/types" "modernc.org/memory" ) const memgrind = true type memReportItem struct { p, pc uintptr s string } func (it *memReportItem) String() string { more := it.s if more != "" { a := strings.Split(more, "\n") more = "\n\t\t" + strings.Join(a, "\n\t\t") } return fmt.Sprintf("\t%s: %#x%s", pc2origin(it.pc), it.p, more) } type memReport []memReportItem func (r memReport) Error() string { a := []string{"memory leaks"} for _, v := range r { a = append(a, v.String()) } return strings.Join(a, "\n") } var ( allocator memory.Allocator allocs map[uintptr]uintptr // addr: caller allocsMore map[uintptr]string frees map[uintptr]uintptr // addr: caller memAudit memReport memAuditEnabled bool ) func pc2origin(pc uintptr) string { f := runtime.FuncForPC(pc) var fn, fns string var fl int if f != nil { fn, fl = f.FileLine(pc) fns = f.Name() if x := strings.LastIndex(fns, "."); x > 0 { fns = fns[x+1:] } } return fmt.Sprintf("%s:%d:%s", fn, fl, fns) } // void *malloc(size_t size); func Xmalloc(t *TLS, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v size=%v, (%v:)", t, size, origin(2)) } if size == 0 { // malloc(0) should return unique pointers // (often expected and gnulib replaces malloc if malloc(0) returns 0) size = 1 } allocMu.Lock() defer allocMu.Unlock() p, err := allocator.UintptrCalloc(int(size)) // if dmesgs { // dmesg("%v: %v -> %#x, %v", origin(1), size, p, err) // } if err != nil { t.setErrno(errno.ENOMEM) return 0 } if memAuditEnabled { pc, _, _, ok := runtime.Caller(1) if !ok { panic("cannot obtain caller's PC") } delete(frees, p) if pc0, ok := allocs[p]; ok { dmesg("%v: malloc returns same address twice, previous call at %v:", pc2origin(pc), pc2origin(pc0)) panic(fmt.Errorf("%v: malloc returns same address twice, previous call at %v:", pc2origin(pc), pc2origin(pc0))) } allocs[p] = pc } return p } // void *calloc(size_t nmemb, size_t size); func Xcalloc(t *TLS, n, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v n=%v size=%v, (%v:)", t, n, size, origin(2)) } rq := int(n * size) if rq == 0 { rq = 1 } allocMu.Lock() defer allocMu.Unlock() p, err := allocator.UintptrCalloc(rq) // if dmesgs { // dmesg("%v: %v -> %#x, %v", origin(1), n*size, p, err) // } if err != nil { t.setErrno(errno.ENOMEM) return 0 } if memAuditEnabled { pc, _, _, ok := runtime.Caller(1) if !ok { panic("cannot obtain caller's PC") } delete(frees, p) if pc0, ok := allocs[p]; ok { dmesg("%v: calloc returns same address twice, previous call at %v:", pc2origin(pc), pc2origin(pc0)) panic(fmt.Errorf("%v: calloc returns same address twice, previous call at %v:", pc2origin(pc), pc2origin(pc0))) } allocs[p] = pc } return p } // void *realloc(void *ptr, size_t size); func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr { if __ccgo_strace { trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2)) } allocMu.Lock() defer allocMu.Unlock() var pc uintptr if memAuditEnabled { var ok bool if pc, _, _, ok = runtime.Caller(1); !ok { panic("cannot obtain caller's PC") } if ptr != 0 { if pc0, ok := frees[ptr]; ok { dmesg("%v: realloc: double free of %#x, previous call at %v:", pc2origin(pc), ptr, pc2origin(pc0)) panic(fmt.Errorf("%v: realloc: double free of %#x, previous call at %v:", pc2origin(pc), ptr, pc2origin(pc0))) } if _, ok := allocs[ptr]; !ok { dmesg("%v: %v: realloc, free of unallocated memory: %#x", origin(1), pc2origin(pc), ptr) panic(fmt.Errorf("%v: realloc, free of unallocated memory: %#x", pc2origin(pc), ptr)) } delete(allocs, ptr) delete(allocsMore, ptr) frees[ptr] = pc } } p, err := allocator.UintptrRealloc(ptr, int(size)) // if dmesgs { // dmesg("%v: %#x, %v -> %#x, %v", origin(1), ptr, size, p, err) // } if err != nil { t.setErrno(errno.ENOMEM) return 0 } if memAuditEnabled && p != 0 { delete(frees, p) if pc0, ok := allocs[p]; ok { dmesg("%v: realloc returns same address twice, previous call at %v:", pc2origin(pc), pc2origin(pc0)) panic(fmt.Errorf("%v: realloc returns same address twice, previous call at %v:", pc2origin(pc), pc2origin(pc0))) } allocs[p] = pc } return p } // void free(void *ptr); func Xfree(t *TLS, p uintptr) { if __ccgo_strace { trc("t=%v p=%v, (%v:)", t, p, origin(2)) } if p == 0 { return } // if dmesgs { // dmesg("%v: %#x", origin(1), p) // } allocMu.Lock() defer allocMu.Unlock() sz := memory.UintptrUsableSize(p) if memAuditEnabled { pc, _, _, ok := runtime.Caller(1) if !ok { panic("cannot obtain caller's PC") } if pc0, ok := frees[p]; ok { dmesg("%v: double free of %#x, previous call at %v:", pc2origin(pc), p, pc2origin(pc0)) panic(fmt.Errorf("%v: double free of %#x, previous call at %v:", pc2origin(pc), p, pc2origin(pc0))) } if _, ok := allocs[p]; !ok { dmesg("%v: free of unallocated memory: %#x", pc2origin(pc), p) panic(fmt.Errorf("%v: free of unallocated memory: %#x", pc2origin(pc), p)) } delete(allocs, p) delete(allocsMore, p) frees[p] = pc } for i := uintptr(0); i < uintptr(sz); i++ { *(*byte)(unsafe.Pointer(p + i)) = 0 } allocator.UintptrFree(p) } func UsableSize(p uintptr) types.Size_t { allocMu.Lock() defer allocMu.Unlock() if memAuditEnabled { pc, _, _, ok := runtime.Caller(1) if !ok { panic("cannot obtain caller's PC") } if _, ok := allocs[p]; !ok { dmesg("%v: usable size of unallocated memory: %#x", pc2origin(pc), p) panic(fmt.Errorf("%v: usable size of unallocated memory: %#x", pc2origin(pc), p)) } } return types.Size_t(memory.UintptrUsableSize(p)) } func Xmalloc_usable_size(tls *TLS, p uintptr) (r Tsize_t) { return UsableSize(p) } type MemAllocatorStat struct { Allocs int Bytes int Mmaps int } // MemStat no-op for this build tag func MemStat() MemAllocatorStat { return MemAllocatorStat{} } // MemAuditStart locks the memory allocator, initializes and enables memory // auditing. Finally it unlocks the memory allocator. // // Some memory handling errors, like double free or freeing of unallocated // memory, will panic when memory auditing is enabled. // // This memory auditing functionality has to be enabled using the libc.memgrind // build tag. // // It is intended only for debug/test builds. It slows down memory allocation // routines and it has additional memory costs. func MemAuditStart() { allocMu.Lock() defer allocMu.Unlock() allocs = map[uintptr]uintptr{} // addr: caller allocsMore = map[uintptr]string{} frees = map[uintptr]uintptr{} // addr: caller memAuditEnabled = true } // MemAuditReport locks the memory allocator, reports memory leaks, if any. // Finally it disables memory auditing and unlocks the memory allocator. // // This memory auditing functionality has to be enabled using the libc.memgrind // build tag. // // It is intended only for debug/test builds. It slows down memory allocation // routines and it has additional memory costs. func MemAuditReport() (r error) { allocMu.Lock() defer func() { allocs = nil allocsMore = nil frees = nil memAuditEnabled = false memAudit = nil allocMu.Unlock() }() if len(allocs) != 0 { for p, pc := range allocs { memAudit = append(memAudit, memReportItem{p, pc, allocsMore[p]}) } sort.Slice(memAudit, func(i, j int) bool { return memAudit[i].String() < memAudit[j].String() }) return memAudit } return nil } func MemAuditAnnotate(pc uintptr, s string) { allocMu.Lock() allocsMore[pc] = s allocMu.Unlock() }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/ioutil_freebsd.go
vendor/modernc.org/libc/ioutil_freebsd.go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE-GO file. // Modifications Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "fmt" "os" "sync" "time" "unsafe" "golang.org/x/sys/unix" ) // Random number state. // We generate random temporary file names so that there's a good // chance the file doesn't exist yet - keeps the number of tries in // TempFile to a minimum. var randState uint32 var randStateMu sync.Mutex func reseed() uint32 { return uint32(time.Now().UnixNano() + int64(os.Getpid())) } func nextRandom(x uintptr) { randStateMu.Lock() r := randState if r == 0 { r = reseed() } r = r*1664525 + 1013904223 // constants from Numerical Recipes randState = r randStateMu.Unlock() copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6)) } func tempFile(s, x uintptr, _ int32) (fd int, err error) { const maxTry = 10000 nconflict := 0 for i := 0; i < maxTry; i++ { nextRandom(x) if fd, err = unix.Open(GoString(s), os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600); err == nil { return fd, nil } if !os.IsExist(err) { return -1, err } if nconflict++; nconflict > 10 { randStateMu.Lock() randState = reseed() nconflict = 0 randStateMu.Unlock() } } return -1, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_linux_mips64le.go
vendor/modernc.org/libc/capi_linux_mips64le.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_IO_putc": {}, "___errno_location": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_b_loc": {}, "__ctype_get_mb_cur_max": {}, "__errno_location": {}, "__floatscan": {}, "__fpclassify": {}, "__fpclassifyf": {}, "__fpclassifyl": {}, "__fsmu8": {}, "__h_errno_location": {}, "__inet_aton": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lockfile": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__shgetc": {}, "__shlim": {}, "__strncasecmp_l": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__unlockfile": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "dup3": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "faccessat": {}, "fchmod": {}, "fchmodat": {}, "fchown": {}, "fchownat": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fstatfs": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "ftruncate64": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostbyname_r": {}, "gethostname": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getrandom": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isupper": {}, "iswalnum": {}, "iswspace": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "linkat": {}, "listen": {}, "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbrtowc": {}, "mbsinit": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkdirat": {}, "mkfifo": {}, "mknod": {}, "mknodat": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "mmap64": {}, "modf": {}, "mremap": {}, "munmap": {}, "nanf": {}, "nanosleep": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "openat": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "pipe2": {}, "poll": {}, "popen": {}, "posix_fadvise": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "pwrite": {}, "qsort": {}, "raise": {}, "rand": {}, "rand_r": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readlinkat": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "renameat2": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlcat": {}, "strlcpy": {}, "strlen": {}, "strncasecmp": {}, "strncat": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtok": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "symlinkat": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unlinkat": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimensat": {}, "utimes": {}, "uuid_copy": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vfscanf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "vsscanf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/mem_brk_musl.go
vendor/modernc.org/libc/mem_brk_musl.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build libc.membrk && !libc.memgrind && linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm) // This is a debug-only version of the memory handling functions. When a // program is built with -tags=libc.membrk a simple but safe version of malloc // and friends is used that works like sbrk(2). Additionally free becomes a // nop. // The fixed heap is initially filled with random bytes from a full cycle PRNG, // program startup time is substantially prolonged. package libc // import "modernc.org/libc" import ( "fmt" "math" "math/bits" "runtime" "strings" "time" "unsafe" "modernc.org/mathutil" ) const ( isMemBrk = true heapSize = 1 << 30 ) var ( brkIndex uintptr heap [heapSize]byte heapP uintptr heap0 uintptr heapRecords []heapRecord heapUsable = map[uintptr]Tsize_t{} heapFree = map[uintptr]struct{}{} rng *mathutil.FC32 ) type heapRecord struct { p uintptr pc uintptr } func (r *heapRecord) String() string { return fmt.Sprintf("[p=%#0x usable=%v pc=%s]", r.p, Xmalloc_usable_size(nil, r.p), pc2origin(r.pc)) } func init() { if roundup(heapGuard, heapAlign) != heapGuard { panic("internal error") } heap0 = uintptr(unsafe.Pointer(&heap[0])) heapP = roundup(heap0, heapAlign) var err error if rng, err = mathutil.NewFC32(math.MinInt32, math.MaxInt32, true); err != nil { panic(err) } rng.Seed(time.Now().UnixNano()) for i := range heap { heap[i] = byte(rng.Next()) } } func pc2origin(pc uintptr) string { f := runtime.FuncForPC(pc) var fn, fns string var fl int if f != nil { fn, fl = f.FileLine(pc) fns = f.Name() if x := strings.LastIndex(fns, "."); x > 0 { fns = fns[x+1:] } } return fmt.Sprintf("%s:%d:%s", fn, fl, fns) } func malloc0(tls *TLS, pc uintptr, n0 Tsize_t, zero bool) (r uintptr) { usable := roundup(uintptr(n0), heapAlign) rq := usable + 2*heapGuard if brkIndex+rq > uintptr(len(heap)) { tls.setErrno(ENOMEM) return 0 } r, brkIndex = heapP+brkIndex, brkIndex+rq heapRecords = append(heapRecords, heapRecord{p: r, pc: pc}) r += heapGuard heapUsable[r] = Tsize_t(usable) if zero { n := uintptr(n0) for i := uintptr(0); i < n; i++ { *(*byte)(unsafe.Pointer(r + i)) = 0 } } return r } func Xmalloc(tls *TLS, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("tls=%v n=%v, (%v:)", tls, n, origin(2)) defer func() { trc("-> %v", r) }() } if n > math.MaxInt { tls.setErrno(ENOMEM) return 0 } if n == 0 { // malloc(0) should return unique pointers // (often expected and gnulib replaces malloc if malloc(0) returns 0) n = 1 } allocatorMu.Lock() defer allocatorMu.Unlock() pc, _, _, _ := runtime.Caller(1) return malloc0(tls, pc, n, false) } func Xcalloc(tls *TLS, m Tsize_t, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("tls=%v m=%v n=%v, (%v:)", tls, m, n, origin(2)) defer func() { trc("-> %v", r) }() } hi, rq := bits.Mul(uint(m), uint(n)) if hi != 0 || rq > math.MaxInt { tls.setErrno(ENOMEM) return 0 } if rq == 0 { rq = 1 } allocatorMu.Lock() defer allocatorMu.Unlock() pc, _, _, _ := runtime.Caller(1) return malloc0(tls, pc, Tsize_t(rq), true) } func Xrealloc(tls *TLS, p uintptr, n Tsize_t) (r uintptr) { if __ccgo_strace { trc("tls=%v p=%v n=%v, (%v:)", tls, p, n, origin(2)) defer func() { trc("-> %v", r) }() } if n == 0 { Xfree(tls, p) return 0 } allocatorMu.Lock() defer allocatorMu.Unlock() pc, _, _, _ := runtime.Caller(1) if p == 0 { return malloc0(tls, pc, n, false) } usable := heapUsable[p] if usable == 0 { panic(todo("realloc of unallocated memory: %#0x", p)) } if usable >= n { // in place return p } // malloc r = malloc0(tls, pc, n, false) copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), usable), unsafe.Slice((*byte)(unsafe.Pointer(p)), usable)) Xfree(tls, p) return r } func Xfree(tls *TLS, p uintptr) { if __ccgo_strace { trc("tls=%v p=%v, (%v:)", tls, p, origin(2)) } allocatorMu.Lock() defer allocatorMu.Unlock() if p == 0 { return } if _, ok := heapUsable[p]; !ok { panic(todo("free of unallocated memory: %#0x", p)) } if _, ok := heapFree[p]; ok { panic(todo("double free: %#0x", p)) } heapFree[p] = struct{}{} } func Xmalloc_usable_size(tls *TLS, p uintptr) (r Tsize_t) { if __ccgo_strace { trc("tls=%v p=%v, (%v:)", tls, p, origin(2)) defer func() { trc("-> %v", r) }() } if p == 0 { return 0 } allocatorMu.Lock() defer allocatorMu.Unlock() return heapUsable[p] } func MemAudit() (r []*MemAuditError) { allocatorMu.Lock() defer allocatorMu.Unlock() a := heapRecords auditP := heap0 rng.Seek(0) for _, v := range a { heapP := v.p mallocP := heapP + heapGuard usable := heapUsable[mallocP] for ; auditP < mallocP; auditP++ { if g, e := *(*byte)(unsafe.Pointer(auditP)), byte(rng.Next()); g != e { r = append(r, &MemAuditError{Caller: pc2origin(v.pc), Message: fmt.Sprintf("guard area before %#0x, %v is corrupted at %#0x, got %#02x, expected %#02x", mallocP, usable, auditP, g, e)}) } } for i := 0; Tsize_t(i) < usable; i++ { rng.Next() } auditP = mallocP + uintptr(usable) z := roundup(auditP, heapAlign) z += heapGuard for ; auditP < z; auditP++ { if g, e := *(*byte)(unsafe.Pointer(auditP)), byte(rng.Next()); g != e { r = append(r, &MemAuditError{Caller: pc2origin(v.pc), Message: fmt.Sprintf("guard area after %#0x, %v is corrupted at %#0x, got %#02x, expected %#02x", mallocP, usable, auditP, g, e)}) } } } z := heap0 + uintptr(len(heap)) for ; auditP < z; auditP++ { if g, e := *(*byte)(unsafe.Pointer(auditP)), byte(rng.Next()); g != e { r = append(r, &MemAuditError{Caller: "-", Message: fmt.Sprintf("guard area after used heap is corrupted at %#0x, got %#02x, expected %#02x", auditP, g, e)}) return r // Report only the first fail } } return r } func UsableSize(p uintptr) Tsize_t { if p == 0 { return 0 } allocatorMu.Lock() defer allocatorMu.Unlock() return heapUsable[p] } type MemAllocatorStat struct { Allocs int Bytes int Mmaps int } // MemStat no-op for this build tag func MemStat() MemAllocatorStat { return MemAllocatorStat{} } // MemAuditStart locks the memory allocator, initializes and enables memory // auditing. Finaly it unlocks the memory allocator. // // Some memory handling errors, like double free or freeing of unallocated // memory, will panic when memory auditing is enabled. // // This memory auditing functionality has to be enabled using the libc.memgrind // build tag. // // It is intended only for debug/test builds. It slows down memory allocation // routines and it has additional memory costs. func MemAuditStart() {} // MemAuditReport locks the memory allocator, reports memory leaks, if any. // Finally it disables memory auditing and unlocks the memory allocator. // // This memory auditing functionality has to be enabled using the libc.memgrind // build tag. // // It is intended only for debug/test builds. It slows down memory allocation // routines and it has additional memory costs. func MemAuditReport() error { return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/atomic64.go
vendor/modernc.org/libc/atomic64.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64) package libc // import "modernc.org/libc" import ( mbits "math/bits" ) // static inline int a_ctz_l(unsigned long x) func _a_ctz_l(tls *TLS, x ulong) int32 { return int32(mbits.TrailingZeros64(x)) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_openbsd_386.go
vendor/modernc.org/libc/libc_openbsd_386.go
// Copyright 2021 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" type ( long = int32 ulong = uint32 )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/stdatomic.go
vendor/modernc.org/libc/stdatomic.go
// Copyright 2024 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "sync" "sync/atomic" "unsafe" ) var ( int8Mu sync.Mutex int16Mu sync.Mutex int32Mu sync.Mutex int64Mu sync.Mutex ) // type __atomic_fetch_add(type *ptr, type val, int memorder) // // { tmp = *ptr; *ptr op= val; return tmp; } // { tmp = *ptr; *ptr = ~(*ptr & val); return tmp; } // nand func X__c11_atomic_fetch_addInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { return X__atomic_fetch_addInt8(t, ptr, val, 0) } func X__atomic_fetch_addInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { return X__atomic_fetch_addUint8(t, ptr, val, 0) } func X__atomic_fetch_addUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { return X__atomic_fetch_addInt16(t, ptr, val, 0) } func X__atomic_fetch_addInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { return X__atomic_fetch_addUint16(t, ptr, val, 0) } func X__atomic_fetch_addUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { return X__atomic_fetch_addInt32(t, ptr, val, 0) } func X__atomic_fetch_addInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*int32)(unsafe.Pointer(ptr)) *(*int32)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { return X__atomic_fetch_addUint32(t, ptr, val, 0) } func X__atomic_fetch_addUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*uint32)(unsafe.Pointer(ptr)) *(*uint32)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { return X__atomic_fetch_addInt64(t, ptr, val, 0) } func X__atomic_fetch_addInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*int64)(unsafe.Pointer(ptr)) *(*int64)(unsafe.Pointer(ptr)) += val return r } func X__c11_atomic_fetch_addUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { return X__atomic_fetch_addUint64(t, ptr, val, 0) } func X__atomic_fetch_addUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*uint64)(unsafe.Pointer(ptr)) *(*uint64)(unsafe.Pointer(ptr)) += val return r } // ---- func X__c11_atomic_fetch_andInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { return X__atomic_fetch_andInt8(t, ptr, val, 0) } func X__atomic_fetch_andInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { return X__atomic_fetch_andUint8(t, ptr, val, 0) } func X__atomic_fetch_andUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { return X__atomic_fetch_andInt16(t, ptr, val, 0) } func X__atomic_fetch_andInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { return X__atomic_fetch_andUint16(t, ptr, val, 0) } func X__atomic_fetch_andUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { return X__atomic_fetch_andInt32(t, ptr, val, 0) } func X__atomic_fetch_andInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*int32)(unsafe.Pointer(ptr)) *(*int32)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { return X__atomic_fetch_andUint32(t, ptr, val, 0) } func X__atomic_fetch_andUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*uint32)(unsafe.Pointer(ptr)) *(*uint32)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { return X__atomic_fetch_andInt64(t, ptr, val, 0) } func X__atomic_fetch_andInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*int64)(unsafe.Pointer(ptr)) *(*int64)(unsafe.Pointer(ptr)) &= val return r } func X__c11_atomic_fetch_andUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { return X__atomic_fetch_andUint64(t, ptr, val, 0) } func X__atomic_fetch_andUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*uint64)(unsafe.Pointer(ptr)) *(*uint64)(unsafe.Pointer(ptr)) &= val return r } // ---- func X__c11_atomic_fetch_orInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { return X__atomic_fetch_orInt8(t, ptr, val, 0) } func X__atomic_fetch_orInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { return X__atomic_fetch_orUint8(t, ptr, val, 0) } func X__atomic_fetch_orUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { return X__atomic_fetch_orInt16(t, ptr, val, 0) } func X__atomic_fetch_orInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { return X__atomic_fetch_orUint16(t, ptr, val, 0) } func X__atomic_fetch_orUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { return X__atomic_fetch_orInt32(t, ptr, val, 0) } func X__atomic_fetch_orInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*int32)(unsafe.Pointer(ptr)) *(*int32)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { return X__atomic_fetch_orUint32(t, ptr, val, 0) } func X__atomic_fetch_orUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*uint32)(unsafe.Pointer(ptr)) *(*uint32)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { return X__atomic_fetch_orInt64(t, ptr, val, 0) } func X__atomic_fetch_orInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*int64)(unsafe.Pointer(ptr)) *(*int64)(unsafe.Pointer(ptr)) |= val return r } func X__c11_atomic_fetch_orUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { return X__atomic_fetch_orUint64(t, ptr, val, 0) } func X__atomic_fetch_orUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*uint64)(unsafe.Pointer(ptr)) *(*uint64)(unsafe.Pointer(ptr)) |= val return r } // ---- func X__c11_atomic_fetch_subInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { return X__atomic_fetch_subInt8(t, ptr, val, 0) } func X__atomic_fetch_subInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { return X__atomic_fetch_subUint8(t, ptr, val, 0) } func X__atomic_fetch_subUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { return X__atomic_fetch_subInt16(t, ptr, val, 0) } func X__atomic_fetch_subInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { return X__atomic_fetch_subUint16(t, ptr, val, 0) } func X__atomic_fetch_subUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { return X__atomic_fetch_subInt32(t, ptr, val, 0) } func X__atomic_fetch_subInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*int32)(unsafe.Pointer(ptr)) *(*int32)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { return X__atomic_fetch_subUint32(t, ptr, val, 0) } func X__atomic_fetch_subUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*uint32)(unsafe.Pointer(ptr)) *(*uint32)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { return X__atomic_fetch_subInt64(t, ptr, val, 0) } func X__atomic_fetch_subInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*int64)(unsafe.Pointer(ptr)) *(*int64)(unsafe.Pointer(ptr)) -= val return r } func X__c11_atomic_fetch_subUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { return X__atomic_fetch_subUint64(t, ptr, val, 0) } func X__atomic_fetch_subUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*uint64)(unsafe.Pointer(ptr)) *(*uint64)(unsafe.Pointer(ptr)) -= val return r } // ---- func X__c11_atomic_fetch_xorInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { return X__atomic_fetch_xorInt8(t, ptr, val, 0) } func X__atomic_fetch_xorInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { return X__atomic_fetch_xorUint8(t, ptr, val, 0) } func X__atomic_fetch_xorUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { return X__atomic_fetch_xorInt16(t, ptr, val, 0) } func X__atomic_fetch_xorInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { return X__atomic_fetch_xorUint16(t, ptr, val, 0) } func X__atomic_fetch_xorUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { return X__atomic_fetch_xorInt32(t, ptr, val, 0) } func X__atomic_fetch_xorInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*int32)(unsafe.Pointer(ptr)) *(*int32)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { return X__atomic_fetch_xorUint32(t, ptr, val, 0) } func X__atomic_fetch_xorUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { int32Mu.Lock() defer int32Mu.Unlock() r = *(*uint32)(unsafe.Pointer(ptr)) *(*uint32)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { return X__atomic_fetch_xorInt64(t, ptr, val, 0) } func X__atomic_fetch_xorInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*int64)(unsafe.Pointer(ptr)) *(*int64)(unsafe.Pointer(ptr)) ^= val return r } func X__c11_atomic_fetch_xorUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { return X__atomic_fetch_xorUint64(t, ptr, val, 0) } func X__atomic_fetch_xorUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { int64Mu.Lock() defer int64Mu.Unlock() r = *(*uint64)(unsafe.Pointer(ptr)) *(*uint64)(unsafe.Pointer(ptr)) ^= val return r } // ---- // void __atomic_exchange (type *ptr, type *val, type *ret, int memorder) func X__c11_atomic_exchangeInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) = val return r } func X__atomic_exchangeInt8(t *TLS, ptr, val, ret uintptr, _ int32) { int8Mu.Lock() defer int8Mu.Unlock() *(*int8)(unsafe.Pointer(ret)) = *(*int8)(unsafe.Pointer(ptr)) *(*int8)(unsafe.Pointer(ptr)) = *(*int8)(unsafe.Pointer(val)) } func X__c11_atomic_exchangeUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() r = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) = val return r } func X__atomic_exchangeUint8(t *TLS, ptr, val, ret uintptr, _ int32) { int8Mu.Lock() defer int8Mu.Unlock() *(*uint8)(unsafe.Pointer(ret)) = *(*uint8)(unsafe.Pointer(ptr)) *(*uint8)(unsafe.Pointer(ptr)) = *(*uint8)(unsafe.Pointer(val)) } func X__c11_atomic_exchangeInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) = val return r } func X__atomic_exchangeInt16(t *TLS, ptr, val, ret uintptr, _ int32) { int16Mu.Lock() defer int16Mu.Unlock() *(*int16)(unsafe.Pointer(ret)) = *(*int16)(unsafe.Pointer(ptr)) *(*int16)(unsafe.Pointer(ptr)) = *(*int16)(unsafe.Pointer(val)) } func X__c11_atomic_exchangeUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() r = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) = val return r } func X__atomic_exchangeUint16(t *TLS, ptr, val, ret uintptr, _ int32) { int16Mu.Lock() defer int16Mu.Unlock() *(*uint16)(unsafe.Pointer(ret)) = *(*uint16)(unsafe.Pointer(ptr)) *(*uint16)(unsafe.Pointer(ptr)) = *(*uint16)(unsafe.Pointer(val)) } func X__c11_atomic_exchangeInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32) { return atomic.SwapInt32((*int32)(unsafe.Pointer(ptr)), val) } func X__atomic_exchangeInt32(t *TLS, ptr, val, ret uintptr, _ int32) { *(*int32)(unsafe.Pointer(ret)) = atomic.SwapInt32((*int32)(unsafe.Pointer(ptr)), *(*int32)(unsafe.Pointer(val))) } func X__c11_atomic_exchangeUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32) { return uint32(atomic.SwapInt32((*int32)(unsafe.Pointer(ptr)), int32(val))) } func X__atomic_exchangeUint32(t *TLS, ptr, val, ret uintptr, _ int32) { *(*uint32)(unsafe.Pointer(ret)) = atomic.SwapUint32((*uint32)(unsafe.Pointer(ptr)), *(*uint32)(unsafe.Pointer(val))) } func X__c11_atomic_exchangeInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64) { return atomic.SwapInt64((*int64)(unsafe.Pointer(ptr)), val) } func X__atomic_exchangeInt64(t *TLS, ptr, val, ret uintptr, _ int32) { *(*int64)(unsafe.Pointer(ret)) = atomic.SwapInt64((*int64)(unsafe.Pointer(ptr)), *(*int64)(unsafe.Pointer(val))) } func X__c11_atomic_exchangeUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64) { return uint64(atomic.SwapInt64((*int64)(unsafe.Pointer(ptr)), int64(val))) } func X__atomic_exchangeUint64(t *TLS, ptr, val, ret uintptr, _ int32) { *(*uint64)(unsafe.Pointer(ret)) = atomic.SwapUint64((*uint64)(unsafe.Pointer(ptr)), *(*uint64)(unsafe.Pointer(val))) } // ---- // bool __atomic_compare_exchange (type *ptr, type *expected, type *desired, bool weak, int success_memorder, int failure_memorder) // https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html // // This built-in function implements an atomic compare and exchange operation. // This compares the contents of *ptr with the contents of *expected. If equal, // the operation is a read-modify-write operation that writes desired into // *ptr. If they are not equal, the operation is a read and the current // contents of *ptr are written into *expected. weak is true for weak // compare_exchange, which may fail spuriously, and false for the strong // variation, which never fails spuriously. Many targets only offer the strong // variation and ignore the parameter. When in doubt, use the strong variation. // // If desired is written into *ptr then true is returned and memory is affected // according to the memory order specified by success_memorder. There are no // restrictions on what memory order can be used here. // // Otherwise, false is returned and memory is affected according to // failure_memorder. This memory order cannot be __ATOMIC_RELEASE nor // __ATOMIC_ACQ_REL. It also cannot be a stronger order than that specified by // success_memorder. func X__atomic_compare_exchangeInt8(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { int8Mu.Lock() defer int8Mu.Unlock() have := *(*int8)(unsafe.Pointer(ptr)) if have == *(*int8)(unsafe.Pointer(expected)) { *(*int8)(unsafe.Pointer(ptr)) = *(*int8)(unsafe.Pointer(desired)) return 1 } *(*int8)(unsafe.Pointer(expected)) = have return 0 } func X__atomic_compare_exchangeUint8(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { return X__atomic_compare_exchangeInt8(t, ptr, expected, desired, weak, success, failure) } func X__atomic_compare_exchangeInt16(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { int16Mu.Lock() defer int16Mu.Unlock() have := *(*int16)(unsafe.Pointer(ptr)) if have == *(*int16)(unsafe.Pointer(expected)) { *(*int16)(unsafe.Pointer(ptr)) = *(*int16)(unsafe.Pointer(desired)) return 1 } *(*int16)(unsafe.Pointer(expected)) = have return 0 } func X__atomic_compare_exchangeUint16(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { return X__atomic_compare_exchangeInt16(t, ptr, expected, desired, weak, success, failure) } func X__atomic_compare_exchangeInt32(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { int32Mu.Lock() defer int32Mu.Unlock() have := *(*int32)(unsafe.Pointer(ptr)) if have == *(*int32)(unsafe.Pointer(expected)) { *(*int32)(unsafe.Pointer(ptr)) = *(*int32)(unsafe.Pointer(desired)) return 1 } *(*int32)(unsafe.Pointer(expected)) = have return 0 } func X__atomic_compare_exchangeUint32(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { return X__atomic_compare_exchangeInt32(t, ptr, expected, desired, weak, success, failure) } func X__atomic_compare_exchangeInt64(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { int64Mu.Lock() defer int64Mu.Unlock() have := *(*int64)(unsafe.Pointer(ptr)) if have == *(*int64)(unsafe.Pointer(expected)) { *(*int64)(unsafe.Pointer(ptr)) = *(*int64)(unsafe.Pointer(desired)) return 1 } *(*int64)(unsafe.Pointer(expected)) = have return 0 } func X__atomic_compare_exchangeUint64(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) int32 { return X__atomic_compare_exchangeInt64(t, ptr, expected, desired, weak, success, failure) } func X__c11_atomic_compare_exchange_strongInt8(t *TLS, ptr, expected uintptr, desired int8, success, failure int32) int32 { int8Mu.Lock() defer int8Mu.Unlock() have := *(*int8)(unsafe.Pointer(ptr)) if have == *(*int8)(unsafe.Pointer(expected)) { *(*int8)(unsafe.Pointer(ptr)) = desired return 1 } *(*int8)(unsafe.Pointer(expected)) = have return 0 } func X__c11_atomic_compare_exchange_strongUint8(t *TLS, ptr, expected uintptr, desired uint8, success, failure int32) int32 { return X__c11_atomic_compare_exchange_strongInt8(t, ptr, expected, int8(desired), success, failure) } func X__c11_atomic_compare_exchange_strongInt16(t *TLS, ptr, expected uintptr, desired int16, success, failure int32) int32 { int16Mu.Lock() defer int16Mu.Unlock() have := *(*int16)(unsafe.Pointer(ptr)) if have == *(*int16)(unsafe.Pointer(expected)) { *(*int16)(unsafe.Pointer(ptr)) = desired return 1 } *(*int16)(unsafe.Pointer(expected)) = have return 0 } func X__c11_atomic_compare_exchange_strongUint16(t *TLS, ptr, expected uintptr, desired uint16, success, failure int32) int32 { return X__c11_atomic_compare_exchange_strongInt16(t, ptr, expected, int16(desired), success, failure) } func X__c11_atomic_compare_exchange_strongInt32(t *TLS, ptr, expected uintptr, desired, success, failure int32) int32 { int32Mu.Lock() defer int32Mu.Unlock() have := *(*int32)(unsafe.Pointer(ptr)) if have == *(*int32)(unsafe.Pointer(expected)) { *(*int32)(unsafe.Pointer(ptr)) = desired return 1 } *(*int32)(unsafe.Pointer(expected)) = have return 0 } func X__c11_atomic_compare_exchange_strongUint32(t *TLS, ptr, expected uintptr, desired uint32, success, failure int32) int32 { return X__c11_atomic_compare_exchange_strongInt32(t, ptr, expected, int32(desired), success, failure) } func X__c11_atomic_compare_exchange_strongInt64(t *TLS, ptr, expected uintptr, desired int64, success, failure int32) int32 { int64Mu.Lock() defer int64Mu.Unlock() have := *(*int64)(unsafe.Pointer(ptr)) if have == *(*int64)(unsafe.Pointer(expected)) { *(*int64)(unsafe.Pointer(ptr)) = desired return 1 } *(*int64)(unsafe.Pointer(expected)) = have return 0 } func X__c11_atomic_compare_exchange_strongUint64(t *TLS, ptr, expected uintptr, desired uint64, success, failure int32) int32 { return X__c11_atomic_compare_exchange_strongInt64(t, ptr, expected, int64(desired), success, failure) } // ---- // void __atomic_load (type *ptr, type *ret, int memorder) func X__c11_atomic_loadInt8(t *TLS, ptr uintptr, memorder int32) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() return *(*int8)(unsafe.Pointer(ptr)) } func X__atomic_loadInt8(t *TLS, ptr, ret uintptr, memorder int32) { int8Mu.Lock() defer int8Mu.Unlock() *(*int8)(unsafe.Pointer(ret)) = *(*int8)(unsafe.Pointer(ptr)) } func X__c11_atomic_loadUint8(t *TLS, ptr uintptr, memorder int32) (r uint8) { return uint8(X__c11_atomic_loadInt8(t, ptr, memorder)) } func X__atomic_loadUint8(t *TLS, ptr, ret uintptr, memorder int32) { X__atomic_loadInt8(t, ptr, ret, memorder) } func X__c11_atomic_loadInt16(t *TLS, ptr uintptr, memorder int32) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() return *(*int16)(unsafe.Pointer(ptr)) } func X__atomic_loadInt16(t *TLS, ptr, ret uintptr, memorder int32) { int16Mu.Lock() defer int16Mu.Unlock() *(*int16)(unsafe.Pointer(ret)) = *(*int16)(unsafe.Pointer(ptr)) } func X__c11_atomic_loadUint16(t *TLS, ptr uintptr, memorder int32) (r uint16) { return uint16(X__c11_atomic_loadInt16(t, ptr, memorder)) } func X__atomic_loadUint16(t *TLS, ptr, ret uintptr, memorder int32) { X__atomic_loadInt16(t, ptr, ret, memorder) } func X__c11_atomic_loadInt32(t *TLS, ptr uintptr, memorder int32) (r int32) { return atomic.LoadInt32((*int32)(unsafe.Pointer(ptr))) } func X__atomic_loadInt32(t *TLS, ptr, ret uintptr, memorder int32) { *(*int32)(unsafe.Pointer(ret)) = atomic.LoadInt32((*int32)(unsafe.Pointer(ptr))) } func X__c11_atomic_loadUint32(t *TLS, ptr uintptr, memorder int32) (r uint32) { return uint32(X__c11_atomic_loadInt32(t, ptr, memorder)) } func X__atomic_loadUint32(t *TLS, ptr, ret uintptr, memorder int32) { X__atomic_loadInt32(t, ptr, ret, memorder) } func X__c11_atomic_loadInt64(t *TLS, ptr uintptr, memorder int32) (r int64) { return atomic.LoadInt64((*int64)(unsafe.Pointer(ptr))) } func X__atomic_loadInt64(t *TLS, ptr, ret uintptr, memorder int32) { *(*int64)(unsafe.Pointer(ret)) = atomic.LoadInt64((*int64)(unsafe.Pointer(ptr))) } func X__c11_atomic_loadUint64(t *TLS, ptr uintptr, memorder int32) (r uint64) { return uint64(X__c11_atomic_loadInt64(t, ptr, memorder)) } func X__atomic_loadUint64(t *TLS, ptr, ret uintptr, memorder int32) { X__atomic_loadInt64(t, ptr, ret, memorder) } // ---- // void __atomic_store (type *ptr, type *val, int memorder) func X__c11_atomic_storeInt8(t *TLS, ptr uintptr, val int8, memorder int32) { int8Mu.Lock() defer int8Mu.Unlock() *(*int8)(unsafe.Pointer(ptr)) = val } func X__atomic_storeInt8(t *TLS, ptr, val uintptr, memorder int32) { int8Mu.Lock() defer int8Mu.Unlock() *(*int8)(unsafe.Pointer(ptr)) = *(*int8)(unsafe.Pointer(val)) } func X__c11_atomic_storeUint8(t *TLS, ptr uintptr, val uint8, memorder int32) { X__c11_atomic_storeInt8(t, ptr, int8(val), memorder) } func X__atomic_storeUint8(t *TLS, ptr, val uintptr, memorder int32) { X__atomic_storeInt8(t, ptr, val, memorder) } func X__c11_atomic_storeInt16(t *TLS, ptr uintptr, val int16, memorder int32) { int16Mu.Lock() defer int16Mu.Unlock() *(*int16)(unsafe.Pointer(ptr)) = val } func X__atomic_storeInt16(t *TLS, ptr, val uintptr, memorder int32) { int16Mu.Lock() defer int16Mu.Unlock() *(*int16)(unsafe.Pointer(ptr)) = *(*int16)(unsafe.Pointer(val)) } func X__c11_atomic_storeUint16(t *TLS, ptr uintptr, val uint16, memorder int32) { X__c11_atomic_storeInt16(t, ptr, int16(val), memorder) } func X__atomic_storeUint16(t *TLS, ptr, val uintptr, memorder int32) { X__atomic_storeInt16(t, ptr, val, memorder) } func X__c11_atomic_storeInt32(t *TLS, ptr uintptr, val int32, memorder int32) { atomic.StoreInt32((*int32)(unsafe.Pointer(ptr)), val) } func X__atomic_storeInt32(t *TLS, ptr, val uintptr, memorder int32) { atomic.StoreInt32((*int32)(unsafe.Pointer(ptr)), *(*int32)(unsafe.Pointer(val))) } func X__c11_atomic_storeUint32(t *TLS, ptr uintptr, val uint32, memorder int32) { X__c11_atomic_storeInt32(t, ptr, int32(val), memorder) } func X__atomic_storeUint32(t *TLS, ptr, val uintptr, memorder int32) { X__atomic_storeInt32(t, ptr, val, memorder) } func X__c11_atomic_storeInt64(t *TLS, ptr uintptr, val int64, memorder int32) { atomic.StoreInt64((*int64)(unsafe.Pointer(ptr)), val) } func X__atomic_storeInt64(t *TLS, ptr, val uintptr, memorder int32) { atomic.StoreInt64((*int64)(unsafe.Pointer(ptr)), *(*int64)(unsafe.Pointer(val))) } func X__c11_atomic_storeUint64(t *TLS, ptr uintptr, val uint64, memorder int32) { X__c11_atomic_storeInt64(t, ptr, int64(val), memorder) } func X__atomic_storeUint64(t *TLS, ptr, val uintptr, memorder int32) { X__atomic_storeInt64(t, ptr, val, memorder) } // type __sync_val_compare_and_swap (type *ptr, type oldval type newval, ...) func X__sync_val_compare_and_swapInt8(t *TLS, ptr uintptr, oldval, newval int8) (r int8) { int8Mu.Lock() defer int8Mu.Unlock() if r = *(*int8)(unsafe.Pointer(ptr)); r == oldval { *(*int8)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapUint8(t *TLS, ptr uintptr, oldval, newval uint8) (r uint8) { int8Mu.Lock() defer int8Mu.Unlock() if r = *(*uint8)(unsafe.Pointer(ptr)); r == oldval { *(*uint8)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapInt16(t *TLS, ptr uintptr, oldval, newval int16) (r int16) { int16Mu.Lock() defer int16Mu.Unlock() if r = *(*int16)(unsafe.Pointer(ptr)); r == oldval { *(*int16)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapUint16(t *TLS, ptr uintptr, oldval, newval uint16) (r uint16) { int16Mu.Lock() defer int16Mu.Unlock() if r = *(*uint16)(unsafe.Pointer(ptr)); r == oldval { *(*uint16)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapInt32(t *TLS, ptr uintptr, oldval, newval int32) (r int32) { int32Mu.Lock() defer int32Mu.Unlock() if r = *(*int32)(unsafe.Pointer(ptr)); r == oldval { *(*int32)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapUint32(t *TLS, ptr uintptr, oldval, newval uint32) (r uint32) { int32Mu.Lock() defer int32Mu.Unlock() if r = *(*uint32)(unsafe.Pointer(ptr)); r == oldval { *(*uint32)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapInt64(t *TLS, ptr uintptr, oldval, newval int64) (r int64) { int64Mu.Lock() defer int64Mu.Unlock() if r = *(*int64)(unsafe.Pointer(ptr)); r == oldval { *(*int64)(unsafe.Pointer(ptr)) = newval } return r } func X__sync_val_compare_and_swapUint64(t *TLS, ptr uintptr, oldval, newval uint64) (r uint64) { int64Mu.Lock() defer int64Mu.Unlock() if r = *(*uint64)(unsafe.Pointer(ptr)); r == oldval { *(*uint64)(unsafe.Pointer(ptr)) = newval } return r }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_s390x.go
vendor/modernc.org/libc/libc_musl_linux_s390x.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" import ( "unsafe" "golang.org/x/sys/unix" ) type long = int64 type ulong = uint64 // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<50 - 1]byte func Xfesetround(tls *TLS, r int32) (r1 int32) { if __ccgo_strace { trc("tls=%v r=%v, (%v:)", tls, r, origin(2)) defer func() { trc("-> %v", r1) }() } return X__fesetround(tls, r) } func Xmmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { if __ccgo_strace { trc("tls=%v start=%v len1=%v prot=%v flags=%v fd=%v off=%v, (%v:)", tls, start, len1, prot, flags, fd, off, origin(2)) defer func() { trc("-> %v", r) }() } return ___mmap(tls, start, len1, prot, flags, fd, off) } func ___mmap(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) { if __ccgo_strace { trc("tls=%v start=%v len1=%v prot=%v flags=%v fd=%v off=%v, (%v:)", tls, start, len1, prot, flags, fd, off, origin(2)) defer func() { trc("-> %v", r) }() } // https://github.com/golang/go/blob/7d822af4500831d131562f17dcf53374469d823e/src/syscall/syscall_linux_s390x.go#L77 args := [6]uintptr{start, uintptr(len1), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(off)} data, _, err := unix.Syscall(unix.SYS_MMAP, uintptr(unsafe.Pointer(&args[0])), 0, 0) if err != 0 { tls.setErrno(int32(err)) return ^uintptr(0) // (void*)-1 } return data }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/ioutil_linux.go
vendor/modernc.org/libc/ioutil_linux.go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE-GO file. // Modifications Copyright 2020 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) package libc // import "modernc.org/libc" import ( "fmt" "os" "sync" "time" "unsafe" "golang.org/x/sys/unix" "modernc.org/libc/errno" "modernc.org/libc/fcntl" ) // Random number state. // We generate random temporary file names so that there's a good // chance the file doesn't exist yet - keeps the number of tries in // TempFile to a minimum. var randState uint32 var randStateMu sync.Mutex func reseed() uint32 { return uint32(time.Now().UnixNano() + int64(os.Getpid())) } func nextRandom(x uintptr) { randStateMu.Lock() r := randState if r == 0 { r = reseed() } r = r*1664525 + 1013904223 // constants from Numerical Recipes randState = r randStateMu.Unlock() copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6)) } func tempFile(s, x uintptr, flags int32) (fd int, err error) { const maxTry = 10000 nconflict := 0 flags |= int32(os.O_RDWR | os.O_CREATE | os.O_EXCL | unix.O_LARGEFILE) for i := 0; i < maxTry; i++ { nextRandom(x) fdcwd := fcntl.AT_FDCWD n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), s, uintptr(flags), 0600, 0, 0) if err == 0 { return int(n), nil } if err != errno.EEXIST { return -1, err } if nconflict++; nconflict > 10 { randStateMu.Lock() randState = reseed() nconflict = 0 randStateMu.Unlock() } } return -1, unix.Errno(errno.EEXIST) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_linux_s390x.go
vendor/modernc.org/libc/capi_linux_s390x.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_IO_putc": {}, "___errno_location": {}, "__assert_fail": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_b_loc": {}, "__ctype_get_mb_cur_max": {}, "__errno_location": {}, "__floatscan": {}, "__fpclassify": {}, "__fpclassifyf": {}, "__fpclassifyl": {}, "__fsmu8": {}, "__h_errno_location": {}, "__inet_aton": {}, "__intscan": {}, "__isalnum_l": {}, "__isalpha_l": {}, "__isdigit_l": {}, "__islower_l": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__isprint_l": {}, "__isupper_l": {}, "__isxdigit_l": {}, "__lockfile": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__shgetc": {}, "__shlim": {}, "__strncasecmp_l": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__syscall1": {}, "__syscall3": {}, "__syscall4": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__uflow": {}, "__unlockfile": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "backtrace": {}, "backtrace_symbols_fd": {}, "bind": {}, "bsearch": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chmod": {}, "chown": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "execvp": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fscanf": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fstatfs": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "ftruncate64": {}, "fts64_close": {}, "fts64_open": {}, "fts64_read": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostbyname_r": {}, "gethostname": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getrandom": {}, "getresgid": {}, "getresuid": {}, "getrlimit": {}, "getrlimit64": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isdigit": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isprint": {}, "isupper": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "malloc": {}, "mblen": {}, "mbrtowc": {}, "mbsinit": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "mmap64": {}, "modf": {}, "mremap": {}, "munmap": {}, "nanf": {}, "nanosleep": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "open64": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "posix_fadvise": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "puts": {}, "pwrite": {}, "qsort": {}, "raise": {}, "rand": {}, "rand_r": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readdir64": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setrlimit": {}, "setrlimit64": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "sscanf": {}, "stat": {}, "stat64": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlcat": {}, "strlcpy": {}, "strlen": {}, "strncasecmp": {}, "strncat": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtok": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "tolower": {}, "toupper": {}, "trunc": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_copy": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vfscanf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "vsscanf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/capi_darwin_amd64.go
vendor/modernc.org/libc/capi_darwin_amd64.go
// Code generated by 'go generate' - DO NOT EDIT. package libc // import "modernc.org/libc" var CAPI = map[string]struct{}{ "_CurrentRuneLocale": {}, "_DefaultRuneLocale": {}, "_IO_putc": {}, "_NSGetEnviron": {}, "___errno_location": {}, "__assert_fail": {}, "__assert_rtn": {}, "__builtin___memcpy_chk": {}, "__builtin___memmove_chk": {}, "__builtin___memset_chk": {}, "__builtin___snprintf_chk": {}, "__builtin___sprintf_chk": {}, "__builtin___strcat_chk": {}, "__builtin___strcpy_chk": {}, "__builtin___strncpy_chk": {}, "__builtin___vsnprintf_chk": {}, "__builtin_abort": {}, "__builtin_abs": {}, "__builtin_add_overflowInt64": {}, "__builtin_add_overflowUint32": {}, "__builtin_add_overflowUint64": {}, "__builtin_bswap16": {}, "__builtin_bswap32": {}, "__builtin_bswap64": {}, "__builtin_bzero": {}, "__builtin_clz": {}, "__builtin_clzl": {}, "__builtin_clzll": {}, "__builtin_constant_p_impl": {}, "__builtin_copysign": {}, "__builtin_copysignf": {}, "__builtin_copysignl": {}, "__builtin_exit": {}, "__builtin_expect": {}, "__builtin_fabs": {}, "__builtin_fabsf": {}, "__builtin_fabsl": {}, "__builtin_free": {}, "__builtin_getentropy": {}, "__builtin_huge_val": {}, "__builtin_huge_valf": {}, "__builtin_inf": {}, "__builtin_inff": {}, "__builtin_infl": {}, "__builtin_isnan": {}, "__builtin_isunordered": {}, "__builtin_llabs": {}, "__builtin_malloc": {}, "__builtin_memcmp": {}, "__builtin_memcpy": {}, "__builtin_memset": {}, "__builtin_mmap": {}, "__builtin_mul_overflowInt64": {}, "__builtin_mul_overflowUint128": {}, "__builtin_mul_overflowUint64": {}, "__builtin_nan": {}, "__builtin_nanf": {}, "__builtin_nanl": {}, "__builtin_object_size": {}, "__builtin_popcount": {}, "__builtin_popcountl": {}, "__builtin_prefetch": {}, "__builtin_printf": {}, "__builtin_snprintf": {}, "__builtin_sprintf": {}, "__builtin_strchr": {}, "__builtin_strcmp": {}, "__builtin_strcpy": {}, "__builtin_strlen": {}, "__builtin_sub_overflowInt64": {}, "__builtin_trap": {}, "__builtin_unreachable": {}, "__ccgo_dmesg": {}, "__ccgo_getMutexType": {}, "__ccgo_in6addr_anyp": {}, "__ccgo_pthreadAttrGetDetachState": {}, "__ccgo_pthreadMutexattrGettype": {}, "__ccgo_sqlite3_log": {}, "__cmsg_nxthdr": {}, "__ctype_get_mb_cur_max": {}, "__darwin_check_fd_set_overflow": {}, "__darwin_fd_clr": {}, "__darwin_fd_isset": {}, "__darwin_fd_set": {}, "__env_rm_add": {}, "__errno_location": {}, "__error": {}, "__floatscan": {}, "__fpclassify": {}, "__fpclassifyf": {}, "__fpclassifyl": {}, "__h_errno_location": {}, "__inet_aton": {}, "__inline_isnand": {}, "__inline_isnanf": {}, "__inline_isnanl": {}, "__intscan": {}, "__isctype": {}, "__isnan": {}, "__isnanf": {}, "__isnanl": {}, "__isoc99_sscanf": {}, "__istype": {}, "__lookup_ipliteral": {}, "__lookup_name": {}, "__lookup_serv": {}, "__maskrune": {}, "__mb_cur_max": {}, "__putenv": {}, "__shgetc": {}, "__shlim": {}, "__sincos_stret": {}, "__sincosf_stret": {}, "__sincospi_stret": {}, "__sincospif_stret": {}, "__srget": {}, "__stderrp": {}, "__stdinp": {}, "__stdoutp": {}, "__strchrnul": {}, "__strncasecmp_l": {}, "__svfscanf": {}, "__swbuf": {}, "__sync_add_and_fetch_uint32": {}, "__sync_sub_and_fetch_uint32": {}, "__tolower": {}, "__toread": {}, "__toread_needs_stdio_exit": {}, "__toupper": {}, "__uflow": {}, "__wcwidth": {}, "_exit": {}, "_longjmp": {}, "_obstack_begin": {}, "_obstack_newchunk": {}, "_setjmp": {}, "abort": {}, "abs": {}, "accept": {}, "access": {}, "acos": {}, "acosh": {}, "alarm": {}, "arc4random_buf": {}, "asin": {}, "asinh": {}, "atan": {}, "atan2": {}, "atanh": {}, "atexit": {}, "atof": {}, "atoi": {}, "atol": {}, "bind": {}, "bsearch": {}, "bzero": {}, "calloc": {}, "ceil": {}, "ceilf": {}, "cfgetospeed": {}, "cfsetispeed": {}, "cfsetospeed": {}, "chdir": {}, "chflags": {}, "chmod": {}, "chown": {}, "clock": {}, "clock_gettime": {}, "close": {}, "closedir": {}, "confstr": {}, "connect": {}, "copyfile": {}, "copysign": {}, "copysignf": {}, "copysignl": {}, "cos": {}, "cosf": {}, "cosh": {}, "ctime": {}, "ctime_r": {}, "digittoint": {}, "dlclose": {}, "dlerror": {}, "dlopen": {}, "dlsym": {}, "dup2": {}, "endpwent": {}, "environ": {}, "exit": {}, "exp": {}, "fabs": {}, "fabsf": {}, "fabsl": {}, "fchmod": {}, "fchown": {}, "fclose": {}, "fcntl": {}, "fcntl64": {}, "fdopen": {}, "ferror": {}, "fflush": {}, "fgetc": {}, "fgets": {}, "fileno": {}, "flock": {}, "floor": {}, "fmod": {}, "fmodl": {}, "fopen": {}, "fopen64": {}, "fork": {}, "fprintf": {}, "fputc": {}, "fputs": {}, "fread": {}, "free": {}, "freeaddrinfo": {}, "frexp": {}, "fsctl": {}, "fseek": {}, "fstat": {}, "fstat64": {}, "fstatfs": {}, "fsync": {}, "ftell": {}, "ftruncate": {}, "fts_close": {}, "fts_open": {}, "fts_read": {}, "futimes": {}, "fwrite": {}, "gai_strerror": {}, "getaddrinfo": {}, "getattrlist": {}, "getc": {}, "getcwd": {}, "getegid": {}, "getentropy": {}, "getenv": {}, "geteuid": {}, "getgid": {}, "getgrgid": {}, "getgrgid_r": {}, "getgrnam": {}, "getgrnam_r": {}, "gethostbyaddr": {}, "gethostbyaddr_r": {}, "gethostbyname": {}, "gethostbyname2": {}, "gethostbyname2_r": {}, "gethostname": {}, "gethostuuid": {}, "getnameinfo": {}, "getpeername": {}, "getpid": {}, "getprogname": {}, "getpwnam": {}, "getpwnam_r": {}, "getpwuid": {}, "getpwuid_r": {}, "getresgid": {}, "getresuid": {}, "getrusage": {}, "getservbyname": {}, "getsockname": {}, "getsockopt": {}, "gettimeofday": {}, "getuid": {}, "gmtime_r": {}, "h_errno": {}, "htonl": {}, "htons": {}, "hypot": {}, "inet_ntoa": {}, "inet_ntop": {}, "inet_pton": {}, "initstate": {}, "initstate_r": {}, "ioctl": {}, "isalnum": {}, "isalpha": {}, "isascii": {}, "isatty": {}, "isblank": {}, "iscntrl": {}, "isdigit": {}, "isgraph": {}, "ishexnumber": {}, "isideogram": {}, "islower": {}, "isnan": {}, "isnanf": {}, "isnanl": {}, "isnumber": {}, "isphonogram": {}, "isprint": {}, "ispunct": {}, "isrune": {}, "issetugid": {}, "isspace": {}, "isspecial": {}, "isupper": {}, "iswalnum": {}, "iswspace": {}, "isxdigit": {}, "kill": {}, "ldexp": {}, "link": {}, "listen": {}, "llabs": {}, "localeconv": {}, "localtime": {}, "localtime_r": {}, "log": {}, "log10": {}, "log2": {}, "longjmp": {}, "lrand48": {}, "lseek": {}, "lseek64": {}, "lstat": {}, "lstat64": {}, "mach_absolute_time": {}, "mach_timebase_info": {}, "malloc": {}, "mblen": {}, "mbstowcs": {}, "mbtowc": {}, "memchr": {}, "memcmp": {}, "memcpy": {}, "memmove": {}, "memset": {}, "mkdir": {}, "mkfifo": {}, "mknod": {}, "mkostemp": {}, "mkstemp": {}, "mkstemp64": {}, "mkstemps": {}, "mkstemps64": {}, "mktime": {}, "mmap": {}, "modf": {}, "munmap": {}, "nanf": {}, "nl_langinfo": {}, "ntohs": {}, "obstack_free": {}, "obstack_vprintf": {}, "open": {}, "opendir": {}, "openpty": {}, "pathconf": {}, "pause": {}, "pclose": {}, "perror": {}, "pipe": {}, "poll": {}, "popen": {}, "posix_fadvise": {}, "pow": {}, "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, "pthread_attr_getdetachstate": {}, "pthread_attr_init": {}, "pthread_attr_setdetachstate": {}, "pthread_attr_setscope": {}, "pthread_attr_setstacksize": {}, "pthread_cond_broadcast": {}, "pthread_cond_destroy": {}, "pthread_cond_init": {}, "pthread_cond_signal": {}, "pthread_cond_timedwait": {}, "pthread_cond_wait": {}, "pthread_create": {}, "pthread_detach": {}, "pthread_equal": {}, "pthread_exit": {}, "pthread_getspecific": {}, "pthread_join": {}, "pthread_key_create": {}, "pthread_key_delete": {}, "pthread_mutex_destroy": {}, "pthread_mutex_init": {}, "pthread_mutex_lock": {}, "pthread_mutex_trylock": {}, "pthread_mutex_unlock": {}, "pthread_mutexattr_destroy": {}, "pthread_mutexattr_init": {}, "pthread_mutexattr_settype": {}, "pthread_self": {}, "pthread_setspecific": {}, "putc": {}, "putchar": {}, "putenv": {}, "puts": {}, "pwrite": {}, "qsort": {}, "raise": {}, "rand": {}, "rand_r": {}, "random": {}, "random_r": {}, "read": {}, "readdir": {}, "readlink": {}, "readv": {}, "realloc": {}, "reallocarray": {}, "realpath": {}, "recv": {}, "recvfrom": {}, "recvmsg": {}, "remove": {}, "rename": {}, "rewind": {}, "rindex": {}, "rint": {}, "rmdir": {}, "round": {}, "scalbn": {}, "scalbnl": {}, "sched_yield": {}, "select": {}, "send": {}, "sendmsg": {}, "sendto": {}, "setattrlist": {}, "setbuf": {}, "setenv": {}, "setjmp": {}, "setlocale": {}, "setsid": {}, "setsockopt": {}, "setstate": {}, "setvbuf": {}, "shmat": {}, "shmctl": {}, "shmdt": {}, "shutdown": {}, "sigaction": {}, "signal": {}, "sin": {}, "sinf": {}, "sinh": {}, "sleep": {}, "snprintf": {}, "socket": {}, "sprintf": {}, "sqrt": {}, "srand48": {}, "srandomdev": {}, "sscanf": {}, "stat": {}, "stat64": {}, "statfs": {}, "stderr": {}, "stdin": {}, "stdout": {}, "strcasecmp": {}, "strcat": {}, "strchr": {}, "strcmp": {}, "strcpy": {}, "strcspn": {}, "strdup": {}, "strerror": {}, "strerror_r": {}, "strlcat": {}, "strlcpy": {}, "strlen": {}, "strncasecmp": {}, "strncat": {}, "strncmp": {}, "strncpy": {}, "strnlen": {}, "strpbrk": {}, "strrchr": {}, "strspn": {}, "strstr": {}, "strtod": {}, "strtof": {}, "strtoimax": {}, "strtok": {}, "strtol": {}, "strtold": {}, "strtoll": {}, "strtoul": {}, "strtoull": {}, "strtoumax": {}, "symlink": {}, "sysconf": {}, "system": {}, "tan": {}, "tanh": {}, "tcgetattr": {}, "tcsendbreak": {}, "tcsetattr": {}, "time": {}, "tmpfile": {}, "toascii": {}, "tolower": {}, "toupper": {}, "trunc": {}, "truncate": {}, "tzset": {}, "umask": {}, "uname": {}, "ungetc": {}, "unlink": {}, "unsetenv": {}, "usleep": {}, "utime": {}, "utimes": {}, "uuid_copy": {}, "uuid_generate_random": {}, "uuid_parse": {}, "uuid_unparse": {}, "vasprintf": {}, "vfprintf": {}, "vprintf": {}, "vsnprintf": {}, "vsprintf": {}, "waitpid": {}, "wcschr": {}, "wctomb": {}, "wcwidth": {}, "write": {}, "writev": {}, "zero_struct_address": {}, }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/modernc.org/libc/libc_musl_linux_ppc64le.go
vendor/modernc.org/libc/libc_musl_linux_ppc64le.go
// Copyright 2023 The Libc Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libc // import "modernc.org/libc" type long = int64 type ulong = uint64 // RawMem represents the biggest byte array the runtime can handle type RawMem [1<<50 - 1]byte
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false