libbsd

package module
v0.11.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2025 License: BSD-3-Clause Imports: 9 Imported by: 2

README

libbsd

Package libsd is a ccgo/v4 version of libbsd.a: Utility functions from BSD systems.

Documentation

Overview

Package libsd is a ccgo/v4 version of libbsd.a: Utility functions from BSD systems.

Index

Constants

This section is empty.

Variables

View Source
var Xoptreset int32

Functions

func X__explicit_bzero_hook

func X__explicit_bzero_hook(tls *libc.TLS, buf uintptr, len1 Tsize_t)

func X__fdnlist

func X__fdnlist(tls *libc.TLS, fd int32, list uintptr) (r int32)

func X_time_to_int added in v0.6.0

func X_time_to_int(tls *libc.TLS, t Ttime_t) (r int32)

C documentation

/*
 * Convert to/from 'int'.  Depending on the sizeof(int) this may or
 * may not require using the 50-year rule.
 */

func X_time_to_long added in v0.6.0

func X_time_to_long(tls *libc.TLS, t Ttime_t) (r int64)

C documentation

/*
 * Convert to/from 'long'.  Depending on the sizeof(long) this may or
 * may not require using the 50-year rule.
 */

func Xarc4random_addrandom

func Xarc4random_addrandom(tls *libc.TLS, dat uintptr, datlen int32)

func Xarc4random_buf

func Xarc4random_buf(tls *libc.TLS, buf uintptr, n Tsize_t)

func Xarc4random_stir

func Xarc4random_stir(tls *libc.TLS)

func Xbsd_getopt

func Xbsd_getopt(tls *libc.TLS, argc int32, argv uintptr, shortopts uintptr) (r int32)

func Xclosefrom

func Xclosefrom(tls *libc.TLS, lowfd int32)

C documentation

/*
 * Close all file descriptors greater than or equal to lowfd.
 * We try the fast way first, falling back on the slow method.
 */

func Xdehumanize_number

func Xdehumanize_number(tls *libc.TLS, buf uintptr, num uintptr) (r int32)

func Xerrc

func Xerrc(tls *libc.TLS, status int32, code int32, format uintptr, va uintptr)

func Xexpand_number

func Xexpand_number(tls *libc.TLS, buf uintptr, num uintptr) (r int32)

C documentation

/*
 * Convert an expression of the following forms to a uint64_t.
 *	1) A positive decimal number.
 *	2) A positive decimal number followed by a 'b' or 'B' (mult by 1).
 *	3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10).
 *	4) A positive decimal number followed by a 'm' or 'M' (mult by 1 << 20).
 *	5) A positive decimal number followed by a 'g' or 'G' (mult by 1 << 30).
 *	6) A positive decimal number followed by a 't' or 'T' (mult by 1 << 40).
 *	7) A positive decimal number followed by a 'p' or 'P' (mult by 1 << 50).
 *	8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60).
 */

func Xexplicit_bzero

func Xexplicit_bzero(tls *libc.TLS, buf uintptr, len1 Tsize_t)

func Xfgetln

func Xfgetln(tls *libc.TLS, stream uintptr, len1 uintptr) (r uintptr)

func Xfgetwln

func Xfgetwln(tls *libc.TLS, stream uintptr, lenp uintptr) (r uintptr)

func Xflopen

func Xflopen(tls *libc.TLS, path uintptr, flags int32, va uintptr) (r int32)

func Xflopenat

func Xflopenat(tls *libc.TLS, dirfd int32, path uintptr, flags int32, va uintptr) (r int32)

func Xfmtcheck

func Xfmtcheck(tls *libc.TLS, f1 uintptr, f2 uintptr) (r uintptr)

func Xfparseln

func Xfparseln(tls *libc.TLS, fp uintptr, size uintptr, lineno uintptr, str uintptr, flags int32) (r uintptr)

C documentation

/* fparseln():
 *	Read a line from a file parsing continuations ending in  *	and eliminating trailing newlines, or comments starting with
 *	the comment char.
 */

func Xfpurge

func Xfpurge(tls *libc.TLS, fp uintptr) (r int32)

func Xfreezero

func Xfreezero(tls *libc.TLS, ptr uintptr, sz Tsize_t)

func Xgetbsize

func Xgetbsize(tls *libc.TLS, headerlenp uintptr, blocksizep uintptr) (r uintptr)

func Xgetentropy added in v0.6.0

func Xgetentropy(tls *libc.TLS, buf uintptr, len1 Tsize_t) (r int32)

func Xgetpeereid

func Xgetpeereid(tls *libc.TLS, s int32, euid uintptr, egid uintptr) (r int32)

C documentation

/* Linux and OpenBSD */

func Xgetprogname

func Xgetprogname(tls *libc.TLS) (r uintptr)

func Xgid_from_group

func Xgid_from_group(tls *libc.TLS, name uintptr, gid uintptr) (r int32)

C documentation

/*
 * gid_from_group()
 *	caches the gid for a given group name. We use a simple hash table.
 * Return:
 *	0 if the group name is found (filling in gid), -1 otherwise
 */

func Xgroup_from_gid

func Xgroup_from_gid(tls *libc.TLS, gid Tgid_t, noname int32) (r uintptr)

C documentation

/*
 * group_from_gid()
 *	caches the name (if any) for the gid. If noname clear, we always
 *	return the stored name (if valid or invalid match).
 *	We use a simple hash table.
 * Return:
 *	Pointer to stored name (or a empty string)
 */

func Xheapsort

func Xheapsort(tls *libc.TLS, vbase uintptr, nmemb Tsize_t, size Tsize_t, compar uintptr) (r int32)

C documentation

/*
 * Heapsort -- Knuth, Vol. 3, page 145.  Runs in O (N lg N), both average
 * and worst.  While heapsort is faster than the worst case of quicksort,
 * the BSD quicksort does median selection so that the chance of finding
 * a data set that will trigger the worst case is nonexistent.  Heapsort's
 * only advantage over quicksort is that it requires little additional memory.
 */

func Xhumanize_number

func Xhumanize_number(tls *libc.TLS, buf uintptr, len1 Tsize_t, quotient Tint64_t, suffix uintptr, scale int32, flags int32) (r1 int32)

func Xinet_net_pton

func Xinet_net_pton(tls *libc.TLS, af int32, src uintptr, dst uintptr, size Tsize_t) (r int32)

C documentation

/*
 * static int
 * inet_net_pton(af, src, dst, size)
 *	convert network number from presentation to network format.
 *	accepts hex octets, hex strings, decimal octets, and /CIDR.
 *	"size" is in bytes and describes "dst".
 * return:
 *	number of bits, either imputed classfully or specified with /CIDR,
 *	or -1 if some failure occurred (check errno).  ENOENT means it was
 *	not a valid network specification.
 * author:
 *	Paul Vixie (ISC), June 1996
 */

func Xlibbsd_MD5Data

func Xlibbsd_MD5Data(tls *libc.TLS, data uintptr, len1 Tsize_t, buf uintptr) (r uintptr)

func Xlibbsd_MD5End

func Xlibbsd_MD5End(tls *libc.TLS, context uintptr, buf uintptr) (r uintptr)

func Xlibbsd_MD5File

func Xlibbsd_MD5File(tls *libc.TLS, filename uintptr, buf uintptr) (r uintptr)

func Xlibbsd_MD5FileChunk

func Xlibbsd_MD5FileChunk(tls *libc.TLS, filename uintptr, buf uintptr, offset Toff_t, length Toff_t) (r uintptr)

func Xlibbsd_MD5Final

func Xlibbsd_MD5Final(tls *libc.TLS, digest uintptr, context uintptr)

func Xlibbsd_MD5Init

func Xlibbsd_MD5Init(tls *libc.TLS, context uintptr)

func Xlibbsd_MD5Pad

func Xlibbsd_MD5Pad(tls *libc.TLS, context uintptr)

func Xlibbsd_MD5Transform

func Xlibbsd_MD5Transform(tls *libc.TLS, state uintptr, block uintptr)

