crt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 23 Imported by: 4

README

crt

Package crt provides C-runtime services. (Work In Progress)

Installation

$ go get modernc.org/crt

Documentation: godoc.org/modernc.org/crt

Documentation

Overview

Package crt provides C-runtime services. (Work In Progress)

Index

Constants

View Source
const (
	Tpthread_cond_t      = "" /* 196-byte string literal not displayed */
	Tpthread_mutexattr_t = "union{__size [4]int8,__align int32}"
)
View Source
const (
	Tpthread_attr_t  = "union{[56]int8,int64}"
	Tpthread_mutex_t = "" /* 201-byte string literal not displayed */
)
View Source
const (
	TFILE = "" /* 518-byte string literal not displayed */
)
View Source
const Tstruct_stat64 = "" /* 300-byte string literal not displayed */
View Source
const Tstruct_timeval = "struct{tv_sec int64,tv_usec int64}"
View Source
const Ttm = "" /* 165-byte string literal not displayed */

Variables

This section is empty.

Functions

func CString

func CString(s string) unsafe.Pointer

CString allocates a C string initialized from s.

func Calloc

func Calloc(size int) (unsafe.Pointer, error)

Calloc is like Malloc except the allocated memory is zeroed. Calloc is safe for concurrent use by multiple goroutines.

func CopyBytes

func CopyBytes(dst unsafe.Pointer, src []byte, addNull bool)

CopyBytes copies src to dest, optionally adding a zero byte at the end.

func CopyString

func CopyString(dst unsafe.Pointer, src string, addNull bool)

CopyString copies src to dest, optionally adding a zero byte at the end.

func Free

func Free(ptr unsafe.Pointer) error

Free deallocates memory. The argument of Free must have been acquired from Calloc or Malloc or Realloc. Free is safe for concurrent use by multiple goroutines.

func GoBytesLen

func GoBytesLen(s *int8, len int) []byte

GoBytesLen returns a []byte copied from a C char* string s having length len bytes.

func GoString

func GoString(s *int8) string

GoString returns a string from a C char* null terminated string s.

func GoStringLen

func GoStringLen(s *int8, len int) string

GoStringLen returns a string from a C char* string s having length len bytes.

func Malloc

func Malloc(size int) (unsafe.Pointer, error)

Malloc allocates size bytes and returns a byte slice of the allocated memory. The memory is not initialized. Malloc panics for size < 0 and returns (nil, nil) for zero size. Malloc is safe for concurrent use by multiple goroutines.

func Movemem

func Movemem(dest, src unsafe.Pointer, n int) int

Movemem copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

func P2U

func P2U(p unsafe.Pointer) uintptr

P2U returns the uintptr value represented by p. If p was obtained by U2P then the uintptr value originally passed to U2P is returned. Otherwise the return value is uintptr(p).

The function is safe for concurrent use by multiple goroutines.

func Realloc

func Realloc(tls *TLS, ptr unsafe.Pointer, size int) (unsafe.Pointer, error)

Realloc changes the size of the memory allocated at ptr to size bytes or returns an error, if any. The contents will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized. If ptr is nil, then the call is equivalent to Malloc(size), for all values of size; if size is equal to zero, and ptr is not nil, then the call is equivalent to Free(ptr). Unless ptr is nil, it must have been returned by an earlier call to Malloc, Calloc or Realloc. If the area pointed to was moved, a Free(ptr) is done. Relloc is safe for concurrent use by multiple goroutines.

func RegisterHeap

func RegisterHeap(h unsafe.Pointer, n int64)

RegisterHeap registers the sbrk-style heap.

func TODO

func TODO(msg string, more ...interface{}) string

TODO remove me.

func U2P

func U2P(u uintptr) unsafe.Pointer

U2P returns unsafe.Pointer(&u).

The function is safe for concurrent use by multiple goroutines.

func UsableSize

func UsableSize(p unsafe.Pointer) int

UsableSize reports the size of the memory block allocated at p, which must have been acquired from Calloc, Malloc or Realloc. The allocated memory block size can be larger than the size originally requested from Calloc, Malloc or Realloc.

func VAFloat64