func Xlibbsd_MD5Update

func Xlibbsd_MD5Update(tls *libc.TLS, context uintptr, data uintptr, len1 Tsize_t)

func Xmergesort

func Xmergesort(tls *libc.TLS, base uintptr, nmemb Tsize_t, size Tsize_t, cmp uintptr) (r int32)

C documentation

/*
 * Arguments are as for qsort.
 */

func Xnlist

func Xnlist(tls *libc.TLS, name uintptr, list uintptr) (r int32)

func Xnvis

func Xnvis(tls *libc.TLS, _mbdst uintptr, _dlen Tsize_t, c int32, flags int32, nextc int32) (r uintptr)

func Xpidfile_close

func Xpidfile_close(tls *libc.TLS, pfh uintptr) (r int32)

func Xpidfile_fileno

func Xpidfile_fileno(tls *libc.TLS, pfh uintptr) (r int32)

func Xpidfile_open

func Xpidfile_open(tls *libc.TLS, path uintptr, mode Tmode_t, pidptr uintptr) (r uintptr)

func Xpidfile_remove

func Xpidfile_remove(tls *libc.TLS, pfh uintptr) (r int32)

func Xpidfile_write

func Xpidfile_write(tls *libc.TLS, pfh uintptr) (r int32)

func Xradixsort

func Xradixsort(tls *libc.TLS, a uintptr, n int32, tab uintptr, endch uint32) (r int32)

func Xreadpassphrase

func Xreadpassphrase(tls *libc.TLS, prompt uintptr, buf uintptr, bufsiz Tsize_t, flags int32) (r uintptr)

func Xreallocarray

func Xreallocarray(tls *libc.TLS, optr uintptr, nmemb Tsize_t, size Tsize_t) (r uintptr)

func Xreallocf

func Xreallocf(tls *libc.TLS, ptr uintptr, size Tsize_t) (r uintptr)

func Xrecallocarray

func Xrecallocarray(tls *libc.TLS, ptr uintptr, oldnmemb Tsize_t, newnmemb Tsize_t, size Tsize_t) (r uintptr)

func Xsetmode

func Xsetmode(tls *libc.TLS, p uintptr) (r uintptr)

func Xsetproctitle_impl

func Xsetproctitle_impl(tls *libc.TLS, fmt uintptr, va uintptr)

func Xsetproctitle_init

func Xsetproctitle_init(tls *libc.TLS, argc int32, argv uintptr, envp uintptr)

func Xsetprogname

func Xsetprogname(tls *libc.TLS, progname uintptr)

func Xsl_add

func Xsl_add(tls *libc.TLS, sl uintptr, name uintptr) (r int32)

C documentation

/*
 * sl_add(): Add an item to the string list
 */

func Xsl_delete

func Xsl_delete(tls *libc.TLS, sl uintptr, name uintptr, all int32) (r int32)

func Xsl_find

func Xsl_find(tls *libc.TLS, sl uintptr, name uintptr) (r uintptr)

C documentation

/*
 * sl_find(): Find a name in the string list
 */

func Xsl_free

func Xsl_free(tls *libc.TLS, sl uintptr, all int32)

C documentation

/*
 * sl_free(): Free a stringlist
 */

func Xsl_init

func Xsl_init(tls *libc.TLS) (r uintptr)

C documentation

/*
 * sl_init(): Initialize a string list
 */

func Xsnvis

func Xsnvis(tls *libc.TLS, _mbdst uintptr, _dlen Tsize_t, c int32, flags int32, nextc int32, mbextra uintptr) (r uintptr)

func Xsradixsort

func Xsradixsort(tls *libc.TLS, a uintptr, n int32, tab uintptr, endch uint32) (r int32)

func Xstravis

func Xstravis(tls *libc.TLS, mbdstp uintptr, mbsrc uintptr, flags int32) (r int32)

func Xstrenvisx

func Xstrenvisx(tls *libc.TLS, mbdst uintptr, _dlen Tsize_t, mbsrc uintptr, len1 Tsize_t, flags int32, cerr_ptr uintptr) (r int32)

func Xstrmode

func Xstrmode(tls *libc.TLS, mode Tmode_t, p uintptr)

func Xstrnstr

func Xstrnstr(tls *libc.TLS, s uintptr, find uintptr, slen Tsize_t) (r uintptr)

C documentation

/*
 * Find the first occurrence of find in s, where the search is limited to the
 * first slen characters of s.
 */

func Xstrnunvis_netbsd

func Xstrnunvis_netbsd(tls *libc.TLS, dst uintptr, dlen Tsize_t, src uintptr) (r int32)

func Xstrnunvisx

func Xstrnunvisx(tls *libc.TLS, dst uintptr, dlen Tsize_t, src uintptr, flag int32) (r int32)

func Xstrnvis_netbsd

func Xstrnvis_netbsd(tls *libc.TLS, mbdst uintptr, _dlen Tsize_t, mbsrc uintptr, flags int32) (r int32)

func Xstrnvis_openbsd

func Xstrnvis_openbsd(tls *libc.TLS, mbdst uintptr, mbsrc uintptr, _dlen Tsize_t, flags int32) (r int32)

func Xstrnvisx

func Xstrnvisx(tls *libc.TLS, mbdst uintptr, _dlen Tsize_t, mbsrc uintptr, len1 Tsize_t, flags int32) (r int32)

func Xstrsenvisx

func Xstrsenvisx(tls *libc.TLS, mbdst uintptr, _dlen Tsize_t, mbsrc uintptr, len1 Tsize_t, flags int32, mbextra uintptr, cerr_ptr uintptr) (r int32)

func Xstrsnvis

func Xstrsnvis(tls *libc.TLS, mbdst uintptr, _dlen Tsize_t, mbsrc uintptr, flags int32, mbextra uintptr) (r int32)

func Xstrsnvisx

func Xstrsnvisx(tls *libc.TLS, mbdst uintptr, _dlen Tsize_t, mbsrc uintptr, len1 Tsize_t, flags int32, mbextra uintptr) (r int32)

func Xstrsvis

func Xstrsvis(tls *libc.TLS, mbdst uintptr, mbsrc uintptr, flags int32, mbextra uintptr) (r int32)

func Xstrsvisx

func Xstrsvisx(tls *libc.TLS, mbdst uintptr, mbsrc uintptr, len1 Tsize_t, flags int32, mbextra uintptr) (r int32)

func Xstrtonum

func Xstrtonum(tls *libc.TLS, nptr uintptr, minval int64, maxval int64, errstr uintptr) (r int64)

func Xstrunvis

func Xstrunvis(tls *libc.TLS, dst uintptr, src uintptr) (r int32)

func Xstrunvisx

func Xstrunvisx(tls *libc.TLS, dst uintptr, src uintptr, flag int32) (r int32)

func Xstrvis

func Xstrvis(tls *libc.TLS, mbdst uintptr, mbsrc uintptr, flags int32) (r int32)

func Xstrvisx

func Xstrvisx(tls *libc.TLS, mbdst uintptr, mbsrc uintptr, len1 Tsize_t, flags int32) (r int32)

func Xsvis

func Xsvis(tls *libc.TLS, _mbdst uintptr, c int32, flags int32, nextc int32, mbextra uintptr) (r uintptr)

func Xuid_from_user

func Xuid_from_user(tls *libc.TLS, name uintptr, uid uintptr) (r int32)

C documentation

/*
 * uid_from_user()
 *	caches the uid for a given user name. We use a simple hash table.
 * Return:
 *	0 if the user name is found (filling in uid), -1 otherwise
 */

func Xunvis

func Xunvis(tls *libc.TLS, cp uintptr, c int32, astate uintptr, flag int32) (r int32)

C documentation

/*
 * unvis - decode characters previously encoded by vis
 */

func Xuser_from_uid

func Xuser_from_uid(tls *libc.TLS, uid Tuid_t, noname int32) (r uintptr)

C documentation