func VAFloat64(ap *[]interface{}) float64

func VAInt32

func VAInt32(ap *[]interface{}) (v int32)

func VAInt64

func VAInt64(ap *[]interface{}) (v int64)

func VALong

func VALong(ap *[]interface{}) int64

func VAOther

func VAOther(ap *[]interface{}) (v interface{})

func VAPointer

func VAPointer(ap *[]interface{}) (r unsafe.Pointer)

func VAULong

func VAULong(ap *[]interface{}) uint64

func VAUint32

func VAUint32(ap *[]interface{}) (v uint32)

func VAUint64

func VAUint64(ap *[]interface{}) (v uint64)

func X__builtin_abort

func X__builtin_abort(tls *TLS)

void abort();

func X__builtin_abs

func X__builtin_abs(tks *TLS, j int32) int32

int abs(int j);

func X__builtin_assert_fail

func X__builtin_assert_fail(tls *TLS, file *int8, line int32, fn, msg *int8)

func X__builtin_bswap64

func X__builtin_bswap64(tls *TLS, x uint64) uint64

uint64_t __builtin_bswap64 (uint64_t x)

func X__builtin_copysign

func X__builtin_copysign(tls *TLS, x, y float64) float64

func X__builtin_exit

func X__builtin_exit(tls *TLS, n int32)

void exit(int);

func X__builtin_ffs

func X__builtin_ffs(tls *TLS, i int32) int32

int ffs(int i);

func X__builtin_ffsl

func X__builtin_ffsl(tls *TLS, i int64) int32

int ffsl(long i);

func X__builtin_ffsll

func X__builtin_ffsll(tls *TLS, i int64) int32

int ffsll(long long i);

func X__builtin_fprintf

func X__builtin_fprintf(tls *TLS, stream unsafe.Pointer, format *int8, args ...interface{}) int32

int __builtin_fprintf(void* stream, const char *format, ...);

func X__builtin_isprint

func X__builtin_isprint(tls *TLS, c int32) int32

int isprint(int c);

func X__builtin_malloc

func X__builtin_malloc(tls *TLS, size uint64) (p unsafe.Pointer)

void *malloc(size_t size);

func X__builtin_memcmp

func X__builtin_memcmp(tls *TLS, s1, s2 unsafe.Pointer, n uint64) int32

int memcmp(const void *s1, const void *s2, size_t n)

func X__builtin_memcpy

func X__builtin_memcpy(tls *TLS, dest, src unsafe.Pointer, n uint64) unsafe.Pointer

void *memcpy(void *dest, const void *src, size_t n)

func X__builtin_memset

func X__builtin_memset(tls *TLS, s unsafe.Pointer, c int32, n uint64) unsafe.Pointer

void *memset(void *s, int c, size_t n)

func X__builtin_printf

func X__builtin_printf(tls *TLS, format *int8, args ...interface{}) int32

int printf(const char *format, ...);

func X__builtin_sprintf

func X__builtin_sprintf(tls *TLS, str, format *int8, args ...interface{}) int32

int sprintf(char *str, const char *format, ...);

func X__builtin_strcmp

func X__builtin_strcmp(tls *TLS, s1, s2 *int8) int32

int strcmp(const char *s1, const char *s2)

func X__builtin_strcpy

func X__builtin_strcpy(tls *TLS, dest, src *int8) *int8

char *strcpy(char *dest, const char *src)

func X__builtin_strlen

func X__builtin_strlen(tls *TLS, s *int8) uint64

size_t strlen(const char *s)

func X__builtin_trap

func X__builtin_trap(tls *TLS)

void __builtin_trap();

func X__ctype_b_loc

func X__ctype_b_loc(tls *TLS) (r0 **uint16)

const unsigned short **__ctype_b_loc(void)

func X__errno_location

func X__errno_location(tls *TLS) *int32

extern int *__errno_location(void);

func X__register_stdfiles

func X__register_stdfiles(tls *TLS, in, out, err unsafe.Pointer)

void __register_stdfiles(void *, void *, void *);

func X__signbit

func X__signbit(tls *TLS, x float64) int32

int __signbit(double x);