/*
 * user_from_uid()
 *	caches the name (if any) for the uid. If noname clear, we always
 *	return the stored name (if valid or invalid match).
 *	We use a simple hash table.
 * Return:
 *	Pointer to stored name (or a empty string)
 */

func Xverrc

func Xverrc(tls *libc.TLS, status int32, code int32, format uintptr, ap Tva_list)

func Xvis

func Xvis(tls *libc.TLS, _mbdst uintptr, c int32, flags int32, nextc int32) (r uintptr)

C documentation

/*
 * vis - visually encode characters
 */

func Xvwarnc

func Xvwarnc(tls *libc.TLS, code int32, format uintptr, ap Tva_list)

func Xwarnc

func Xwarnc(tls *libc.TLS, code int32, format uintptr, va uintptr)

Types

type TBITCMD

type TBITCMD = struct {
	Fcmd  int8
	Fcmd2 int8
	Fbits Tmode_t
}

type TEFT

type TEFT = int32

type TElf32_Addr

type TElf32_Addr = uint32

type TElf32_Chdr

type TElf32_Chdr = struct {
	Fch_type      TElf32_Word
	Fch_size      TElf32_Word
	Fch_addralign TElf32_Word
}

type TElf32_Conflict

type TElf32_Conflict = uint32

type TElf32_Dyn

type TElf32_Dyn = struct {
	Fd_tag TElf32_Sword
	Fd_un  struct {
		Fd_ptr [0]TElf32_Addr
		Fd_val TElf32_Word
	}
}

type TElf32_Ehdr

type TElf32_Ehdr = struct {
	Fe_ident     [16]uint8
	Fe_type      TElf32_Half
	Fe_machine   TElf32_Half
	Fe_version   TElf32_Word
	Fe_entry     TElf32_Addr
	Fe_phoff     TElf32_Off
	Fe_shoff     TElf32_Off
	Fe_flags     TElf32_Word
	Fe_ehsize    TElf32_Half
	Fe_phentsize TElf32_Half
	Fe_phnum     TElf32_Half
	Fe_shentsize TElf32_Half
	Fe_shnum     TElf32_Half
	Fe_shstrndx  TElf32_Half
}

type TElf32_Half

type TElf32_Half = uint16

type TElf32_Lib

type TElf32_Lib = struct {
	Fl_name       TElf32_Word
	Fl_time_stamp TElf32_Word
	Fl_checksum   TElf32_Word
	Fl_version    TElf32_Word
	Fl_flags      TElf32_Word
}

type TElf32_Move

type TElf32_Move = struct {
	Fm_value   TElf32_Xword
	Fm_info    TElf32_Word
	Fm_poffset TElf32_Word
	Fm_repeat  TElf32_Half
	Fm_stride  TElf32_Half
}

type TElf32_Nhdr

type TElf32_Nhdr = struct {
	Fn_namesz TElf32_Word
	Fn_descsz TElf32_Word
	Fn_type   TElf32_Word
}

type TElf32_Off

type TElf32_Off = uint32

type TElf32_Phdr

type TElf32_Phdr = struct {
	Fp_type   TElf32_Word
	Fp_offset TElf32_Off
	Fp_vaddr  TElf32_Addr
	Fp_paddr  TElf32_Addr
	Fp_filesz TElf32_Word
	Fp_memsz  TElf32_Word
	Fp_flags  TElf32_Word
	Fp_align  TElf32_Word
}

type TElf32_RegInfo

type TElf32_RegInfo = struct {
	Fri_gprmask  TElf32_Word
	Fri_cprmask  [4]TElf32_Word
	Fri_gp_value TElf32_Sword
}

type TElf32_Rel

type TElf32_Rel = struct {
	Fr_offset TElf32_Addr
	Fr_info   TElf32_Word
}

type TElf32_Rela

type TElf32_Rela = struct {
	Fr_offset TElf32_Addr
	Fr_info   TElf32_Word
	Fr_addend TElf32_Sword
}

type TElf32_Relr

type TElf32_Relr = uint32

type TElf32_Section

type TElf32_Section = uint16

type TElf32_Shdr

type TElf32_Shdr = struct {
	Fsh_name      TElf32_Word
	Fsh_type      TElf32_Word
	Fsh_flags     TElf32_Word
	Fsh_addr      TElf32_Addr
	Fsh_offset    TElf32_Off
	Fsh_size      TElf32_Word
	Fsh_link      TElf32_Word
	Fsh_info      TElf32_Word
	Fsh_addralign TElf32_Word
	Fsh_entsize   TElf32_Word
}

type TElf32_Sword

type TElf32_Sword = int32

type TElf32_Sxword

type TElf32_Sxword = int64

type TElf32_Sym

type TElf32_Sym = struct {
	Fst_name  TElf32_Word
	Fst_value TElf32_Addr
	Fst_size  TElf32_Word
	Fst_info  uint8
	Fst_other uint8
	Fst_shndx TElf32_Section
}

type TElf32_Syminfo

type TElf32_Syminfo = struct {
	Fsi_boundto TElf32_Half
	Fsi_flags   TElf32_Half
}

type TElf32_Verdaux

type TElf32_Verdaux = struct {
	Fvda_name TElf32_Word
	Fvda_next TElf32_Word
}

type TElf32_Verdef

type TElf32_Verdef = struct {
	Fvd_version TElf32_Half
	Fvd_flags   TElf32_Half
	Fvd_ndx     TElf32_Half
	Fvd_cnt     TElf32_Half
	Fvd_hash    TElf32_Word
	Fvd_aux     TElf32_Word
	Fvd_next    TElf32_Word
}

type TElf32_Vernaux

type TElf32_Vernaux = struct {
	Fvna_hash  TElf32_Word
	Fvna_flags TElf32_Half
	Fvna_other TElf32_Half
	Fvna_name  TElf32_Word
	Fvna_next  TElf32_Word
}

type TElf32_Verneed

type TElf32_Verneed = struct {
	Fvn_version TElf32_Half
	Fvn_cnt     TElf32_Half
	Fvn_file    TElf32_Word
	Fvn_aux     TElf32_Word
	Fvn_next    TElf32_Word
}

type TElf32_Versym

type TElf32_Versym = uint16

type TElf32_Word

type TElf32_Word = uint32

type TElf32_Xword

type TElf32_Xword = uint64

type TElf32_auxv_t

type TElf32_auxv_t = struct {
	Fa_type Tuint32_t
	Fa_un   struct {
		Fa_val Tuint32_t
	}
}

type TElf32_gptab

type TElf32_gptab = struct {
	Fgt_entry [0]struct {
		Fgt_g_value TElf32_Word
		Fgt_bytes   TElf32_Word
	}
	Fgt_header struct {
		Fgt_current_g_value TElf32_Word
		Fgt_unused          TElf32_Word
	}
}

type TElf64_Addr

type TElf64_Addr = uint64

type TElf64_Chdr

type TElf64_Chdr = struct {
	Fch_type      TElf64_Word
	Fch_reserved  TElf64_Word
	Fch_size      TElf64_Xword
	Fch_addralign TElf64_Xword
}

type TElf64_Dyn

type TElf64_Dyn = struct {
	Fd_tag TElf64_Sxword
	Fd_un  struct {
		Fd_ptr [0]TElf64_Addr
		Fd_val TElf64_Xword
	}
}

type TElf64_Ehdr

type TElf64_Ehdr = struct {
	Fe_ident     [16]uint8
	Fe_type      TElf64_Half
	Fe_machine   TElf64_Half
	Fe_version   TElf64_Word
	Fe_entry     TElf64_Addr
	Fe_phoff     TElf64_Off
	Fe_shoff     TElf64_Off
	Fe_flags     TElf64_Word
	Fe_ehsize    TElf64_Half
	Fe_phentsize TElf64_Half
	Fe_phnum     TElf64_Half
	Fe_shentsize TElf64_Half
	Fe_shnum     TElf64_Half
	Fe_shstrndx  TElf64_Half
}

type TElf64_Half

type TElf64_Half = uint16

type TElf64_Lib

type TElf64_Lib = struct {
	Fl_name       TElf64_Word
	Fl_time_stamp TElf64_Word
	Fl_checksum   TElf64_Word
	Fl_version    TElf64_Word
	Fl_flags      TElf64_Word
}

type TElf64_Move

type TElf64_Move = struct {
	Fm_value   TElf64_Xword
	Fm_info    TElf64_Xword
	Fm_poffset TElf64_Xword
	Fm_repeat  TElf64_Half
	Fm_stride  TElf64_Half
}

type TElf64_Nhdr

type TElf64_Nhdr = struct {
	Fn_namesz TElf64_Word
	Fn_descsz TElf64_Word
	Fn_type   TElf64_Word
}

type TElf64_Off

type TElf64_Off = uint64

type TElf64_Phdr

type TElf64_Phdr = struct {
	Fp_type   TElf64_Word
	Fp_flags  TElf64_Word
	Fp_offset TElf64_Off
	Fp_vaddr  TElf64_Addr
	Fp_paddr  TElf64_Addr
	Fp_filesz TElf64_Xword
	Fp_memsz  TElf64_Xword
	Fp_align  TElf64_Xword
}

type TElf64_Rel

type TElf64_Rel = struct {
	Fr_offset TElf64_Addr
	Fr_info   TElf64_Xword
}

type TElf64_Rela

type TElf64_Rela = struct {
	Fr_offset TElf64_Addr
	Fr_info   TElf64_Xword
	Fr_addend TElf64_Sxword
}

type TElf64_Relr

type TElf64_Relr = uint64

type TElf64_Section

type TElf64_Section = uint16

type TElf64_Shdr

type TElf64_Shdr = struct {
	Fsh_name      TElf64_Word
	Fsh_type      TElf64_Word
	Fsh_flags     TElf64_Xword
	Fsh_addr      TElf64_Addr
	Fsh_offset    TElf64_Off
	Fsh_size      TElf64_Xword
	Fsh_link      TElf64_Word
	Fsh_info      TElf64_Word
	Fsh_addralign TElf64_Xword
	Fsh_entsize   TElf64_Xword
}

type TElf64_Sword

type TElf64_Sword = int32

type TElf64_Sxword

type TElf64_Sxword = int64

type TElf64_Sym

type TElf64_Sym = struct {
	Fst_name  TElf64_Word
	Fst_info  uint8
	Fst_other uint8
	Fst_shndx TElf64_Section
	Fst_value TElf64_Addr
	Fst_size  TElf64_Xword
}

type TElf64_Syminfo

type TElf64_Syminfo = struct {
	Fsi_boundto TElf64_Half
	Fsi_flags   TElf64_Half
}

type TElf64_Verdaux

type TElf64_Verdaux = struct {
	Fvda_name TElf64_Word
	Fvda_next TElf64_Word
}

type TElf64_Verdef

type TElf64_Verdef = struct {
	Fvd_version TElf64_Half
	Fvd_flags   TElf64_Half
	Fvd_ndx     TElf64_Half
	Fvd_cnt     TElf64_Half
	Fvd_hash    TElf64_Word
	Fvd_aux     TElf64_Word
	Fvd_next    TElf64_Word
}

type TElf64_Vernaux

type TElf64_Vernaux = struct {
	Fvna_hash  TElf64_Word
	Fvna_flags TElf64_Half
	Fvna_other TElf64_Half
	Fvna_name  TElf64_Word
	Fvna_next  TElf64_Word
}

type TElf64_Verneed

type TElf64_Verneed = struct {
	Fvn_version TElf64_Half
	Fvn_cnt     TElf64_Half
	Fvn_file    TElf64_Word
	Fvn_aux     TElf64_Word
	Fvn_next    TElf64_Word
}

type TElf64_Versym

type TElf64_Versym = uint16

type TElf64_Word

type TElf64_Word = uint32

type TElf64_Xword

type TElf64_Xword = uint64

type TElf64_auxv_t

type TElf64_auxv_t = struct {
	Fa_type Tuint64_t
	Fa_un   struct {
		Fa_val Tuint64_t
	}
}

type TElf_MIPS_ABIFlags_v0

type TElf_MIPS_ABIFlags_v0 = struct {
	Fversion   TElf32_Half
	Fisa_level uint8
	Fisa_rev   uint8
	Fgpr_size  uint8
	Fcpr1_size uint8
	Fcpr2_size uint8
	Ffp_abi    uint8
	Fisa_ext   TElf32_Word
	Fases      TElf32_Word
	Fflags1    TElf32_Word
	Fflags2    TElf32_Word
}

type TElf_Options

type TElf_Options = struct {
	Fkind    uint8
	Fsize    uint8
	Fsection TElf32_Section
	Finfo    TElf32_Word
}

type TElf_Options_Hw

type TElf_Options_Hw = struct {
	Fhwp_flags1 TElf32_Word
	Fhwp_flags2 TElf32_Word
}

type TElf_Symndx added in v0.6.0

type TElf_Symndx = uint32

type TGIDC

type TGIDC = struct {
	Fvalid int32
	Fname  [32]int8
	Fgid   Tgid_t
}

type TMD5Context

type TMD5Context = TMD5_CTX

type TMD5_CTX

type TMD5_CTX = struct {
	Fstate  [4]Tuint32_t
	Fcount  Tuint64_t
	Fbuffer [64]Tuint8_t
}

type TSHA2_CTX added in v0.6.0

type TSHA2_CTX = struct {
	Fstate struct {
		Fst64        [0][8]Tuint64_t
		Fst32        [8]Tuint32_t
		F__ccgo_pad2 [32]byte
	}
	Fbitcount [2]Tuint64_t
	Fbuffer   [128]Tuint8_t
}

type TSHA384_CTX added in v0.6.0

type TSHA384_CTX = struct {
	Fstate struct {
		Fst64        [0][8]Tuint64_t
		Fst32        [8]Tuint32_t
		F__ccgo_pad2 [32]byte
	}
	Fbitcount [2]Tuint64_t
	Fbuffer   [128]Tuint8_t
}

type TSHA512_CTX added in v0.6.0

type TSHA512_CTX = struct {
	Fstate struct {
		Fst64        [0][8]Tuint64_t
		Fst32        [8]Tuint32_t
		F__ccgo_pad2 [32]byte
	}
	Fbitcount [2]Tuint64_t
	Fbuffer   [128]Tuint8_t
}

type TStringList

type TStringList = struct {
	Fsl_str uintptr
	Fsl_max Tsize_t
	Fsl_cur Tsize_t
}

type TUIDC

type TUIDC = struct {
	Fvalid int32
	Fname  [32]int8
	Fuid   Tuid_t
}

type T_G_fpos64_t

type T_G_fpos64_t = Tfpos_t
type T_IO_cookie_io_functions_t = Tcookie_io_functions_t

type T_SHA2_CTX added in v0.6.0

type T_SHA2_CTX = TSHA2_CTX

type T_fpstate

type T_fpstate = struct {
	Fcwd       uint16
	Fswd       uint16
	Fftw       uint16
	Ffop       uint16
	Frip       uint64
	Frdp       uint64
	Fmxcsr     uint32
	Fmxcr_mask uint32
	F_st       [8]struct {
		Fsignificand [4]uint16
		Fexponent    uint16
		Fpadding     [3]uint16
	}
	F_xmm [16]struct {
		Felement [4]uint32
	}
	Fpadding [24]uint32
}

type T_rs

type T_rs = struct {
	Frs_have  Tsize_t
	Frs_count Tsize_t
}

C documentation

/* Marked MAP_INHERIT_ZERO, so zero'd out in fork children. */

type T_rsx

type T_rsx = struct {
	Frs_chacha Tchacha_ctx
	Frs_buf    [1024]uint8
}

C documentation

/* Maybe be preserved in fork children, if _rs_allocate() decides. */

type T_stringlist

type T_stringlist = TStringList

type Tbitcmd

type Tbitcmd = TBITCMD