func X__signbitf

func X__signbitf(tls *TLS, x float32) int32

int __signbitf(float x);

func Xabort

func Xabort(tls *TLS)

void abort();

func Xabs

func Xabs(tls *TLS, j int32) int32

int abs(int j);

func Xaccess

func Xaccess(tls *TLS, path *int8, amode int32) int32

int access(const char *path, int amode);

func Xacos

func Xacos(tls *TLS, x float64) float64

func Xasin

func Xasin(tls *TLS, x float64) float64

func Xatan

func Xatan(tls *TLS, x float64) float64

func Xatoi

func Xatoi(tls *TLS, _s *int8) (r0 int32)

int atoi(const char *nptr);

func Xcalloc

func Xcalloc(tls *TLS, nmemb, size uint64) (p unsafe.Pointer)

void *calloc(size_t nmemb, size_t size);

func Xceil

func Xceil(tls *TLS, x float64) float64

func Xclose

func Xclose(tls *TLS, fd int32) int32

int close(int fd);

func Xcopysign

func Xcopysign(tls *TLS, x, y float64) float64

func Xcos

func Xcos(tls *TLS, x float64) float64

func Xcosh

func Xcosh(tls *TLS, x float64) float64

func Xdlclose

func Xdlclose(tls *TLS, handle unsafe.Pointer) int32

int dlclose(void *handle);

func Xdlerror

func Xdlerror(tls *TLS) *int8

char *dlerror(void);

func Xdlopen

func Xdlopen(tls *TLS, filename *int8, flags int32) unsafe.Pointer

void *dlopen(const char *filename, int flags);

func Xdlsym

func Xdlsym(tls *TLS, handle unsafe.Pointer, symbol *int8) unsafe.Pointer

void *dlsym(void *handle, const char *symbol);

func Xexit

func Xexit(tls *TLS, n int32)

void exit(int);

func Xexp

func Xexp(tls *TLS, x float64) float64

func Xfabs

func Xfabs(tls *TLS, x float64) float64

func Xfchmod

func Xfchmod(tls *TLS, fd int32, mode uint32) int32

int fchmod(int fd, mode_t mode);

func Xfchown

func Xfchown(tls *TLS, fd int32, owner, group uint32) int32

int fchown(int fd, uid_t owner, gid_t group);

func Xfclose

func Xfclose(tls *TLS, stream *XFILE) int32

int fclose(FILE *stream);

func Xfcntl

func Xfcntl(tls *TLS, fildes, cmd int32, args ...interface{}) int32

int fcntl(int fildes, int cmd, ...);

func Xfflush

func Xfflush(tls *TLS, stream *XFILE) int32

int fflush(FILE *stream);

func Xffs

func Xffs(tls *TLS, i int32) int32

int ffs(int i);

func Xffsl

func Xffsl(tls *TLS, i int64) int32

int ffsl(long i);

func Xffsll

func Xffsll(tls *TLS, i int64) int32

int ffsll(long long i);

func Xfgetc

func Xfgetc(tls *TLS, stream *XFILE) int32

int fgetc(FILE *stream);

func Xfgets

func Xfgets(tls *TLS, s *int8, size int32, stream *XFILE) *int8

char *fgets(char *s, int size, FILE *stream);

func Xfloor

func Xfloor(tls *TLS, x float64) float64

func Xfprintf

func Xfprintf(tls *TLS, stream *XFILE, format *int8, args ...interface{}) int32

int fprintf(FILE * stream, const char *format, ...);

func Xfread

func Xfread(tls *TLS, ptr unsafe.Pointer, size, nmemb uint64, stream *XFILE) uint64

size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);

func Xfree

func Xfree(tls *TLS, ptr unsafe.Pointer)

void free(void *ptr);

func Xfseek

func Xfseek(tls *TLS, stream *XFILE, offset int64, whence int32) int32

int fseek(FILE *stream, long offset, int whence);

func Xfstat64

func Xfstat64(tls *TLS, fildes int32, buf *Xstruct_stat64) int32

int fstat64(int fildes, struct stat64 *buf);

func Xfsync

func Xfsync(tls *TLS, fildes int32) int32