type Tblkcnt_t

type Tblkcnt_t = int64

type Tblksize_t

type Tblksize_t = int64

type Tcaddr_t

type Tcaddr_t = uintptr

type Tcc_t

type Tcc_t = uint8

type Tchacha_ctx

type Tchacha_ctx = struct {
	Finput [16]Tu32
}

type Tclock_t

type Tclock_t = int64

type Tclockid_t

type Tclockid_t = int32

type Tcmsghdr

type Tcmsghdr = struct {
	Fcmsg_len   Tsocklen_t
	F__pad1     int32
	Fcmsg_level int32
	Fcmsg_type  int32
}

type Tcookie_io_functions_t

type Tcookie_io_functions_t = struct {
	Fread   uintptr
	Fwrite  uintptr
	Fseek   uintptr
	Fclose1 uintptr
}

type Tcpu_set_t

type Tcpu_set_t = struct {
	F__bits [16]uint64
}

type Tcpu_set_t1

type Tcpu_set_t1 = struct {
	F__bits [16]uint64
}

type Tdev_t

type Tdev_t = uint64

type Tdirent

type Tdirent = struct {
	Fd_ino    Tino_t
	Fd_off    Toff_t
	Fd_reclen uint16
	Fd_type   uint8
	Fd_name   [256]int8
}

type Tdiv_t

type Tdiv_t = struct {
	Fquot int32
	Frem  int32
}

type Tdl_phdr_info added in v0.6.0

type Tdl_phdr_info = struct {
	Fdlpi_addr      TElf64_Addr
	Fdlpi_name      uintptr
	Fdlpi_phdr      uintptr
	Fdlpi_phnum     TElf64_Half
	Fdlpi_adds      uint64
	Fdlpi_subs      uint64
	Fdlpi_tls_modid Tsize_t
	Fdlpi_tls_data  uintptr
}

type Tf_owner_ex

type Tf_owner_ex = struct {
	Ftype1 int32
	Fpid   Tpid_t
}

type Tfd_mask

type Tfd_mask = uint64

type Tfd_set

type Tfd_set = struct {
	Ffds_bits [16]uint64
}

type Tfile_handle

type Tfile_handle = struct {
	Fhandle_bytes uint32
	Fhandle_type  int32
}

type Tfilebuf

type Tfilebuf = struct {
	Ffp   uintptr
	Fbuf  uintptr
	Flen1 Tsize_t
}

type Tfilewbuf

type Tfilewbuf = struct {
	Ffp   uintptr
	Fwbuf uintptr
	Flen1 Tsize_t
}

type Tflock

type Tflock = struct {
	Fl_type   int16
	Fl_whence int16
	Fl_start  Toff_t
	Fl_len    Toff_t
	Fl_pid    Tpid_t
}

type Tfpos_t

type Tfpos_t = struct {
	F__lldata [0]int64
	F__align  [0]float64
	F__opaque [16]int8
}

type Tfpregset_t

type Tfpregset_t = uintptr

type Tfsblkcnt_t

type Tfsblkcnt_t = uint64

type Tfsfilcnt_t

type Tfsfilcnt_t = uint64

type Tfsid_t added in v0.6.0

type Tfsid_t = struct {
	F__val [2]int32
}

type Tgid_t

type Tgid_t = uint32

type Tgidc

type Tgidc = TGIDC

type Tgreg_t

type Tgreg_t = int64

type Tgregset_t

type Tgregset_t = [23]int64

type Tgroup

type Tgroup = struct {
	Fgr_name   uintptr
	Fgr_passwd uintptr
	Fgr_gid    Tgid_t
	Fgr_mem    uintptr
}

type Tgroup_filter

type Tgroup_filter = struct {
	Fgf_interface Tuint32_t
	Fgf_group     Tsockaddr_storage
	Fgf_fmode     Tuint32_t
	Fgf_numsrc    Tuint32_t
	Fgf_slist     [1]Tsockaddr_storage
}

type Tgroup_req

type Tgroup_req = struct {
	Fgr_interface Tuint32_t
	Fgr_group     Tsockaddr_storage
}

type Tgroup_source_req

type Tgroup_source_req = struct {
	Fgsr_interface Tuint32_t
	Fgsr_group     Tsockaddr_storage
	Fgsr_source    Tsockaddr_storage
}

type Tid_t

type Tid_t = uint32

type Timaxdiv_t

type Timaxdiv_t = struct {
	Fquot Tintmax_t
	Frem  Tintmax_t
}

type Tin6_addr

type Tin6_addr = struct {
	F__in6_union struct {
		F__s6_addr16 [0][8]Tuint16_t
		F__s6_addr32 [0][4]Tuint32_t
		F__s6_addr   [16]Tuint8_t
	}
}

type Tin6_pktinfo

type Tin6_pktinfo = struct {
	Fipi6_addr    Tin6_addr
	Fipi6_ifindex uint32
}

type Tin_addr

type Tin_addr = struct {
	Fs_addr Tin_addr_t
}

type Tin_addr_t

type Tin_addr_t = uint32

type Tin_pktinfo

type Tin_pktinfo = struct {
	Fipi_ifindex  int32
	Fipi_spec_dst Tin_addr
	Fipi_addr     Tin_addr
}

type Tin_port_t

type Tin_port_t = uint16

type Tino_t

type Tino_t = uint64

type Tint8_t

type Tint8_t = int8

type Tint16_t

type Tint16_t = int16

type Tint32_t

type Tint32_t = int32

func X_time_to_time32 added in v0.6.0

func X_time_to_time32(tls *libc.TLS, t Ttime_t) (r Tint32_t)

C documentation

/*
 * Convert time_t to a 32 bit representation.  If time_t is 64 bits we can
 * simply chop it down.   The resulting 32 bit representation can be
 * converted back to a temporally local 64 bit time_t using time32_to_time.
 */

type Tint64_t

type Tint64_t = int64

func X_time_to_time64 added in v0.6.0

func X_time_to_time64(tls *libc.TLS, t Ttime_t) (r Tint64_t)

C documentation

/*
 * Convert time_t to a 64 bit representation.  If time_t is represented
 * as 32 bits we simply sign-extend and do not support times past 2038.
 */

type Tint_fast8_t

type Tint_fast8_t = int8

type Tint_fast16_t

type Tint_fast16_t = int32

type Tint_fast32_t

type Tint_fast32_t = int32

type Tint_fast64_t

type Tint_fast64_t = int64

type Tint_least8_t

type Tint_least8_t = int8

type Tint_least16_t

type Tint_least16_t = int16

type Tint_least32_t

type Tint_least32_t = int32

type Tint_least64_t

type Tint_least64_t = int64

type Tintmax_t

type Tintmax_t = int64

func Xstrtoi

func Xstrtoi(tls *libc.TLS, nptr uintptr, endptr uintptr, base int32, lo Tintmax_t, hi Tintmax_t, rstatus uintptr) (r Tintmax_t)

type Tintptr_t

type Tintptr_t = int64

type Tiovec

type Tiovec = struct {
	Fiov_base uintptr
	Fiov_len  Tsize_t
}

type Tip6_mtuinfo

type Tip6_mtuinfo = struct {
	Fip6m_addr Tsockaddr_in6
	Fip6m_mtu  Tuint32_t
}

type Tip_mreq

type Tip_mreq = struct {
	Fimr_multiaddr Tin_addr
	Fimr_interface Tin_addr
}

type Tip_mreq_source

type Tip_mreq_source = struct {
	Fimr_multiaddr  Tin_addr
	Fimr_interface  Tin_addr
	Fimr_sourceaddr Tin_addr
}

type Tip_mreqn

type Tip_mreqn = struct {
	Fimr_multiaddr Tin_addr
	Fimr_address   Tin_addr
	Fimr_ifindex   int32
}

type Tip_msfilter

type Tip_msfilter = struct {
	Fimsf_multiaddr Tin_addr
	Fimsf_interface Tin_addr
	Fimsf_fmode     Tuint32_t
	Fimsf_numsrc    Tuint32_t
	Fimsf_slist     [1]Tin_addr
}