int fsync(int fildes);

func Xftell

func Xftell(tls *TLS, stream *XFILE) int64

long ftell(FILE *stream);

func Xftruncate64

func Xftruncate64(tls *TLS, fildes int32, length int64) int32

int ftruncate(int fildes, off_t length);

func Xfwrite

func Xfwrite(tls *TLS, ptr unsafe.Pointer, size, nmemb uint64, stream *XFILE) uint64

size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);

func Xgetcwd

func Xgetcwd(tls *TLS, buf *int8, size uint64) *int8

char *getcwd(char *buf, size_t size);

func Xgetenv

func Xgetenv(tls *TLS, name *int8) *int8

char *getenv(const char *name);

func Xgeteuid

func Xgeteuid(tls *TLS) uint32

uid_t geteuid(void);

func Xgetpid

func Xgetpid(tls *TLS) int32

pid_t getpid(void);

func Xgettimeofday

func Xgettimeofday(tls *TLS, tp *Xstruct_timeval, tzp unsafe.Pointer) int32

int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

func Xindex

func Xindex(tls *TLS, s *int8, c int32) *int8

char *index(const char *s, int c)

func Xisprint

func Xisprint(tls *TLS, c int32) int32

int isprint(int c);

func Xlog

func Xlog(tls *TLS, x float64) float64

func Xlog10

func Xlog10(tls *TLS, x float64) float64

func Xlseek64

func Xlseek64(tls *TLS, fildes int32, offset int64, whence int32) int64

off_t lseek64(int fildes, off_t offset, int whence);

func Xlstat64

func Xlstat64(tls *TLS, file *int8, buf *Xstruct_stat64) int32

extern int lstat64(char *__file, struct stat64 *__buf);

func Xmalloc

func Xmalloc(tls *TLS, size uint64) unsafe.Pointer

void *malloc(size_t size);

func Xmalloc_usable_size

func Xmalloc_usable_size(tls *TLS, ptr unsafe.Pointer) uint64

size_t malloc_usable_size (void *ptr);

func Xmemcmp

func Xmemcmp(tls *TLS, s1, s2 unsafe.Pointer, n uint64) int32

int memcmp(const void *s1, const void *s2, size_t n)

func Xmemcpy

func Xmemcpy(tls *TLS, dest, src unsafe.Pointer, n uint64) unsafe.Pointer

void *memcpy(void *dest, const void *src, size_t n)

func Xmemmove

func Xmemmove(tls *TLS, dest, src unsafe.Pointer, n uint64) unsafe.Pointer

void *memmove(void *dest, const void *src, size_t n);

func Xmempcpy

func Xmempcpy(tls *TLS, dest, src unsafe.Pointer, n uint64) unsafe.Pointer

void *mempcpy(void *dest, const void *src, size_t n);

func Xmemset

func Xmemset(tls *TLS, s unsafe.Pointer, c int32, n uint64) unsafe.Pointer

void *memset(void *s, int c, size_t n)

func Xmkdir

func Xmkdir(tls *TLS, pathname *int8, mode uint32) int32

int mkdir(const char *pathname, mode_t mode);

func Xmmap64

func Xmmap64(tls *TLS, addr unsafe.Pointer, len uint64, prot, flags, fildes int32, off int64) unsafe.Pointer

void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off);

func Xmunmap

func Xmunmap(tls *TLS, addr unsafe.Pointer, len uint64) int32

int munmap(void *addr, size_t len);

func Xopen64

func Xopen64(tls *TLS, pathname *int8, flags int32, args ...interface{}) int32

int open64(const char *pathname, int flags, ...);

func Xpow

func Xpow(tls *TLS, x, y float64) float64

func Xprintf

func Xprintf(tls *TLS, format *int8, args ...interface{}) int32

int printf(const char *format, ...);

func Xpthread_cond_signal

func Xpthread_cond_signal(tls *TLS, cond *Xpthread_cond_t) int32

int pthread_cond_signal(pthread_cond_t *cond);

func Xpthread_cond_wait

func Xpthread_cond_wait(tls *TLS, cond *Xpthread_cond_t, mutex *Xpthread_mutex_t) int32