type Tip_opts

type Tip_opts = struct {
	Fip_dst  Tin_addr
	Fip_opts [40]int8
}

type Tipv6_mreq

type Tipv6_mreq = struct {
	Fipv6mr_multiaddr Tin6_addr
	Fipv6mr_interface uint32
}

type Titimerspec

type Titimerspec = struct {
	Fit_interval Ttimespec
	Fit_value    Ttimespec
}

type Titimerval

type Titimerval = struct {
	Fit_interval Ttimeval
	Fit_value    Ttimeval
}

type Tkey_t

type Tkey_t = int32

type Tlconv

type Tlconv = struct {
	Fdecimal_point      uintptr
	Fthousands_sep      uintptr
	Fgrouping           uintptr
	Fint_curr_symbol    uintptr
	Fcurrency_symbol    uintptr
	Fmon_decimal_point  uintptr
	Fmon_thousands_sep  uintptr
	Fmon_grouping       uintptr
	Fpositive_sign      uintptr
	Fnegative_sign      uintptr
	Fint_frac_digits    int8
	Ffrac_digits        int8
	Fp_cs_precedes      int8
	Fp_sep_by_space     int8
	Fn_cs_precedes      int8
	Fn_sep_by_space     int8
	Fp_sign_posn        int8
	Fn_sign_posn        int8
	Fint_p_cs_precedes  int8
	Fint_p_sep_by_space int8
	Fint_n_cs_precedes  int8
	Fint_n_sep_by_space int8
	Fint_p_sign_posn    int8
	Fint_n_sign_posn    int8
}

type Tldiv_t

type Tldiv_t = struct {
	Fquot int64
	Frem  int64
}

type Tlinger

type Tlinger = struct {
	Fl_onoff  int32
	Fl_linger int32
}
type Tlink_map = struct {
	Fl_addr TElf64_Addr
	Fl_name uintptr
	Fl_ld   uintptr
	Fl_next uintptr
	Fl_prev uintptr
}

type Tlldiv_t

type Tlldiv_t = struct {
	Fquot int64
	Frem  int64
}

type Tlocale_t

type Tlocale_t = uintptr

type Tmax_align_t

type Tmax_align_t = struct {
	F__ll int64
	F__ld float64
}

type Tmbstate_t

type Tmbstate_t = struct {
	F__opaque1 uint32
	F__opaque2 uint32
}

type Tmcontext_t

type Tmcontext_t = struct {
	Fgregs       Tgregset_t
	Ffpregs      Tfpregset_t
	F__reserved1 [8]uint64
}

type Tmmsghdr

type Tmmsghdr = struct {
	Fmsg_hdr Tmsghdr
	Fmsg_len uint32
}

type Tmode_t

type Tmode_t = uint32

func Xgetmode

func Xgetmode(tls *libc.TLS, bbox uintptr, omode Tmode_t) (r Tmode_t)

C documentation

/*
 * Given the old mode and an array of bitcmd structures, apply the operations
 * described in the bitcmd structures to the old mode, and return the new mode.
 * Note that there is no '=' command; a strict assignment is just a '-' (clear
 * bits) followed by a '+' (set bits).
 */

type Tmsghdr

type Tmsghdr = struct {
	Fmsg_name       uintptr
	Fmsg_namelen    Tsocklen_t
	Fmsg_iov        uintptr
	Fmsg_iovlen     int32
	F__pad1         int32
	Fmsg_control    uintptr
	Fmsg_controllen Tsocklen_t
	F__pad2         int32
	Fmsg_flags      int32
}
type Tnlink_t = uint64

type Tnlist

type Tnlist = struct {
	F__ccgo0_0 struct {
		Fn_un [0]struct {
			Fn_next [0]uintptr
			Fn_strx [0]int64
			Fn_name uintptr
		}
		Fn_name uintptr
	}
	Fn_type  uint8
	Fn_other int8
	Fn_desc  int16
	Fn_value uint64
}

type Tnv

type Tnv = struct {
	Fname  [7]int8
	Fvalue Tuint8_t
}

C documentation

/*
 * RFC 1866
 */

type Toff_t

type Toff_t = int64

type Toption

type Toption = struct {
	Fname    uintptr
	Fhas_arg int32
	Fflag    uintptr
	Fval     int32
}

type Tpasswd

type Tpasswd = struct {
	Fpw_name   uintptr
	Fpw_passwd uintptr
	Fpw_uid    Tuid_t
	Fpw_gid    Tgid_t
	Fpw_gecos  uintptr
	Fpw_dir    uintptr
	Fpw_shell  uintptr
}

type Tpid_t

type Tpid_t = int32

type Tpidfh

type Tpidfh = struct {
	Fpf_fd   int32
	Fpf_path uintptr
	Fpf_dev  Tdev_t
	Fpf_ino  Tino_t
}

type Tpthread_attr_t

type Tpthread_attr_t = struct {
	F__u struct {
		F__vi [0][14]int32
		F__s  [0][7]uint64
		F__i  [14]int32
	}
}

type Tpthread_barrier_t

type Tpthread_barrier_t = struct {
	F__u struct {
		F__vi [0][8]int32
		F__p  [0][4]uintptr
		F__i  [8]int32
	}
}

type Tpthread_barrierattr_t

type Tpthread_barrierattr_t = struct {
	F__attr uint32
}

type Tpthread_cond_t

type Tpthread_cond_t = struct {
	F__u struct {
		F__vi [0][12]int32
		F__p  [0][6]uintptr
		F__i  [12]int32
	}
}

type Tpthread_condattr_t

type Tpthread_condattr_t = struct {
	F__attr uint32
}

type Tpthread_key_t

type Tpthread_key_t = uint32

type Tpthread_mutex_t

type Tpthread_mutex_t = struct {
	F__u struct {
		F__vi [0][10]int32
		F__p  [0][5]uintptr
		F__i  [10]int32
	}
}

type Tpthread_mutexattr_t

type Tpthread_mutexattr_t = struct {
	F__attr uint32
}

type Tpthread_once_t

type Tpthread_once_t = int32

type Tpthread_rwlock_t

type Tpthread_rwlock_t = struct {
	F__u struct {
		F__vi [0][14]int32
		F__p  [0][7]uintptr
		F__i  [14]int32
	}
}

type Tpthread_rwlockattr_t

type Tpthread_rwlockattr_t = struct {
	F__attr [2]uint32
}

type Tpthread_spinlock_t

type Tpthread_spinlock_t = int32

type Tpthread_t

type Tpthread_t = uintptr

type Tptrdiff_t

type Tptrdiff_t = int64

type Tquad_t

type Tquad_t = int64

type Tr_debug added in v0.6.0

type Tr_debug = struct {
	Fr_version int32
	Fr_map     uintptr
	Fr_brk     TElf64_Addr
	Fr_state   int32
	Fr_ldbase  TElf64_Addr
}

type Trand_pool_info added in v0.6.0

type Trand_pool_info = struct {
	Fentropy_count int32
	Fbuf_size      int32
}

type Tregister_t

type Tregister_t = int64

type Trlim_t

type Trlim_t = uint64

type Trlimit

type Trlimit = struct {
	Frlim_cur Trlim_t
	Frlim_max Trlim_t
}

type Trusage

type Trusage = struct {
	Fru_utime    Ttimeval
	Fru_stime    Ttimeval
	Fru_maxrss   int64
	Fru_ixrss    int64
	Fru_idrss    int64
	Fru_isrss    int64
	Fru_minflt   int64
	Fru_majflt   int64
	Fru_nswap    int64
	Fru_inblock  int64
	Fru_oublock  int64
	Fru_msgsnd   int64
	Fru_msgrcv   int64
	Fru_nsignals int64
	Fru_nvcsw    int64
	Fru_nivcsw   int64
	F__reserved  [16]int64
}

type Tsa_family_t

type Tsa_family_t = uint16

type Tsched_param

type Tsched_param = struct {
	Fsched_priority int32
	F__reserved1    int32
	F__reserved2    [2]struct {
		F__reserved1 Ttime_t
		F__reserved2 int64
	}
	F__reserved3 int32
}

type Tsig_atomic_t

type Tsig_atomic_t = int32

type Tsig_t

type Tsig_t = uintptr

type Tsigaction

type Tsigaction = struct {
	F__sa_handler struct {
		Fsa_sigaction [0]uintptr
		Fsa_handler   uintptr
	}
	Fsa_mask     Tsigset_t
	Fsa_flags    int32
	Fsa_restorer uintptr
}

type Tsigaltstack

type Tsigaltstack = Tstack_t

type Tsigcontext

type Tsigcontext = struct {
	Fr8          uint64
	Fr9          uint64
	Fr10         uint64
	Fr11         uint64
	Fr12         uint64
	Fr13         uint64
	Fr14         uint64
	Fr15         uint64
	Frdi         uint64
	Frsi         uint64
	Frbp         uint64
	Frbx         uint64
	Frdx         uint64
	Frax         uint64
	Frcx         uint64
	Frsp         uint64
	Frip         uint64
	Feflags      uint64
	Fcs          uint16
	Fgs          uint16
	Ffs          uint16
	F__pad0      uint16
	Ferr         uint64
	Ftrapno      uint64
	Foldmask     uint64
	Fcr2         uint64
	Ffpstate     uintptr
	F__reserved1 [8]uint64
}

type Tsigevent

type Tsigevent = struct {
	Fsigev_value  Tsigval
	Fsigev_signo  int32
	Fsigev_notify int32
	F__sev_fields struct {
		Fsigev_notify_thread_id [0]Tpid_t
		F__sev_thread           [0]struct {
			Fsigev_notify_function   uintptr
			Fsigev_notify_attributes uintptr
		}
		F__pad [48]int8
	}
}

type Tsighandler_t

type Tsighandler_t = uintptr

type Tsiginfo_t

type Tsiginfo_t = struct {
	Fsi_signo    int32
	Fsi_errno    int32
	Fsi_code     int32
	F__si_fields struct {
		F__si_common [0]struct {
			F__first struct {
				F__timer [0]struct {
					Fsi_timerid int32
					Fsi_overrun int32
				}
				F__piduid struct {
					Fsi_pid Tpid_t
					Fsi_uid Tuid_t
				}
			}
			F__second struct {
				F__sigchld [0]struct {
					Fsi_status int32
					Fsi_utime  Tclock_t
					Fsi_stime  Tclock_t
				}
				Fsi_value    Tsigval
				F__ccgo_pad2 [16]byte
			}
		}
		F__sigfault [0]struct {
			Fsi_addr     uintptr
			Fsi_addr_lsb int16
			F__first     struct {
				Fsi_pkey    [0]uint32
				F__addr_bnd struct {
					Fsi_lower uintptr
					Fsi_upper uintptr
				}
			}
		}
		F__sigpoll [0]struct {
			Fsi_band int64
			Fsi_fd   int32
		}
		F__sigsys [0]struct {
			Fsi_call_addr uintptr
			Fsi_syscall   int32
			Fsi_arch      uint32
		}
		F__pad [112]int8
	}
}

type Tsigset_t

type Tsigset_t = struct {
	F__bits [16]uint64
}

type Tsigval

type Tsigval = struct {
	Fsival_ptr   [0]uintptr
	Fsival_int   int32
	F__ccgo_pad2 [4]byte
}

type Tsize_t

type Tsize_t = uint64

func Xstrlcat

func Xstrlcat(tls *libc.TLS, dst uintptr, src uintptr, dsize Tsize_t) (r Tsize_t)

C documentation

/*
 * Appends src to string dst of size dsize (unlike strncat, dsize is the
 * full size of dst, not space left).  At most dsize-1 characters
 * will be copied.  Always NUL terminates (unless dsize <= strlen(dst)).
 * Returns strlen(src) + MIN(dsize, strlen(initial dst)).
 * If retval >= dsize, truncation occurred.
 */

func Xstrlcpy

func Xstrlcpy(tls *libc.TLS, dst uintptr, src uintptr, dsize Tsize_t) (r Tsize_t)

C documentation

/*
 * Copy string src to buffer dst of size dsize.  At most dsize-1
 * chars will be copied.  Always NUL terminates (unless dsize == 0).
 * Returns strlen(src); if retval >= dsize, truncation occurred.
 */

func Xwcslcat

func Xwcslcat(tls *libc.TLS, dst uintptr, src uintptr, siz Tsize_t) (r Tsize_t)

C documentation

/*
 * Appends src to string dst of size siz (unlike wcsncat, siz is the
 * full size of dst, not space left).  At most siz-1 characters
 * will be copied.  Always NUL terminates (unless siz == 0).
 * Returns wcslen(initial dst) + wcslen(src); if retval >= siz,
 * truncation occurred.
 */

func Xwcslcpy

func Xwcslcpy(tls *libc.TLS, dst uintptr, src uintptr, siz Tsize_t) (r Tsize_t)

C documentation

/*
 * Copy src to string dst of size siz.  At most siz-1 characters
 * will be copied.  Always NUL terminates (unless siz == 0).
 * Returns wcslen(src); if retval >= siz, truncation occurred.
 */

type Tsockaddr

type Tsockaddr = struct {
	Fsa_family Tsa_family_t
	Fsa_data   [14]int8
}

type Tsockaddr_in

type Tsockaddr_in = struct {
	Fsin_family Tsa_family_t
	Fsin_port   Tin_port_t
	Fsin_addr   Tin_addr
	Fsin_zero   [8]Tuint8_t
}

type Tsockaddr_in6

type Tsockaddr_in6 = struct {
	Fsin6_family   Tsa_family_t
	Fsin6_port     Tin_port_t
	Fsin6_flowinfo Tuint32_t
	Fsin6_addr     Tin6_addr
	Fsin6_scope_id Tuint32_t
}

type Tsockaddr_storage

type Tsockaddr_storage = struct {
	Fss_family    Tsa_family_t
	F__ss_padding [118]int8
	F__ss_align   uint64
}

type Tsockaddr_un

type Tsockaddr_un = struct {
	Fsun_family Tsa_family_t
	Fsun_path   [108]int8
}

type Tsocklen_t

type Tsocklen_t = uint32

type Tspeed_t

type Tspeed_t = uint32

type Tssize_t

type Tssize_t = int64

func Xstrnunvis_openbsd

func Xstrnunvis_openbsd(tls *libc.TLS, dst uintptr, src uintptr, dlen Tsize_t) (r Tssize_t)

type Tstack

type Tstack = struct {
	Fsa uintptr
	Fsn int32
	Fsi int32
}

type Tstack_t

type Tstack_t = struct {
	Fss_sp    uintptr
	Fss_flags int32
	Fss_size  Tsize_t
}

type Tstat

type Tstat = struct {
	Fst_dev     Tdev_t
	Fst_ino     Tino_t
	Fst_nlink   Tnlink_t
	Fst_mode    Tmode_t
	Fst_uid     Tuid_t
	Fst_gid     Tgid_t
	F__pad0     uint32
	Fst_rdev    Tdev_t
	Fst_size    Toff_t
	Fst_blksize Tblksize_t
	Fst_blocks  Tblkcnt_t
	Fst_atim    Ttimespec
	Fst_mtim    Ttimespec
	Fst_ctim    Ttimespec
	F__unused   [3]int64
}

type Tstatfs added in v0.6.0

type Tstatfs = struct {
	Ff_type    uint64
	Ff_bsize   uint64
	Ff_blocks  Tfsblkcnt_t
	Ff_bfree   Tfsblkcnt_t
	Ff_bavail  Tfsblkcnt_t
	Ff_files   Tfsfilcnt_t
	Ff_ffree   Tfsfilcnt_t
	Ff_fsid    Tfsid_t
	Ff_namelen uint64
	Ff_frsize  uint64
	Ff_flags   uint64
	Ff_spare   [4]uint64
}