int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);

func Xpthread_create

func Xpthread_create(tls *TLS, thread *uint64, attr *Xpthread_attr_t, start_routine func(*TLS, unsafe.Pointer) unsafe.Pointer, arg unsafe.Pointer) int32

int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, void *(*start_routine)(void*), void *restrict arg);

func Xpthread_detach

func Xpthread_detach(tls *TLS, thread uint64) int32

int pthread_detach(pthread_t thread);

func Xpthread_equal

func Xpthread_equal(tls *TLS, thread1, thread2 uint64) int32

extern int pthread_equal(pthread_t __thread1, pthread_t __thread2);

func Xpthread_join

func Xpthread_join(tls *TLS, thread uint64, value_ptr *unsafe.Pointer) int32

int pthread_join(pthread_t thread, void **value_ptr);

func Xpthread_mutex_destroy

func Xpthread_mutex_destroy(tls *TLS, mutex *Xpthread_mutex_t) int32

extern int pthread_mutex_destroy(pthread_mutex_t * __mutex);

func Xpthread_mutex_init

func Xpthread_mutex_init(tls *TLS, mutex *Xpthread_mutex_t, mutexattr *Xpthread_mutexattr_t) int32

extern int pthread_mutex_init(pthread_mutex_t * __mutex, pthread_mutexattr_t * __mutexattr);

func Xpthread_mutex_lock

func Xpthread_mutex_lock(tls *TLS, mutex *Xpthread_mutex_t) int32

extern int pthread_mutex_lock(pthread_mutex_t * __mutex);

func Xpthread_mutex_trylock

func Xpthread_mutex_trylock(tls *TLS, mutex *Xpthread_mutex_t) int32

int pthread_mutex_trylock(pthread_mutex_t *mutex);

func Xpthread_mutex_unlock

func Xpthread_mutex_unlock(tls *TLS, mutex *Xpthread_mutex_t) int32

extern int pthread_mutex_unlock(pthread_mutex_t * __mutex);

func Xpthread_mutexattr_destroy

func Xpthread_mutexattr_destroy(tls *TLS, attr *Xpthread_mutexattr_t) int32

extern int pthread_mutexattr_destroy(pthread_mutexattr_t * __attr);

func Xpthread_mutexattr_init

func Xpthread_mutexattr_init(tls *TLS, attr *Xpthread_mutexattr_t) int32

extern int pthread_mutexattr_init(pthread_mutexattr_t * __attr);

func Xpthread_mutexattr_settype

func Xpthread_mutexattr_settype(tls *TLS, attr *Xpthread_mutexattr_t, kind int32) int32

extern int pthread_mutexattr_settype(pthread_mutexattr_t * __attr, int __kind);

func Xpthread_self

func Xpthread_self(tls *TLS) uint64

pthread_t pthread_self(void);

func Xqsort

func Xqsort(tls *TLS, base unsafe.Pointer, nmemb, size uint64, compar func(tls *TLS, a, b unsafe.Pointer) int32)

void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));

func Xread

func Xread(tls *TLS, fd int32, buf unsafe.Pointer, count uint64) int64

ssize_t read(int fd, void *buf, size_t count);

func Xreadlink(tls *TLS, pathname, buf *int8, bufsiz uint64) int64

ssize_t readlink(const char *pathname, char *buf, size_t bufsiz);

func Xrealloc

func Xrealloc(tls *TLS, ptr unsafe.Pointer, size uint64) unsafe.Pointer

void *realloc(void *ptr, size_t size);

func Xrewind

func Xrewind(tls *TLS, stream *XFILE)

void rewind(FILE *stream);

func Xrindex

func Xrindex(tls *TLS, s *int8, c int32) *int8

char *rindex(const char *s, int c)

func Xrmdir

func Xrmdir(tls *TLS, pathname *int8) int32

int rmdir(const char *pathname);

func Xround

func Xround(tls *TLS, x float64) float64

double round(double x);

func Xsbrk

func Xsbrk(tls *TLS, increment int64) unsafe.Pointer

void *sbrk(intptr_t increment);

func Xsched_yield

func Xsched_yield(tls *TLS) int32

int sched_yield(void);

func Xsin

func Xsin(tls *TLS, x float64) float64

func Xsinh

func Xsinh(tls *TLS, x float64) float64

func Xsleep

func Xsleep(tls *TLS, seconds uint32) uint32

unsigned sleep(unsigned seconds);

func Xsprintf

func Xsprintf(tls *TLS, str, format *int8, args ...interface{}) int32

int sprintf(char *str, const char *format, ...);

func Xsqrt

func Xsqrt(tls *TLS, x float64) float64

func Xstat64

func Xstat64(tls *TLS, file *int8, buf *Xstruct_stat64) int32

extern int stat64(char *__file, struct stat64 *__buf);

func Xstrcat

func Xstrcat(tls *TLS, dest, src *int8) *int8

char *strcat(char *dest, const char *src)

func Xstrchr

func Xstrchr(tls *TLS, s *int8, c int32) *int8

char *strchr(const char *s, int c)

func Xstrcmp

func Xstrcmp(tls *TLS, s1, s2 *int8) int32

int strcmp(const char *s1, const char *s2)

func Xstrcpy

func Xstrcpy(tls *TLS, dest, src *int8) *int8

char *strcpy(char *dest, const char *src)

func Xstrerror_r

func Xstrerror_r(tls *TLS, errnum int32, buf *int8, buflen uint64) int32

int strerror_r(int errnum, char *buf, size_t buflen);

func Xstrlen

func Xstrlen(tls *TLS, s *int8) uint64

size_t strlen(const char *s)

func Xstrncmp

func Xstrncmp(tls *TLS, s1, s2 *int8, n uint64) int32

int strncmp(const char *s1, const char *s2, size_t n)

func Xstrncpy

func Xstrncpy(tls *TLS, dest, src *int8, n uint64) *int8

char *strncpy(char *dest, const char *src, size_t n)

func Xstrrchr

func Xstrrchr(tls *TLS, s *int8, c int32) *int8

char *strrchr(const char *s, int c)

func Xsysconf

func Xsysconf(tls *TLS, name int32) int64

long sysconf(int name);

func Xsystem

func Xsystem(tls *TLS, command *int8) int32

int system(const char *command);

func Xtan

func Xtan(tls *TLS, x float64) float64

func Xtanh

func Xtanh(tls *TLS, x float64) float64

func Xtime

func Xtime(tls *TLS, tloc *int64) int64

time_t time(time_t *tloc);

func Xtolower

func Xtolower(tls *TLS, c int32) int32

int tolower(int c);

func Xunlink(tls *TLS, path *int8) int32

int unlink(const char *path);

func Xusleep

func Xusleep(tls *TLS, usec uint32) int32

int usleep(useconds_t usec);

func Xutimes

func Xutimes(tls *TLS, filename *int8, times *[2]Xstruct_timeval) int32

int utimes(const char *filename, const struct timeval times[2]);

func Xvfprintf

func Xvfprintf(tls *TLS, stream *XFILE, format *int8, ap []interface{}) int32

int vfprintf(FILE *stream, const char *format, va_list ap);

func Xvprintf

func Xvprintf(tls *TLS, format *int8, ap []interface{}) int32

int vprintf(const char *format, va_list ap);

func Xwrite

func Xwrite(tls *TLS, fd int32, buf unsafe.Pointer, count uint64) int64

ssize_t write(int fd, const void *buf, size_t count);

Types

type TLS

type TLS struct {
	// contains filtered or unexported fields
}

TLS represents the C-thread local storage.

func NewTLS

func NewTLS() *TLS

NewTLS returns a newly created TLS.

func (*TLS) Close

func (t *TLS) Close()

TLS frees any resources used by t.

type XFILE

type XFILE struct {
	X_flags          int32
	X_IO_read_ptr    *int8
	X_IO_read_end    *int8
	X_IO_read_base   *int8
	X_IO_write_base  *int8
	X_IO_write_ptr   *int8
	X_IO_write_end   *int8
	X_IO_buf_base    *int8
	X_IO_buf_end     *int8
	X_IO_save_base   *int8
	X_IO_backup_base *int8
	X_IO_save_end    *int8
	X_markers        unsafe.Pointer
	X_chain          unsafe.Pointer
	X_fileno         int32
	X_flags2         int32
	X_old_offset     int64
	X_cur_column     uint16
	X_vtable_offset  int8
	X_shortbuf       [1]int8
	X_lock           unsafe.Pointer
	X_offset         int64
	X__pad1          unsafe.Pointer
	X__pad2          unsafe.Pointer
	X__pad3          unsafe.Pointer
	X__pad4          unsafe.Pointer
	X__pad5          uint64
	X_mode           int32
	X_unused2        [20]int8
}

func Xfopen64

func Xfopen64(tls *TLS, path, mode *int8) *XFILE

FILE *fopen64(const char *path, const char *mode);

type Xpthread_attr_t

type Xpthread_attr_t struct {
	X [0]struct {
		X0 [56]int8
		X1 int64
	}
	U [56]byte
}

type Xpthread_cond_t

type Xpthread_cond_t struct {
	X [0]struct {
		X__size  [48]int8
		X__align int64
		// contains filtered or unexported fields
	}
	U [48]byte

} // t4 union{__data struct{__lock int32,__futex uint32,__total_seq uint64,__wakeup_seq uint64,__woken_seq uint64,__mutex *struct{},__nwaiters uint32,__broadcast_seq uint32},__size [48]int8,__align int64}

type Xpthread_mutex_t

type Xpthread_mutex_t struct {
	X [0]struct {
		X0 struct {
			X0 int32
			X1 uint32
			X2 int32
			X3 uint32
			X4 int32
			X5 int16
			X6 int16
			X7 struct {
				X0 unsafe.Pointer
				X1 unsafe.Pointer
			}
		}
		X__size  [40]int8
		X__align int64
	}
	U [40]byte

} // union{__data struct{__lock int32,__count uint32,__owner int32,__nusers uint32,__kind int32,__spins int16,__elision int16,__list struct{__prev *struct{},__next *struct{}}},__size [40]int8,__align int64}

type Xpthread_mutexattr_t

type Xpthread_mutexattr_t struct {
	X [0]struct {
		X__size  [4]int8
		X__align int32
	}
	U [4]byte

} // t175 union{__size [4]int8,__align int32}

type Xstruct_stat64

type Xstruct_stat64 struct {
	Xst_dev           uint64
	Xst_ino           uint64
	Xst_nlink         uint64
	Xst_mode          uint32
	Xst_uid           uint32
	Xst_gid           uint32
	X__pad0           int32
	Xst_rdev          uint64
	Xst_size          int64
	Xst_blksize       int64
	Xst_blocks        int64
	Xst_atime         int64
	Xst_atimensec     uint64
	Xst_mtime         int64
	Xst_mtimensec     uint64
	Xst_ctime         int64
	Xst_ctimensec     uint64
	X__glibc_reserved [3]int64

} // t196 struct{st_dev uint64,st_ino uint64,st_nlink uint64,st_mode uint32,st_uid uint32,st_gid uint32,__pad0 int32,st_rdev uint64,st_size int64,st_blksize int64,st_blocks int64,st_atime int64,st_atimensec uint64,st_mtime int64,st_mtimensec uint64,st_ctime int64,st_ctimensec uint64,__glibc_reserved [3]int64}

type Xstruct_timeval

type Xstruct_timeval struct {
	Xtv_sec  int64
	Xtv_usec int64

} // t196 struct{tv_sec int64,tv_usec int64}

type Xtm

type Xtm struct {
	Xtm_sec      int32
	Xtm_min      int32
	Xtm_hour     int32
	Xtm_mday     int32
	Xtm_mon      int32
	Xtm_year     int32
	Xtm_wday     int32
	Xtm_yday     int32
	Xtm_isdst    int32
	X__tm_gmtoff int64
	X__tm_zone   *int8

} // t162 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 int64,__tm_zone *int8}

func Xlocaltime

func Xlocaltime(tls *TLS, timep *int64) *Xtm

struct tm *localtime(const time_t *timep);

Jump to

Keyboard shortcuts

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