type Tstatvfs added in v0.6.0

type Tstatvfs = struct {
	Ff_bsize    uint64
	Ff_frsize   uint64
	Ff_blocks   Tfsblkcnt_t
	Ff_bfree    Tfsblkcnt_t
	Ff_bavail   Tfsblkcnt_t
	Ff_files    Tfsfilcnt_t
	Ff_ffree    Tfsfilcnt_t
	Ff_favail   Tfsfilcnt_t
	Ff_fsid     uint64
	Ff_flag     uint64
	Ff_namemax  uint64
	Ff_type     uint32
	F__reserved [5]int32
}

type Tstatx

type Tstatx = struct {
	Fstx_mask            Tuint32_t
	Fstx_blksize         Tuint32_t
	Fstx_attributes      Tuint64_t
	Fstx_nlink           Tuint32_t
	Fstx_uid             Tuint32_t
	Fstx_gid             Tuint32_t
	Fstx_mode            Tuint16_t
	F__pad0              [1]Tuint16_t
	Fstx_ino             Tuint64_t
	Fstx_size            Tuint64_t
	Fstx_blocks          Tuint64_t
	Fstx_attributes_mask Tuint64_t
	Fstx_atime           Tstatx_timestamp
	Fstx_btime           Tstatx_timestamp
	Fstx_ctime           Tstatx_timestamp
	Fstx_mtime           Tstatx_timestamp
	Fstx_rdev_major      Tuint32_t
	Fstx_rdev_minor      Tuint32_t
	Fstx_dev_major       Tuint32_t
	Fstx_dev_minor       Tuint32_t
	F__pad1              [14]Tuint64_t
}

type Tstatx_timestamp

type Tstatx_timestamp = struct {
	Ftv_sec  Tint64_t
	Ftv_nsec Tuint32_t
	F__pad   Tuint32_t
}

type Tsuseconds_t

type Tsuseconds_t = int64

type Ttcflag_t

type Ttcflag_t = uint32

type Ttermios

type Ttermios = struct {
	Fc_iflag    Ttcflag_t
	Fc_oflag    Ttcflag_t
	Fc_cflag    Ttcflag_t
	Fc_lflag    Ttcflag_t
	Fc_line     Tcc_t
	Fc_cc       [32]Tcc_t
	F__c_ispeed Tspeed_t
	F__c_ospeed Tspeed_t
}

type Ttime_t

type Ttime_t = int64

func X_int_to_time added in v0.6.0

func X_int_to_time(tls *libc.TLS, tint int32) (r Ttime_t)

func X_long_to_time added in v0.6.0

func X_long_to_time(tls *libc.TLS, tlong int64) (r Ttime_t)

func X_time32_to_time added in v0.6.0

func X_time32_to_time(tls *libc.TLS, t32 Tint32_t) (r Ttime_t)

C documentation

/*
 * Convert a 32 bit representation of time_t into time_t.  XXX needs to
 * implement the 50-year rule to handle post-2038 conversions.
 */

func X_time64_to_time added in v0.6.0

func X_time64_to_time(tls *libc.TLS, t64 Tint64_t) (r Ttime_t)

C documentation

/*
 * Convert a 64 bit representation of time_t into time_t.  If time_t is
 * represented as 32 bits we can simply chop it and not support times
 * past 2038.
 */

type Ttimer_t

type Ttimer_t = uintptr

type Ttimespec

type Ttimespec = struct {
	Ftv_sec  Ttime_t
	Ftv_nsec int64
}

type Ttimeval

type Ttimeval = struct {
	Ftv_sec  Ttime_t
	Ftv_usec Tsuseconds_t
}

type Ttimezone

type Ttimezone = struct {
	Ftz_minuteswest int32
	Ftz_dsttime     int32
}

type Ttm

type Ttm = struct {
	Ftm_sec    int32
	Ftm_min    int32
	Ftm_hour   int32
	Ftm_mday   int32
	Ftm_mon    int32
	Ftm_year   int32
	Ftm_wday   int32
	Ftm_yday   int32
	Ftm_isdst  int32
	Ftm_gmtoff int64
	Ftm_zone   uintptr
}

type Tu8

type Tu8 = uint8

type Tu32

type Tu32 = uint32

type Tu_char

type Tu_char = uint8

type Tu_int

type Tu_int = uint32

type Tu_int8_t

type Tu_int8_t = uint8

type Tu_int16_t

type Tu_int16_t = uint16

type Tu_int32_t

type Tu_int32_t = uint32

type Tu_int64_t

type Tu_int64_t = uint64

type Tu_long

type Tu_long = uint64

type Tu_quad_t

type Tu_quad_t = uint64

type Tu_short

type Tu_short = uint16

type Tucontext

type Tucontext = Tucontext_t

type Tucontext_t

type Tucontext_t = struct {
	Fuc_flags     uint64
	Fuc_link      uintptr
	Fuc_stack     Tstack_t
	Fuc_mcontext  Tmcontext_t
	Fuc_sigmask   Tsigset_t
	F__fpregs_mem [64]uint64
}

type Tucred

type Tucred = struct {
	Fpid Tpid_t
	Fuid Tuid_t
	Fgid Tgid_t
}

type Tuid_t

type Tuid_t = uint32

type Tuidc

type Tuidc = TUIDC

type Tuint

type Tuint = uint32

type Tuint8_t

type Tuint8_t = uint8

type Tuint16_t

type Tuint16_t = uint16

type Tuint32_t

type Tuint32_t = uint32

func Xarc4random

func Xarc4random(tls *libc.TLS) (r Tuint32_t)

func Xarc4random_uniform

func Xarc4random_uniform(tls *libc.TLS, upper_bound Tuint32_t) (r1 Tuint32_t)

C documentation

/*
 * Calculate a uniformly distributed random number less than upper_bound
 * avoiding "modulo bias".
 *
 * Uniformity is achieved by generating new random numbers until the one
 * returned is outside the range [0, 2**32 % upper_bound).  This
 * guarantees the selected random number will be inside
 * [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound)
 * after reduction modulo upper_bound.
 */

type Tuint64_t

type Tuint64_t = uint64

type Tuint_fast8_t

type Tuint_fast8_t = uint8

type Tuint_fast16_t

type Tuint_fast16_t = uint32

type Tuint_fast32_t

type Tuint_fast32_t = uint32

type Tuint_fast64_t

type Tuint_fast64_t = uint64

type Tuint_least8_t

type Tuint_least8_t = uint8

type Tuint_least16_t

type Tuint_least16_t = uint16

type Tuint_least32_t

type Tuint_least32_t = uint32

type Tuint_least64_t

type Tuint_least64_t = uint64

type Tuintmax_t

type Tuintmax_t = uint64

func Xstrtou

func Xstrtou(tls *libc.TLS, nptr uintptr, endptr uintptr, base int32, lo Tuintmax_t, hi Tuintmax_t, rstatus uintptr) (r Tuintmax_t)

type Tuintptr_t

type Tuintptr_t = uint64

type Tulong

type Tulong = uint64

type Tuseconds_t

type Tuseconds_t = uint32

type Tushort

type Tushort = uint16

type Tva_list

type Tva_list = uintptr

type Tvisfun_t

type Tvisfun_t = uintptr

type Twchar_t

type Twchar_t = int32

type Twctrans_t

type Twctrans_t = uintptr

type Twctype_t

type Twctype_t = uint64

type Twinsize

type Twinsize = struct {
	Fws_row    uint16
	Fws_col    uint16
	Fws_xpixel uint16
	Fws_ypixel uint16
}

type Twint_t

type Twint_t = uint32

Directories

Path Synopsis
internal
tests/bzero command
tests/closefrom command
tests/endian command
tests/fpurge command
tests/humanize command
tests/md5 command
tests/nlist command
tests/overlay command
tests/progname command
tests/pwcache command
tests/setmode command
tests/strl command
tests/strmode command
tests/strnstr command
tests/strtonum command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL