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/modernc.org/libc/capi_windows_arm64.go | vendor/modernc.org/libc/capi_windows_arm64.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": {},
"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": {},
"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": {},
"_fstat64": {},
"_fstati64": {},
"_ftime": {},
"_ftime64": {},
"_gmtime64": {},
"_imp___environ": {},
"_iob": {},
"_isatty": {},
"_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/ccgo_linux_arm64.go | vendor/modernc.org/libc/ccgo_linux_arm64.go | // Code generated for linux/arm64 by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/aarch64 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/uni | 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_linux_arm64.go | vendor/modernc.org/libc/capi_linux_arm64.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/libc_netbsd_amd64.go | vendor/modernc.org/libc/libc_netbsd_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"
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 = int64
ulong = uint64
)
// 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(""))
// 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)
}
// int getnameinfo(const struct sockaddr * restrict sa, socklen_t salen, char * restrict host, socklen_t hostlen, char * restrict serv, socklen_t servlen, int flags);
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_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: uint16(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, uint64(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
}
| 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/watch.go | vendor/modernc.org/libc/watch.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 (
"fmt"
"math"
"os"
"sync"
"unsafe"
)
var (
watches = map[uintptr]watch{}
watchesMu sync.Mutex
)
type watch interface {
msg() string
}
type watcher string
func (w watcher) msg() string {
if w == "" {
return ""
}
return fmt.Sprintf(": %s", w)
}
type watchInt8 struct {
val int8
watcher
}
func WatchInt8(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchInt8{*(*int8)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchUint8 struct {
val uint8
watcher
}
func WatchUint8(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchUint8{*(*uint8)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchInt16 struct {
val int16
watcher
}
func WatchInt16(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchInt16{*(*int16)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchUint16 struct {
val uint16
watcher
}
func WatchUint16(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchUint16{*(*uint16)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchInt32 struct {
val int32
watcher
}
func WatchInt32(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchInt32{*(*int32)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchUint32 struct {
val uint32
watcher
}
func WatchUint32(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchUint32{*(*uint32)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchInt64 struct {
val int64
watcher
}
func WatchInt64(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchInt64{*(*int64)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchUint64 struct {
val uint64
watcher
}
func WatchUint64(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchUint64{*(*uint64)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchFloat32 struct {
val float32
watcher
}
func WatchFloat32(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchFloat32{*(*float32)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchFloat64 struct {
val float64
watcher
}
func WatchFloat64(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchFloat64{*(*float64)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
type watchPtr struct {
val uintptr
watcher
}
func WatchPtr(p uintptr, msg string) {
watchesMu.Lock()
watches[p] = &watchPtr{*(*uintptr)(unsafe.Pointer(p)), watcher(msg)}
watchesMu.Unlock()
}
func Watch() {
watchesMu.Lock()
flush := false
for p, v := range watches {
switch x := v.(type) {
case *watchInt8:
if val := *(*int8)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: int8@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchUint8:
if val := *(*uint8)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: uint8@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchInt16:
if val := *(*int16)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: int16@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchUint16:
if val := *(*uint16)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: uint16@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchInt32:
if val := *(*int32)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: int32@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchUint32:
if val := *(*uint32)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: uint32@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchInt64:
if val := *(*int64)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: int64@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchUint64:
if val := *(*uint64)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: uint64@%#x was %d, new %d%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
case *watchFloat32:
if val := *(*float32)(unsafe.Pointer(p)); math.Float32bits(val) != math.Float32bits(x.val) {
flush = true
fmt.Fprintf(os.Stderr, "%v: float32@%#x was %v(%#x), new %v(%#x)%s\n", origin(2), p, x.val, math.Float32bits(x.val), val, math.Float32bits(val), x.msg())
x.val = val
}
case *watchFloat64:
if val := *(*float64)(unsafe.Pointer(p)); math.Float64bits(val) != math.Float64bits(x.val) {
flush = true
fmt.Fprintf(os.Stderr, "%v: float64@%#x was %v(%#x), new %v(%#x)%s\n", origin(2), p, x.val, math.Float64bits(x.val), val, math.Float64bits(val), x.msg())
x.val = val
}
case *watchPtr:
if val := *(*uintptr)(unsafe.Pointer(p)); val != x.val {
flush = true
fmt.Fprintf(os.Stderr, "%v: ptr@%#x was %#x, new %#x%s\n", origin(2), p, x.val, val, x.msg())
x.val = val
}
default:
panic(todo("%T", x))
}
}
if flush {
os.Stderr.Sync()
}
watchesMu.Unlock()
}
func WatchDelete(p uintptr) {
watchesMu.Lock()
delete(watches, p)
watchesMu.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/probes.go | vendor/modernc.org/libc/probes.go | // Copyright 2022 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 (
"bytes"
"fmt"
"math"
"runtime/debug"
"sort"
"strings"
"sync"
"sync/atomic"
"github.com/dustin/go-humanize"
)
type PerfCounter struct {
a []int32
labels []string
enabled bool
}
func NewPerfCounter(labels []string) *PerfCounter {
return &PerfCounter{
a: make([]int32, len(labels)),
labels: labels,
enabled: true,
}
}
func (c *PerfCounter) Disable() { c.enabled = false }
func (c *PerfCounter) Enable() { c.enabled = true }
func (c *PerfCounter) Clear() {
for i := range c.a {
c.a[i] = 0
}
}
func (c *PerfCounter) Inc(n int) {
if c.enabled {
atomic.AddInt32(&c.a[n], 1)
}
}
func (c *PerfCounter) IncN(n, m int) {
if c.enabled {
atomic.AddInt32(&c.a[n], int32(m))
}
}
func (c *PerfCounter) String() string {
sv := c.enabled
defer func() { c.enabled = sv }()
c.enabled = false
var a []string
for i, v := range c.a {
if v != 0 {
a = append(a, fmt.Sprintf("%q: %s", c.labels[i], h(v)))
}
}
return fmt.Sprint(a)
}
func h(v interface{}) string {
switch x := v.(type) {
case int:
return humanize.Comma(int64(x))
case int32:
return humanize.Comma(int64(x))
case int64:
return humanize.Comma(x)
case uint32:
return humanize.Comma(int64(x))
case uint64:
if x <= math.MaxInt64 {
return humanize.Comma(int64(x))
}
return "-" + humanize.Comma(-int64(x))
}
return fmt.Sprint(v)
}
type StackCapture struct {
sync.Mutex
m map[string]int
depth int
enabled bool
}
func NewStackCapture(depth int) *StackCapture {
return &StackCapture{
m: map[string]int{},
depth: depth,
enabled: true,
}
}
func (c *StackCapture) Disable() { c.enabled = false }
func (c *StackCapture) Enable() { c.enabled = true }
func (c *StackCapture) Clear() {
c.Lock()
defer c.Unlock()
c.m = map[string]int{}
}
var (
stackCapturePrefix = []byte("\n\t")
)
func (c *StackCapture) Record() {
if !c.enabled {
return
}
b := debug.Stack()
var s strings.Builder
out:
for i := 0; len(b) > 0 && i < c.depth+2; i++ {
l := bytes.Index(b, stackCapturePrefix)
if l < 0 {
break out
}
b = b[l+len(stackCapturePrefix):]
h := bytes.IndexByte(b, '\n')
if h < 0 {
h = len(b)
}
if i > 1 {
fmt.Fprintf(&s, "\n\t%s", b[:h])
}
b = b[h:]
}
c.Lock()
defer c.Unlock()
c.m[s.String()]++
}
func (c *StackCapture) String() string {
c.Lock()
defer c.Unlock()
var b strings.Builder
var a []string
for k := range c.m {
a = append(a, k)
}
sort.Slice(a, func(i, j int) bool { return c.m[a[i]] < c.m[a[j]] })
for _, k := range a {
fmt.Fprintf(&b, "%d%s\n", c.m[k], k)
}
return b.String()
}
| 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/scanf.go | vendor/modernc.org/libc/scanf.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 (
"io"
"strconv"
"strings"
"unsafe"
)
// The format string consists of a sequence of directives which describe how to
// process the sequence of input characters. If processing of a directive
// fails, no further input is read, and scanf() returns. A "failure" can
// be either of the following: input failure, meaning that input characters
// were unavailable, or matching failure, meaning that the input was
// inappropriate.
func scanf(r io.ByteScanner, format, args uintptr) (nvalues int32) {
// var src []byte //TODO-
var ok bool
out:
for {
c := *(*byte)(unsafe.Pointer(format))
// src = append(src, c) //TODO-
switch c {
case '%':
var n int
var match bool
format, n, match = scanfConversion(r, format, &args)
if !match {
break out
}
nvalues += int32(n)
ok = true
case 0:
break out
case ' ', '\t', '\n', '\r', '\v', '\f':
format = skipWhiteSpace(format)
ok = true
next:
for {
c, err := r.ReadByte()
if err != nil {
break out
}
switch c {
case ' ', '\t', '\n', '\r', '\v', '\f':
// nop
default:
r.UnreadByte()
break next
}
}
default:
c2, err := r.ReadByte()
if err != nil {
break out
}
if c2 != c {
r.UnreadByte()
break out
}
format++
ok = true
}
}
if ok {
return nvalues
}
return -1 // stdio.EOF but not defined for windows
}
func scanfConversion(r io.ByteScanner, format uintptr, args *uintptr) (_ uintptr, nvalues int, match bool) {
format++ // '%'
// Each conversion specification in format begins with either the character '%'
// or the character sequence "%n$" (see below for the distinction) followed by:
mod := 0
width := -1
discard := false
flags:
for {
switch c := *(*byte)(unsafe.Pointer(format)); c {
case '*':
// An optional '*' assignment-suppression character: scanf() reads input as
// directed by the conversion specification, but discards the input. No
// corresponding pointer argument is re‐ quired, and this specification is not
// included in the count of successful assignments returned by scanf().
format++
discard = true
case '\'':
// For decimal conversions, an optional quote character ('). This specifies
// that the input number may include thousands' separators as defined by the
// LC_NUMERIC category of the current locale. (See setlocale(3).) The quote
// character may precede or follow the '*' assignment-suppression character.
format++
panic(todo(""))
case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
// An optional decimal integer which specifies the maximum field width.
// Reading of characters stops either when this maximum is reached or when a
// nonmatching character is found, whichever happens first. Most conversions
// discard initial white space characters (the exceptions are noted below), and
// these discarded characters don't count toward the maximum field width.
// String input conversions store a terminating null byte ('\0') to mark the
// end of the input; the maximum field width does not include this terminator.
width = 0
num:
for {
var digit int
switch c := *(*byte)(unsafe.Pointer(format)); {
default:
break num
case c >= '0' && c <= '9':
format++
digit = int(c) - '0'
}
width0 := width
width = 10*width + digit
if width < width0 {
panic(todo(""))
}
}
case 'h', 'j', 'l', 'L', 'q', 't', 'z':
format, mod = parseLengthModifier(format)
default:
break flags
}
}
// A conversion specifier that specifies the type of input conversion to be
// performed.
switch c := *(*byte)(unsafe.Pointer(format)); c {
case '%':
// Matches a literal '%'. That is, %% in the format string matches a single
// input '%' character. No conversion is done (but initial white space
// characters are discarded), and assign‐ ment does not occur.
format++
skipReaderWhiteSpace(r)
c, err := r.ReadByte()
if err != nil {
return format, -1, false
}
if c == '%' {
return format, 1, true
}
r.UnreadByte()
return format, 0, false
case 'd':
// Matches an optionally signed decimal integer; the next pointer must be a
// pointer to int.
format++
skipReaderWhiteSpace(r)
var digit, n uint64
allowSign := true
neg := false
dec:
for ; width != 0; width-- {
c, err := r.ReadByte()
if err != nil {
if match {
break dec
}
return 0, 0, false
}
if allowSign {
switch c {
case '-':
allowSign = false
neg = true
continue
case '+':
allowSign = false
continue
}
}
switch {
case c >= '0' && c <= '9':
digit = uint64(c) - '0'
default:
r.UnreadByte()
break dec
}
match = true
n0 := n
n = n*10 + digit
if n < n0 {
panic(todo(""))
}
}
if !match {
break
}
if !discard {
arg := VaUintptr(args)
v := int64(n)
if neg {
v = -v
}
switch mod {
case modNone:
*(*int32)(unsafe.Pointer(arg)) = int32(v)
case modH:
*(*int16)(unsafe.Pointer(arg)) = int16(v)
case modHH:
*(*int8)(unsafe.Pointer(arg)) = int8(v)
case modL:
*(*long)(unsafe.Pointer(arg)) = long(v)
case modLL:
*(*int64)(unsafe.Pointer(arg)) = int64(v)
default:
panic(todo("", mod))
}
}
nvalues = 1
case 'D':
// Equivalent to ld; this exists only for backward compatibility. (Note:
// thus only in libc4. In libc5 and glibc the %D is silently ignored, causing
// old programs to fail mysteriously.)
format++
panic(todo(""))
case 'i':
// Matches an optionally signed integer; the next pointer must be a pointer to
// int. The integer is read in base 16 if it begins with 0x or 0X, in base 8
// if it begins with 0, and in base 10 otherwise. Only characters that
// correspond to the base are used.
format++
panic(todo(""))
case 'o':
// Matches an unsigned octal integer; the next pointer must be a pointer to
// unsigned int.
format++
panic(todo(""))
case 'u':
// Matches an unsigned decimal integer; the next pointer must be a pointer to
// unsigned int.
format++
panic(todo(""))
case 'x', 'X':
// Matches an unsigned hexadecimal integer; the next pointer must be a pointer
// to unsigned int.
format++
skipReaderWhiteSpace(r)
var digit, n uint64
allowPrefix := true
var b []byte
hex:
for ; width != 0; width-- {
c, err := r.ReadByte()
if err != nil {
if match || err == io.EOF {
break hex
}
panic(todo("", err))
}
if allowPrefix {
if len(b) == 1 && b[0] == '0' && (c == 'x' || c == 'X') {
allowPrefix = false
match = false
b = nil
continue
}
b = append(b, c)
}
switch {
case c >= '0' && c <= '9':
digit = uint64(c) - '0'
case c >= 'a' && c <= 'f':
digit = uint64(c) - 'a' + 10
case c >= 'A' && c <= 'F':
digit = uint64(c) - 'A' + 10
default:
r.UnreadByte()
break hex
}
match = true
n0 := n
n = n<<4 + digit
if n < n0 {
panic(todo(""))
}
}
if !match {
break
}
if !discard {
arg := VaUintptr(args)
switch mod {
case modNone:
*(*uint32)(unsafe.Pointer(arg)) = uint32(n)
case modH:
*(*uint16)(unsafe.Pointer(arg)) = uint16(n)
case modHH:
*(*byte)(unsafe.Pointer(arg)) = byte(n)
case modL:
*(*ulong)(unsafe.Pointer(arg)) = ulong(n)
default:
panic(todo(""))
}
}
nvalues = 1
case 'f', 'e', 'g', 'E', 'a':
// Matches an optionally signed floating-point number; the next pointer must be
// a pointer to float.
format++
skipReaderWhiteSpace(r)
seq := fpLiteral(r)
if len(seq) == 0 {
return 0, 0, false
}
var neg bool
switch seq[0] {
case '+':
seq = seq[1:]
case '-':
neg = true
seq = seq[1:]
}
n, err := strconv.ParseFloat(string(seq), 64)
if err != nil {
panic(todo("", err))
}
if !discard {
arg := VaUintptr(args)
if neg {
n = -n
}
switch mod {
case modNone:
*(*float32)(unsafe.Pointer(arg)) = float32(n)
case modL:
*(*float64)(unsafe.Pointer(arg)) = n
default:
panic(todo("", mod, neg, n))
}
}
return format, 1, true
case 's':
// Matches a sequence of non-white-space characters; the next pointer must be
// a pointer to the initial element of a character array that is long enough to
// hold the input sequence and the terminating null byte ('\0'), which is added
// automatically. The input string stops at white space or at the maximum
// field width, whichever occurs first.
var c byte
var err error
var arg uintptr
if !discard {
arg = VaUintptr(args)
}
scans:
for ; width != 0; width-- {
if c, err = r.ReadByte(); err != nil {
if err != io.EOF {
nvalues = -1
}
break scans
}
switch c {
case ' ', '\t', '\n', '\r', '\v', '\f':
break scans
}
nvalues = 1
match = true
if !discard {
*(*byte)(unsafe.Pointer(arg)) = c
arg++
}
}
if match {
switch {
case width == 0:
r.UnreadByte()
fallthrough
default:
if !discard {
*(*byte)(unsafe.Pointer(arg)) = 0
}
}
}
case 'c':
// Matches a sequence of characters whose length is specified by the maximum
// field width (default 1); the next pointer must be a pointer to char, and
// there must be enough room for all the characters (no terminating null byte
// is added). The usual skip of leading white space is suppressed. To skip
// white space first, use an explicit space in the format.
format++
panic(todo(""))
case '[':
// Matches a nonempty sequence of characters from the specified set of
// accepted characters; the next pointer must be a pointer to char, and there
// must be enough room for all the char‐ acters in the string, plus a
// terminating null byte. The usual skip of leading white space is suppressed.
// The string is to be made up of characters in (or not in) a particular set;
// the set is defined by the characters between the open bracket [ character
// and a close bracket ] character. The set excludes those characters if the
// first character after the open bracket is a circumflex (^). To include a
// close bracket in the set, make it the first character after the open bracket
// or the circumflex; any other position will end the set. The hyphen
// character - is also special; when placed between two other characters, it
// adds all intervening characters to the set. To include a hyphen, make it
// the last character before the final close bracket. For instance, [^]0-9-]
// means the set "everything except close bracket, zero through nine, and
// hyphen". The string ends with the appearance of a character not in the
// (or, with a circumflex, in) set or when the field width runs out.
format++
var re0 []byte
bracket:
for i := 0; ; i++ {
c := *(*byte)(unsafe.Pointer(format))
format++
if c == ']' && i != 0 {
break bracket
}
re0 = append(re0, c)
}
set := map[byte]struct{}{}
re := string(re0)
neg := strings.HasPrefix(re, "^")
if neg {
re = re[1:]
}
for len(re) != 0 {
switch {
case len(re) >= 3 && re[1] == '-':
for c := re[0]; c <= re[2]; c++ {
set[c] = struct{}{}
}
re = re[3:]
default:
set[c] = struct{}{}
re = re[1:]
}
}
var arg uintptr
if !discard {
arg = VaUintptr(args)
}
for ; width != 0; width-- {
c, err := r.ReadByte()
if err != nil {
if err == io.EOF {
return format, nvalues, match
}
return format, -1, match
}
if _, ok := set[c]; ok == !neg {
match = true
nvalues = 1
if !discard {
*(*byte)(unsafe.Pointer(arg)) = c
arg++
}
}
}
if match {
switch {
case width == 0:
r.UnreadByte()
fallthrough
default:
if !discard {
*(*byte)(unsafe.Pointer(arg)) = 0
}
}
}
case 'p':
// Matches a pointer value (as printed by %p in printf(3); the next pointer
// must be a pointer to a pointer to void.
format++
skipReaderWhiteSpace(r)
c, err := r.ReadByte()
if err != nil {
panic(todo("", err))
}
if c == '0' {
if c, err = r.ReadByte(); err != nil {
panic(todo("", err))
}
if c != 'x' && c != 'X' {
r.UnreadByte()
}
}
var digit, n uint64
ptr:
for ; width != 0; width-- {
c, err := r.ReadByte()
if err != nil {
if match {
break ptr
}
panic(todo(""))
}
switch {
case c >= '0' && c <= '9':
digit = uint64(c) - '0'
case c >= 'a' && c <= 'f':
digit = uint64(c) - 'a' + 10
case c >= 'A' && c <= 'F':
digit = uint64(c) - 'A' + 10
default:
r.UnreadByte()
break ptr
}
match = true
n0 := n
n = n<<4 + digit
if n < n0 {
panic(todo(""))
}
}
if !match {
break
}
if !discard {
arg := VaUintptr(args)
*(*uintptr)(unsafe.Pointer(arg)) = uintptr(n)
}
nvalues = 1
case 'n':
// Nothing is expected; instead, the number of characters consumed thus far
// from the input is stored through the next pointer, which must be a pointer
// to int. This is not a conversion and does not increase the count returned
// by the function. The assignment can be suppressed with the *
// assignment-suppression character, but the effect on the return value is
// undefined. Therefore %*n conversions should not be used.
format++
panic(todo(""))
default:
panic(todo("%#U", c))
}
return format, nvalues, match
}
func skipReaderWhiteSpace(r io.ByteScanner) error {
for {
c, err := r.ReadByte()
if err != nil {
return err
}
switch c {
case ' ', '\t', '\n', '\r', '\v', '\f':
// ok
default:
r.UnreadByte()
return nil
}
}
}
func skipWhiteSpace(s uintptr) uintptr {
for {
switch c := *(*byte)(unsafe.Pointer(s)); c {
case ' ', '\t', '\n', '\r', '\v', '\f':
s++
default:
return s
}
}
}
// [-+]?([0-9]*[.])?[0-9]+([eE][-+]?\d+)?
func fpLiteral(rd io.ByteScanner) (seq []byte) {
const endOfText = 0x110000
var pos, width, length int
defer func() {
if len(seq) > length {
rd.UnreadByte()
seq = seq[:len(seq)-1]
}
}()
var r rune
step := func(pos int) (rune, int) {
b, err := rd.ReadByte()
if err != nil {
return endOfText, 0
}
seq = append(seq, b)
return rune(b), 1
}
move := func() {
pos += width
if r != endOfText {
r, width = step(pos + width)
}
}
accept := func(x rune) bool {
if r == x {
move()
return true
}
return false
}
accept2 := func(x rune) bool {
if r <= x {
move()
return true
}
return false
}
r = endOfText
width = 0
r, width = step(pos)
if accept('.') {
goto l7
}
if accept('+') {
goto l30
}
if accept('-') {
goto l30
}
if r < '0' {
goto l4out
}
if accept2('9') {
goto l35
}
l4out:
return seq
l7:
if r < '0' {
goto l7out
}
if accept2('9') {
goto l10
}
l7out:
return seq
l10:
length = pos
if accept('E') {
goto l18
}
if accept('e') {
goto l18
}
if r < '0' {
goto l15out
}
if accept2('9') {
goto l10
}
l15out:
return seq
l18:
if accept('+') {
goto l23
}
if accept('-') {
goto l23
}
if r < '0' {
goto l20out
}
if accept2('9') {
goto l26
}
l20out:
return seq
l23:
if r < '0' {
goto l23out
}
if accept2('9') {
goto l26
}
l23out:
return seq
l26:
length = pos
if r < '0' {
goto l27out
}
if accept2('9') {
goto l26
}
l27out:
return seq
l30:
if accept('.') {
goto l7
}
if r < '0' {
goto l32out
}
if accept2('9') {
goto l35
}
l32out:
return seq
l35:
length = pos
if accept('.') {
goto l7
}
if accept('E') {
goto l18
}
if accept('e') {
goto l18
}
if r < '0' {
goto l42out
}
if accept2('9') {
goto l35
}
l42out:
return seq
}
| 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_all.go | vendor/modernc.org/libc/libc_all.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 is a partial reimplementation of C libc in pure Go.
package libc // import "modernc.org/libc"
import (
"math"
"sync/atomic"
"unsafe"
"golang.org/x/exp/constraints"
)
func X__sync_add_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
switch unsafe.Sizeof(v) {
case 4:
return T(atomic.AddInt32((*int32)(unsafe.Pointer(p)), int32(v)))
case 8:
return T(atomic.AddInt64((*int64)(unsafe.Pointer(p)), int64(v)))
default:
panic(todo(""))
}
}
func X__sync_sub_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
switch unsafe.Sizeof(v) {
case 4:
return T(atomic.AddInt32((*int32)(unsafe.Pointer(p)), -int32(v)))
case 8:
return T(atomic.AddInt64((*int64)(unsafe.Pointer(p)), -int64(v)))
default:
panic(todo(""))
}
}
// GoString returns the value of a C string at s.
func GoString(s uintptr) string {
if s == 0 {
return ""
}
p := s
for *(*byte)(unsafe.Pointer(p)) != 0 {
p++
}
return string(unsafe.Slice((*byte)(unsafe.Pointer(s)), p-s))
}
// GoBytes returns a byte slice from a C char* having length len bytes.
func GoBytes(s uintptr, len int) []byte {
return unsafe.Slice((*byte)(unsafe.Pointer(s)), len)
}
func X__isfinitef(tls *TLS, f float32) int32 {
d := float64(f)
if !math.IsInf(d, 0) && !math.IsNaN(d) {
return 1
}
return 0
}
func X__isfinite(tls *TLS, d float64) int32 {
if !math.IsInf(d, 0) && !math.IsNaN(d) {
return 1
}
return 0
}
func X__isfinitel(tls *TLS, d float64) int32 {
if !math.IsInf(d, 0) && !math.IsNaN(d) {
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/musl_windows_arm64.go | vendor/modernc.org/libc/musl_windows_arm64.go | // Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_arm64.go -pkgname libc -static-locals-prefix _s -Iarch\aarch64 -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:351:9 */
type locale_t = uintptr /* alltypes.h:351: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:73:15 */
type intptr_t = int32 /* alltypes.h:78:15 */
type off_t = int32 /* 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 wint_t = uint32 /* alltypes.h:21:18 */
type wctype_t = uint32 /* alltypes.h:211:23 */
type __mbstate_t = struct {
__opaque1 uint32
__opaque2 uint32
} /* alltypes.h:345:9 */
type mbstate_t = __mbstate_t /* alltypes.h:345: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: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 = int32 /* alltypes.h:119:25 */
type intmax_t = int32 /* 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 = uint32 /* alltypes.h:144:25 */
type uintmax_t = uint32 /* 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 */
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:351: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:93:16 */
type clockid_t = int32 /* alltypes.h:222:13 */
type timespec = struct {
tv_sec time_t
tv_nsec int32
} /* alltypes.h:237: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:281:9 */
type pthread_t = uintptr /* alltypes.h:281:26 */
type pthread_once_t = int32 /* alltypes.h:287:13 */
type pthread_key_t = uint32 /* alltypes.h:292:18 */
type pthread_spinlock_t = int32 /* alltypes.h:297:13 */
type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:302:37 */
type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:307:37 */
type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:312:37 */
type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:317:40 */
type __sigset_t = struct{ __bits [32]uint32 } /* alltypes.h:357:9 */
type sigset_t = __sigset_t /* alltypes.h:357:71 */
type pthread_attr_t = struct{ __u struct{ __i [9]int32 } } /* alltypes.h:380:147 */
type pthread_mutex_t = struct {
__u struct {
_ [0]uint64
__i [6]int32
_ [24]byte
}
} /* alltypes.h:385:157 */
type pthread_cond_t = struct {
__u struct {
_ [0]uint64
__i [12]int32
}
} /* alltypes.h:395:112 */
type pthread_rwlock_t = struct {
__u struct {
_ [0]uint64
__i [8]int32
_ [32]byte
}
} /* alltypes.h:405:139 */
type pthread_barrier_t = struct {
__u struct {
_ [0]uint64
__i [5]int32
_ [20]byte
}
} /* alltypes.h:410: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:217:14 */
type clock_t = int32 /* alltypes.h:227: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:281: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 = uint32 /* signal.h:10:23 */
type gregset_t = [34]uint32 /* signal.h:11:23 */
type fpregset_t = struct {
vregs [32]float64
fpsr uint32
fpcr uint32
} /* signal.h:17:3 */
type sigcontext = struct {
fault_address uint32
regs [31]uint32
sp uint32
pc uint32
pstate uint32
_ [4]byte
__reserved [256]float64
} /* signal.h:18:9 */
type mcontext_t = sigcontext /* signal.h:23:3 */
type _aarch64_ctx = struct {
magic uint32
size uint32
} /* signal.h:29:1 */
type fpsimd_context = struct {
head struct {
magic uint32
size uint32
}
fpsr uint32
fpcr uint32
vregs [32]float64
} /* signal.h:33:1 */
type esr_context = struct {
head struct {
magic uint32
size uint32
}
esr uint32
} /* signal.h:39:1 */
type extra_context = struct {
head struct {
magic uint32
size uint32
}
datap uint32
size uint32
__reserved [3]uint32
} /* signal.h:43:1 */
type sve_context = struct {
head struct {
magic uint32
size uint32
}
vl uint16
__reserved [3]uint16
} /* signal.h:49:1 */
type __ucontext = struct {
uc_flags uint32
_ [4]byte
uc_link uintptr
uc_stack stack_t
uc_sigmask sigset_t
uc_mcontext mcontext_t
} /* signal.h:99:9 */
type ucontext_t = __ucontext /* signal.h:105: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:160:18 */
type syscall_arg_t = int32 /* syscall.h:22:14 */
func a_ll(tls *TLS, p uintptr) int32 { /* atomic_arch.h:2:19: */
var v int32
panic(`arch\aarch64\atomic_arch.h:5:2: assembler statements not supported`)
return v
}
func a_sc(tls *TLS, p uintptr, v int32) int32 { /* atomic_arch.h:10:19: */
var r int32
panic(`arch\aarch64\atomic_arch.h:13:2: assembler statements not supported`)
return BoolInt32(!(r != 0))
}
func a_barrier(tls *TLS) { /* atomic_arch.h:18:20: */
panic(`arch\aarch64\atomic_arch.h:20:2: assembler statements not supported`)
}
func a_ll_p(tls *TLS, p uintptr) uintptr { /* atomic_arch.h:38:20: */
var v uintptr
panic(`arch\aarch64\atomic_arch.h:41:2: assembler statements not supported`)
return v
}
func a_sc_p(tls *TLS, p uintptr, v uintptr) int32 { /* atomic_arch.h:46:19: */
var r int32
panic(`arch\aarch64\atomic_arch.h:49:2: assembler statements not supported`)
return BoolInt32(!(r != 0))
}
func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:68:19: */
panic(`arch\aarch64\atomic_arch.h:70:2: assembler statements not supported`)
return int32(x)
}
func a_fetch_add(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:46:19: */
var old int32
for __ccgo := true; __ccgo; __ccgo = !(a_sc(tls, p, int32(uint32(old)+uint32(v))) != 0) {
old = a_ll(tls, p)
}
return old
}
func a_fetch_and(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:59:19: */
var old int32
for __ccgo := true; __ccgo; __ccgo = !(a_sc(tls, p, old&v) != 0) {
old = a_ll(tls, p)
}
return old
}
func a_fetch_or(tls *TLS, p uintptr, v int32) int32 { /* atomic.h:72:19: */
var old int32
for __ccgo := true; __ccgo; __ccgo = !(a_sc(tls, p, old|v) != 0) {
old = a_ll(tls, p)
}
return old
}
func a_and(tls *TLS, p uintptr, v int32) { /* atomic.h:151:20: */
a_fetch_and(tls, p, v)
}
func a_or(tls *TLS, p uintptr, v int32) { /* atomic.h:159:20: */
a_fetch_or(tls, p, v)
}
func a_or_64(tls *TLS, p uintptr, v uint64_t) { /* atomic.h:220:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*struct {
v uint64_t
_ [4]byte
})(unsafe.Pointer(bp)) = func() (r struct {
v uint64_t
_ [4]byte
}) {
*(*uint64_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = v
return r
}()
if *(*uint32_t)(unsafe.Pointer(bp)) != 0 {
a_or(tls, p, int32(*(*uint32_t)(unsafe.Pointer(bp))))
}
if *(*uint32_t)(unsafe.Pointer(bp + 1*4)) != 0 {
a_or(tls, p+uintptr(1)*4, int32(*(*uint32_t)(unsafe.Pointer(bp + 1*4))))
}
}
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\aarch64\pthread_arch.h:4:2: assembler statements not supported`)
return self - uintptr(uint64(unsafe.Sizeof(__pthread{})))
}
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
| 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/ccgo_linux_ppc64le.go | vendor/modernc.org/libc/ccgo_linux_ppc64le.go | // Code generated for linux/ppc64le by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -mlong-double-64 -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/powerpc64 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -mlong-double-64 -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/powerpc64/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname | 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/libc32.go | vendor/modernc.org/libc/libc32.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 && (arm || 386)
package libc // import "modernc.org/libc"
import (
"unsafe"
"modernc.org/libc/limits"
"modernc.org/libc/sys/types"
)
const (
heapSize = 1 << 30 // Adjust for your debugging session requirements and system RAM size.
)
type (
// RawMem represents the biggest byte array the runtime can handle
RawMem [1<<31 - 1]byte
// 32-5*4 = 12 bytes left to pad
stackHeaderPadding struct {
a uintptr
b uintptr
c uintptr
}
)
type bits []int
func newBits(n int) (r bits) { return make(bits, (n+31)>>5) }
func (b bits) has(n int) bool { return b != nil && b[n>>5]&(1<<uint(n&31)) != 0 }
func (b bits) set(n int) { b[n>>5] |= 1 << uint(n&31) }
func Xstrchrnul(tls *TLS, s uintptr, c int32) (r uintptr) {
return x___strchrnul(tls, s, c)
}
func x___strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) {
var k types.Size_t
var w uintptr
_, _ = k, w
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
}
for {
if !(uint32(s)%Uint32FromInt64(4) != 0) {
break
}
if !(*(*int8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c {
return s
}
goto _1
_1:
s++
}
k = uint32(-Int32FromInt32(1)) / Uint32FromInt32(limits.UCHAR_MAX) * uint32(c)
w = s
for {
if !(!((*(*uint32)(unsafe.Pointer(w))-uint32(-Int32FromInt32(1))/Uint32FromInt32(limits.UCHAR_MAX)) & ^*(*uint32)(unsafe.Pointer(w)) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(limits.UCHAR_MAX)*uint32(Int32FromInt32(limits.UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint32)(unsafe.Pointer(w))^k-uint32(-Int32FromInt32(1))/Uint32FromInt32(limits.UCHAR_MAX)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (uint32(-Int32FromInt32(1))/Uint32FromInt32(limits.UCHAR_MAX)*uint32(Int32FromInt32(limits.UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) {
break
}
goto _2
_2:
w += 4
}
s = w
for {
if !(*(*int8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) {
break
}
goto _3
_3:
s++
}
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/syscall_musl.go | vendor/modernc.org/libc/syscall_musl.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 (
"golang.org/x/sys/unix"
"runtime"
)
func ___syscall_cp(tls *TLS, n, a, b, c, d, e, f long) long {
r1, _, err := (unix.Syscall6(uintptr(n), uintptr(a), uintptr(b), uintptr(c), uintptr(d), uintptr(e), uintptr(f)))
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall0(tls *TLS, n long) long {
switch n {
case __NR_sched_yield:
runtime.Gosched()
return 0
default:
r1, _, err := unix.Syscall(uintptr(n), 0, 0, 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
}
func X__syscall1(tls *TLS, n, a1 long) long {
r1, _, err := unix.Syscall(uintptr(n), uintptr(a1), 0, 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall2(tls *TLS, n, a1, a2 long) long {
r1, _, err := unix.Syscall(uintptr(n), uintptr(a1), uintptr(a2), 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall3(tls *TLS, n, a1, a2, a3 long) long {
r1, _, err := unix.Syscall(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3))
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall4(tls *TLS, n, a1, a2, a3, a4 long) long {
r1, _, err := unix.Syscall6(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), 0, 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall5(tls *TLS, n, a1, a2, a3, a4, a5 long) long {
r1, _, err := unix.Syscall6(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), uintptr(a5), 0)
if err != 0 {
return long(-err)
}
return long(r1)
}
func X__syscall6(tls *TLS, n, a1, a2, a3, a4, a5, a6 long) long {
r1, _, err := unix.Syscall6(uintptr(n), uintptr(a1), uintptr(a2), uintptr(a3), uintptr(a4), uintptr(a5), uintptr(a6))
if err != 0 {
return long(-err)
}
return long(r1)
}
| 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_amd64.go | vendor/modernc.org/libc/musl_freebsd_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_freebsd_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 ../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 = int64 /* <builtin>:3:26 */
type size_t = uint64 /* <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__ccgo_pad1 [4]byte
F__types uintptr
} /* table.cpp.c:290:3 */
type _RuneRange = struct {
F__nranges int32
F__ccgo_pad1 [4]byte
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__ccgo_pad1 [4]byte
F__runetype [256]uint64
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
F__ccgo_pad2 [4]byte
} /* 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 *);
| 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_arm.go | vendor/modernc.org/libc/libc_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.
//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/aliases.go | vendor/modernc.org/libc/aliases.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"
func X__vm_wait(tls *TLS) {}
// static volatile int *const dummy_lockptr = 0;
//
// weak_alias(dummy_lockptr, __atexit_lockptr);
// weak_alias(dummy_lockptr, __bump_lockptr);
// weak_alias(dummy_lockptr, __sem_open_lockptr);
var X__atexit_lockptr int32
var X__bump_lockptr int32
var X__sem_open_lockptr int32
// static int dummy(int fd)
//
// {
// return fd;
// }
//
// weak_alias(dummy, __aio_close);
func X__aio_close(tls *TLS, fd int32) int32 {
return fd
}
func Xtzset(tls *TLS) {
___tzset(tls)
}
type DIR = TDIR
const DT_DETACHED = _DT_DETACHED
const DT_EXITING = _DT_EXITING
const DT_JOINABLE = _DT_JOINABLE
type FILE = TFILE
type HEADER = THEADER
func Xfcntl64(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) {
return Xfcntl(tls, fd, cmd, va)
}
func Xfopen64(tls *TLS, filename uintptr, mode uintptr) (r uintptr) {
return Xfopen(tls, filename, mode)
}
func Xfstat64(tls *TLS, fd int32, st uintptr) (r int32) {
return Xfstat(tls, fd, st)
}
func Xftruncate64(tls *TLS, fd int32, length Toff_t) (r int32) {
return Xftruncate(tls, fd, length)
}
func Xgetrlimit64(tls *TLS, resource int32, rlim uintptr) (r int32) {
return Xgetrlimit(tls, resource, rlim)
}
func Xlseek64(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) {
return Xlseek(tls, fd, offset, whence)
}
func Xlstat64(tls *TLS, path uintptr, buf uintptr) (r int32) {
return Xlstat(tls, path, buf)
}
func Xmkstemp64(tls *TLS, template uintptr) (r int32) {
return Xmkstemp(tls, template)
}
func Xmkstemps64(tls *TLS, template uintptr, len1 int32) (r int32) {
return Xmkstemps(tls, template, len1)
}
func Xmmap64(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) {
return Xmmap(tls, start, len1, prot, flags, fd, off)
}
func Xopen64(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) {
return Xopen(tls, filename, flags, va)
}
func Xreaddir64(tls *TLS, dir uintptr) (r uintptr) {
return Xreaddir(tls, dir)
}
func Xsetrlimit64(tls *TLS, resource int32, rlim uintptr) (r int32) {
return Xsetrlimit(tls, resource, rlim)
}
func Xstat64(tls *TLS, path uintptr, buf uintptr) (r int32) {
return Xstat(tls, path, buf)
}
func Xpthread_setcancelstate(tls *TLS, new int32, old uintptr) int32 {
return _pthread_setcancelstate(tls, new, old)
}
func Xpthread_sigmask(tls *TLS, now int32, set, old uintptr) int32 {
return _pthread_sigmask(tls, now, set, old)
}
| 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_windows_amd64.go | vendor/modernc.org/libc/capi_windows_amd64.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": {},
"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": {},
"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": {},
"__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": {},
"_fstat64": {},
"_fstati64": {},
"_ftime": {},
"_ftime64": {},
"_gmtime64": {},
"_imp___environ": {},
"_iob": {},
"_isatty": {},
"_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/mem.go | vendor/modernc.org/libc/mem.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))
package libc // import "modernc.org/libc"
import (
"modernc.org/libc/errno"
"modernc.org/libc/sys/types"
"modernc.org/memory"
)
const memgrind = false
var (
allocator memory.Allocator
)
// void *malloc(size_t size);
func Xmalloc(t *TLS, n types.Size_t) uintptr {
if __ccgo_strace {
trc("t=%v n=%v, (%v:)", t, n, origin(2))
}
if n == 0 {
// malloc(0) should return unique pointers
// (often expected and gnulib replaces malloc if malloc(0) returns 0)
n = 1
}
allocMu.Lock()
defer allocMu.Unlock()
p, err := allocator.UintptrMalloc(int(n))
if err != nil {
t.setErrno(errno.ENOMEM)
return 0
}
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 err != nil {
t.setErrno(errno.ENOMEM)
return 0
}
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()
p, err := allocator.UintptrRealloc(ptr, int(size))
if err != nil {
t.setErrno(errno.ENOMEM)
return 0
}
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
}
allocMu.Lock()
defer allocMu.Unlock()
allocator.UintptrFree(p)
}
func Xmalloc_usable_size(tls *TLS, p uintptr) (r types.Size_t) {
if __ccgo_strace {
trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
defer func() { trc("-> %v", r) }()
}
if p == 0 {
return 0
}
allocMu.Lock()
defer allocMu.Unlock()
return types.Size_t(memory.UintptrUsableSize(p))
}
func UsableSize(p uintptr) types.Size_t {
allocMu.Lock()
defer allocMu.Unlock()
return types.Size_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 {
allocMu.Lock()
defer allocMu.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/libc_openbsd.go | vendor/modernc.org/libc/libc_openbsd.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"
"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/utime"
"modernc.org/libc/uuid"
)
var (
startTime = gotime.Now() // For clock(3)
in6_addr_any in.In6_addr
)
type Tsize_t = types.Size_t
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_ uintptr
var X_toupper_tab_ uintptr
func init() {
// fake a TLS since this comes before NewTLS() or Start()
t := &TLS{errnop: uintptr(unsafe.Pointer(&errno0))}
X_tolower_tab_ = Xmalloc(t, 2*65537)
if X_tolower_tab_ == 0 {
panic("unable to allocate tolower table")
}
X_toupper_tab_ = Xmalloc(t, 2*65537)
if X_tolower_tab_ == 0 {
panic("unable to allocate toupper table")
}
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 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))
}
ru := unix.Rusage{}
if err := unix.Getrusage(int(who), &ru); err != nil {
t.setErrno(err)
return -1
}
*(*unix.Rusage)(unsafe.Pointer(usage)) = ru
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.Chdir(GoString(path)); 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_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=%s flags=%v args=%v, (%v:)", t, GoString(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=%s flags=%v args=%v, (%v:)", t, GoString(pathname), flags, args, origin(2))
}
var mode types.Mode_t
if args != 0 {
mode = (types.Mode_t)(VaUint32(&args))
}
fd, err := unix.Open(GoString(pathname), int(flags), mode)
if err != nil {
if __ccgo_strace {
trc("%s: %s", err.Error(), GoString(pathname))
}
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, fd)
}
if __ccgo_strace {
trc("%s fd=%d", GoString(pathname), fd)
}
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))
}
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.Fsync(int(fd)); 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))
}
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.Close(int(fd)); 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))
}
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: fd %d length %#0x: 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))
}
var n int
var err error
switch {
case count == 0:
n, err = unix.Read(int(fd), nil)
default:
n, err = unix.Read(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count])
if dmesgs && err == nil {
dmesg("%v: fd %v, count %#x, n %#x\n%s", origin(1), fd, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n]))
}
}
if err != nil {
if dmesgs {
dmesg("%v: fd %v, %v FAIL", origin(1), fd, err)
}
t.setErrno(err)
return -1
}
if dmesgs {
dmesg("%v: ok", origin(1))
}
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))
}
var n int
var err error
switch {
case count == 0:
n, err = unix.Write(int(fd), nil)
default:
n, err = unix.Write(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count])
if dmesgs {
dmesg("%v: fd %v, count %#x\n%s", origin(1), fd, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
}
}
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)
}
// 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.Fchmod(int(fd), uint32(mode)); err != nil {
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.Fchown(int(fd), int(owner), int(group)); err != nil {
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.Geteuid()
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))
}
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
if err := unix.Munmap(b); err != nil {
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 {
panic(todo("", "will fail on OpenBSD 7.5"))
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)
panic(todo("", "will fail on OpenBSD 7.5"))
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)
panic(todo("", "will fail on OpenBSD 7.5"))
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))
}
sn, err := unix.Getsockname(int(sockfd))
if err != nil {
if dmesgs {
dmesg("%v: fd %v: %v", origin(1), sockfd, err)
}
t.setErrno(err)
return -1
}
*(*unix.Sockaddr)(unsafe.Pointer(addr)) = sn
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))
}
return types.Mode_t(unix.Umask(int(mask)))
}
// 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.Exec(GoString(file), getVaList(argv), GetEnviron()); err != nil {
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.Wait4(int(pid), (*unix.WaitStatus)(unsafe.Pointer(wstatus)), int(optname), nil)
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.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))
}
p := make([]byte, len)
n, _, err := unix.Recvfrom(int(sockfd), p, int(flags))
if err != nil {
t.setErrno(err)
return -1
}
copy((*RawMem)(unsafe.Pointer(buf))[:n:n], p[:])
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))
}
p := unsafe.Slice((*byte)(unsafe.Pointer(buf)), len)
if err := unix.Send(int(sockfd), p, int(flags)); err != nil {
t.setErrno(err)
return -1
}
return types.Ssize_t(len)
}
// 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.Shutdown(int(sockfd), int(how)); err != nil {
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))
}
sa, err := unix.Getpeername(int(sockfd))
if err != nil {
t.setErrno(err)
return -1
}
if __ccgo_strace {
trc("sa=%v", sa)
}
panic(todo(""))
// populate addr & addrlen from sa
// , addr, uintptr(addrlen))
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))
}
fd, err := unix.Socket(int(domain), int(type1), int(protocol))
if err != nil {
t.setErrno(err)
return -1
}
return int32(fd)
}
// 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))
}
if err := unix.Bind(int(sockfd), *(*unix.Sockaddr)(unsafe.Pointer(addr))); err != nil {
t.setErrno(err)
return -1
}
return 0
}
// 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.Connect(int(sockfd), *(*unix.Sockaddr)(unsafe.Pointer(addr))); err != nil {
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.Listen(int(sockfd), int(backlog)); err != nil {
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))
}
nfd, sa, err := unix.Accept(int(sockfd))
if err != nil {
t.setErrno(err)
return -1
}
if __ccgo_strace {
trc("sa=%v", sa)
}
panic(todo(""))
// populate addr, addrlen from sa
return int32(nfd)
}
// 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.Setrlimit(int(resource), (*unix.Rlimit)(unsafe.Pointer(rlim))); err != nil {
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);
| 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_linux_loong64.go | vendor/modernc.org/libc/capi_linux_loong64.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_linux_amd64.go | vendor/modernc.org/libc/libc_linux_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.
//go:build !(linux && amd64)
package libc // import "modernc.org/libc"
import (
"os"
"strings"
gotime "time"
"unicode"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
"modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/wctype"
)
var (
startTime = gotime.Now() // For clock(3)
)
// 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))
}
// 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 {
sz := int(unsafe.Sizeof(k_sigaction{}))
kact = t.Alloc(sz)
defer t.Free(sz)
*(*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(signum), 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))
}
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
}
if cmd == fcntl.F_SETFL {
arg |= unix.O_LARGEFILE
}
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))
}
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))
}
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))
}
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))
}
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))
}
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))
}
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))
}
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
// }
t.setErrno(err)
return -1
}
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
// }
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))
}
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))
}
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, _, 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))
}
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.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))
}
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 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.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
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))
}
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))
}
if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
}
// if dmesgs {
// dmesg("%v: %q: ok", origin(1), GoString(pathname))
// }
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.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
// }
t.setErrno(err)
return -1
}
// if dmesgs {
// dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
// }
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))
}
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 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.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -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))
}
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))
}
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 pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
if __ccgo_strace {
trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
}
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))
}
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))
}
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
fd, _, err := unix.Syscall(unix.SYS_OPEN, pathname, uintptr(flags|unix.O_LARGEFILE), 0666)
if err != 0 {
t.setErrno(err)
return 0
}
if p := newFile(t, int32(fd)); p != 0 {
return p
}
Xclose(t, int32(fd))
t.setErrno(errno.ENOMEM)
return 0
}
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
if __ccgo_strace {
trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
}
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
if __ccgo_strace {
trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
}
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
// 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
}
func AtomicLoadPInt8(addr uintptr) (val int8) {
return int8(a_load_8(addr))
}
func AtomicLoadPInt16(addr uintptr) (val int16) {
return int16(a_load_16(addr))
}
func AtomicLoadPUint8(addr uintptr) byte {
return byte(a_load_8(addr))
}
func AtomicLoadPUint16(addr uintptr) uint16 {
return uint16(a_load_16(addr))
}
func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
return byte(a_load_8(ptr))
}
var _table1 = [384]int32{
129: int32(1),
130: int32(2),
131: int32(3),
132: int32(4),
133: int32(5),
134: int32(6),
135: int32(7),
136: int32(8),
137: int32(9),
138: int32(10),
139: int32(11),
140: int32(12),
141: int32(13),
142: int32(14),
143: int32(15),
144: int32(16),
145: int32(17),
146: int32(18),
147: int32(19),
148: int32(20),
149: int32(21),
150: int32(22),
151: int32(23),
152: int32(24),
153: int32(25),
154: int32(26),
155: int32(27),
156: int32(28),
157: int32(29),
158: int32(30),
159: int32(31),
160: int32(32),
161: int32(33),
162: int32(34),
163: int32(35),
164: int32(36),
165: int32(37),
166: int32(38),
167: int32(39),
168: int32(40),
169: int32(41),
170: int32(42),
171: int32(43),
172: int32(44),
173: int32(45),
174: int32(46),
175: int32(47),
176: int32(48),
177: int32(49),
178: int32(50),
179: int32(51),
180: int32(52),
181: int32(53),
182: int32(54),
183: int32(55),
184: int32(56),
185: int32(57),
186: int32(58),
187: int32(59),
188: int32(60),
189: int32(61),
190: int32(62),
191: int32(63),
192: int32(64),
193: int32('a'),
194: int32('b'),
195: int32('c'),
196: int32('d'),
197: int32('e'),
198: int32('f'),
199: int32('g'),
200: int32('h'),
201: int32('i'),
202: int32('j'),
203: int32('k'),
204: int32('l'),
205: int32('m'),
206: int32('n'),
207: int32('o'),
208: int32('p'),
209: int32('q'),
210: int32('r'),
211: int32('s'),
212: int32('t'),
213: int32('u'),
214: int32('v'),
215: int32('w'),
216: int32('x'),
217: int32('y'),
218: int32('z'),
219: int32(91),
220: int32(92),
221: int32(93),
222: int32(94),
223: int32(95),
224: int32(96),
225: int32('a'),
226: int32('b'),
227: int32('c'),
228: int32('d'),
229: int32('e'),
230: int32('f'),
231: int32('g'),
232: int32('h'),
233: int32('i'),
234: int32('j'),
235: int32('k'),
236: int32('l'),
237: int32('m'),
238: int32('n'),
239: int32('o'),
240: int32('p'),
241: int32('q'),
242: int32('r'),
243: int32('s'),
244: int32('t'),
245: int32('u'),
246: int32('v'),
247: int32('w'),
248: int32('x'),
249: int32('y'),
250: int32('z'),
251: int32(123),
252: int32(124),
253: int32(125),
254: int32(126),
255: int32(127),
}
var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
defer func() { trc("-> %v", r) }()
}
return uintptr(unsafe.Pointer(&_ptable1))
}
type Tin6_addr = struct {
F__in6_union struct {
F__s6_addr16 [0][8]uint16
F__s6_addr32 [0][4]uint32
F__s6_addr [16]uint8
}
}
var Xin6addr_any = Tin6_addr{}
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)
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
| 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_netbsd_amd64.go | vendor/modernc.org/libc/musl_netbsd_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_netbsd_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 ../netbsd/ctype_.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/isprint.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 */
type ssize_t = int64 /* ctype_.cpp.c:111:18 */
type __sfpos = struct {
F_pos int64
F_mbstate_in struct {
F__mbstateL int64
F__ccgo_pad1 [120]byte
}
F_mbstate_out struct {
F__mbstateL int64
F__ccgo_pad1 [120]byte
}
} /* ctype_.cpp.c:121:9 */
type fpos_t = __sfpos /* ctype_.cpp.c:124:3 */
type __sbuf = struct {
F_base uintptr
F_size int32
F__ccgo_pad1 [4]byte
} /* ctype_.cpp.c:126:1 */
type __sFILE = struct {
F_p uintptr
F_r int32
F_w int32
F_flags uint16
F_file int16
F__ccgo_pad1 [4]byte
F_bf struct {
F_base uintptr
F_size int32
F__ccgo_pad1 [4]byte
}
F_lbfsize int32
F__ccgo_pad2 [4]byte
F_cookie uintptr
F_close uintptr
F_read uintptr
F_seek uintptr
F_write uintptr
F_ext struct {
F_base uintptr
F_size int32
F__ccgo_pad1 [4]byte
}
F_up uintptr
F_ur int32
F_ubuf [3]uint8
F_nbuf [1]uint8
F_flush uintptr
F_lb_unused [8]int8
F_blksize int32
F__ccgo_pad3 [4]byte
F_offset int64
} /* ctype_.cpp.c:131:9 */
type FILE = __sFILE /* ctype_.cpp.c:165:3 */
type off_t = int64 /* ctype_.cpp.c:365:17 */
type locale_t = uintptr /* ctype_.cpp.c:514:24 */
var X_C_ctype_tab_ = [257]uint16{
0: uint16(0),
1: uint16(0x0002),
2: uint16(0x0002),
3: uint16(0x0002),
4: uint16(0x0002),
5: uint16(0x0002),
6: uint16(0x0002),
7: uint16(0x0002),
8: uint16(0x0002),
9: uint16(0x0002),
10: uint16(0x0200 |
0x0002 |
0x0040),
11: uint16(0x0002 |
0x0040),
12: uint16(0x0002 |
0x0040),
13: uint16(0x0002 |
0x0040),
14: uint16(0x0002 |
0x0040),
15: uint16(0x0002),
16: uint16(0x0002),
17: uint16(0x0002),
18: uint16(0x0002),
19: uint16(0x0002),
20: uint16(0x0002),
21: uint16(0x0002),
22: uint16(0x0002),
23: uint16(0x0002),
24: uint16(0x0002),
25: uint16(0x0002),
26: uint16(0x0002),
27: uint16(0x0002),
28: uint16(0x0002),
29: uint16(0x0002),
30: uint16(0x0002),
31: uint16(0x0002),
32: uint16(0x0002),
33: uint16(0x0200 |
0x0400 |
0x0040),
34: uint16(0x0008 |
0x0400 |
0x0020),
35: uint16(0x0008 |
0x0400 |
0x0020),
36: uint16(0x0008 |
0x0400 |
0x0020),
37: uint16(0x0008 |
0x0400 |
0x0020),
38: uint16(0x0008 |
0x0400 |
0x0020),
39: uint16(0x0008 |
0x0400 |
0x0020),
40: uint16(0x0008 |
0x0400 |
0x0020),
41: uint16(0x0008 |
0x0400 |
0x0020),
42: uint16(0x0008 |
0x0400 |
0x0020),
43: uint16(0x0008 |
0x0400 |
0x0020),
44: uint16(0x0008 |
0x0400 |
0x0020),
45: uint16(0x0008 |
0x0400 |
0x0020),
46: uint16(0x0008 |
0x0400 |
0x0020),
47: uint16(0x0008 |
0x0400 |
0x0020),
48: uint16(0x0008 |
0x0400 |
0x0020),
49: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
50: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
51: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
52: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
53: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
54: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
55: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
56: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
57: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
58: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
59: uint16(0x0008 |
0x0400 |
0x0020),
60: uint16(0x0008 |
0x0400 |
0x0020),
61: uint16(0x0008 |
0x0400 |
0x0020),
62: uint16(0x0008 |
0x0400 |
0x0020),
63: uint16(0x0008 |
0x0400 |
0x0020),
64: uint16(0x0008 |
0x0400 |
0x0020),
65: uint16(0x0008 |
0x0400 |
0x0020),
66: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
67: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
68: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
69: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
70: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
71: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
72: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
73: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
74: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
75: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
76: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
77: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
78: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
79: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
80: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
81: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
82: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
83: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
84: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
85: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
86: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
87: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
88: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
89: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
90: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
91: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
92: uint16(0x0008 |
0x0400 |
0x0020),
93: uint16(0x0008 |
0x0400 |
0x0020),
94: uint16(0x0008 |
0x0400 |
0x0020),
95: uint16(0x0008 |
0x0400 |
0x0020),
96: uint16(0x0008 |
0x0400 |
0x0020),
97: uint16(0x0008 |
0x0400 |
0x0020),
98: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
99: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
100: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
101: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
102: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
103: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
104: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
105: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
106: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
107: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
108: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
109: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
110: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
111: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
112: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
113: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
114: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
115: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
116: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
117: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
118: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
119: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
120: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
121: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
122: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
123: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
124: uint16(0x0008 |
0x0400 |
0x0020),
125: uint16(0x0008 |
0x0400 |
0x0020),
126: uint16(0x0008 |
0x0400 |
0x0020),
127: uint16(0x0008 |
0x0400 |
0x0020),
128: uint16(0x0002),
} /* ctype_.cpp.c:601:22 */
var X_ctype_tab_ uintptr = 0 /* ctype_.cpp.c:2233:22 */
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
}
type locale_t1 = 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_t1) 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_t1) 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_t1) 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 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_t1) 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)
}
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 _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 FILE1 = _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_t1 = _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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if c == '+' || c == '-' {
neg = Bool32(c == '-')
c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if uint32(c-'0') >= 10 && pok != 0 {
if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(unsafe.Pointer(f)).Frpos--
} else {
}
}
}
if uint32(c-'0') >= 10 {
if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(unsafe.Pointer(f)).Frpos--
} else {
}
return -0x7fffffffffffffff - int64(1)
}
for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
}
if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
gotdig = 1
}
if c == '.' {
gotrad = 1
for c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}(); c == '0'; c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(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)))
}
if lrp > int64(-emin/2) {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34
return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308
}
if lrp < int64(emin-2*53) {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34
return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308
}
// Align incomplete final B1B digit
if j != 0 {
for ; j < 9; j++ {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10)
}
k++
j = 0
}
a = 0
z = k
e2 = 0
rp = int32(lrp)
// Optimize small to mid-size integers (even in exp. notation)
if lnz < 9 && lnz <= rp && rp < 18 {
if rp == 9 {
return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp)))
}
if rp < 9 {
return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp])
}
var bitlim int32 = bits - 3*(rp-9)
if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) {
return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10])
}
}
// Drop trailing zeros
for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- {
}
// Align radix point to B1B digit boundary
if rp%9 != 0 {
var rpm9 int32
if rp >= 0 {
rpm9 = rp % 9
} else {
rpm9 = rp%9 + 9
}
var p10 int32 = _sp10s[8-rpm9]
var carry uint32_t = uint32_t(0)
for k = a; k != z; k++ {
var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10)
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry
carry = uint32_t(1000000000/p10) * tmp
if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) {
a = (a + 1) & (128 - 1)
rp = rp - 9
}
}
if carry != 0 {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry
}
rp = rp + (9 - rpm9)
}
// Upscale until desired number of bits are left of radix point
for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] {
var carry uint32_t = uint32_t(0)
e2 = e2 - 29
for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) {
var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry)
if tmp > uint64(1000000000) {
carry = uint32_t(tmp / uint64(1000000000))
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000))
} else {
carry = uint32_t(0)
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp)
}
if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) {
z = k
}
if k == a {
break
}
}
if carry != 0 {
rp = rp + 9
a = (a - 1) & (128 - 1)
if a == z {
z = (z - 1) & (128 - 1)
*(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4))
}
*(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry
}
}
// Downscale until exactly number of bits are left of radix point
for {
var carry uint32_t = uint32_t(0)
var sh int32 = 1
for i = 0; i < 2; i++ {
k = (a + i) & (128 - 1)
if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] {
i = 2
break
}
if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] {
break
}
}
if i == 2 && rp == 9*2 {
break
}
// FIXME: find a way to compute optimal sh
if rp > 9+9*2 {
sh = 9
}
e2 = e2 + sh
for k = a; k != z; k = (k + 1) & (128 - 1) {
var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1)
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry
carry = uint32_t(int32(1000000000)>>sh) * tmp
if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) {
a = (a + 1) & (128 - 1)
i--
rp = rp - 9
}
}
if carry != 0 {
if (z+1)&(128-1) != a {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry
z = (z + 1) & (128 - 1)
} else {
*(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1)
}
}
}
// Assemble desired bits into floating point variable
for y = float64(AssignInt32(&i, 0)); i < 2; i++ {
if (a+i)&(128-1) == z {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = 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/ccgo_linux_s390x.go | vendor/modernc.org/libc/ccgo_linux_s390x.go | // Code generated for linux/s390x by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -hide __mmap -mlong-double-64 -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/s390x -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/s390x/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/s | 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_386.go | vendor/modernc.org/libc/musl_windows_386.go | // Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -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/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 = int32 /* <builtin>:3:26 */
type size_t = uint32 /* <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:366:9 */
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 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:88:15 */
type intptr_t = int32 /* alltypes.h:93:15 */
type off_t = int64 /* alltypes.h:185:16 */
type pid_t = int32 /* alltypes.h:258:13 */
type uid_t = uint32 /* alltypes.h:268:18 */
type gid_t = uint32 /* alltypes.h:273:18 */
type useconds_t = uint32 /* alltypes.h:283: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 = size_t(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+size_t(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 += 4
i++
goto __2
goto __4
__4:
;
__1:
;
if !(Environ() == _soldenv) {
goto __6
}
newenv = Xrealloc(tls, _soldenv, uint32(unsafe.Sizeof(uintptr(0)))*(i+size_t(2)))
if !!(newenv != 0) {
goto __8
}
goto oom
__8:
;
goto __7
__6:
newenv = Xmalloc(tls, uint32(unsafe.Sizeof(uintptr(0)))*(i+size_t(2)))
if !!(newenv != 0) {
goto __9
}
goto oom
__9:
;
if !(i != 0) {
goto __10
}
Xmemcpy(tls, newenv, Environ(), uint32(unsafe.Sizeof(uintptr(0)))*i)
__10:
;
Xfree(tls, _soldenv)
__7:
;
*(*uintptr)(unsafe.Pointer(newenv + uintptr(i)*4)) = s
*(*uintptr)(unsafe.Pointer(newenv + uintptr(i+size_t(1))*4)) = 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((int32(X__strchrnul(tls, s, '=')) - int32(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 = size_t(0)
for ; i < _senv_alloced_n; i++ {
if *(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*4)) == old {
*(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*4)) = new
Xfree(tls, old)
return
} else if !(int32(*(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*4))) != 0) && new != 0 {
*(*uintptr)(unsafe.Pointer(_senv_alloced + uintptr(i)*4)) = new
new = uintptr(0)
}
}
if !(new != 0) {
return
}
var t uintptr = Xrealloc(tls, _senv_alloced, uint32(unsafe.Sizeof(uintptr(0)))*(_senv_alloced_n+size_t(1)))
if !(t != 0) {
return
}
*(*uintptr)(unsafe.Pointer(AssignPtrUintptr(uintptr(unsafe.Pointer(&_senv_alloced)), t) + uintptr(PostIncUint32(&_senv_alloced_n, 1))*4)) = 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(AssignUint32(&l1, size_t((int32(X__strchrnul(tls, var1, '='))-int32(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+size_t(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+size_t(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((int32(X__strchrnul(tls, name, '=')) - int32(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 += 4 {
//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, 4))) = *(*uintptr)(unsafe.Pointer(e))
} else {
eo += 4
}
}
if eo != e {
*(*uintptr)(unsafe.Pointer(eo)) = uintptr(0)
}
}
return 0
}
type wint_t = uint32 /* alltypes.h:221:18 */
type wctype_t = uint32 /* alltypes.h:226:23 */
type __mbstate_t = struct {
__opaque1 uint32
__opaque2 uint32
} /* alltypes.h:360:9 */
type mbstate_t = __mbstate_t /* alltypes.h:360: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:78:24 */
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 */
// 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:366: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 = int64 /* alltypes.h:108:16 */
type clockid_t = int32 /* alltypes.h:237:13 */
type timespec = struct {
tv_sec time_t
tv_nsec int32
__12 uint32 /* int : 32 */
} /* alltypes.h:252: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
pending uintptr
}
timer_id int32
locale locale_t
killlock [1]int32
dlerror_buf uintptr
stdio_locks uintptr
canary_at_end uintptr_t
dtv_copy uintptr
} /* alltypes.h:296:9 */
type pthread_t = uintptr /* alltypes.h:296:26 */
type pthread_once_t = int32 /* alltypes.h:302:13 */
type pthread_key_t = uint32 /* alltypes.h:307:18 */
type pthread_spinlock_t = int32 /* alltypes.h:312:13 */
type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:317:37 */
type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:322:37 */
type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:327:37 */
type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:332:40 */
type __sigset_t = struct{ __bits [32]uint32 } /* alltypes.h:372:9 */
type sigset_t = __sigset_t /* alltypes.h:372:71 */
type pthread_attr_t = struct{ __u struct{ __i [9]int32 } } /* alltypes.h:395:147 */
type pthread_mutex_t = struct{ __u struct{ __i [6]int32 } } /* alltypes.h:400:157 */
type pthread_cond_t = struct{ __u struct{ __i [12]int32 } } /* alltypes.h:410:112 */
type pthread_rwlock_t = struct{ __u struct{ __i [8]int32 } } /* alltypes.h:420:139 */
type pthread_barrier_t = struct{ __u struct{ __i [5]int32 } } /* alltypes.h:425:137 */
type sched_param = struct {
sched_priority int32
__reserved1 int32
__reserved2 [4]int32
__reserved3 int32
} /* sched.h:19:1 */
type timer_t = uintptr /* alltypes.h:232:14 */
type clock_t = int32 /* alltypes.h:242:14 */
type itimerspec = struct {
it_interval struct {
tv_sec time_t
tv_nsec int32
__12 uint32 /* int : 32 */
}
it_value struct {
tv_sec time_t
tv_nsec int32
__12 uint32 /* int : 32 */
}
} /* time.h:80:1 */
type sigevent = struct {
sigev_value struct{ sival_int int32 }
sigev_signo int32
sigev_notify int32
sigev_notify_function uintptr
sigev_notify_attributes uintptr
__pad [44]int8
} /* time.h:107:1 */
type __ptcb = struct {
__f uintptr
__x uintptr
__next uintptr
} /* alltypes.h:296:9 */
type sigaltstack = struct {
ss_sp uintptr
ss_flags int32
ss_size size_t
} /* signal.h:44:9 */
type stack_t = sigaltstack /* signal.h:44:28 */
type greg_t = int32 /* signal.h:51:13 */
type gregset_t = [19]int32 /* signal.h:51:21 */
type _fpstate = struct {
cw uint32
sw uint32
tag uint32
ipoff uint32
cssel uint32
dataoff uint32
datasel uint32
_st [8]struct {
significand [4]uint16
exponent uint16
}
status uint32
} /* signal.h:52:9 */
type fpregset_t = uintptr /* signal.h:58:3 */
type sigcontext = struct {
gs uint16
__gsh uint16
fs uint16
__fsh uint16
es uint16
__esh uint16
ds uint16
__dsh uint16
edi uint32
esi uint32
ebp uint32
esp uint32
ebx uint32
edx uint32
ecx uint32
eax uint32
trapno uint32
err uint32
eip uint32
cs uint16
__csh uint16
eflags uint32
esp_at_signal uint32
ss uint16
__ssh uint16
fpstate uintptr
oldmask uint32
cr2 uint32
} /* signal.h:59:1 */
type mcontext_t = struct {
gregs gregset_t
fpregs fpregset_t
oldmask uint32
cr2 uint32
} /* signal.h:73:3 */
type __ucontext = struct {
uc_flags uint32
uc_link uintptr
uc_stack stack_t
uc_mcontext mcontext_t
uc_sigmask sigset_t
__fpregs_mem [28]uint32
} /* signal.h:86:9 */
type ucontext_t = __ucontext /* signal.h:93:3 */
type sigval = struct{ sival_int int32 } /* time.h:107:1 */
type siginfo_t = struct {
si_signo int32
si_errno int32
si_code int32
__si_fields struct {
_ [0]uint32
__pad [116]int8
}
} /* signal.h:145:3 */
type sigaction = struct {
__sa_handler struct{ sa_handler uintptr }
sa_mask sigset_t
sa_flags int32
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:175:18 */
type syscall_arg_t = int32 /* syscall.h:22:14 */
func a_and(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:29:20: */
panic(`arch/i386/atomic_arch.h:31:2: assembler statements not supported`)
}
func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:87:19: */
var r int32
panic(`arch/i386/atomic_arch.h:90:2: assembler statements not supported`)
return r
}
func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:96:19: */
var r int32
panic(`arch/i386/atomic_arch.h:99:2: assembler statements not supported`)
return r
}
func a_clz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:104:19: */
panic(`arch/i386/atomic_arch.h:106:2: assembler statements not supported`)
return int32(x)
}
type a_cas_p_undefined_but_pointer_not_32bit = [1]int8 /* atomic.h:229:14 */
type __timer = struct {
timerid int32
thread pthread_t
} /* pthread_impl.h:64:1 */
func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
var self uintptr
panic(`arch/i386/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 size_t(1)
}
if uint32(wc) < uint32(0x80) {
*(*int8)(unsafe.Pointer(s)) = int8(wc)
return size_t(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 Uint32FromInt32(-1)
}
*(*int8)(unsafe.Pointer(s)) = int8(wc)
return size_t(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 size_t(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 size_t(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 size_t(4)
}
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84
return Uint32FromInt32(-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 = size_t(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+size_t(1) != 0) {
return Uint32FromInt32(-1)
}
n = n + l
} else {
n++
}
}
return n
}
for n >= size_t(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+size_t(1) != 0) {
return Uint32FromInt32(-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+size_t(1) != 0) {
return Uint32FromInt32(-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(4)
defer tls.Free(4)
*(*uintptr)(unsafe.Pointer(bp)) = ws
//TODO return wcsrtombs(s, &(const wchar_t *){ws}, n, 0);
return Xwcsrtombs(tls, s, bp, n, 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 ; uintptr_t(s)%uintptr_t(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 = Uint32(Uint32FromInt32(-1)) / size_t(255) * size_t(c)
for w = s; !((*(*uint32)(unsafe.Pointer(w))-Uint32(Uint32FromInt32(-1))/size_t(255)) & ^*(*uint32)(unsafe.Pointer(w)) & (Uint32(Uint32FromInt32(-1))/size_t(255)*size_t(255/2+1)) != 0) && !((*(*uint32)(unsafe.Pointer(w))^k-Uint32(Uint32FromInt32(-1))/size_t(255)) & ^(*(*uint32)(unsafe.Pointer(w))^k) & (Uint32(Uint32FromInt32(-1))/size_t(255)*size_t(255/2+1)) != 0); w += 4 {
}
s = w
for ; *(*int8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c; s++ {
}
return s
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
if __ccgo_strace {
trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
}
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
return uintptr(0)
}
return Xmemcpy(tls, d, s, l+size_t(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/musl_netbsd_arm.go | vendor/modernc.org/libc/musl_netbsd_arm.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_netbsd_arm.go -pkgname libc -static-locals-prefix _s -Iarch/arm -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../netbsd/ctype_.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/isprint.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 */
type ssize_t = int32 /* ctype_.cpp.c:111:18 */
type __sfpos = struct {
F_pos int32
F_mbstate_in struct {
F__mbstateL int32
F__ccgo_pad1 [124]byte
}
F_mbstate_out struct {
F__mbstateL int32
F__ccgo_pad1 [124]byte
}
} /* ctype_.cpp.c:121:9 */
type fpos_t = __sfpos /* ctype_.cpp.c:124:3 */
type __sbuf = struct {
F_base uintptr
F_size int32
} /* ctype_.cpp.c:126:1 */
type __sFILE = struct {
F_p uintptr
F_r int32
F_w int32
F_flags uint16
F_file int16
F_bf struct {
F_base uintptr
F_size int32
}
F_lbfsize int32
F_cookie uintptr
F_close uintptr
F_read uintptr
F_seek uintptr
F_write uintptr
F_ext struct {
F_base uintptr
F_size int32
}
F_up uintptr
F_ur int32
F_ubuf [3]uint8
F_nbuf [1]uint8
F_flush uintptr
F_lb_unused [4]uint8
F_blksize int32
F_offset int32
} /* ctype_.cpp.c:131:9 */
type FILE = __sFILE /* ctype_.cpp.c:165:3 */
type off_t = int32 /* ctype_.cpp.c:365:17 */
type locale_t = uintptr /* ctype_.cpp.c:514:24 */
var X_C_ctype_tab_ = [257]uint16{
0: uint16(0),
1: uint16(0x0002),
2: uint16(0x0002),
3: uint16(0x0002),
4: uint16(0x0002),
5: uint16(0x0002),
6: uint16(0x0002),
7: uint16(0x0002),
8: uint16(0x0002),
9: uint16(0x0002),
10: uint16(0x0200 |
0x0002 |
0x0040),
11: uint16(0x0002 |
0x0040),
12: uint16(0x0002 |
0x0040),
13: uint16(0x0002 |
0x0040),
14: uint16(0x0002 |
0x0040),
15: uint16(0x0002),
16: uint16(0x0002),
17: uint16(0x0002),
18: uint16(0x0002),
19: uint16(0x0002),
20: uint16(0x0002),
21: uint16(0x0002),
22: uint16(0x0002),
23: uint16(0x0002),
24: uint16(0x0002),
25: uint16(0x0002),
26: uint16(0x0002),
27: uint16(0x0002),
28: uint16(0x0002),
29: uint16(0x0002),
30: uint16(0x0002),
31: uint16(0x0002),
32: uint16(0x0002),
33: uint16(0x0200 |
0x0400 |
0x0040),
34: uint16(0x0008 |
0x0400 |
0x0020),
35: uint16(0x0008 |
0x0400 |
0x0020),
36: uint16(0x0008 |
0x0400 |
0x0020),
37: uint16(0x0008 |
0x0400 |
0x0020),
38: uint16(0x0008 |
0x0400 |
0x0020),
39: uint16(0x0008 |
0x0400 |
0x0020),
40: uint16(0x0008 |
0x0400 |
0x0020),
41: uint16(0x0008 |
0x0400 |
0x0020),
42: uint16(0x0008 |
0x0400 |
0x0020),
43: uint16(0x0008 |
0x0400 |
0x0020),
44: uint16(0x0008 |
0x0400 |
0x0020),
45: uint16(0x0008 |
0x0400 |
0x0020),
46: uint16(0x0008 |
0x0400 |
0x0020),
47: uint16(0x0008 |
0x0400 |
0x0020),
48: uint16(0x0008 |
0x0400 |
0x0020),
49: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
50: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
51: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
52: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
53: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
54: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
55: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
56: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
57: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
58: uint16(0x0004 |
0x0008 |
0x0400 |
0x0100),
59: uint16(0x0008 |
0x0400 |
0x0020),
60: uint16(0x0008 |
0x0400 |
0x0020),
61: uint16(0x0008 |
0x0400 |
0x0020),
62: uint16(0x0008 |
0x0400 |
0x0020),
63: uint16(0x0008 |
0x0400 |
0x0020),
64: uint16(0x0008 |
0x0400 |
0x0020),
65: uint16(0x0008 |
0x0400 |
0x0020),
66: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
67: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
68: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
69: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
70: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
71: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080 |
0x0100),
72: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
73: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
74: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
75: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
76: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
77: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
78: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
79: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
80: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
81: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
82: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
83: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
84: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
85: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
86: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
87: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
88: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
89: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
90: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
91: uint16(0x0001 |
0x0008 |
0x0400 |
0x0080),
92: uint16(0x0008 |
0x0400 |
0x0020),
93: uint16(0x0008 |
0x0400 |
0x0020),
94: uint16(0x0008 |
0x0400 |
0x0020),
95: uint16(0x0008 |
0x0400 |
0x0020),
96: uint16(0x0008 |
0x0400 |
0x0020),
97: uint16(0x0008 |
0x0400 |
0x0020),
98: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
99: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
100: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
101: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
102: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
103: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400 |
0x0100),
104: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
105: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
106: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
107: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
108: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
109: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
110: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
111: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
112: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
113: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
114: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
115: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
116: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
117: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
118: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
119: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
120: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
121: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
122: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
123: uint16(0x0001 |
0x0008 |
0x0010 |
0x0400),
124: uint16(0x0008 |
0x0400 |
0x0020),
125: uint16(0x0008 |
0x0400 |
0x0020),
126: uint16(0x0008 |
0x0400 |
0x0020),
127: uint16(0x0008 |
0x0400 |
0x0020),
128: uint16(0x0002),
} /* ctype_.cpp.c:601:22 */
var X_ctype_tab_ uintptr = 0 /* ctype_.cpp.c:2233:22 */
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
}
type locale_t1 = uintptr /* alltypes.h:336: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_t1) 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_t1) 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_t1) 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 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_t1) 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)
}
type uintptr_t = uint32 /* alltypes.h:48:24 */
type intptr_t = int32 /* alltypes.h:63:15 */
type int8_t = int8 /* alltypes.h:89:25 */
type int16_t = int16 /* alltypes.h:94:25 */
type int32_t = int32 /* alltypes.h:99:25 */
type int64_t = int64 /* alltypes.h:104:25 */
type intmax_t = int64 /* alltypes.h:109:25 */
type uint8_t = uint8 /* alltypes.h:114:25 */
type uint16_t = uint16 /* alltypes.h:119:25 */
type uint32_t = uint32 /* alltypes.h:124:25 */
type uint64_t = uint64 /* alltypes.h:129:25 */
type uintmax_t = uint64 /* alltypes.h:139: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 off_t1 = int64 /* alltypes.h:155: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_t1
Fgetln_buf uintptr
Fmustbezero_2 uintptr
Fshend uintptr
F__ccgo_pad1 [4]byte
Fshlim off_t1
Fshcnt off_t1
Fprev_locked uintptr
Fnext_locked uintptr
Flocale uintptr
F__ccgo_pad2 [4]byte
} /* alltypes.h:313:9 */
type FILE1 = _IO_FILE /* alltypes.h:313:25 */
type va_list = uintptr /* alltypes.h:319:27 */
type _G_fpos64_t = struct {
F__ccgo_pad1 [0]uint64
F__opaque [16]uint8
} /* stdio.h:54:9 */
type fpos_t1 = _G_fpos64_t /* stdio.h:58:3 */
type float_t = float32 /* alltypes.h:23:15 */
type double_t = float64 /* alltypes.h:28: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 = 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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if c == '+' || c == '-' {
neg = Bool32(c == '-')
c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if uint32(c-'0') >= 10 && pok != 0 {
if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(unsafe.Pointer(f)).Frpos--
} else {
}
}
}
if uint32(c-'0') >= 10 {
if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(unsafe.Pointer(f)).Frpos--
} else {
}
return -0x7fffffffffffffff - int64(1)
}
for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
}
if (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
gotdig = 1
}
if c == '.' {
gotrad = 1
for c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}(); c == '0'; c = func() int32 {
if (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Frpos != (*FILE1)(unsafe.Pointer(f)).Fshend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(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 (*FILE1)(unsafe.Pointer(f)).Fshlim >= int64(0) {
(*FILE1)(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)))
}
if lrp > int64(-emin/2) {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34
return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308
}
if lrp < int64(emin-2*53) {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34
return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308
}
// Align incomplete final B1B digit
if j != 0 {
for ; j < 9; j++ {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10)
}
k++
j = 0
}
a = 0
z = k
e2 = 0
rp = int32(lrp)
// Optimize small to mid-size integers (even in exp. notation)
if lnz < 9 && lnz <= rp && rp < 18 {
if rp == 9 {
return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp)))
}
if rp < 9 {
return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp])
}
var bitlim int32 = bits - 3*(rp-9)
if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) {
return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10])
}
}
// Drop trailing zeros
for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- {
}
// Align radix point to B1B digit boundary
if rp%9 != 0 {
var rpm9 int32
if rp >= 0 {
rpm9 = rp % 9
} else {
rpm9 = rp%9 + 9
}
var p10 int32 = _sp10s[8-rpm9]
var carry uint32_t = uint32_t(0)
for k = a; k != z; k++ {
var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10)
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry
carry = uint32_t(1000000000/p10) * tmp
if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) {
a = (a + 1) & (128 - 1)
rp = rp - 9
}
}
if carry != 0 {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry
}
rp = rp + (9 - rpm9)
}
// Upscale until desired number of bits are left of radix point
for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] {
var carry uint32_t = uint32_t(0)
e2 = e2 - 29
for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) {
var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry)
if tmp > uint64(1000000000) {
carry = uint32_t(tmp / uint64(1000000000))
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000))
} else {
carry = uint32_t(0)
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp)
}
if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) {
z = k
}
if k == a {
break
}
}
if carry != 0 {
rp = rp + 9
a = (a - 1) & (128 - 1)
if a == z {
z = (z - 1) & (128 - 1)
*(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4))
}
*(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry
}
}
// Downscale until exactly number of bits are left of radix point
for {
var carry uint32_t = uint32_t(0)
var sh int32 = 1
for i = 0; i < 2; i++ {
k = (a + i) & (128 - 1)
if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] {
i = 2
break
}
if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] {
break
}
}
if i == 2 && rp == 9*2 {
break
}
// FIXME: find a way to compute optimal sh
if rp > 9+9*2 {
sh = 9
}
e2 = e2 + sh
for k = a; k != z; k = (k + 1) & (128 - 1) {
var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1)
*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry
carry = uint32_t(int32(1000000000)>>sh) * tmp
if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) {
a = (a + 1) & (128 - 1)
i--
rp = rp - 9
}
}
if carry != 0 {
if (z+1)&(128-1) != a {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry
z = (z + 1) & (128 - 1)
} else {
*(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1)
}
}
}
// Assemble desired bits into floating point variable
for y = float64(AssignInt32(&i, 0)); i < 2; i++ {
if (a+i)&(128-1) == z {
*(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0)
}
y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)))
}
y = y * float64(sign)
// Limit precision for denormal results
if bits > 53+e2-emin {
| 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_linux_ppc64le.go | vendor/modernc.org/libc/capi_linux_ppc64le.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_darwin.go | vendor/modernc.org/libc/libc_darwin.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 (
crand "crypto/rand"
"encoding/hex"
"errors"
"fmt"
"io"
"io/fs"
mbits "math/bits"
"os"
"os/exec"
gosignal "os/signal"
"path/filepath"
"runtime"
"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/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/uuid"
"modernc.org/libc/wctype"
"modernc.org/memory"
)
const (
maxPathLen = 1024
)
// var (
// in6_addr_any in.In6_addr
// )
type Tsize_t = types.Size_t
type (
syscallErrno = unix.Errno
long = types.User_long_t
ulong = types.User_ulong_t
)
// // 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
// user@darwin-m1:~/tmp$ cat main.c
//
// #include <xlocale.h>
// #include <stdio.h>
//
// int main() {
// printf("%i\n", ___mb_cur_max());
// return 0;
// }
//
// user@darwin-m1:~/tmp$ gcc main.c && ./a.out
// 1
// user@darwin-m1:~/tmp$
var X__mb_cur_max int32 = 1
var startTime = gotime.Now() // For clock(3)
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, hex.Dump(b))
}
return unix.Write(int(fd), b)
}
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
}
func X__inline_isnand(t *TLS, x float64) int32 {
if __ccgo_strace {
trc("t=%v x=%v, (%v:)", t, x, origin(2))
}
return Xisnan(t, x)
}
func X__inline_isnanf(t *TLS, x float32) int32 {
if __ccgo_strace {
trc("t=%v x=%v, (%v:)", t, x, origin(2))
}
return Xisnanf(t, x)
}
func X__inline_isnanl(t *TLS, x float64) int32 {
if __ccgo_strace {
trc("t=%v x=%v, (%v:)", t, x, origin(2))
}
return Xisnan(t, x)
}
// 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.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 futimes(int fd, const struct timeval tv[2]);
func Xfutimes(t *TLS, fd int32, tv uintptr) int32 {
if __ccgo_strace {
trc("t=%v fd=%v tv=%v, (%v:)", t, fd, tv, origin(2))
}
var a []unix.Timeval
if tv != 0 {
a = make([]unix.Timeval, 2)
a[0] = *(*unix.Timeval)(unsafe.Pointer(tv))
a[1] = *(*unix.Timeval)(unsafe.Pointer(tv + unsafe.Sizeof(unix.Timeval{})))
}
if err := unix.Futimes(int(fd), 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
}
// void srandomdev(void);
func Xsrandomdev(t *TLS) {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
panic(todo(""))
}
// int gethostuuid(uuid_t id, const struct timespec *wait);
func Xgethostuuid(t *TLS, id uintptr, wait uintptr) int32 {
if __ccgo_strace {
trc("t=%v id=%v wait=%v, (%v:)", t, id, wait, origin(2))
}
if _, _, err := unix.Syscall(unix.SYS_GETHOSTUUID, id, wait, 0); err != 0 { // Cannot avoid the syscall here.
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
}
t.setErrno(err)
return -1
}
if dmesgs {
dmesg("%v: ok", origin(1))
}
return 0
}
// int flock(int fd, int operation);
func Xflock(t *TLS, fd, operation int32) int32 {
if __ccgo_strace {
trc("t=%v operation=%v, (%v:)", t, operation, origin(2))
}
if err := unix.Flock(int(fd), int(operation)); 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 fsctl(const char *,unsigned long,void*,unsigned int);
func Xfsctl(t *TLS, path uintptr, request ulong, data uintptr, options uint32) int32 {
if __ccgo_strace {
trc("t=%v path=%v request=%v data=%v options=%v, (%v:)", t, path, request, data, options, origin(2))
}
panic(todo(""))
// if _, _, err := unix.Syscall6(unix.SYS_FSCTL, path, uintptr(request), data, uintptr(options), 0, 0); err != 0 {
// t.setErrno(err)
// return -1
// }
// return 0
}
// int * __error(void);
func X__error(t *TLS) uintptr {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return t.errnop
}
// int isspace(int c);
func Xisspace(t *TLS, c int32) int32 {
if __ccgo_strace {
trc("t=%v c=%v, (%v:)", t, c, origin(2))
}
return __isspace(t, c)
}
// void __assert_rtn(const char *, const char *, int, const char *)
func X__assert_rtn(t *TLS, function, file uintptr, line int32, assertion uintptr) {
if __ccgo_strace {
trc("t=%v file=%v line=%v assertion=%v, (%v:)", t, file, line, assertion, origin(2))
}
panic(todo(""))
// fmt.Fprintf(os.Stderr, "assertion failure: %s:%d.%s: %s\n", GoString(file), line, GoString(function), GoString(assertion))
// os.Stderr.Sync()
// Xexit(t, 1)
}
// 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 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.Chdir(GoString(path)); 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
}
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))
_, off := t.Zone()
localtime.Ftm_gmtoff = int64(off)
localtime.Ftm_zone = 0
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_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
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))
}
var mode types.Mode_t
if args != 0 {
mode = (types.Mode_t)(VaUint32(&args))
}
fd, err := unix.Open(GoString(pathname), int(flags), uint32(mode))
if err != nil {
if dmesgs {
dmesg("%v: %q %#x %#o: %v FAIL", origin(1), GoString(pathname), flags, mode, err)
}
t.setErrno(err)
return -1
}
if dmesgs {
dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, fd)
}
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 {
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)))
}
if err := unix.Fsync(int(fd)); err != nil {
if dmesgs {
dmesg("%v: %v: %v FAIL", origin(1), fd, err)
}
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_NPROCESSORS_ONLN:
return long(runtime.NumCPU())
case unistd.X_SC_GETPW_R_SIZE_MAX:
return 128
}
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.Close(int(fd)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
}
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))
}
var n int
var err error
switch {
case count == 0:
n, err = unix.Read(int(fd), nil)
default:
n, err = unix.Read(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count])
if dmesgs && err == nil {
dmesg("%v: fd %v, count %#x, n %#x\n%s", origin(1), fd, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n]))
}
}
if err != nil {
if dmesgs {
dmesg("%v: fd %v, %v FAIL", origin(1), fd, err)
}
t.setErrno(err)
return -1
}
if dmesgs {
dmesg("%v: ok", origin(1))
}
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))
}
var n int
var err error
switch {
case count == 0:
n, err = unix.Write(int(fd), nil)
default:
n, err = unix.Write(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count])
if dmesgs {
dmesg("%v: fd %v, count %#x\n%s", origin(1), fd, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
}
}
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)
}
// 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.Fchmod(int(fd), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %d %#o: %v FAIL", origin(1), fd, mode, err)
}
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))
}
r := types.Uid_t(unix.Geteuid())
if dmesgs {
dmesg("%v: %v", origin(1), r)
}
return r
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
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))
}
// Cannot avoid the syscall here, addr sometimes matter.
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 FAIL", origin(1), err)
}
t.setErrno(err)
return ^uintptr(0) // (void*)-1
}
if dmesgs {
dmesg("%v: %#x", origin(1), data)
}
return data
}
// 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 { // Cannot avoid the syscall here, must pair with mmap.
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
}
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 {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
}
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 { // Cannot avoid the syscall here.
if dmesgs {
dmesg("%v: fd %v: %v FAIL", origin(1), sockfd, err)
}
t.setErrno(err)
return -1
}
if dmesgs {
dmesg("%v: fd %v: ok", origin(1), sockfd)
}
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 {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
}
t.setErrno(err)
return -1
}
if dmesgs {
dmesg("%v: ok", origin(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))
}
return types.Mode_t(unix.Umask(int(mask)))
}
// // int execvp(const char *file, char *const argv[]);
// func Xexecvp(t *TLS, file, argv uintptr) int32 {
// if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
// t.setErrno(err)
// return -1
// }
//
// return 0
// }
// pid_t (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.Wait4(int(pid), (*unix.WaitStatus)(unsafe.Pointer(wstatus)), int(optname), nil)
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.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 {
// return Xgetrlimit64(t, resource, rlim)
// }
//
// // int setrlimit(int resource, const struct rlimit *rlim);
// func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
// return Xsetrlimit64(t, resource, rlim)
// }
//
// // int setrlimit(int resource, const struct rlimit *rlim);
// func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// 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))
}
r := types.Uid_t(os.Getuid())
if dmesgs {
dmesg("%v: %v", origin(1), r)
}
return r
}
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
r := int32(os.Getpid())
if dmesgs {
dmesg("%v: %v", origin(1), r)
}
return r
}
// 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 {
// 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 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 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: 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))
}
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))
}
f := getObject(ftsp).(*ftstream)
if f.x == len(f.s) {
if dmesgs {
dmesg("%v: FAIL", origin(1))
}
t.setErrno(0)
return 0
}
r := f.s[f.x]
if e := (*fts.FTSENT)(unsafe.Pointer(r)).Ffts_errno; e != 0 {
if dmesgs {
dmesg("%v: FAIL", origin(1))
}
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))
}
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);
| 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/abi0_linux_amd64.go | vendor/modernc.org/libc/abi0_linux_amd64.go | // Code generated for linux/amd64 by 'qbecc --abi0wrap .', DO NOT EDIT.
package libc
import "unsafe"
var _ unsafe.Pointer
//go:noescape
func Y_Exit(tls *TLS, ec int32)
//go:noescape
func Y_IO_feof_unlocked(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y_IO_ferror_unlocked(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y_IO_getc(tls *TLS, f1 uintptr) (r int32)
//go:noescape
func Y_IO_getc_unlocked(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y_IO_putc(tls *TLS, c1 int32, f1 uintptr) (r int32)
//go:noescape
func Y_IO_putc_unlocked(tls *TLS, c int32, f uintptr) (r int32)
//go:noescape
func Y___errno_location(tls *TLS) (r uintptr)
//go:noescape
func Y__aio_close(tls *TLS, fd int32) (_2 int32)
//go:noescape
func Y__asctime_r(tls *TLS, tm uintptr, buf uintptr) (r uintptr)
//go:noescape
func Y__assert_fail(tls *TLS, expr uintptr, file uintptr, line int32, func1 uintptr)
//go:noescape
func Y__atomic_compare_exchangeInt16(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeInt32(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeInt64(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeInt8(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeUint16(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeUint32(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeUint64(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_compare_exchangeUint8(t *TLS, ptr, expected, desired uintptr, weak, success, failure int32) (_3 int32)
//go:noescape
func Y__atomic_exchangeInt16(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeInt32(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeInt64(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeInt8(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeUint16(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeUint32(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeUint64(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_exchangeUint8(t *TLS, ptr, val, ret uintptr, _ int32)
//go:noescape
func Y__atomic_fetch_addInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__atomic_fetch_addInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__atomic_fetch_addInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__atomic_fetch_addInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__atomic_fetch_addUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__atomic_fetch_addUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__atomic_fetch_addUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__atomic_fetch_addUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__atomic_fetch_andInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__atomic_fetch_andInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__atomic_fetch_andInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__atomic_fetch_andInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__atomic_fetch_andUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__atomic_fetch_andUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__atomic_fetch_andUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__atomic_fetch_andUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__atomic_fetch_orInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__atomic_fetch_orInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__atomic_fetch_orInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__atomic_fetch_orInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__atomic_fetch_orUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__atomic_fetch_orUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__atomic_fetch_orUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__atomic_fetch_orUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__atomic_fetch_subInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__atomic_fetch_subInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__atomic_fetch_subInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__atomic_fetch_subInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__atomic_fetch_subUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__atomic_fetch_subUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__atomic_fetch_subUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__atomic_fetch_subUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__atomic_fetch_xorInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__atomic_fetch_xorInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__atomic_fetch_xorInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__atomic_fetch_xorInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__atomic_fetch_xorUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__atomic_fetch_xorUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__atomic_fetch_xorUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__atomic_fetch_xorUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__atomic_loadInt16(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadInt32(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadInt64(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadInt8(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadUint16(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadUint32(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadUint64(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_loadUint8(t *TLS, ptr, ret uintptr, memorder int32)
//go:noescape
func Y__atomic_storeInt16(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeInt32(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeInt64(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeInt8(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeUint16(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeUint32(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeUint64(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__atomic_storeUint8(t *TLS, ptr, val uintptr, memorder int32)
//go:noescape
func Y__block_all_sigs(tls *TLS, set uintptr)
//go:noescape
func Y__block_app_sigs(tls *TLS, set uintptr)
//go:noescape
func Y__builtin___memcpy_chk(t *TLS, dest, src uintptr, n, os Tsize_t) (r uintptr)
//go:noescape
func Y__builtin___memmove_chk(t *TLS, dest, src uintptr, n, os Tsize_t) (_3 uintptr)
//go:noescape
func Y__builtin___memset_chk(t *TLS, s uintptr, c int32, n, os Tsize_t) (_4 uintptr)
//go:noescape
func Y__builtin___snprintf_chk(t *TLS, str uintptr, maxlen Tsize_t, flag int32, os Tsize_t, format, args uintptr) (r int32)
//go:noescape
func Y__builtin___sprintf_chk(t *TLS, s uintptr, flag int32, os Tsize_t, format, args uintptr) (r int32)
//go:noescape
func Y__builtin___strcat_chk(t *TLS, dest, src uintptr, os Tsize_t) (r uintptr)
//go:noescape
func Y__builtin___strcpy_chk(t *TLS, dest, src uintptr, os Tsize_t) (_3 uintptr)
//go:noescape
func Y__builtin___strncpy_chk(t *TLS, dest, src uintptr, n, os Tsize_t) (r uintptr)
//go:noescape
func Y__builtin___vsnprintf_chk(t *TLS, str uintptr, maxlen Tsize_t, flag int32, os Tsize_t, format, args uintptr) (r int32)
//go:noescape
func Y__builtin_abort(t *TLS)
//go:noescape
func Y__builtin_abs(t *TLS, j int32) (_2 int32)
//go:noescape
func Y__builtin_add_overflowInt64(t *TLS, a, b int64, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_add_overflowUint32(t *TLS, a, b uint32, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_add_overflowUint64(t *TLS, a, b uint64, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_alloca(tls *TLS, size Tsize_t) (_2 uintptr)
//go:noescape
func Y__builtin_bswap16(t *TLS, x uint16) (_2 uint16)
//go:noescape
func Y__builtin_bswap32(t *TLS, x uint32) (_2 uint32)
//go:noescape
func Y__builtin_bswap64(t *TLS, x uint64) (_2 uint64)
//go:noescape
func Y__builtin_bzero(t *TLS, s uintptr, n Tsize_t)
//go:noescape
func Y__builtin_clz(t *TLS, n uint32) (_2 int32)
//go:noescape
func Y__builtin_clzl(t *TLS, n ulong) (_2 int32)
//go:noescape
func Y__builtin_clzll(t *TLS, n uint64) (_2 int32)
//go:noescape
func Y__builtin_copysign(t *TLS, x, y float64) (_2 float64)
//go:noescape
func Y__builtin_copysignf(t *TLS, x, y float32) (_2 float32)
//go:noescape
func Y__builtin_copysignl(t *TLS, x, y float64) (_2 float64)
//go:noescape
func Y__builtin_ctz(t *TLS, n uint32) (_2 int32)
//go:noescape
func Y__builtin_ctzl(tls *TLS, x ulong) (_2 int32)
//go:noescape
func Y__builtin_exit(t *TLS, status int32)
//go:noescape
func Y__builtin_expect(t *TLS, exp, c long) (_2 long)
//go:noescape
func Y__builtin_fabs(t *TLS, x float64) (_2 float64)
//go:noescape
func Y__builtin_fabsf(t *TLS, x float32) (_2 float32)
//go:noescape
func Y__builtin_fabsl(t *TLS, x float64) (_2 float64)
//go:noescape
func Y__builtin_ffs(tls *TLS, i int32) (r int32)
//go:noescape
func Y__builtin_fma(tls *TLS, x, y, z float64) (r float64)
//go:noescape
func Y__builtin_fmax(tls *TLS, x float64, y float64) (r float64)
//go:noescape
func Y__builtin_fmin(tls *TLS, x float64, y float64) (r float64)
//go:noescape
func Y__builtin_free(t *TLS, ptr uintptr)
//go:noescape
func Y__builtin_getentropy(t *TLS, buf uintptr, n Tsize_t) (_3 int32)
//go:noescape
func Y__builtin_huge_val(t *TLS) (_1 float64)
//go:noescape
func Y__builtin_huge_valf(t *TLS) (_1 float32)
//go:noescape
func Y__builtin_hypot(tls *TLS, x float64, y float64) (r float64)
//go:noescape
func Y__builtin_inf(t *TLS) (_1 float64)
//go:noescape
func Y__builtin_inff(tls *TLS) (_1 float32)
//go:noescape
func Y__builtin_infl(t *TLS) (_1 float64)
//go:noescape
func Y__builtin_isblank(tls *TLS, c int32) (r int32)
//go:noescape
func Y__builtin_isnan(t *TLS, x float64) (_2 int32)
//go:noescape
func Y__builtin_isnanf(t *TLS, x float32) (_2 int32)
//go:noescape
func Y__builtin_isnanl(t *TLS, x float64) (_2 int32)
//go:noescape
func Y__builtin_isprint(tls *TLS, c int32) (r int32)
//go:noescape
func Y__builtin_isunordered(t *TLS, a, b float64) (_2 int32)
//go:noescape
func Y__builtin_llabs(tls *TLS, a int64) (_2 int64)
//go:noescape
func Y__builtin_log2(t *TLS, x float64) (_2 float64)
//go:noescape
func Y__builtin_lrint(tls *TLS, x float64) (r long)
//go:noescape
func Y__builtin_lrintf(tls *TLS, x float32) (r long)
//go:noescape
func Y__builtin_lround(tls *TLS, x float64) (r long)
//go:noescape
func Y__builtin_malloc(t *TLS, size Tsize_t) (_2 uintptr)
//go:noescape
func Y__builtin_memcmp(t *TLS, s1, s2 uintptr, n Tsize_t) (_3 int32)
//go:noescape
func Y__builtin_memcpy(t *TLS, dest, src uintptr, n Tsize_t) (r uintptr)
//go:noescape
func Y__builtin_memset(t *TLS, s uintptr, c int32, n Tsize_t) (_4 uintptr)
//go:noescape
func Y__builtin_mmap(t *TLS, addr uintptr, length Tsize_t, prot, flags, fd int32, offset Toff_t) (_5 uintptr)
//go:noescape
func Y__builtin_mul_overflowInt64(t *TLS, a, b int64, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_mul_overflowUint128(t *TLS, a, b Uint128, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_mul_overflowUint64(t *TLS, a, b uint64, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_nan(t *TLS, s uintptr) (_2 float64)
//go:noescape
func Y__builtin_nanf(tls *TLS, s uintptr) (_2 float32)
//go:noescape
func Y__builtin_nanl(t *TLS, s uintptr) (_2 float64)
//go:noescape
func Y__builtin_object_size(t *TLS, p uintptr, typ int32) (_3 Tsize_t)
//go:noescape
func Y__builtin_popcount(t *TLS, x uint32) (_2 int32)
//go:noescape
func Y__builtin_popcountl(t *TLS, x ulong) (_2 int32)
//go:noescape
func Y__builtin_prefetch(t *TLS, addr, args uintptr)
//go:noescape
func Y__builtin_printf(tls *TLS, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__builtin_rintf(tls *TLS, x float32) (r float32)
//go:noescape
func Y__builtin_round(tls *TLS, x float64) (r float64)
//go:noescape
func Y__builtin_roundf(tls *TLS, x float32) (r float32)
//go:noescape
func Y__builtin_snprintf(t *TLS, str uintptr, size Tsize_t, format, args uintptr) (_4 int32)
//go:noescape
func Y__builtin_sprintf(t *TLS, str, format, args uintptr) (r int32)
//go:noescape
func Y__builtin_strchr(t *TLS, s uintptr, c int32) (_3 uintptr)
//go:noescape
func Y__builtin_strcmp(t *TLS, s1, s2 uintptr) (_2 int32)
//go:noescape
func Y__builtin_strcpy(t *TLS, dest, src uintptr) (_2 uintptr)
//go:noescape
func Y__builtin_strlen(t *TLS, s uintptr) (_2 Tsize_t)
//go:noescape
func Y__builtin_sub_overflowInt64(t *TLS, a, b int64, res uintptr) (_3 int32)
//go:noescape
func Y__builtin_trap(t *TLS)
//go:noescape
func Y__builtin_trunc(tls *TLS, x float64) (r float64)
//go:noescape
func Y__builtin_unreachable(t *TLS)
//go:noescape
func Y__builtin_vsnprintf(t *TLS, str uintptr, size Tsize_t, format, va uintptr) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongInt16(t *TLS, ptr, expected uintptr, desired int16, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongInt32(t *TLS, ptr, expected uintptr, desired, success, failure int32) (_3 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongInt64(t *TLS, ptr, expected uintptr, desired int64, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongInt8(t *TLS, ptr, expected uintptr, desired int8, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongUint16(t *TLS, ptr, expected uintptr, desired uint16, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongUint32(t *TLS, ptr, expected uintptr, desired uint32, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongUint64(t *TLS, ptr, expected uintptr, desired uint64, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_compare_exchange_strongUint8(t *TLS, ptr, expected uintptr, desired uint8, success, failure int32) (_4 int32)
//go:noescape
func Y__c11_atomic_exchangeInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__c11_atomic_exchangeInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__c11_atomic_exchangeInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__c11_atomic_exchangeInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__c11_atomic_exchangeUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__c11_atomic_exchangeUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__c11_atomic_exchangeUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__c11_atomic_exchangeUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__c11_atomic_fetch_addInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__c11_atomic_fetch_addInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__c11_atomic_fetch_addInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__c11_atomic_fetch_addInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__c11_atomic_fetch_addUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__c11_atomic_fetch_addUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__c11_atomic_fetch_addUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__c11_atomic_fetch_addUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__c11_atomic_fetch_andInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__c11_atomic_fetch_andInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__c11_atomic_fetch_andInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__c11_atomic_fetch_andInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__c11_atomic_fetch_andUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__c11_atomic_fetch_andUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__c11_atomic_fetch_andUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__c11_atomic_fetch_andUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__c11_atomic_fetch_orInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__c11_atomic_fetch_orInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__c11_atomic_fetch_orInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__c11_atomic_fetch_orInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__c11_atomic_fetch_orUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__c11_atomic_fetch_orUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__c11_atomic_fetch_orUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__c11_atomic_fetch_orUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__c11_atomic_fetch_subInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__c11_atomic_fetch_subInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__c11_atomic_fetch_subInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__c11_atomic_fetch_subInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__c11_atomic_fetch_subUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__c11_atomic_fetch_subUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__c11_atomic_fetch_subUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__c11_atomic_fetch_subUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__c11_atomic_fetch_xorInt16(t *TLS, ptr uintptr, val int16, _ int32) (r int16)
//go:noescape
func Y__c11_atomic_fetch_xorInt32(t *TLS, ptr uintptr, val int32, _ int32) (r int32)
//go:noescape
func Y__c11_atomic_fetch_xorInt64(t *TLS, ptr uintptr, val int64, _ int32) (r int64)
//go:noescape
func Y__c11_atomic_fetch_xorInt8(t *TLS, ptr uintptr, val int8, _ int32) (r int8)
//go:noescape
func Y__c11_atomic_fetch_xorUint16(t *TLS, ptr uintptr, val uint16, _ int32) (r uint16)
//go:noescape
func Y__c11_atomic_fetch_xorUint32(t *TLS, ptr uintptr, val uint32, _ int32) (r uint32)
//go:noescape
func Y__c11_atomic_fetch_xorUint64(t *TLS, ptr uintptr, val uint64, _ int32) (r uint64)
//go:noescape
func Y__c11_atomic_fetch_xorUint8(t *TLS, ptr uintptr, val uint8, _ int32) (r uint8)
//go:noescape
func Y__c11_atomic_loadInt16(t *TLS, ptr uintptr, memorder int32) (r int16)
//go:noescape
func Y__c11_atomic_loadInt32(t *TLS, ptr uintptr, memorder int32) (r int32)
//go:noescape
func Y__c11_atomic_loadInt64(t *TLS, ptr uintptr, memorder int32) (r int64)
//go:noescape
func Y__c11_atomic_loadInt8(t *TLS, ptr uintptr, memorder int32) (r int8)
//go:noescape
func Y__c11_atomic_loadUint16(t *TLS, ptr uintptr, memorder int32) (r uint16)
//go:noescape
func Y__c11_atomic_loadUint32(t *TLS, ptr uintptr, memorder int32) (r uint32)
//go:noescape
func Y__c11_atomic_loadUint64(t *TLS, ptr uintptr, memorder int32) (r uint64)
//go:noescape
func Y__c11_atomic_loadUint8(t *TLS, ptr uintptr, memorder int32) (r uint8)
//go:noescape
func Y__c11_atomic_storeInt16(t *TLS, ptr uintptr, val int16, memorder int32)
//go:noescape
func Y__c11_atomic_storeInt32(t *TLS, ptr uintptr, val int32, memorder int32)
//go:noescape
func Y__c11_atomic_storeInt64(t *TLS, ptr uintptr, val int64, memorder int32)
//go:noescape
func Y__c11_atomic_storeInt8(t *TLS, ptr uintptr, val int8, memorder int32)
//go:noescape
func Y__c11_atomic_storeUint16(t *TLS, ptr uintptr, val uint16, memorder int32)
//go:noescape
func Y__c11_atomic_storeUint32(t *TLS, ptr uintptr, val uint32, memorder int32)
//go:noescape
func Y__c11_atomic_storeUint64(t *TLS, ptr uintptr, val uint64, memorder int32)
//go:noescape
func Y__c11_atomic_storeUint8(t *TLS, ptr uintptr, val uint8, memorder int32)
//go:noescape
func Y__ccgo_dmesg(t *TLS, fmt uintptr, va uintptr)
//go:noescape
func Y__ccgo_getMutexType(tls *TLS, m uintptr) (_2 int32)
//go:noescape
func Y__ccgo_in6addr_anyp(t *TLS) (_1 uintptr)
//go:noescape
func Y__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) (_2 int32)
//go:noescape
func Y__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) (_2 int32)
//go:noescape
func Y__ccgo_sqlite3_log(t *TLS, iErrCode int32, zFormat uintptr, args uintptr)
//go:noescape
func Y__clock_gettime(tls *TLS, clk Tclockid_t, ts uintptr) (r1 int32)
//go:noescape
func Y__clock_nanosleep(tls *TLS, clk Tclockid_t, flags int32, req uintptr, rem uintptr) (r int32)
//go:noescape
func Y__cmsg_nxthdr(t *TLS, msgh, cmsg uintptr) (_2 uintptr)
//go:noescape
func Y__convert_scm_timestamps(tls *TLS, msg uintptr, csize Tsocklen_t)
//go:noescape
func Y__cos(tls *TLS, x float64, y float64) (r1 float64)
//go:noescape
func Y__cosdf(tls *TLS, x float64) (r1 float32)
//go:noescape
func Y__crypt_blowfish(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintptr)
//go:noescape
func Y__crypt_des(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintptr)
//go:noescape
func Y__crypt_md5(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintptr)
//go:noescape
func Y__crypt_r(tls *TLS, key uintptr, salt uintptr, data uintptr) (r uintptr)
//go:noescape
func Y__crypt_sha256(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintptr)
//go:noescape
func Y__crypt_sha512(tls *TLS, key uintptr, setting uintptr, output uintptr) (r uintptr)
//go:noescape
func Y__ctype_b_loc(tls *TLS) (r uintptr)
//go:noescape
func Y__ctype_get_mb_cur_max(tls *TLS) (r Tsize_t)
//go:noescape
func Y__ctype_tolower_loc(tls *TLS) (r uintptr)
//go:noescape
func Y__ctype_toupper_loc(tls *TLS) (r uintptr)
//go:noescape
func Y__des_setkey(tls *TLS, key uintptr, ekey uintptr)
//go:noescape
func Y__dn_expand(tls *TLS, base uintptr, end uintptr, src uintptr, dest uintptr, space int32) (r int32)
//go:noescape
func Y__dns_parse(tls *TLS, r uintptr, rlen int32, __ccgo_fp_callback uintptr, ctx uintptr) (r1 int32)
//go:noescape
func __ccgo_abi0___dns_parse_2(_0 *TLS, _1 uintptr, _2 int32, _3 uintptr, _4 int32, _5 uintptr, _6 int32, __ccgo_fp uintptr) (_7 int32)
func __ccgo_abiInternal___dns_parse_2(tls *TLS, dest, abi0CodePtr uintptr) {
f := func(_0 *TLS, _1 uintptr, _2 int32, _3 uintptr, _4 int32, _5 uintptr, _6 int32) (_7 int32) {
return __ccgo_abi0___dns_parse_2(_0, _1, _2, _3, _4, _5, _6, abi0CodePtr)
}
*(*[2]uintptr)(unsafe.Pointer(dest)) = *(*[2]uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&f))))
}
//go:noescape
func Y__do_des(tls *TLS, l_in Tuint32_t, r_in Tuint32_t, l_out uintptr, r_out uintptr, count Tuint32_t, saltbits Tuint32_t, ekey uintptr)
//go:noescape
func Y__do_orphaned_stdio_locks(tls *TLS)
//go:noescape
func Y__dup3(tls *TLS, old int32, new1 int32, flags int32) (r1 int32)
//go:noescape
func Y__duplocale(tls *TLS, old Tlocale_t) (r Tlocale_t)
//go:noescape
func Y__env_rm_add(tls *TLS, old uintptr, new1 uintptr)
//go:noescape
func Y__errno_location(tls *TLS) (r uintptr)
//go:noescape
func Y__execvpe(tls *TLS, file uintptr, argv uintptr, envp uintptr) (r int32)
//go:noescape
func Y__expo2(tls *TLS, x float64, sign float64) (r float64)
//go:noescape
func Y__expo2f(tls *TLS, x float32, sign float32) (r float32)
//go:noescape
func Y__fbufsize(tls *TLS, f uintptr) (r Tsize_t)
//go:noescape
func Y__fclose_ca(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__fdopen(tls *TLS, fd int32, mode uintptr) (r uintptr)
//go:noescape
func Y__fesetround(tls *TLS, r int32) (r1 int32)
//go:noescape
func Y__fgetwc_unlocked(tls *TLS, f uintptr) (r Twint_t)
//go:noescape
func Y__flbf(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__floatscan(tls *TLS, f uintptr, prec int32, pok int32) (r float64)
//go:noescape
func Y__fmodeflags(tls *TLS, mode uintptr) (r int32)
//go:noescape
func Y__fopen_rb_ca(tls *TLS, filename uintptr, f uintptr, buf uintptr, len1 Tsize_t) (r uintptr)
//go:noescape
func Y__fpclassify(tls *TLS, x float64) (r int32)
//go:noescape
func Y__fpclassifyf(tls *TLS, x float32) (r int32)
//go:noescape
func Y__fpclassifyl(tls *TLS, x float64) (r int32)
//go:noescape
func Y__fpending(tls *TLS, f uintptr) (r Tsize_t)
//go:noescape
func Y__fpurge(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__fputwc_unlocked(tls *TLS, c Twchar_t, f uintptr) (r Twint_t)
//go:noescape
func Y__freadable(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__freadahead(tls *TLS, f uintptr) (r Tsize_t)
//go:noescape
func Y__freading(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__freadptr(tls *TLS, f uintptr, sizep uintptr) (r uintptr)
//go:noescape
func Y__freadptrinc(tls *TLS, f uintptr, inc Tsize_t)
//go:noescape
func Y__freelocale(tls *TLS, l Tlocale_t)
//go:noescape
func Y__fseeko(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32)
//go:noescape
func Y__fseeko_unlocked(tls *TLS, f uintptr, off Toff_t, whence int32) (r int32)
//go:noescape
func Y__fseterr(tls *TLS, f uintptr)
//go:noescape
func Y__fsetlocking(tls *TLS, f uintptr, type1 int32) (r int32)
//go:noescape
func Y__fstat(tls *TLS, fd int32, st uintptr) (r int32)
//go:noescape
func Y__fstatat(tls *TLS, fd int32, path uintptr, st uintptr, flag int32) (r int32)
//go:noescape
func Y__ftello(tls *TLS, f uintptr) (r Toff_t)
//go:noescape
func Y__ftello_unlocked(tls *TLS, f uintptr) (r Toff_t)
//go:noescape
func Y__funcs_on_quick_exit(tls *TLS)
//go:noescape
func Y__futimesat(tls *TLS, dirfd int32, pathname uintptr, times uintptr) (r int32)
//go:noescape
func Y__fwritable(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__fwritex(tls *TLS, s uintptr, l Tsize_t, f uintptr) (r Tsize_t)
//go:noescape
func Y__fwriting(tls *TLS, f uintptr) (r int32)
//go:noescape
func Y__fxstat(tls *TLS, ver int32, fd int32, buf uintptr) (r int32)
//go:noescape
func Y__fxstatat(tls *TLS, ver int32, fd int32, path uintptr, buf uintptr, flag int32) (r int32)
//go:noescape
func Y__get_handler_set(tls *TLS, set uintptr)
//go:noescape
func Y__get_locale(tls *TLS, cat int32, val uintptr) (r uintptr)
//go:noescape
func Y__get_resolv_conf(tls *TLS, conf uintptr, search uintptr, search_sz Tsize_t) (r int32)
//go:noescape
func Y__getauxval(tls *TLS, item uint64) (r uint64)
//go:noescape
func Y__getdelim(tls *TLS, s uintptr, n uintptr, delim int32, f uintptr) (r Tssize_t)
//go:noescape
func Y__getgr_a(tls *TLS, name uintptr, gid Tgid_t, gr uintptr, buf uintptr, size uintptr, mem uintptr, nmem uintptr, res uintptr) (r int32)
//go:noescape
func Y__getgrent_a(tls *TLS, f uintptr, gr uintptr, line uintptr, size uintptr, mem uintptr, nmem uintptr, res uintptr) (r int32)
//go:noescape
func Y__getopt_msg(tls *TLS, a uintptr, b uintptr, c uintptr, l Tsize_t)
//go:noescape
func Y__getpw_a(tls *TLS, name uintptr, uid Tuid_t, pw uintptr, buf uintptr, size uintptr, res uintptr) (r int32)
//go:noescape
func Y__getpwent_a(tls *TLS, f uintptr, pw uintptr, line uintptr, size uintptr, res uintptr) (r int32)
//go:noescape
func Y__gettextdomain(tls *TLS) (r uintptr)
//go:noescape
func Y__gmtime_r(tls *TLS, t uintptr, tm uintptr) (r uintptr)
//go:noescape
func Y__h_errno_location(tls *TLS) (r uintptr)
//go:noescape
func Y__inet_aton(tls *TLS, s0 uintptr, dest uintptr) (r int32)
//go:noescape
func Y__init_ssp(tls *TLS, entropy uintptr)
//go:noescape
func Y__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) (r uint64)
//go:noescape
func Y__isalnum_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isalpha_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isblank_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__iscntrl_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isdigit_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isfinite(tls *TLS, d float64) (_2 int32)
//go:noescape
func Y__isfinitef(tls *TLS, f float32) (_2 int32)
//go:noescape
func Y__isfinitel(tls *TLS, d float64) (_2 int32)
//go:noescape
func Y__isgraph_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__islower_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isnan(t *TLS, x float64) (_2 int32)
//go:noescape
func Y__isnanf(t *TLS, arg float32) (_2 int32)
//go:noescape
func Y__isnanl(t *TLS, arg float64) (_2 int32)
//go:noescape
func Y__isoc99_fscanf(tls *TLS, f uintptr, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__isoc99_fwscanf(tls *TLS, f uintptr, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__isoc99_scanf(tls *TLS, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__isoc99_sscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__isoc99_swscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__isoc99_vfscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32)
//go:noescape
func Y__isoc99_vfwscanf(tls *TLS, f uintptr, fmt uintptr, ap Tva_list) (r int32)
//go:noescape
func Y__isoc99_vscanf(tls *TLS, fmt uintptr, ap Tva_list) (r int32)
//go:noescape
func Y__isoc99_vsscanf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32)
//go:noescape
func Y__isoc99_vswscanf(tls *TLS, s uintptr, fmt uintptr, ap Tva_list) (r int32)
//go:noescape
func Y__isoc99_vwscanf(tls *TLS, fmt uintptr, ap Tva_list) (r int32)
//go:noescape
func Y__isoc99_wscanf(tls *TLS, fmt uintptr, va uintptr) (r int32)
//go:noescape
func Y__isprint_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__ispunct_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isspace_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__isupper_l(tls *TLS, c int32, l Tlocale_t) (r int32)
//go:noescape
func Y__iswalnum_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswalpha_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswblank_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswcntrl_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswctype_l(tls *TLS, c Twint_t, t Twctype_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswdigit_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswgraph_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswlower_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswprint_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswpunct_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswspace_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
func Y__iswupper_l(tls *TLS, c Twint_t, l Tlocale_t) (r int32)
//go:noescape
| 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_arm64.go | vendor/modernc.org/libc/libc_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.
//go:build !(linux && arm64)
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/libc_unix1.go | vendor/modernc.org/libc/libc_unix1.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 unix && !illumos && !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)) && !openbsd
package libc // import "modernc.org/libc"
import (
"golang.org/x/sys/unix"
"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))
}
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/straceon.go | vendor/modernc.org/libc/straceon.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.strace
// +build libc.strace
package libc // import "modernc.org/libc"
const __ccgo_strace = 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/capi_netbsd_amd64.go | vendor/modernc.org/libc/capi_netbsd_amd64.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/builtin32.go | vendor/modernc.org/libc/builtin32.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"
)
func X__builtin_ctzl(tls *TLS, x ulong) int32 {
return int32(mbits.TrailingZeros32(x))
}
func X__builtin_clzl(t *TLS, n ulong) int32 {
return int32(mbits.LeadingZeros32(n))
}
// int __builtin_popcountl (unsigned long x)
func X__builtin_popcountl(t *TLS, x ulong) int32 {
return int32(mbits.OnesCount32(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/mem_brk.go | vendor/modernc.org/libc/mem_brk.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.membrk a simple but safe version of malloc
// and friends is used that works like sbrk(2). Additionally free becomes a
// nop.
package libc // import "modernc.org/libc"
import (
"unsafe"
"modernc.org/libc/errno"
"modernc.org/libc/sys/types"
)
const (
heapAlign = 16
memgrind = false
)
var (
heap = make([]byte, heapSize)
heapP = uintptr(unsafe.Pointer(&heap[heapAlign]))
heapLast = uintptr(unsafe.Pointer(&heap[heapSize-1]))
)
// void *malloc(size_t size);
func Xmalloc(t *TLS, n types.Size_t) uintptr {
if __ccgo_strace {
trc("t=%v n=%v, (%v:)", t, n, origin(2))
}
if n == 0 {
// malloc(0) should return unique pointers
// (often expected and gnulib replaces malloc if malloc(0) returns 0)
n = 1
}
allocMu.Lock()
defer allocMu.Unlock()
n2 := uintptr(n) + uintptrSize // reserve space for recording block size
p := roundup(heapP, 16)
if p+uintptr(n2) >= heapLast {
t.setErrno(errno.ENOMEM)
return 0
}
heapP = p + uintptr(n2)
*(*uintptr)(unsafe.Pointer(p - uintptrSize)) = uintptr(n)
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))
}
return Xmalloc(t, n*size)
}
// 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))
}
switch {
case ptr != 0 && size != 0:
p := Xmalloc(t, size)
sz0 := UsableSize(ptr)
if p != 0 {
copy((*RawMem)(unsafe.Pointer(p))[:size:size], (*RawMem)(unsafe.Pointer(ptr))[:sz0:sz0])
}
return p
case ptr == 0 && size != 0:
return Xmalloc(t, size)
}
return 0
}
// void free(void *ptr);
func Xfree(t *TLS, p uintptr) {
if __ccgo_strace {
trc("t=%v p=%v, (%v:)", t, p, origin(2))
}
}
func UsableSize(p uintptr) types.Size_t {
return types.Size_t(*(*uintptr)(unsafe.Pointer(p - uintptrSize)))
}
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/ioutil_openbsd.go | vendor/modernc.org/libc/ioutil_openbsd.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/ccgo_linux_386.go | vendor/modernc.org/libc/ccgo_linux_386.go | // Code generated for linux/386 by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -mlong-double-64 -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/i386 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -march=i486 -mtune=generic -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go | 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_freebsd_arm64.go | vendor/modernc.org/libc/capi_freebsd_arm64.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/libc_windows_arm64.go | vendor/modernc.org/libc/libc_windows_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 (
"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_unix3.go | vendor/modernc.org/libc/libc_unix3.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 unix && !illumos && !(linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm))
package libc // import "modernc.org/libc"
import (
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
ctime "modernc.org/libc/time"
)
// 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 ts unix.Timespec
if err := unix.ClockGettime(clk_id, &ts); err != nil {
t.setErrno(err)
trc("FAIL: %v", err)
return -1
}
*(*unix.Timespec)(unsafe.Pointer(tp)) = ts
return 0
}
func Xgmtime_r(tls *TLS, t uintptr, tm uintptr) (r uintptr) {
if __ccgo_strace {
trc("tls=%v t=%v tm=%v, (%v:)", tls, t, tm, origin(2))
defer func() { trc("-> %v", r) }()
}
if x___secs_to_tm(tls, int64(*(*time_t)(unsafe.Pointer(t))), tm) < 0 {
*(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(errno.EOVERFLOW)
return uintptr(0)
}
(*ctime.Tm)(unsafe.Pointer(tm)).Ftm_isdst = 0
(*ctime.Tm)(unsafe.Pointer(tm)).Ftm_gmtoff = 0
(*ctime.Tm)(unsafe.Pointer(tm)).Ftm_zone = uintptr(unsafe.Pointer(&x___utc))
return tm
}
| 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_arm64.go | vendor/modernc.org/libc/musl_openbsd_arm64.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_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -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:351: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:63:24 */
type intptr_t = int64 /* alltypes.h:78:15 */
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 */
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:73:15 */
type off_t = int64 /* alltypes.h:170: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:328:9 */
type FILE = _IO_FILE /* alltypes.h:328:25 */
type va_list = uintptr /* alltypes.h:334: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:38:15 */
type double_t = float64 /* alltypes.h:43: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_freebsd_386.go | vendor/modernc.org/libc/libc_freebsd_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"
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_illumos_amd64.go | vendor/modernc.org/libc/libc_illumos_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 (
// "os"
// "strings"
gotime "time"
"unicode"
"unsafe"
"golang.org/x/sys/unix"
// "modernc.org/libc/errno"
"modernc.org/libc/fcntl"
// "modernc.org/libc/signal"
"modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/wctype"
)
var (
startTime = gotime.Now() // For clock(3)
)
// 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 {
// sz := int(unsafe.Sizeof(k_sigaction{}))
// kact = t.Alloc(sz)
// defer t.Free(sz)
// *(*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(signum), 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))
}
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
}
if cmd == fcntl.F_SETFL {
arg |= unix.O_LARGEFILE
}
panic(todo(""))
// 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))
}
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
// if err != 0 {
// // if dmesgs {
// // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
// // }
// t.setErrno(err)
// return -1
// }
// // if dmesgs {
// // dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
// // }
// 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))
}
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 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))
}
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
// 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))
}
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))
}
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
// t.setErrno(err)
// return -1
// }
//
// // if dmesgs {
// // dmesg("%v: %q: ok", origin(1), GoString(pathname))
// // }
// 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))
}
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
// // if dmesgs {
// // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
// // }
// t.setErrno(err)
// return -1
// }
//
// // if dmesgs {
// // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
// // }
// 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 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))
}
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
// return -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 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))
}
panic(todo(""))
// 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
// fd, _, err := unix.Syscall(unix.SYS_OPEN, pathname, uintptr(flags|unix.O_LARGEFILE), 0666)
// if err != 0 {
// t.setErrno(err)
// return 0
// }
//
// if p := newFile(t, int32(fd)); p != 0 {
// return p
// }
//
// Xclose(t, int32(fd))
// t.setErrno(errno.ENOMEM)
// return 0
}
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
if __ccgo_strace {
trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
}
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
if __ccgo_strace {
trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
}
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
// 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
}
func AtomicLoadPInt8(addr uintptr) (val int8) {
return int8(a_load_8(addr))
}
func AtomicLoadPInt16(addr uintptr) (val int16) {
return int16(a_load_16(addr))
}
func AtomicLoadPUint8(addr uintptr) byte {
return byte(a_load_8(addr))
}
func AtomicLoadPUint16(addr uintptr) uint16 {
return uint16(a_load_16(addr))
}
func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
return byte(a_load_8(ptr))
}
var _table1 = [384]int32{
129: int32(1),
130: int32(2),
131: int32(3),
132: int32(4),
133: int32(5),
134: int32(6),
135: int32(7),
136: int32(8),
137: int32(9),
138: int32(10),
139: int32(11),
140: int32(12),
141: int32(13),
142: int32(14),
143: int32(15),
144: int32(16),
145: int32(17),
146: int32(18),
147: int32(19),
148: int32(20),
149: int32(21),
150: int32(22),
151: int32(23),
152: int32(24),
153: int32(25),
154: int32(26),
155: int32(27),
156: int32(28),
157: int32(29),
158: int32(30),
159: int32(31),
160: int32(32),
161: int32(33),
162: int32(34),
163: int32(35),
164: int32(36),
165: int32(37),
166: int32(38),
167: int32(39),
168: int32(40),
169: int32(41),
170: int32(42),
171: int32(43),
172: int32(44),
173: int32(45),
174: int32(46),
175: int32(47),
176: int32(48),
177: int32(49),
178: int32(50),
179: int32(51),
180: int32(52),
181: int32(53),
182: int32(54),
183: int32(55),
184: int32(56),
185: int32(57),
186: int32(58),
187: int32(59),
188: int32(60),
189: int32(61),
190: int32(62),
191: int32(63),
192: int32(64),
193: int32('a'),
194: int32('b'),
195: int32('c'),
196: int32('d'),
197: int32('e'),
198: int32('f'),
199: int32('g'),
200: int32('h'),
201: int32('i'),
202: int32('j'),
203: int32('k'),
204: int32('l'),
205: int32('m'),
206: int32('n'),
207: int32('o'),
208: int32('p'),
209: int32('q'),
210: int32('r'),
211: int32('s'),
212: int32('t'),
213: int32('u'),
214: int32('v'),
215: int32('w'),
216: int32('x'),
217: int32('y'),
218: int32('z'),
219: int32(91),
220: int32(92),
221: int32(93),
222: int32(94),
223: int32(95),
224: int32(96),
225: int32('a'),
226: int32('b'),
227: int32('c'),
228: int32('d'),
229: int32('e'),
230: int32('f'),
231: int32('g'),
232: int32('h'),
233: int32('i'),
234: int32('j'),
235: int32('k'),
236: int32('l'),
237: int32('m'),
238: int32('n'),
239: int32('o'),
240: int32('p'),
241: int32('q'),
242: int32('r'),
243: int32('s'),
244: int32('t'),
245: int32('u'),
246: int32('v'),
247: int32('w'),
248: int32('x'),
249: int32('y'),
250: int32('z'),
251: int32(123),
252: int32(124),
253: int32(125),
254: int32(126),
255: int32(127),
}
var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
defer func() { trc("-> %v", r) }()
}
return uintptr(unsafe.Pointer(&_ptable1))
}
type Tin6_addr = struct {
F__in6_union struct {
F__s6_addr16 [0][8]uint16
F__s6_addr32 [0][4]uint32
F__s6_addr [16]uint8
}
}
var Xin6addr_any = Tin6_addr{}
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)
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
| 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_riscv64.go | vendor/modernc.org/libc/capi_linux_riscv64.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": {},
"iswalnum": {},
"iswspace": {},
"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/musl_freebsd_arm.go | vendor/modernc.org/libc/musl_freebsd_arm.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_arm.go -pkgname libc -static-locals-prefix _s -Iarch/arm -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 = uint32 /* <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]uint8
F__encoding [32]uint8
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/libc64.go | vendor/modernc.org/libc/libc64.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 && !(386 || arm)) || mips64le
package libc // import "modernc.org/libc"
import (
"unsafe"
"modernc.org/libc/limits"
"modernc.org/libc/sys/types"
)
const (
heapSize = 2 << 30 // Adjust for your debugging session requirements and system RAM size.
)
type (
// RawMem represents the biggest byte array the runtime can handle
RawMem [1<<50 - 1]byte
// 48-5*8 = 8 bytes left to pad
stackHeaderPadding struct {
a uintptr
}
)
type bits []int
func newBits(n int) (r bits) { return make(bits, (n+63)>>6) }
func (b bits) has(n int) bool { return b != nil && b[n>>6]&(1<<uint(n&63)) != 0 }
func (b bits) set(n int) { b[n>>6] |= 1 << uint(n&63) }
func Xstrchrnul(tls *TLS, s uintptr, c int32) (r uintptr) {
if __ccgo_strace {
trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
defer func() { trc("-> %v", r) }()
}
var k types.Size_t
var w uintptr
_, _ = k, w
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
}
for {
if !(uint64(s)%Uint64FromInt64(8) != 0) {
break
}
if !(*(*int8)(unsafe.Pointer(s)) != 0) || int32(*(*uint8)(unsafe.Pointer(s))) == c {
return s
}
goto _1
_1:
s++
}
k = uint64(-Int32FromInt32(1)) / Uint64FromInt32(limits.UCHAR_MAX) * uint64(c)
w = s
for {
if !(!((*(*uint64)(unsafe.Pointer(w))-uint64(-Int32FromInt32(1))/Uint64FromInt32(limits.UCHAR_MAX)) & ^*(*uint64)(unsafe.Pointer(w)) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(limits.UCHAR_MAX)*uint64(Int32FromInt32(limits.UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0) && !((*(*uint64)(unsafe.Pointer(w))^k-uint64(-Int32FromInt32(1))/Uint64FromInt32(limits.UCHAR_MAX)) & ^(*(*uint64)(unsafe.Pointer(w))^k) & (uint64(-Int32FromInt32(1))/Uint64FromInt32(limits.UCHAR_MAX)*uint64(Int32FromInt32(limits.UCHAR_MAX)/Int32FromInt32(2)+Int32FromInt32(1))) != 0)) {
break
}
goto _2
_2:
w += 8
}
s = w
for {
if !(*(*int8)(unsafe.Pointer(s)) != 0 && int32(*(*uint8)(unsafe.Pointer(s))) != c) {
break
}
goto _3
_3:
s++
}
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/libc_freebsd_amd64.go | vendor/modernc.org/libc/libc_freebsd_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"
import (
"strings"
gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/fts"
"modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/utime"
)
type (
long = int64
ulong = uint64
)
var (
startTime = gotime.Now() // For clock(3)
)
// 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: uint64(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, uint64(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 uint64) 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
}
var _table1 = [384]int32{
129: int32(1),
130: int32(2),
131: int32(3),
132: int32(4),
133: int32(5),
134: int32(6),
135: int32(7),
136: int32(8),
137: int32(9),
138: int32(10),
139: int32(11),
140: int32(12),
141: int32(13),
142: int32(14),
143: int32(15),
144: int32(16),
145: int32(17),
146: int32(18),
147: int32(19),
148: int32(20),
149: int32(21),
150: int32(22),
151: int32(23),
152: int32(24),
153: int32(25),
154: int32(26),
155: int32(27),
156: int32(28),
157: int32(29),
158: int32(30),
159: int32(31),
160: int32(32),
161: int32(33),
162: int32(34),
163: int32(35),
164: int32(36),
165: int32(37),
166: int32(38),
167: int32(39),
168: int32(40),
169: int32(41),
170: int32(42),
171: int32(43),
172: int32(44),
173: int32(45),
174: int32(46),
175: int32(47),
176: int32(48),
177: int32(49),
178: int32(50),
179: int32(51),
180: int32(52),
181: int32(53),
182: int32(54),
183: int32(55),
184: int32(56),
185: int32(57),
186: int32(58),
187: int32(59),
188: int32(60),
189: int32(61),
190: int32(62),
191: int32(63),
192: int32(64),
193: int32('a'),
194: int32('b'),
195: int32('c'),
196: int32('d'),
197: int32('e'),
198: int32('f'),
199: int32('g'),
200: int32('h'),
201: int32('i'),
202: int32('j'),
203: int32('k'),
204: int32('l'),
205: int32('m'),
206: int32('n'),
207: int32('o'),
208: int32('p'),
209: int32('q'),
210: int32('r'),
211: int32('s'),
212: int32('t'),
213: int32('u'),
214: int32('v'),
215: int32('w'),
216: int32('x'),
217: int32('y'),
218: int32('z'),
219: int32(91),
220: int32(92),
221: int32(93),
222: int32(94),
223: int32(95),
224: int32(96),
225: int32('a'),
226: int32('b'),
227: int32('c'),
228: int32('d'),
229: int32('e'),
230: int32('f'),
231: int32('g'),
232: int32('h'),
233: int32('i'),
234: int32('j'),
235: int32('k'),
236: int32('l'),
237: int32('m'),
238: int32('n'),
239: int32('o'),
240: int32('p'),
241: int32('q'),
242: int32('r'),
243: int32('s'),
244: int32('t'),
245: int32('u'),
246: int32('v'),
247: int32('w'),
248: int32('x'),
249: int32('y'),
250: int32('z'),
251: int32(123),
252: int32(124),
253: int32(125),
254: int32(126),
255: int32(127),
}
var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
defer func() { trc("-> %v", r) }()
}
return uintptr(unsafe.Pointer(&_ptable1))
}
type Tin6_addr = struct {
F__in6_union struct {
F__s6_addr16 [0][8]uint16
F__s6_addr32 [0][4]uint32
F__s6_addr [16]uint8
}
}
var Xin6addr_any = Tin6_addr{}
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)
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
func X__maskrune(tls *TLS, _c int32, _f uint64) int32 {
return int32(uint32(int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c&0xff)*4)))) & uint32(_f))
}
// int fstatfs(int fd, struct statfs *buf);
func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
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
}
type lconv = 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
F__ccgo_pad1 [2]byte
}
var posix_lconv = lconv{Fdecimal_point: ts + 23, Fthousands_sep: ts + 13, Fgrouping: ts + 13, Fint_curr_symbol: ts + 13, Fcurrency_symbol: ts + 13, Fmon_decimal_point: ts + 13, Fmon_thousands_sep: ts + 13, Fmon_grouping: ts + 13, Fpositive_sign: ts + 13, Fnegative_sign: ts + 13, Fint_frac_digits: Int8FromInt32(255), Ffrac_digits: Int8FromInt32(255), Fp_cs_precedes: Int8FromInt32(255), Fp_sep_by_space: Int8FromInt32(255), Fn_cs_precedes: Int8FromInt32(255), Fn_sep_by_space: Int8FromInt32(255), Fp_sign_posn: Int8FromInt32(255), Fn_sign_posn: Int8FromInt32(255), Fint_p_cs_precedes: Int8FromInt32(255), Fint_p_sep_by_space: Int8FromInt32(255), Fint_n_cs_precedes: Int8FromInt32(255), Fint_n_sep_by_space: Int8FromInt32(255), Fint_p_sign_posn: Int8FromInt32(255), Fint_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */
return Xtolower(tls, c)
}
| 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_linux_arm.go | vendor/modernc.org/libc/ccgo_linux_arm.go | // Code generated for linux/arm by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/arm -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/arm/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo.go obj/src/unistd/usleep.lo.go obj/src/unis | 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/ioutil_darwin.go | vendor/modernc.org/libc/ioutil_darwin.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/ccgo_linux_loong64.go | vendor/modernc.org/libc/ccgo_linux_loong64.go | // Code generated for linux/loong64 by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/loongarch64 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo.go obj/src/unistd/usleep.lo.go | 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_freebsd_arm64.go | vendor/modernc.org/libc/musl_freebsd_arm64.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_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 ../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 = int64 /* <builtin>:3:26 */
type size_t = uint64 /* <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__ccgo_pad1 [4]byte
F__types uintptr
} /* table.cpp.c:290:3 */
type _RuneRange = struct {
F__nranges int32
F__ccgo_pad1 [4]byte
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__ccgo_pad1 [4]byte
F__runetype [256]uint64
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
F__ccgo_pad2 [4]byte
} /* 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 *);
| 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_arm64.go | vendor/modernc.org/libc/libc_freebsd_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"
import (
"strings"
gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/fts"
"modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/utime"
)
type (
long = int64
ulong = uint64
)
var (
startTime = gotime.Now() // For clock(3)
)
// 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: uint64(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, uint64(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 uint64) 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
}
var _table1 = [384]int32{
129: int32(1),
130: int32(2),
131: int32(3),
132: int32(4),
133: int32(5),
134: int32(6),
135: int32(7),
136: int32(8),
137: int32(9),
138: int32(10),
139: int32(11),
140: int32(12),
141: int32(13),
142: int32(14),
143: int32(15),
144: int32(16),
145: int32(17),
146: int32(18),
147: int32(19),
148: int32(20),
149: int32(21),
150: int32(22),
151: int32(23),
152: int32(24),
153: int32(25),
154: int32(26),
155: int32(27),
156: int32(28),
157: int32(29),
158: int32(30),
159: int32(31),
160: int32(32),
161: int32(33),
162: int32(34),
163: int32(35),
164: int32(36),
165: int32(37),
166: int32(38),
167: int32(39),
168: int32(40),
169: int32(41),
170: int32(42),
171: int32(43),
172: int32(44),
173: int32(45),
174: int32(46),
175: int32(47),
176: int32(48),
177: int32(49),
178: int32(50),
179: int32(51),
180: int32(52),
181: int32(53),
182: int32(54),
183: int32(55),
184: int32(56),
185: int32(57),
186: int32(58),
187: int32(59),
188: int32(60),
189: int32(61),
190: int32(62),
191: int32(63),
192: int32(64),
193: int32('a'),
194: int32('b'),
195: int32('c'),
196: int32('d'),
197: int32('e'),
198: int32('f'),
199: int32('g'),
200: int32('h'),
201: int32('i'),
202: int32('j'),
203: int32('k'),
204: int32('l'),
205: int32('m'),
206: int32('n'),
207: int32('o'),
208: int32('p'),
209: int32('q'),
210: int32('r'),
211: int32('s'),
212: int32('t'),
213: int32('u'),
214: int32('v'),
215: int32('w'),
216: int32('x'),
217: int32('y'),
218: int32('z'),
219: int32(91),
220: int32(92),
221: int32(93),
222: int32(94),
223: int32(95),
224: int32(96),
225: int32('a'),
226: int32('b'),
227: int32('c'),
228: int32('d'),
229: int32('e'),
230: int32('f'),
231: int32('g'),
232: int32('h'),
233: int32('i'),
234: int32('j'),
235: int32('k'),
236: int32('l'),
237: int32('m'),
238: int32('n'),
239: int32('o'),
240: int32('p'),
241: int32('q'),
242: int32('r'),
243: int32('s'),
244: int32('t'),
245: int32('u'),
246: int32('v'),
247: int32('w'),
248: int32('x'),
249: int32('y'),
250: int32('z'),
251: int32(123),
252: int32(124),
253: int32(125),
254: int32(126),
255: int32(127),
}
var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
defer func() { trc("-> %v", r) }()
}
return uintptr(unsafe.Pointer(&_ptable1))
}
type Tin6_addr = struct {
F__in6_union struct {
F__s6_addr16 [0][8]uint16
F__s6_addr32 [0][4]uint32
F__s6_addr [16]uint8
}
}
var Xin6addr_any = Tin6_addr{}
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)
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
| 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/etc.go | vendor/modernc.org/libc/etc.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 (
"fmt"
"io"
"os"
"path/filepath"
"reflect"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"unsafe"
"modernc.org/libc/errno"
"modernc.org/libc/signal"
"modernc.org/libc/sys/types"
)
const (
allocatorPageOverhead = 4 * unsafe.Sizeof(int(0))
stackHeaderSize = unsafe.Sizeof(stackHeader{})
stackSegmentSize = 1<<12 - allocatorPageOverhead
uintptrSize = unsafe.Sizeof(uintptr(0))
)
var (
Covered = map[uintptr]struct{}{}
CoveredC = map[string]struct{}{}
fToken uintptr
tid int32
atExit []func()
atExitMu sync.Mutex
signals [signal.NSIG]uintptr
signalsMu sync.Mutex
objectMu sync.Mutex
objects = map[uintptr]interface{}{}
tlsBalance int32
_ = origin
_ = trc
)
func init() {
if n := stackHeaderSize; n%16 != 0 {
panic(fmt.Errorf("internal error: stackHeaderSize %v == %v (mod 16)", n, n%16))
}
}
func origin(skip int) string {
pc, fn, fl, _ := runtime.Caller(skip)
f := runtime.FuncForPC(pc)
var fns string
if f != nil {
fns = f.Name()
if x := strings.LastIndex(fns, "."); x > 0 {
fns = fns[x+1:]
}
}
return fmt.Sprintf("%s:%d:%s", filepath.Base(fn), fl, fns)
}
func trc(s string, args ...interface{}) string { //TODO-
switch {
case s == "":
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
default:
s = fmt.Sprintf(s, args...)
}
r := fmt.Sprintf("%s: TRC %s", origin(2), s)
fmt.Fprintf(os.Stdout, "%s\n", r)
os.Stdout.Sync()
return r
}
func todo(s string, args ...interface{}) string { //TODO-
switch {
case s == "":
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
default:
s = fmt.Sprintf(s, args...)
}
r := fmt.Sprintf("%s: TODOTODO %s", origin(2), s) //TODOOK
if dmesgs {
dmesg("%s", r)
}
fmt.Fprintf(os.Stdout, "%s\n", r)
os.Stdout.Sync()
os.Exit(1)
panic("unrechable")
}
var coverPCs [1]uintptr //TODO not concurrent safe
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 token() uintptr { return atomic.AddUintptr(&fToken, 1) }
func addObject(o interface{}) uintptr {
t := token()
objectMu.Lock()
objects[t] = o
objectMu.Unlock()
return t
}
func getObject(t uintptr) interface{} {
objectMu.Lock()
o := objects[t]
if o == nil {
panic(todo("", t))
}
objectMu.Unlock()
return o
}
func removeObject(t uintptr) {
objectMu.Lock()
if _, ok := objects[t]; !ok {
panic(todo(""))
}
delete(objects, t)
objectMu.Unlock()
}
func (t *TLS) setErrno(err interface{}) {
if t == nil {
panic("nil TLS")
}
if memgrind {
if atomic.SwapInt32(&t.reentryGuard, 1) != 0 {
panic(todo("concurrent use of TLS instance %p", t))
}
defer func() {
if atomic.SwapInt32(&t.reentryGuard, 0) != 1 {
panic(todo("concurrent use of TLS instance %p", t))
}
}()
}
// if dmesgs {
// dmesg("%v: %T(%v)\n%s", origin(1), err, err, debug.Stack())
// }
again:
switch x := err.(type) {
case int:
*(*int32)(unsafe.Pointer(t.errnop)) = int32(x)
case int32:
*(*int32)(unsafe.Pointer(t.errnop)) = x
case *os.PathError:
err = x.Err
goto again
case syscallErrno:
*(*int32)(unsafe.Pointer(t.errnop)) = int32(x)
case *os.SyscallError:
err = x.Err
goto again
default:
panic(todo("%T", x))
}
}
// Close frees the resources of t.
func (t *TLS) Close() {
t.Free(int(unsafe.Sizeof(int32(0))))
if memgrind {
if t.stackHeaderBalance != 0 {
panic(todo("non zero stack header balance: %d", t.stackHeaderBalance))
}
atomic.AddInt32(&tlsBalance, -1)
}
t.pthreadData.close(t)
*t = TLS{}
}
// Alloc allocates n bytes of thread-local storage. It must be paired with a
// call to t.Free(n), using the same n. The order matters. This is ok:
//
// t.Alloc(11)
// t.Alloc(22)
// t.Free(22)
// t.Free(11)
//
// This is not correct:
//
// t.Alloc(11)
// t.Alloc(22)
// t.Free(11)
// t.Free(22)
func (t *TLS) Alloc(n int) (r uintptr) {
t.sp++
if memgrind {
if atomic.SwapInt32(&t.reentryGuard, 1) != 0 {
panic(todo("concurrent use of TLS instance %p", t))
}
defer func() {
if atomic.SwapInt32(&t.reentryGuard, 0) != 1 {
panic(todo("concurrent use of TLS instance %p", t))
}
}()
}
n += 15
n &^= 15
if t.stack.free >= n {
r = t.stack.sp
t.stack.free -= n
t.stack.sp += uintptr(n)
return r
}
//if we have a next stack
if nstack := t.stack.next; nstack != 0 {
if (*stackHeader)(unsafe.Pointer(nstack)).free >= n {
*(*stackHeader)(unsafe.Pointer(t.stack.page)) = t.stack
t.stack = *(*stackHeader)(unsafe.Pointer(nstack))
r = t.stack.sp
t.stack.free -= n
t.stack.sp += uintptr(n)
return r
}
nstack := *(*stackHeader)(unsafe.Pointer(t.stack.next))
for ; ; nstack = *(*stackHeader)(unsafe.Pointer(nstack.next)) {
if memgrind {
if atomic.AddInt32(&t.stackHeaderBalance, -1) < 0 {
panic(todo("negative stack header balance"))
}
}
Xfree(t, nstack.page)
if nstack.next == 0 {
break
}
}
t.stack.next = 0
}
if t.stack.page != 0 {
*(*stackHeader)(unsafe.Pointer(t.stack.page)) = t.stack
}
rq := n + int(stackHeaderSize)
if rq%int(stackSegmentSize) != 0 {
rq -= rq % int(stackSegmentSize)
rq += int(stackSegmentSize)
}
t.stack.free = rq - int(stackHeaderSize)
t.stack.prev = t.stack.page
rq += 15
rq &^= 15
t.stack.page = Xmalloc(t, types.Size_t(rq))
if t.stack.page == 0 {
panic("OOM")
}
if memgrind {
atomic.AddInt32(&t.stackHeaderBalance, 1)
}
t.stack.sp = t.stack.page + stackHeaderSize
r = t.stack.sp
t.stack.free -= n
t.stack.sp += uintptr(n)
if t.stack.prev != 0 {
(*stackHeader)(unsafe.Pointer(t.stack.prev)).next = t.stack.page
}
return r
}
// this declares how many stack frames are kept alive before being freed
const stackFrameKeepalive = 2
// Free deallocates n bytes of thread-local storage. See TLS.Alloc for details
// on correct usage.
func (t *TLS) Free(n int) {
t.sp--
if memgrind {
if atomic.SwapInt32(&t.reentryGuard, 1) != 0 {
panic(todo("concurrent use of TLS instance %p", t))
}
defer func() {
if atomic.SwapInt32(&t.reentryGuard, 0) != 1 {
panic(todo("concurrent use of TLS instance %p", t))
}
}()
}
n += 15
n &^= 15
t.stack.free += n
t.stack.sp -= uintptr(n)
if t.stack.sp != t.stack.page+stackHeaderSize {
return
}
nstack := t.stack
//if we are the first one, just free all of them
if t.stack.prev == 0 {
for ; ; nstack = *(*stackHeader)(unsafe.Pointer(nstack.next)) {
if memgrind {
if atomic.AddInt32(&t.stackHeaderBalance, -1) < 0 {
panic(todo("negative stack header balance"))
}
}
Xfree(t, nstack.page)
if nstack.next == 0 {
break
}
}
t.stack = stackHeader{}
return
}
//look if we are in the last n stackframes (n=stackFrameKeepalive)
//if we find something just return and set the current stack pointer to the previous one
for i := 0; i < stackFrameKeepalive; i++ {
if nstack.next == 0 {
*((*stackHeader)(unsafe.Pointer(t.stack.page))) = t.stack
t.stack = *(*stackHeader)(unsafe.Pointer(t.stack.prev))
return
}
nstack = *(*stackHeader)(unsafe.Pointer(nstack.next))
}
//else only free the last
if memgrind {
if atomic.AddInt32(&t.stackHeaderBalance, -1) < 0 {
panic(todo("negative stack header balance"))
}
}
Xfree(t, nstack.page)
(*stackHeader)(unsafe.Pointer(nstack.prev)).next = 0
*(*stackHeader)(unsafe.Pointer(t.stack.page)) = t.stack
t.stack = *(*stackHeader)(unsafe.Pointer(t.stack.prev))
}
type stackHeader struct {
free int // bytes left in page
page uintptr // stack page
prev uintptr // prev stack page = prev stack header
next uintptr // next stack page = next stack header
sp uintptr // next allocation address
_ stackHeaderPadding
}
func cString(t *TLS, s string) uintptr { //TODO-
n := len(s)
p := Xmalloc(t, types.Size_t(n)+1)
if p == 0 {
panic("OOM")
}
copy((*RawMem)(unsafe.Pointer(p))[:n:n], s)
*(*byte)(unsafe.Pointer(p + uintptr(n))) = 0
return p
}
// 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.
//
// Individual arguments must be one of int, uint, int32, uint32, int64, uint64,
// float64, uintptr or Intptr. Other types will panic.
//
// This function supports code generated by ccgo/v3. For manually constructed
// var args it's recommended to use the NewVaList function instead.
//
// 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
}
// 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, types.Size_t(8*n))
}
// 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...)
}
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 getVaList(va uintptr) []string {
r := []string{}
for p := va; ; p += 8 {
st := *(*uintptr)(unsafe.Pointer(p))
if st == 0 {
return r
}
r = append(r, GoString(st))
}
return r
}
func roundup(n, to uintptr) uintptr {
if r := n % to; r != 0 {
return n + to - r
}
return n
}
func Bool(v bool) bool { return v }
func Bool32(b bool) int32 {
if b {
return 1
}
return 0
}
func Bool64(b bool) int64 {
if b {
return 1
}
return 0
}
type sorter struct {
len int
base uintptr
sz uintptr
f func(*TLS, uintptr, uintptr) int32
t *TLS
}
func (s *sorter) Len() int { return s.len }
func (s *sorter) Less(i, j int) bool {
return s.f(s.t, s.base+uintptr(i)*s.sz, s.base+uintptr(j)*s.sz) < 0
}
func (s *sorter) Swap(i, j int) {
p := uintptr(s.base + uintptr(i)*s.sz)
q := uintptr(s.base + uintptr(j)*s.sz)
for i := 0; i < int(s.sz); i++ {
*(*byte)(unsafe.Pointer(p)), *(*byte)(unsafe.Pointer(q)) = *(*byte)(unsafe.Pointer(q)), *(*byte)(unsafe.Pointer(p))
p++
q++
}
}
func CString(s string) (uintptr, error) {
n := len(s)
p := Xmalloc(nil, types.Size_t(n)+1)
if p == 0 {
return 0, fmt.Errorf("CString: cannot allocate %d bytes", n+1)
}
copy((*RawMem)(unsafe.Pointer(p))[:n:n], s)
*(*byte)(unsafe.Pointer(p + uintptr(n))) = 0
return p, nil
}
func GetEnviron() (r []string) {
for p := Environ(); ; p += unsafe.Sizeof(p) {
q := *(*uintptr)(unsafe.Pointer(p))
if q == 0 {
return r
}
r = append(r, GoString(q))
}
}
func strToUint64(t *TLS, s uintptr, base int32) (seenDigits, neg bool, next uintptr, n uint64, err int32) {
var c byte
out:
for {
c = *(*byte)(unsafe.Pointer(s))
switch c {
case ' ', '\t', '\n', '\r', '\v', '\f':
s++
case '+':
s++
break out
case '-':
s++
neg = true
break out
default:
break out
}
}
for {
c = *(*byte)(unsafe.Pointer(s))
var digit uint64
switch base {
case 10:
switch {
case c >= '0' && c <= '9':
seenDigits = true
digit = uint64(c) - '0'
default:
return seenDigits, neg, s, n, 0
}
case 16:
if c >= 'A' && c <= 'F' {
c = c + ('a' - 'A')
}
switch {
case c >= '0' && c <= '9':
seenDigits = true
digit = uint64(c) - '0'
case c >= 'a' && c <= 'f':
seenDigits = true
digit = uint64(c) - 'a' + 10
default:
return seenDigits, neg, s, n, 0
}
default:
panic(todo("", base))
}
n0 := n
n = uint64(base)*n + digit
if n < n0 { // overflow
return seenDigits, neg, s, n0, errno.ERANGE
}
s++
}
}
func strToFloatt64(t *TLS, s uintptr, bits int) (n float64, errno int32) {
var b []byte
var neg bool
defer func() {
var err error
if n, err = strconv.ParseFloat(string(b), bits); err != nil {
panic(todo(""))
}
if neg {
n = -n
}
}()
var c byte
out:
for {
c = *(*byte)(unsafe.Pointer(s))
switch c {
case ' ', '\t', '\n', '\r', '\v', '\f':
s++
case '+':
s++
break out
case '-':
s++
neg = true
break out
default:
break out
}
}
for {
c = *(*byte)(unsafe.Pointer(s))
switch {
case c >= '0' && c <= '9':
b = append(b, c)
case c == '.':
b = append(b, c)
s++
for {
c = *(*byte)(unsafe.Pointer(s))
switch {
case c >= '0' && c <= '9':
b = append(b, c)
case c == 'e' || c == 'E':
b = append(b, c)
s++
for {
c = *(*byte)(unsafe.Pointer(s))
switch {
case c == '+' || c == '-':
b = append(b, c)
s++
for {
c = *(*byte)(unsafe.Pointer(s))
switch {
case c >= '0' && c <= '9':
b = append(b, c)
default:
return
}
s++
}
default:
panic(todo("%q %q", b, string(c)))
}
}
default:
return
}
s++
}
default:
panic(todo("%q %q", b, string(c)))
}
s++
}
}
func parseZone(s string) (name string, off int) {
_, name, off, _ = parseZoneOffset(s, false)
return name, off
}
func parseZoneOffset(s string, offOpt bool) (string, string, int, bool) {
s0 := s
name := s
for len(s) != 0 {
switch c := s[0]; {
case c >= 'A' && c <= 'Z', c >= 'a' && c <= 'z', c == '_', c == '/':
s = s[1:]
default:
name = name[:len(name)-len(s)]
if len(name) < 3 {
panic(todo("%q", s0))
}
if offOpt {
if len(s) == 0 {
return "", name, 0, false
}
if c := s[0]; (c < '0' || c > '9') && c != '+' && c != '-' {
return s, name, 0, false
}
}
s, off := parseOffset(s)
return s, name, off, true
}
}
return "", s0, 0, true
}
// [+|-]hh[:mm[:ss]]
func parseOffset(s string) (string, int) {
if len(s) == 0 {
panic(todo(""))
}
k := 1
switch s[0] {
case '+':
// nop
s = s[1:]
case '-':
k = -1
s = s[1:]
}
s, hh, ok := parseUint(s)
if !ok {
panic(todo(""))
}
n := hh * 3600
if len(s) == 0 || s[0] != ':' {
return s, k * n
}
s = s[1:] // ':'
if len(s) == 0 {
panic(todo(""))
}
s, mm, ok := parseUint(s)
if !ok {
panic(todo(""))
}
n += mm * 60
if len(s) == 0 || s[0] != ':' {
return s, k * n
}
s = s[1:] // ':'
if len(s) == 0 {
panic(todo(""))
}
s, ss, _ := parseUint(s)
return s, k * (n + ss)
}
func parseUint(s string) (string, int, bool) {
var ok bool
var r int
for len(s) != 0 {
switch c := s[0]; {
case c >= '0' && c <= '9':
ok = true
r0 := r
r = 10*r + int(c) - '0'
if r < r0 {
panic(todo(""))
}
s = s[1:]
default:
return s, r, ok
}
}
return s, r, ok
}
// https://stackoverflow.com/a/53052382
//
// isTimeDST returns true if time t occurs within daylight saving time
// for its time zone.
func isTimeDST(t time.Time) bool {
// If the most recent (within the last year) clock change
// was forward then assume the change was from std to dst.
hh, mm, _ := t.UTC().Clock()
tClock := hh*60 + mm
for m := -1; m > -12; m-- {
// assume dst lasts for at least one month
hh, mm, _ := t.AddDate(0, m, 0).UTC().Clock()
clock := hh*60 + mm
if clock != tClock {
return clock > tClock
}
}
// assume no dst
return false
}
| 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/fsync.go | vendor/modernc.org/libc/fsync.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 = false
| 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_arm.go | vendor/modernc.org/libc/libc_netbsd_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))
}
panic(todo(""))
// 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: uint16(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
}
| 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_amd64.go | vendor/modernc.org/libc/capi_freebsd_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": {},
"_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_illumos_amd64.go | vendor/modernc.org/libc/musl_illumos_amd64.go | // Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_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/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.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/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.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/gethostbyname_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/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.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 src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.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
)
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 = int32 /* <builtin>:15:24 */
type uint16_t = uint16 /* alltypes.h:126:25 */
type uint32_t = uint32 /* alltypes.h:131:25 */
type uint64_t = uint64 /* alltypes.h:136:25 */
func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24
}
var table = [384]uint16{
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x320/256 | 0x320*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x160/256 | 0x160*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536),
uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
} /* __ctype_b_loc.c:9:29 */
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
}
return uintptr(unsafe.Pointer(&ptable))
}
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
}
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 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__builtin_isprint(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 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 off_t = int64 /* alltypes.h:162:16 */
type ino_t = uint64 /* alltypes.h:167:25 */
type dirent = struct {
d_ino ino_t
d_off off_t
d_reclen uint16
d_type uint8
d_name [256]int8
_ [5]byte
} /* dirent.h:5:1 */
type __dirstream = struct {
tell off_t
fd int32
buf_pos int32
buf_end int32
lock [1]int32
buf [2048]int8
} /* dirent.h:20:9 */
type DIR = __dirstream /* dirent.h:20:28 */
type ssize_t = int64 /* alltypes.h:65:15 */
type intptr_t = int64 /* alltypes.h:70:15 */
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 */
type div_t = struct {
quot int32
rem int32
} /* stdlib.h:62:35 */
type ldiv_t = struct {
quot int64
rem int64
} /* stdlib.h:63:36 */
type lldiv_t = struct {
quot int64
rem int64
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
if __ccgo_strace {
trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
}
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
}
type mode_t = uint32 /* alltypes.h:152:18 */
type iovec = struct {
iov_base uintptr
iov_len size_t
} /* alltypes.h:355:1 */
type flock = struct {
l_type int16
l_whence int16
_ [4]byte
l_start off_t
l_len off_t
l_pid pid_t
_ [4]byte
} /* fcntl.h:24:1 */
type file_handle = struct {
_ [0]uint32
handle_bytes uint32
handle_type int32
} /* fcntl.h:167:1 */
type f_owner_ex = struct {
__type int32
pid pid_t
} /* fcntl.h:172:1 */
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
if __ccgo_strace {
trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
}
panic(todo(""))
// var fd int32
// var dir uintptr
//
// if AssignInt32(&fd, Xopen(tls, name, 00|0200000|02000000, 0)) < 0 {
// return uintptr(0)
// }
// if !(int32(AssignUintptr(&dir, Xcalloc(tls, uint64(1), uint64(unsafe.Sizeof(DIR{}))))) != 0) {
// X__syscall1(tls, int64(3), int64(fd))
// return uintptr(0)
// }
// (*DIR)(unsafe.Pointer(dir)).fd = fd
// return dir
}
type max_align_t = struct {
__ll int64
__ld float64
} /* alltypes.h:41:54 */
type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
if __ccgo_strace {
trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
}
panic(todo(""))
// var de uintptr
//
// if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
// var len int32 = int32(X__syscall3(tls, int64(217), int64((*DIR)(unsafe.Pointer(dir)).fd), int64(dir+24), int64(unsafe.Sizeof([2048]int8{}))))
// if len <= 0 {
// if len < 0 && len != -2 {
// *(*int32)(unsafe.Pointer(X___errno_location(tls))) = -len
// }
// return uintptr(0)
// }
// (*DIR)(unsafe.Pointer(dir)).buf_end = len
// (*DIR)(unsafe.Pointer(dir)).buf_pos = 0
// }
// de = dir + 24 + uintptr((*DIR)(unsafe.Pointer(dir)).buf_pos)
// *(*int32)(unsafe.Pointer(dir + 12)) += int32((*dirent)(unsafe.Pointer(de)).d_reclen)
// (*DIR)(unsafe.Pointer(dir)).tell = (*dirent)(unsafe.Pointer(de)).d_off
// return de
}
type uintptr_t = uint64 /* 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 = int64 /* alltypes.h:111:25 */
type intmax_t = int64 /* alltypes.h:116:25 */
type uint8_t = uint8 /* alltypes.h:121: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 _IO_FILE = struct {
flags uint32
_ [4]byte
rpos uintptr
rend uintptr
close uintptr
wend uintptr
wpos uintptr
mustbezero_1 uintptr
wbase uintptr
read uintptr
write uintptr
seek uintptr
buf uintptr
buf_size size_t
prev uintptr
next uintptr
fd int32
pipe_pid int32
lockcount int64
mode int32
lock int32
lbf int32
_ [4]byte
cookie uintptr
off off_t
getln_buf uintptr
mustbezero_2 uintptr
shend uintptr
shlim off_t
shcnt off_t
prev_locked uintptr
next_locked uintptr
locale 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 {
_ [0]uint64
__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 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 float64;} at bp, 8
*(*float64)(unsafe.Pointer(bp)) = __f
return *(*uint64)(unsafe.Pointer(bp))
}
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 */
_ [5]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 int64
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
dtv_copy uintptr
} /* alltypes.h:273:9 */
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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
}
return X__shgetc(tls, f)
}()
if c == '+' || c == '-' {
neg = Bool32(c == '-')
c = func() int32 {
if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
}
return X__shgetc(tls, f)
}()
if uint32(c-'0') >= 10 && pok != 0 {
if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
(*FILE)(unsafe.Pointer(f)).rpos--
} else {
}
}
}
if uint32(c-'0') >= 10 {
if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
(*FILE)(unsafe.Pointer(f)).rpos--
} else {
}
return -0x7fffffffffffffff - int64(1)
}
for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 {
if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
}
return X__shgetc(tls, f)
}() {
}
if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
(*FILE)(unsafe.Pointer(f)).rpos--
} 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: */
| 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/straceoff.go | vendor/modernc.org/libc/straceoff.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.strace
// +build !libc.strace
package libc // import "modernc.org/libc"
const __ccgo_strace = false
| 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_linux_mips64le.go | vendor/modernc.org/libc/libc_linux_mips64le.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 (
"os"
"strings"
gotime "time"
"unicode"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
"modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/wctype"
)
var (
startTime = gotime.Now() // For clock(3)
)
// 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))
}
// 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 {
sz := int(unsafe.Sizeof(k_sigaction{}))
kact = t.Alloc(sz)
defer t.Free(sz)
*(*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(signum), 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))
}
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
}
if cmd == fcntl.F_SETFL {
arg |= unix.O_LARGEFILE
}
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))
}
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))
}
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))
}
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))
}
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))
}
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))
}
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))
}
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
// }
t.setErrno(err)
return -1
}
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
// }
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))
}
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))
}
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 := gotime.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 __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
}
// 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.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))
}
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 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.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
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))
}
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))
}
if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
}
// if dmesgs {
// dmesg("%v: %q: ok", origin(1), GoString(pathname))
// }
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.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
// }
t.setErrno(err)
return -1
}
// if dmesgs {
// dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
// }
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))
}
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 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.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -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))
}
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))
}
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 pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
if __ccgo_strace {
trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
}
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))
}
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))
}
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
fd, _, err := unix.Syscall(unix.SYS_OPEN, pathname, uintptr(flags|unix.O_LARGEFILE), 0666)
if err != 0 {
t.setErrno(err)
return 0
}
if p := newFile(t, int32(fd)); p != 0 {
return p
}
Xclose(t, int32(fd))
t.setErrno(errno.ENOMEM)
return 0
}
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
if __ccgo_strace {
trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
}
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
if __ccgo_strace {
trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
}
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
// 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
}
func AtomicLoadPInt8(addr uintptr) (val int8) {
return int8(a_load_8(addr))
}
func AtomicLoadPInt16(addr uintptr) (val int16) {
return int16(a_load_16(addr))
}
func AtomicLoadPUint8(addr uintptr) byte {
return byte(a_load_8(addr))
}
func AtomicLoadPUint16(addr uintptr) uint16 {
return uint16(a_load_16(addr))
}
func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
return byte(a_load_8(ptr))
}
var _table1 = [384]int32{
129: int32(1),
130: int32(2),
131: int32(3),
132: int32(4),
133: int32(5),
134: int32(6),
135: int32(7),
136: int32(8),
137: int32(9),
138: int32(10),
139: int32(11),
140: int32(12),
141: int32(13),
142: int32(14),
143: int32(15),
144: int32(16),
145: int32(17),
146: int32(18),
147: int32(19),
148: int32(20),
149: int32(21),
150: int32(22),
151: int32(23),
152: int32(24),
153: int32(25),
154: int32(26),
155: int32(27),
156: int32(28),
157: int32(29),
158: int32(30),
159: int32(31),
160: int32(32),
161: int32(33),
162: int32(34),
163: int32(35),
164: int32(36),
165: int32(37),
166: int32(38),
167: int32(39),
168: int32(40),
169: int32(41),
170: int32(42),
171: int32(43),
172: int32(44),
173: int32(45),
174: int32(46),
175: int32(47),
176: int32(48),
177: int32(49),
178: int32(50),
179: int32(51),
180: int32(52),
181: int32(53),
182: int32(54),
183: int32(55),
184: int32(56),
185: int32(57),
186: int32(58),
187: int32(59),
188: int32(60),
189: int32(61),
190: int32(62),
191: int32(63),
192: int32(64),
193: int32('a'),
194: int32('b'),
195: int32('c'),
196: int32('d'),
197: int32('e'),
198: int32('f'),
199: int32('g'),
200: int32('h'),
201: int32('i'),
202: int32('j'),
203: int32('k'),
204: int32('l'),
205: int32('m'),
206: int32('n'),
207: int32('o'),
208: int32('p'),
209: int32('q'),
210: int32('r'),
211: int32('s'),
212: int32('t'),
213: int32('u'),
214: int32('v'),
215: int32('w'),
216: int32('x'),
217: int32('y'),
218: int32('z'),
219: int32(91),
220: int32(92),
221: int32(93),
222: int32(94),
223: int32(95),
224: int32(96),
225: int32('a'),
226: int32('b'),
227: int32('c'),
228: int32('d'),
229: int32('e'),
230: int32('f'),
231: int32('g'),
232: int32('h'),
233: int32('i'),
234: int32('j'),
235: int32('k'),
236: int32('l'),
237: int32('m'),
238: int32('n'),
239: int32('o'),
240: int32('p'),
241: int32('q'),
242: int32('r'),
243: int32('s'),
244: int32('t'),
245: int32('u'),
246: int32('v'),
247: int32('w'),
248: int32('x'),
249: int32('y'),
250: int32('z'),
251: int32(123),
252: int32(124),
253: int32(125),
254: int32(126),
255: int32(127),
}
var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
defer func() { trc("-> %v", r) }()
}
return uintptr(unsafe.Pointer(&_ptable1))
}
type Tin6_addr = struct {
F__in6_union struct {
F__s6_addr16 [0][8]uint16
F__s6_addr32 [0][4]uint32
F__s6_addr [16]uint8
}
}
var Xin6addr_any = Tin6_addr{}
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)
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
| 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_netbsd.go | vendor/modernc.org/libc/ioutil_netbsd.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/memgrind_musl.go | vendor/modernc.org/libc/memgrind_musl.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/memory"
)
const (
isMemBrk = false
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 (
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 Tsize_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
}
allocatorMu.Lock()
defer allocatorMu.Unlock()
p, err := allocator.UintptrCalloc(int(size))
// if dmesgs {
// dmesg("%v: %v -> %#x, %v", origin(1), size, p, err)
// }
if err != nil {
t.setErrno(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 Tsize_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
}
allocatorMu.Lock()
defer allocatorMu.Unlock()
p, err := allocator.UintptrCalloc(rq)
// if dmesgs {
// dmesg("%v: %v -> %#x, %v", origin(1), n*size, p, err)
// }
if err != nil {
t.setErrno(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 Tsize_t) uintptr {
if __ccgo_strace {
trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2))
}
allocatorMu.Lock()
defer allocatorMu.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(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)
// }
allocatorMu.Lock()
defer allocatorMu.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) Tsize_t {
allocatorMu.Lock()
defer allocatorMu.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 Tsize_t(memory.UintptrUsableSize(p))
}
type MemAllocatorStat struct {
Allocs int
Bytes int
Mmaps int
}
// MemStat no-op for this build tag
func MemStat() MemAllocatorStat {
return MemAllocatorStat{}
}
func Xmalloc_usable_size(tls *TLS, p uintptr) (r Tsize_t) {
return UsableSize(p)
}
// 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() {
allocatorMu.Lock()
defer allocatorMu.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) {
allocatorMu.Lock()
defer func() {
allocs = nil
allocsMore = nil
frees = nil
memAuditEnabled = false
memAudit = nil
allocatorMu.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) {
allocatorMu.Lock()
allocsMore[pc] = s
allocatorMu.Unlock()
}
func MemAudit() (r []*MemAuditError) {
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/capi_openbsd_amd64.go | vendor/modernc.org/libc/capi_openbsd_amd64.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/musl_darwin_amd64.go | vendor/modernc.org/libc/musl_darwin_amd64.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_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 ../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 */
// /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:54
// int __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));
func X__darwin_check_fd_set_overflow(tls *TLS, _ int32, _ uintptr, _ int32) int32 {
return 1
}
// 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:343:32 */
type ssize_t = int64 /* alltypes.h:65:15 */
type intptr_t = int64 /* alltypes.h:70:15 */
type off_t = int64 /* 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 uintptr_t = uint64 /* 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 = 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 */
| 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_illumos_amd64.go | vendor/modernc.org/libc/capi_illumos_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_linux.go | vendor/modernc.org/libc/libc_linux.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 (
// "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 = types.X__syscall_slong_t
ulong = types.X__syscall_ulong_t
)
type file uintptr
func (f file) fd() int32 { return (*stdio.FILE)(unsafe.Pointer(f)).F_fileno }
func (f file) setFd(fd int32) { (*stdio.FILE)(unsafe.Pointer(f)).F_fileno = fd }
func (f file) err() bool { return (*stdio.FILE)(unsafe.Pointer(f)).F_flags2&stdio.X_IO_ERR_SEEN != 0 }
func (f file) setErr() { (*stdio.FILE)(unsafe.Pointer(f)).F_flags2 |= stdio.X_IO_ERR_SEEN }
func (f file) flags() int32 { return (*stdio.FILE)(unsafe.Pointer(f)).F_flags }
func (f file) orFlags(n int32) { (*stdio.FILE)(unsafe.Pointer(f)).F_flags |= n }
func (f file) xorFlags(n int32) { (*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))
}
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 types.X__useconds_t) int32 {
if __ccgo_strace {
trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
}
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))
}
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))
}
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 {
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 {
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))
}
//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))
}
// 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 {
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)))
}
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))
}
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))
}
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 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))
}
// 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))
}
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), 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.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))
}
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)
}
// 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 {
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) {
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 {
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 {
| 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_linux_mips64le.go | vendor/modernc.org/libc/musl_linux_mips64le.go | // Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_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/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.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/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.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/gethostbyname_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/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.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 src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.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
)
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 = int32 /* <builtin>:15:24 */
type uint16_t = uint16 /* alltypes.h:126:25 */
type uint32_t = uint32 /* alltypes.h:131:25 */
type uint64_t = uint64 /* alltypes.h:136:25 */
func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24
}
var table = [384]uint16{
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x320/256 | 0x320*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16((0x160/256 | 0x160*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536),
uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
} /* __ctype_b_loc.c:9:29 */
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
if __ccgo_strace {
trc("tls=%v, (%v:)", tls, origin(2))
}
return uintptr(unsafe.Pointer(&ptable))
}
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
}
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 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__builtin_isprint(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 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 off_t = int64 /* alltypes.h:162:16 */
type ino_t = uint64 /* alltypes.h:167:25 */
type dirent = struct {
d_ino ino_t
d_off off_t
d_reclen uint16
d_type uint8
d_name [256]int8
_ [5]byte
} /* dirent.h:5:1 */
type __dirstream = struct {
tell off_t
fd int32
buf_pos int32
buf_end int32
lock [1]int32
buf [2048]int8
} /* dirent.h:20:9 */
type DIR = __dirstream /* dirent.h:20:28 */
type ssize_t = int64 /* alltypes.h:65:15 */
type intptr_t = int64 /* alltypes.h:70:15 */
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 */
type div_t = struct {
quot int32
rem int32
} /* stdlib.h:62:35 */
type ldiv_t = struct {
quot int64
rem int64
} /* stdlib.h:63:36 */
type lldiv_t = struct {
quot int64
rem int64
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
if __ccgo_strace {
trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
}
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
}
type mode_t = uint32 /* alltypes.h:152:18 */
type iovec = struct {
iov_base uintptr
iov_len size_t
} /* alltypes.h:355:1 */
type flock = struct {
l_type int16
l_whence int16
_ [4]byte
l_start off_t
l_len off_t
l_pid pid_t
_ [4]byte
} /* fcntl.h:24:1 */
type file_handle = struct {
_ [0]uint32
handle_bytes uint32
handle_type int32
} /* fcntl.h:167:1 */
type f_owner_ex = struct {
__type int32
pid pid_t
} /* fcntl.h:172:1 */
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
if __ccgo_strace {
trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
}
var fd int32
var dir uintptr
if AssignInt32(&fd, Xopen(tls, name, 00|0200000|02000000, 0)) < 0 {
return uintptr(0)
}
if !(int32(AssignUintptr(&dir, Xcalloc(tls, uint64(1), uint64(unsafe.Sizeof(DIR{}))))) != 0) {
X__syscall1(tls, int64(3), int64(fd))
return uintptr(0)
}
(*DIR)(unsafe.Pointer(dir)).fd = fd
return dir
}
type max_align_t = struct {
__ll int64
__ld float64
} /* alltypes.h:41:54 */
type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
if __ccgo_strace {
trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
}
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
var len int32 = int32(X__syscall3(tls, int64(217), int64((*DIR)(unsafe.Pointer(dir)).fd), int64(dir+24), int64(unsafe.Sizeof([2048]int8{}))))
if len <= 0 {
if len < 0 && len != -2 {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = -len
}
return uintptr(0)
}
(*DIR)(unsafe.Pointer(dir)).buf_end = len
(*DIR)(unsafe.Pointer(dir)).buf_pos = 0
}
de = dir + 24 + uintptr((*DIR)(unsafe.Pointer(dir)).buf_pos)
*(*int32)(unsafe.Pointer(dir + 12)) += int32((*dirent)(unsafe.Pointer(de)).d_reclen)
(*DIR)(unsafe.Pointer(dir)).tell = (*dirent)(unsafe.Pointer(de)).d_off
return de
}
type uintptr_t = uint64 /* 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 = int64 /* alltypes.h:111:25 */
type intmax_t = int64 /* alltypes.h:116:25 */
type uint8_t = uint8 /* alltypes.h:121: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 _IO_FILE = struct {
flags uint32
_ [4]byte
rpos uintptr
rend uintptr
close uintptr
wend uintptr
wpos uintptr
mustbezero_1 uintptr
wbase uintptr
read uintptr
write uintptr
seek uintptr
buf uintptr
buf_size size_t
prev uintptr
next uintptr
fd int32
pipe_pid int32
lockcount int64
mode int32
lock int32
lbf int32
_ [4]byte
cookie uintptr
off off_t
getln_buf uintptr
mustbezero_2 uintptr
shend uintptr
shlim off_t
shcnt off_t
prev_locked uintptr
next_locked uintptr
locale 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 {
_ [0]uint64
__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 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 float64;} at bp, 8
*(*float64)(unsafe.Pointer(bp)) = __f
return *(*uint64)(unsafe.Pointer(bp))
}
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 */
_ [5]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 int64
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
dtv_copy uintptr
} /* alltypes.h:273:9 */
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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
}
return X__shgetc(tls, f)
}()
if c == '+' || c == '-' {
neg = Bool32(c == '-')
c = func() int32 {
if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
}
return X__shgetc(tls, f)
}()
if uint32(c-'0') >= 10 && pok != 0 {
if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
(*FILE)(unsafe.Pointer(f)).rpos--
} else {
}
}
}
if uint32(c-'0') >= 10 {
if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
(*FILE)(unsafe.Pointer(f)).rpos--
} else {
}
return -0x7fffffffffffffff - int64(1)
}
for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 {
if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
}
return X__shgetc(tls, f)
}() {
}
if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
(*FILE)(unsafe.Pointer(f)).rpos--
} 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
| 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_amd64.go | vendor/modernc.org/libc/libc_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.
//go:build !(linux && amd64)
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/nodmesg.go | vendor/modernc.org/libc/nodmesg.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"
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/libc/ccgo_linux_amd64.go | vendor/modernc.org/libc/ccgo_linux_amd64.go | // Code generated for linux/amd64 by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -mlong-double-64 -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/x86_64 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/fenv.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/setjmp/longjmp.lo.go obj/src/setjmp/setjmp.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.l | 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_darwin_arm64.go | vendor/modernc.org/libc/capi_darwin_arm64.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/capi_linux_arm.go | vendor/modernc.org/libc/capi_linux_arm.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/etc_musl.go | vendor/modernc.org/libc/etc_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)
package libc // import "modernc.org/libc"
import (
"fmt"
"os"
"path/filepath"
"runtime"
"strings"
)
// origin returns caller's short position, skipping skip frames.
func origin(skip int) string {
pc, fn, fl, _ := runtime.Caller(skip)
f := runtime.FuncForPC(pc)
var fns string
if f != nil {
fns = f.Name()
if x := strings.LastIndex(fns, "."); x > 0 {
fns = fns[x+1:]
}
if strings.HasPrefix(fns, "func") {
num := true
for _, c := range fns[len("func"):] {
if c < '0' || c > '9' {
num = false
break
}
}
if num {
return origin(skip + 2)
}
}
}
return fmt.Sprintf("%s:%d:%s", filepath.Base(fn), fl, fns)
}
// todo prints and return caller's position and an optional message tagged with TODO. Output goes to stderr.
func todo(s string, args ...interface{}) string {
switch {
case s == "":
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
default:
s = fmt.Sprintf(s, args...)
}
r := fmt.Sprintf("%s\n\tTODO %s", origin(2), s)
// fmt.Fprintf(os.Stderr, "%s\n", r)
// os.Stdout.Sync()
return r
}
// trc prints and return caller's position and an optional message tagged with TRC. Output goes to stderr.
func trc(s string, args ...interface{}) string {
switch {
case s == "":
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
default:
s = fmt.Sprintf(s, args...)
}
r := fmt.Sprintf("%s: TRC %s", origin(2), s)
fmt.Fprintf(os.Stderr, "%s\n", r)
os.Stderr.Sync()
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/capi_freebsd_arm.go | vendor/modernc.org/libc/capi_freebsd_arm.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/pthread_musl.go | vendor/modernc.org/libc/pthread_musl.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 (
"runtime"
"sync"
"sync/atomic"
"time"
"unsafe"
)
type pthreadAttr struct {
detachState int32
}
type pthreadCleanupItem struct {
routine, arg uintptr
}
// C original, unpatched version
//
// include/alltypes.h.in:86:TYPEDEF struct {
// union {
// int __i[sizeof(long)==8?10:6];
// volatile int __vi[sizeof(long)==8?10:6];
// volatile void *volatile __p[sizeof(long)==8?5:6];
// } __u;
// } pthread_mutex_t;
//TODO(jnml) can remove __ccgo_room patches now.
// We overlay the C version with our version below. It must not be larger than
// the C version.
type pthreadMutex struct { // gc 64b 32b | tinygo 64b 32b
sync.Mutex // 0 8 0 4 | 0 16 0 8
count int32 // 8 4 4 4 | 16 4 8 4
typ uint32 // 12 4 8 4 | 20 4 12 4
owner int32 // 16 4 12 4 | 24 4 16 4
// 20 16 | 28 20
}
type pthreadConds struct {
sync.Mutex
conds map[uintptr][]chan struct{}
}
var (
// Ensure there's enough space for unsafe type conversions.
_ [unsafe.Sizeof(Tpthread_mutex_t{}) - unsafe.Sizeof(pthreadMutex{})]byte
_ [unsafe.Sizeof(Tpthread_attr_t{}) - unsafe.Sizeof(pthreadAttr{})]byte
pthreadKeysMutex sync.Mutex
pthreadKeyDestructors []uintptr
pthreadKeysFree []Tpthread_key_t
conds = pthreadConds{conds: map[uintptr][]chan struct{}{}}
)
func _pthread_setcancelstate(tls *TLS, new int32, old uintptr) int32 {
//TODO actually respect cancel state
if uint32(new) > 2 {
return EINVAL
}
p := tls.pthread + unsafe.Offsetof(t__pthread{}.Fcanceldisable)
if old != 0 {
r := *(*int32)(unsafe.Pointer(p))
*(*int32)(unsafe.Pointer(old)) = int32(byte(r))
}
*(*int32)(unsafe.Pointer(p)) = new
return 0
}
func Xpthread_getspecific(tls *TLS, k Tpthread_key_t) uintptr {
return tls.pthreadKeyValues[k]
}
func Xpthread_setspecific(tls *TLS, k Tpthread_key_t, x uintptr) int32 {
if tls.pthreadKeyValues == nil {
tls.pthreadKeyValues = map[Tpthread_key_t]uintptr{}
}
tls.pthreadKeyValues[k] = x
return 0
}
func Xpthread_key_create(tls *TLS, k uintptr, dtor uintptr) int32 {
pthreadKeysMutex.Lock()
defer pthreadKeysMutex.Unlock()
var key Tpthread_key_t
switch l := Tpthread_key_t(len(pthreadKeysFree)); {
case l == 0:
key = Tpthread_key_t(len(pthreadKeyDestructors))
pthreadKeyDestructors = append(pthreadKeyDestructors, dtor)
default:
key = pthreadKeysFree[l-1]
pthreadKeysFree = pthreadKeysFree[:l-1]
pthreadKeyDestructors[key] = dtor
}
*(*Tpthread_key_t)(unsafe.Pointer(k)) = key
return 0
}
func Xpthread_key_delete(tls *TLS, k Tpthread_key_t) int32 {
pthreadKeysMutex.Lock()
defer pthreadKeysMutex.Unlock()
pthreadKeysFree = append(pthreadKeysFree, k)
return 0
}
func Xpthread_create(tls *TLS, res, attrp, entry, arg uintptr) int32 {
var attr pthreadAttr
if attrp != 0 {
attr = *(*pthreadAttr)(unsafe.Pointer(attrp))
}
detachState := int32(_DT_JOINABLE)
if attr.detachState != 0 {
detachState = _DT_DETACHED
}
tls2 := NewTLS()
tls2.ownsPthread = false
*(*Tpthread_t)(unsafe.Pointer(res)) = tls2.pthread
(*t__pthread)(unsafe.Pointer(tls2.pthread)).Fdetach_state = detachState
if detachState == _DT_JOINABLE {
(*sync.Mutex)(unsafe.Pointer(tls2.pthread + unsafe.Offsetof(t__pthread{}.F__ccgo_join_mutex))).Lock()
}
go func() {
Xpthread_exit(tls2, (*(*func(*TLS, uintptr) uintptr)(unsafe.Pointer(&struct{ uintptr }{entry})))(tls2, arg))
}()
return 0
}
func Xpthread_exit(tls *TLS, result uintptr) {
state := atomic.LoadInt32((*int32)(unsafe.Pointer(tls.pthread + unsafe.Offsetof(t__pthread{}.Fdetach_state))))
(*t__pthread)(unsafe.Pointer(tls.pthread)).Fresult = result
switch state {
case _DT_JOINABLE, _DT_DETACHED:
// ok
default:
panic(todo("", state))
}
for len(tls.pthreadCleanupItems) != 0 {
Xpthread_cleanup_pop(tls, 1)
}
for {
done := true
for k, v := range tls.pthreadKeyValues {
if v != 0 {
delete(tls.pthreadKeyValues, k)
pthreadKeysMutex.Lock()
d := pthreadKeyDestructors[k]
pthreadKeysMutex.Unlock()
if d != 0 {
done = false
(*(*func(*TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{d})))(tls, v)
}
}
}
if done {
break
}
}
if state == _DT_JOINABLE {
(*sync.Mutex)(unsafe.Pointer(tls.pthread + unsafe.Offsetof(t__pthread{}.F__ccgo_join_mutex))).Unlock()
}
atomic.StoreInt32((*int32)(unsafe.Pointer(tls.pthread+unsafe.Offsetof(t__pthread{}.Fdetach_state))), _DT_EXITED)
tls.Close()
runtime.Goexit()
}
func Xpthread_join(tls *TLS, t Tpthread_t, res uintptr) (r int32) {
if (*t__pthread)(unsafe.Pointer(t)).Fdetach_state > _DT_JOINABLE {
return EINVAL
}
(*sync.Mutex)(unsafe.Pointer(t + unsafe.Offsetof(t__pthread{}.F__ccgo_join_mutex))).Lock()
if res != 0 {
*(*uintptr)(unsafe.Pointer(res)) = (*t__pthread)(unsafe.Pointer(tls.pthread)).Fresult
}
return 0
}
func Xpthread_cleanup_push(tls *TLS, f, x uintptr) {
X_pthread_cleanup_push(tls, 0, f, x)
}
func __pthread_cleanup_push(tls *TLS, _, f, x uintptr) {
tls.pthreadCleanupItems = append(tls.pthreadCleanupItems, pthreadCleanupItem{f, x})
}
func X_pthread_cleanup_push(tls *TLS, _, f, x uintptr) {
tls.pthreadCleanupItems = append(tls.pthreadCleanupItems, pthreadCleanupItem{f, x})
}
func Xpthread_cleanup_pop(tls *TLS, run int32) {
X_pthread_cleanup_pop(tls, 0, run)
}
func __pthread_cleanup_pop(tls *TLS, _ uintptr, run int32) {
X_pthread_cleanup_pop(tls, 0, run)
}
func X_pthread_cleanup_pop(tls *TLS, _ uintptr, run int32) {
l := len(tls.pthreadCleanupItems)
item := tls.pthreadCleanupItems[l-1]
tls.pthreadCleanupItems = tls.pthreadCleanupItems[:l-1]
if run != 0 {
(*(*func(*TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{item.routine})))(tls, item.arg)
}
}
func Xpthread_attr_init(tls *TLS, a uintptr) int32 {
*(*Tpthread_attr_t)(unsafe.Pointer(a)) = Tpthread_attr_t{}
return 0
}
func Xpthread_attr_setscope(tls *TLS, a uintptr, scope int32) int32 {
switch scope {
case PTHREAD_SCOPE_SYSTEM:
return 0
case PTHREAD_SCOPE_PROCESS:
return ENOTSUP
default:
return EINVAL
}
}
func Xpthread_attr_setstacksize(tls *TLS, a uintptr, stacksite Tsize_t) int32 {
return 0
}
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) (r int32) {
if uint32(state) > 1 {
return EINVAL
}
(*pthreadAttr)(unsafe.Pointer(a)).detachState = state
return 0
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 {
*(*int32)(unsafe.Pointer(state)) = (*pthreadAttr)(unsafe.Pointer(a)).detachState
return 0
}
func Xpthread_attr_destroy(tls *TLS, a uintptr) int32 {
return 0
}
func Xpthread_self(tls *TLS) uintptr {
return tls.pthread
}
func Xpthread_mutex_init(tls *TLS, m, a uintptr) int32 {
*(*Tpthread_mutex_t)(unsafe.Pointer(m)) = Tpthread_mutex_t{}
if a != 0 {
(*pthreadMutex)(unsafe.Pointer(m)).typ = (*Tpthread_mutexattr_t)(unsafe.Pointer(a)).F__attr
}
return 0
}
func Xpthread_mutex_destroy(tls *TLS, m uintptr) int32 {
*(*Tpthread_mutex_t)(unsafe.Pointer(m)) = Tpthread_mutex_t{}
return 0
}
func Xpthread_mutex_lock(tls *TLS, m uintptr) int32 {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return 0
case PTHREAD_MUTEX_RECURSIVE:
if atomic.CompareAndSwapInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner), 0, tls.ID) {
(*pthreadMutex)(unsafe.Pointer(m)).count = 1
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return 0
}
if atomic.LoadInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner)) == tls.ID {
(*pthreadMutex)(unsafe.Pointer(m)).count++
return 0
}
for {
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
if atomic.CompareAndSwapInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner), 0, tls.ID) {
(*pthreadMutex)(unsafe.Pointer(m)).count = 1
return 0
}
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
}
default:
panic(todo("", typ))
}
}
func Xpthread_mutex_trylock(tls *TLS, m uintptr) int32 {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
if (*pthreadMutex)(unsafe.Pointer(m)).TryLock() {
return 0
}
return EBUSY
default:
panic(todo("typ=%v", typ))
}
}
func Xpthread_mutex_unlock(tls *TLS, m uintptr) int32 {
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
return 0
case PTHREAD_MUTEX_RECURSIVE:
if atomic.LoadInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner)) != tls.ID {
return EPERM
}
if atomic.AddInt32(&((*pthreadMutex)(unsafe.Pointer(m)).count), -1) == 0 {
atomic.StoreInt32(&((*pthreadMutex)(unsafe.Pointer(m)).owner), 0)
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
}
return 0
default:
panic(todo("", typ))
}
}
func Xpthread_cond_init(tls *TLS, c, a uintptr) int32 {
*(*Tpthread_cond_t)(unsafe.Pointer(c)) = Tpthread_cond_t{}
if a != 0 {
panic(todo(""))
}
conds.Lock()
delete(conds.conds, c)
conds.Unlock()
return 0
}
func Xpthread_cond_timedwait(tls *TLS, c, m, ts uintptr) (r int32) {
var to <-chan time.Time
if ts != 0 {
deadlineSecs := (*Ttimespec)(unsafe.Pointer(ts)).Ftv_sec
deadlineNsecs := (*Ttimespec)(unsafe.Pointer(ts)).Ftv_nsec
deadline := time.Unix(deadlineSecs, int64(deadlineNsecs))
d := deadline.Sub(time.Now())
if d <= 0 {
return ETIMEDOUT
}
to = time.After(d)
}
conds.Lock()
waiters := conds.conds[c]
ch := make(chan struct{}, 1)
waiters = append(waiters, ch)
conds.conds[c] = waiters
conds.Unlock()
defer func() {
conds.Lock()
defer conds.Unlock()
waiters = conds.conds[c]
for i, v := range waiters {
if v == ch {
conds.conds[c] = append(waiters[:i], waiters[i+1:]...)
return
}
}
}()
switch typ := (*pthreadMutex)(unsafe.Pointer(m)).typ; typ {
case PTHREAD_MUTEX_NORMAL:
(*pthreadMutex)(unsafe.Pointer(m)).Unlock()
select {
case <-ch:
// ok
case <-to:
r = ETIMEDOUT
}
(*pthreadMutex)(unsafe.Pointer(m)).Lock()
return r
default:
panic(todo("", typ))
}
}
func Xpthread_cond_wait(tls *TLS, c, m uintptr) int32 {
return Xpthread_cond_timedwait(tls, c, m, 0)
}
func Xpthread_cond_signal(tls *TLS, c uintptr) int32 {
return pthreadSignalN(tls, c, false)
}
func pthreadSignalN(tls *TLS, c uintptr, all bool) int32 {
conds.Lock()
waiters := conds.conds[c]
handle := waiters
if len(waiters) != 0 {
switch {
case all:
delete(conds.conds, c)
default:
handle = handle[:1]
conds.conds[c] = waiters[1:]
}
}
conds.Unlock()
for _, v := range handle {
close(v)
}
return 0
}
func Xpthread_cond_broadcast(tls *TLS, c uintptr) int32 {
return pthreadSignalN(tls, c, true)
}
func Xpthread_cond_destroy(tls *TLS, c uintptr) int32 {
return Xpthread_cond_broadcast(tls, c)
}
func Xpthread_atfork(tls *TLS, prepare, parent, child uintptr) int32 {
// fork(2) not supported.
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 {
*(*Tpthread_mutexattr_t)(unsafe.Pointer(a)) = Tpthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 {
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, typ int32) int32 {
if uint32(typ) > 2 {
return EINVAL
}
(*Tpthread_mutexattr_t)(unsafe.Pointer(a)).F__attr = uint32(typ) & 3
return 0
}
func Xpthread_detach(tls *TLS, t uintptr) int32 {
state := atomic.SwapInt32((*int32)(unsafe.Pointer(tls.pthread+unsafe.Offsetof(t__pthread{}.Fdetach_state))), _DT_DETACHED)
switch state {
case _DT_EXITED, _DT_DETACHED:
return 0
default:
panic(todo("", tls.ID, state))
}
}
// int pthread_equal(pthread_t, pthread_t);
func Xpthread_equal(tls *TLS, t, u uintptr) int32 {
return Bool32(t == u)
}
// int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict old)
func _pthread_sigmask(tls *TLS, now int32, set, old uintptr) int32 {
// ignored
return 0
}
// 202402251838 all_test.go:589: files=36 buildFails=30 execFails=2 pass=4
// 202402262246 all_test.go:589: files=36 buildFails=26 execFails=2 pass=8
// 202403041858 all_musl_test.go:640: files=36 buildFails=22 execFails=4 pass=10
| 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_linux_riscv64.go | vendor/modernc.org/libc/ccgo_linux_riscv64.go | // Code generated for linux/riscv64 by 'gcc --package-name=libc --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=_ -emit-func-aliases -eval-all-macros -extended-errors -ignore-asm-errors -ignore-unsupported-alignment -isystem -std=c99 -nostdinc -ffreestanding -D_XOPEN_SOURCE=700 -I./arch/riscv64 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -DNDEBUG -nostdlib -shared -o lib/libc.so.go obj/src/complex/__cexp.lo.go obj/src/complex/__cexpf.lo.go obj/src/complex/cabs.lo.go obj/src/complex/cabsf.lo.go obj/src/complex/cabsl.lo.go obj/src/complex/cacos.lo.go obj/src/complex/cacosf.lo.go obj/src/complex/cacosh.lo.go obj/src/complex/cacoshf.lo.go obj/src/complex/cacoshl.lo.go obj/src/complex/cacosl.lo.go obj/src/complex/carg.lo.go obj/src/complex/cargf.lo.go obj/src/complex/cargl.lo.go obj/src/complex/casin.lo.go obj/src/complex/casinf.lo.go obj/src/complex/casinh.lo.go obj/src/complex/casinhf.lo.go obj/src/complex/casinhl.lo.go obj/src/complex/casinl.lo.go obj/src/complex/catan.lo.go obj/src/complex/catanf.lo.go obj/src/complex/catanh.lo.go obj/src/complex/catanhf.lo.go obj/src/complex/catanhl.lo.go obj/src/complex/catanl.lo.go obj/src/complex/ccos.lo.go obj/src/complex/ccosf.lo.go obj/src/complex/ccosh.lo.go obj/src/complex/ccoshf.lo.go obj/src/complex/ccoshl.lo.go obj/src/complex/ccosl.lo.go obj/src/complex/cexp.lo.go obj/src/complex/cexpf.lo.go obj/src/complex/cexpl.lo.go obj/src/complex/cimag.lo.go obj/src/complex/cimagf.lo.go obj/src/complex/cimagl.lo.go obj/src/complex/clog.lo.go obj/src/complex/clogf.lo.go obj/src/complex/clogl.lo.go obj/src/complex/conj.lo.go obj/src/complex/conjf.lo.go obj/src/complex/conjl.lo.go obj/src/complex/cpow.lo.go obj/src/complex/cpowf.lo.go obj/src/complex/cpowl.lo.go obj/src/complex/cproj.lo.go obj/src/complex/cprojf.lo.go obj/src/complex/cprojl.lo.go obj/src/complex/creal.lo.go obj/src/complex/crealf.lo.go obj/src/complex/creall.lo.go obj/src/complex/csin.lo.go obj/src/complex/csinf.lo.go obj/src/complex/csinh.lo.go obj/src/complex/csinhf.lo.go obj/src/complex/csinhl.lo.go obj/src/complex/csinl.lo.go obj/src/complex/csqrt.lo.go obj/src/complex/csqrtf.lo.go obj/src/complex/csqrtl.lo.go obj/src/complex/ctan.lo.go obj/src/complex/ctanf.lo.go obj/src/complex/ctanh.lo.go obj/src/complex/ctanhf.lo.go obj/src/complex/ctanhl.lo.go obj/src/complex/ctanl.lo.go obj/src/conf/confstr.lo.go obj/src/conf/fpathconf.lo.go obj/src/conf/legacy.lo.go obj/src/conf/pathconf.lo.go obj/src/conf/sysconf.lo.go obj/src/crypt/crypt.lo.go obj/src/crypt/crypt_blowfish.lo.go obj/src/crypt/crypt_des.lo.go obj/src/crypt/crypt_md5.lo.go obj/src/crypt/crypt_r.lo.go obj/src/crypt/crypt_sha256.lo.go obj/src/crypt/crypt_sha512.lo.go obj/src/crypt/encrypt.lo.go obj/src/ctype/__ctype_b_loc.lo.go obj/src/ctype/__ctype_get_mb_cur_max.lo.go obj/src/ctype/__ctype_tolower_loc.lo.go obj/src/ctype/__ctype_toupper_loc.lo.go obj/src/ctype/isalnum.lo.go obj/src/ctype/isalpha.lo.go obj/src/ctype/isascii.lo.go obj/src/ctype/isblank.lo.go obj/src/ctype/iscntrl.lo.go obj/src/ctype/isdigit.lo.go obj/src/ctype/isgraph.lo.go obj/src/ctype/islower.lo.go obj/src/ctype/isprint.lo.go obj/src/ctype/ispunct.lo.go obj/src/ctype/isspace.lo.go obj/src/ctype/isupper.lo.go obj/src/ctype/iswalnum.lo.go obj/src/ctype/iswalpha.lo.go obj/src/ctype/iswblank.lo.go obj/src/ctype/iswcntrl.lo.go obj/src/ctype/iswctype.lo.go obj/src/ctype/iswdigit.lo.go obj/src/ctype/iswgraph.lo.go obj/src/ctype/iswlower.lo.go obj/src/ctype/iswprint.lo.go obj/src/ctype/iswpunct.lo.go obj/src/ctype/iswspace.lo.go obj/src/ctype/iswupper.lo.go obj/src/ctype/iswxdigit.lo.go obj/src/ctype/isxdigit.lo.go obj/src/ctype/toascii.lo.go obj/src/ctype/tolower.lo.go obj/src/ctype/toupper.lo.go obj/src/ctype/towctrans.lo.go obj/src/ctype/wcswidth.lo.go obj/src/ctype/wctrans.lo.go obj/src/ctype/wcwidth.lo.go obj/src/dirent/alphasort.lo.go obj/src/dirent/closedir.lo.go obj/src/dirent/dirfd.lo.go obj/src/dirent/fdopendir.lo.go obj/src/dirent/opendir.lo.go obj/src/dirent/readdir.lo.go obj/src/dirent/readdir_r.lo.go obj/src/dirent/rewinddir.lo.go obj/src/dirent/scandir.lo.go obj/src/dirent/seekdir.lo.go obj/src/dirent/telldir.lo.go obj/src/dirent/versionsort.lo.go obj/src/env/__environ.lo.go obj/src/env/__reset_tls.lo.go obj/src/env/__stack_chk_fail.lo.go obj/src/env/clearenv.lo.go obj/src/env/getenv.lo.go obj/src/env/putenv.lo.go obj/src/env/secure_getenv.lo.go obj/src/env/setenv.lo.go obj/src/env/unsetenv.lo.go obj/src/errno/strerror.lo.go obj/src/exit/_Exit.lo.go obj/src/exit/abort_lock.lo.go obj/src/exit/assert.lo.go obj/src/exit/at_quick_exit.lo.go obj/src/exit/quick_exit.lo.go obj/src/fcntl/creat.lo.go obj/src/fcntl/fcntl.lo.go obj/src/fcntl/open.lo.go obj/src/fcntl/openat.lo.go obj/src/fcntl/posix_fadvise.lo.go obj/src/fcntl/posix_fallocate.lo.go obj/src/fenv/riscv64/fenv-sf.lo.go obj/src/internal/defsysinfo.lo.go obj/src/internal/emulate_wait4.lo.go obj/src/internal/floatscan.lo.go obj/src/internal/intscan.lo.go obj/src/internal/libc.lo.go obj/src/internal/procfdname.lo.go obj/src/internal/shgetc.lo.go obj/src/internal/syscall_ret.lo.go obj/src/internal/vdso.lo.go obj/src/internal/version.lo.go obj/src/ipc/ftok.lo.go obj/src/ipc/msgctl.lo.go obj/src/ipc/msgget.lo.go obj/src/ipc/msgrcv.lo.go obj/src/ipc/msgsnd.lo.go obj/src/ipc/semctl.lo.go obj/src/ipc/semget.lo.go obj/src/ipc/semop.lo.go obj/src/ipc/semtimedop.lo.go obj/src/ipc/shmat.lo.go obj/src/ipc/shmctl.lo.go obj/src/ipc/shmdt.lo.go obj/src/ipc/shmget.lo.go obj/src/legacy/cuserid.lo.go obj/src/legacy/err.lo.go obj/src/legacy/euidaccess.lo.go obj/src/legacy/ftw.lo.go obj/src/legacy/futimes.lo.go obj/src/legacy/getdtablesize.lo.go obj/src/legacy/getloadavg.lo.go obj/src/legacy/getpagesize.lo.go obj/src/legacy/getpass.lo.go obj/src/legacy/getusershell.lo.go obj/src/legacy/isastream.lo.go obj/src/legacy/lutimes.lo.go obj/src/legacy/ulimit.lo.go obj/src/legacy/utmpx.lo.go obj/src/linux/adjtime.lo.go obj/src/linux/adjtimex.lo.go obj/src/linux/arch_prctl.lo.go obj/src/linux/brk.lo.go obj/src/linux/cache.lo.go obj/src/linux/cap.lo.go obj/src/linux/chroot.lo.go obj/src/linux/clock_adjtime.lo.go obj/src/linux/copy_file_range.lo.go obj/src/linux/epoll.lo.go obj/src/linux/eventfd.lo.go obj/src/linux/fallocate.lo.go obj/src/linux/fanotify.lo.go obj/src/linux/flock.lo.go obj/src/linux/getdents.lo.go obj/src/linux/getrandom.lo.go obj/src/linux/inotify.lo.go obj/src/linux/ioperm.lo.go obj/src/linux/iopl.lo.go obj/src/linux/klogctl.lo.go obj/src/linux/memfd_create.lo.go obj/src/linux/mlock2.lo.go obj/src/linux/module.lo.go obj/src/linux/mount.lo.go obj/src/linux/name_to_handle_at.lo.go obj/src/linux/open_by_handle_at.lo.go obj/src/linux/personality.lo.go obj/src/linux/pivot_root.lo.go obj/src/linux/prctl.lo.go obj/src/linux/preadv2.lo.go obj/src/linux/prlimit.lo.go obj/src/linux/process_vm.lo.go obj/src/linux/ptrace.lo.go obj/src/linux/pwritev2.lo.go obj/src/linux/quotactl.lo.go obj/src/linux/readahead.lo.go obj/src/linux/reboot.lo.go obj/src/linux/remap_file_pages.lo.go obj/src/linux/sbrk.lo.go obj/src/linux/sendfile.lo.go obj/src/linux/setfsgid.lo.go obj/src/linux/setfsuid.lo.go obj/src/linux/sethostname.lo.go obj/src/linux/setns.lo.go obj/src/linux/settimeofday.lo.go obj/src/linux/signalfd.lo.go obj/src/linux/splice.lo.go obj/src/linux/statx.lo.go obj/src/linux/stime.lo.go obj/src/linux/swap.lo.go obj/src/linux/sync_file_range.lo.go obj/src/linux/syncfs.lo.go obj/src/linux/sysinfo.lo.go obj/src/linux/tee.lo.go obj/src/linux/timerfd.lo.go obj/src/linux/unshare.lo.go obj/src/linux/utimes.lo.go obj/src/linux/vhangup.lo.go obj/src/linux/vmsplice.lo.go obj/src/linux/wait3.lo.go obj/src/linux/wait4.lo.go obj/src/linux/xattr.lo.go obj/src/locale/__lctrans.lo.go obj/src/locale/__mo_lookup.lo.go obj/src/locale/bind_textdomain_codeset.lo.go obj/src/locale/c_locale.lo.go obj/src/locale/catclose.lo.go obj/src/locale/catgets.lo.go obj/src/locale/catopen.lo.go obj/src/locale/dcngettext.lo.go obj/src/locale/duplocale.lo.go obj/src/locale/freelocale.lo.go obj/src/locale/iconv.lo.go obj/src/locale/iconv_close.lo.go obj/src/locale/langinfo.lo.go obj/src/locale/locale_map.lo.go obj/src/locale/localeconv.lo.go obj/src/locale/newlocale.lo.go obj/src/locale/pleval.lo.go obj/src/locale/setlocale.lo.go obj/src/locale/strcoll.lo.go obj/src/locale/strfmon.lo.go obj/src/locale/strtod_l.lo.go obj/src/locale/strxfrm.lo.go obj/src/locale/textdomain.lo.go obj/src/locale/uselocale.lo.go obj/src/locale/wcscoll.lo.go obj/src/locale/wcsxfrm.lo.go obj/src/malloc/reallocarray.lo.go obj/src/math/__cos.lo.go obj/src/math/__cosdf.lo.go obj/src/math/__cosl.lo.go obj/src/math/__expo2.lo.go obj/src/math/__expo2f.lo.go obj/src/math/__fpclassify.lo.go obj/src/math/__fpclassifyf.lo.go obj/src/math/__fpclassifyl.lo.go obj/src/math/__invtrigl.lo.go obj/src/math/__math_divzero.lo.go obj/src/math/__math_divzerof.lo.go obj/src/math/__math_invalid.lo.go obj/src/math/__math_invalidf.lo.go obj/src/math/__math_invalidl.lo.go obj/src/math/__math_oflow.lo.go obj/src/math/__math_oflowf.lo.go obj/src/math/__math_uflow.lo.go obj/src/math/__math_uflowf.lo.go obj/src/math/__math_xflow.lo.go obj/src/math/__math_xflowf.lo.go obj/src/math/__polevll.lo.go obj/src/math/__rem_pio2.lo.go obj/src/math/__rem_pio2_large.lo.go obj/src/math/__rem_pio2f.lo.go obj/src/math/__rem_pio2l.lo.go obj/src/math/__signbit.lo.go obj/src/math/__signbitf.lo.go obj/src/math/__signbitl.lo.go obj/src/math/__sin.lo.go obj/src/math/__sindf.lo.go obj/src/math/__sinl.lo.go obj/src/math/__tan.lo.go obj/src/math/__tandf.lo.go obj/src/math/__tanl.lo.go obj/src/math/acos.lo.go obj/src/math/acosf.lo.go obj/src/math/acosh.lo.go obj/src/math/acoshf.lo.go obj/src/math/acoshl.lo.go obj/src/math/acosl.lo.go obj/src/math/asin.lo.go obj/src/math/asinf.lo.go obj/src/math/asinh.lo.go obj/src/math/asinhf.lo.go obj/src/math/asinhl.lo.go obj/src/math/asinl.lo.go obj/src/math/atan.lo.go obj/src/math/atan2.lo.go obj/src/math/atan2f.lo.go obj/src/math/atan2l.lo.go obj/src/math/atanf.lo.go obj/src/math/atanh.lo.go obj/src/math/atanhf.lo.go obj/src/math/atanhl.lo.go obj/src/math/atanl.lo.go obj/src/math/cbrt.lo.go obj/src/math/cbrtf.lo.go obj/src/math/cbrtl.lo.go obj/src/math/ceil.lo.go obj/src/math/ceilf.lo.go obj/src/math/ceill.lo.go obj/src/math/copysign.lo.go obj/src/math/copysignf.lo.go obj/src/math/copysignl.lo.go obj/src/math/cos.lo.go obj/src/math/cosf.lo.go obj/src/math/cosh.lo.go obj/src/math/coshf.lo.go obj/src/math/coshl.lo.go obj/src/math/cosl.lo.go obj/src/math/erf.lo.go obj/src/math/erff.lo.go obj/src/math/erfl.lo.go obj/src/math/exp.lo.go obj/src/math/exp10.lo.go obj/src/math/exp10f.lo.go obj/src/math/exp10l.lo.go obj/src/math/exp2.lo.go obj/src/math/exp2f.lo.go obj/src/math/exp2f_data.lo.go obj/src/math/exp2l.lo.go obj/src/math/exp_data.lo.go obj/src/math/expf.lo.go obj/src/math/expl.lo.go obj/src/math/expm1.lo.go obj/src/math/expm1f.lo.go obj/src/math/expm1l.lo.go obj/src/math/fabs.lo.go obj/src/math/fabsf.lo.go obj/src/math/fabsl.lo.go obj/src/math/fdim.lo.go obj/src/math/fdimf.lo.go obj/src/math/fdiml.lo.go obj/src/math/finite.lo.go obj/src/math/finitef.lo.go obj/src/math/floor.lo.go obj/src/math/floorf.lo.go obj/src/math/floorl.lo.go obj/src/math/fma.lo.go obj/src/math/fmal.lo.go obj/src/math/fmax.lo.go obj/src/math/fmaxf.lo.go obj/src/math/fmaxl.lo.go obj/src/math/fmin.lo.go obj/src/math/fminf.lo.go obj/src/math/fminl.lo.go obj/src/math/fmod.lo.go obj/src/math/fmodf.lo.go obj/src/math/fmodl.lo.go obj/src/math/frexp.lo.go obj/src/math/frexpf.lo.go obj/src/math/frexpl.lo.go obj/src/math/hypot.lo.go obj/src/math/hypotf.lo.go obj/src/math/hypotl.lo.go obj/src/math/ilogb.lo.go obj/src/math/ilogbf.lo.go obj/src/math/ilogbl.lo.go obj/src/math/j0.lo.go obj/src/math/j0f.lo.go obj/src/math/j1.lo.go obj/src/math/j1f.lo.go obj/src/math/jn.lo.go obj/src/math/jnf.lo.go obj/src/math/ldexp.lo.go obj/src/math/ldexpf.lo.go obj/src/math/ldexpl.lo.go obj/src/math/lgamma.lo.go obj/src/math/lgamma_r.lo.go obj/src/math/lgammaf.lo.go obj/src/math/lgammaf_r.lo.go obj/src/math/lgammal.lo.go obj/src/math/llrint.lo.go obj/src/math/llrintf.lo.go obj/src/math/llrintl.lo.go obj/src/math/llround.lo.go obj/src/math/llroundf.lo.go obj/src/math/llroundl.lo.go obj/src/math/log.lo.go obj/src/math/log10.lo.go obj/src/math/log10f.lo.go obj/src/math/log10l.lo.go obj/src/math/log1p.lo.go obj/src/math/log1pf.lo.go obj/src/math/log1pl.lo.go obj/src/math/log2.lo.go obj/src/math/log2_data.lo.go obj/src/math/log2f.lo.go obj/src/math/log2f_data.lo.go obj/src/math/log2l.lo.go obj/src/math/log_data.lo.go obj/src/math/logb.lo.go obj/src/math/logbf.lo.go obj/src/math/logbl.lo.go obj/src/math/logf.lo.go obj/src/math/logf_data.lo.go obj/src/math/logl.lo.go obj/src/math/lrint.lo.go obj/src/math/lrintf.lo.go obj/src/math/lrintl.lo.go obj/src/math/lround.lo.go obj/src/math/lroundf.lo.go obj/src/math/lroundl.lo.go obj/src/math/modf.lo.go obj/src/math/modff.lo.go obj/src/math/modfl.lo.go obj/src/math/nan.lo.go obj/src/math/nanf.lo.go obj/src/math/nanl.lo.go obj/src/math/nextafter.lo.go obj/src/math/nextafterf.lo.go obj/src/math/nextafterl.lo.go obj/src/math/nexttoward.lo.go obj/src/math/nexttowardf.lo.go obj/src/math/nexttowardl.lo.go obj/src/math/pow.lo.go obj/src/math/pow_data.lo.go obj/src/math/powf.lo.go obj/src/math/powf_data.lo.go obj/src/math/powl.lo.go obj/src/math/remainder.lo.go obj/src/math/remainderf.lo.go obj/src/math/remainderl.lo.go obj/src/math/remquo.lo.go obj/src/math/remquof.lo.go obj/src/math/remquol.lo.go obj/src/math/rint.lo.go obj/src/math/rintf.lo.go obj/src/math/rintl.lo.go obj/src/math/round.lo.go obj/src/math/roundf.lo.go obj/src/math/roundl.lo.go obj/src/math/scalb.lo.go obj/src/math/scalbf.lo.go obj/src/math/scalbln.lo.go obj/src/math/scalblnf.lo.go obj/src/math/scalblnl.lo.go obj/src/math/scalbn.lo.go obj/src/math/scalbnf.lo.go obj/src/math/scalbnl.lo.go obj/src/math/signgam.lo.go obj/src/math/significand.lo.go obj/src/math/significandf.lo.go obj/src/math/sin.lo.go obj/src/math/sincos.lo.go obj/src/math/sincosf.lo.go obj/src/math/sincosl.lo.go obj/src/math/sinf.lo.go obj/src/math/sinh.lo.go obj/src/math/sinhf.lo.go obj/src/math/sinhl.lo.go obj/src/math/sinl.lo.go obj/src/math/sqrt.lo.go obj/src/math/sqrt_data.lo.go obj/src/math/sqrtf.lo.go obj/src/math/sqrtl.lo.go obj/src/math/tan.lo.go obj/src/math/tanf.lo.go obj/src/math/tanh.lo.go obj/src/math/tanhf.lo.go obj/src/math/tanhl.lo.go obj/src/math/tanl.lo.go obj/src/math/tgamma.lo.go obj/src/math/tgammaf.lo.go obj/src/math/tgammal.lo.go obj/src/math/trunc.lo.go obj/src/math/truncf.lo.go obj/src/math/truncl.lo.go obj/src/misc/a64l.lo.go obj/src/misc/basename.lo.go obj/src/misc/dirname.lo.go obj/src/misc/ffs.lo.go obj/src/misc/ffsl.lo.go obj/src/misc/ffsll.lo.go obj/src/misc/fmtmsg.lo.go obj/src/misc/get_current_dir_name.lo.go obj/src/misc/getauxval.lo.go obj/src/misc/getdomainname.lo.go obj/src/misc/getentropy.lo.go obj/src/misc/gethostid.lo.go obj/src/misc/getopt.lo.go obj/src/misc/getopt_long.lo.go obj/src/misc/getpriority.lo.go obj/src/misc/getresgid.lo.go obj/src/misc/getresuid.lo.go obj/src/misc/getrlimit.lo.go obj/src/misc/getrusage.lo.go obj/src/misc/getsubopt.lo.go obj/src/misc/ioctl.lo.go obj/src/misc/issetugid.lo.go obj/src/misc/lockf.lo.go obj/src/misc/login_tty.lo.go obj/src/misc/mntent.lo.go obj/src/misc/nftw.lo.go obj/src/misc/openpty.lo.go obj/src/misc/ptsname.lo.go obj/src/misc/pty.lo.go obj/src/misc/realpath.lo.go obj/src/misc/setdomainname.lo.go obj/src/misc/setpriority.lo.go obj/src/misc/setrlimit.lo.go obj/src/misc/syscall.lo.go obj/src/misc/syslog.lo.go obj/src/misc/uname.lo.go obj/src/mman/madvise.lo.go obj/src/mman/mincore.lo.go obj/src/mman/mlock.lo.go obj/src/mman/mlockall.lo.go obj/src/mman/mmap.lo.go obj/src/mman/mprotect.lo.go obj/src/mman/mremap.lo.go obj/src/mman/msync.lo.go obj/src/mman/munlock.lo.go obj/src/mman/munlockall.lo.go obj/src/mman/munmap.lo.go obj/src/mman/posix_madvise.lo.go obj/src/mman/shm_open.lo.go obj/src/multibyte/btowc.lo.go obj/src/multibyte/c16rtomb.lo.go obj/src/multibyte/c32rtomb.lo.go obj/src/multibyte/internal.lo.go obj/src/multibyte/mblen.lo.go obj/src/multibyte/mbrlen.lo.go obj/src/multibyte/mbrtoc16.lo.go obj/src/multibyte/mbrtoc32.lo.go obj/src/multibyte/mbrtowc.lo.go obj/src/multibyte/mbsinit.lo.go obj/src/multibyte/mbsnrtowcs.lo.go obj/src/multibyte/mbsrtowcs.lo.go obj/src/multibyte/mbstowcs.lo.go obj/src/multibyte/mbtowc.lo.go obj/src/multibyte/wcrtomb.lo.go obj/src/multibyte/wcsnrtombs.lo.go obj/src/multibyte/wcsrtombs.lo.go obj/src/multibyte/wcstombs.lo.go obj/src/multibyte/wctob.lo.go obj/src/multibyte/wctomb.lo.go obj/src/network/accept.lo.go obj/src/network/accept4.lo.go obj/src/network/bind.lo.go obj/src/network/connect.lo.go obj/src/network/dn_comp.lo.go obj/src/network/dn_expand.lo.go obj/src/network/dn_skipname.lo.go obj/src/network/dns_parse.lo.go obj/src/network/ent.lo.go obj/src/network/ether.lo.go obj/src/network/freeaddrinfo.lo.go obj/src/network/gai_strerror.lo.go obj/src/network/getaddrinfo.lo.go obj/src/network/gethostbyaddr.lo.go obj/src/network/gethostbyaddr_r.lo.go obj/src/network/gethostbyname.lo.go obj/src/network/gethostbyname2.lo.go obj/src/network/gethostbyname2_r.lo.go obj/src/network/gethostbyname_r.lo.go obj/src/network/getifaddrs.lo.go obj/src/network/getnameinfo.lo.go obj/src/network/getpeername.lo.go obj/src/network/getservbyname.lo.go obj/src/network/getservbyname_r.lo.go obj/src/network/getsockname.lo.go obj/src/network/getsockopt.lo.go obj/src/network/h_errno.lo.go obj/src/network/herror.lo.go obj/src/network/hstrerror.lo.go obj/src/network/htonl.lo.go obj/src/network/htons.lo.go obj/src/network/if_freenameindex.lo.go obj/src/network/if_indextoname.lo.go obj/src/network/if_nameindex.lo.go obj/src/network/if_nametoindex.lo.go obj/src/network/in6addr_any.lo.go obj/src/network/in6addr_loopback.lo.go obj/src/network/inet_addr.lo.go obj/src/network/inet_aton.lo.go obj/src/network/inet_legacy.lo.go obj/src/network/inet_ntoa.lo.go obj/src/network/inet_ntop.lo.go obj/src/network/inet_pton.lo.go obj/src/network/listen.lo.go obj/src/network/lookup_ipliteral.lo.go obj/src/network/lookup_name.lo.go obj/src/network/lookup_serv.lo.go obj/src/network/netlink.lo.go obj/src/network/netname.lo.go obj/src/network/ns_parse.lo.go obj/src/network/ntohl.lo.go obj/src/network/ntohs.lo.go obj/src/network/proto.lo.go obj/src/network/recv.lo.go obj/src/network/recvfrom.lo.go obj/src/network/recvmmsg.lo.go obj/src/network/recvmsg.lo.go obj/src/network/res_init.lo.go obj/src/network/res_mkquery.lo.go obj/src/network/res_msend.lo.go obj/src/network/res_send.lo.go obj/src/network/res_state.lo.go obj/src/network/resolvconf.lo.go obj/src/network/send.lo.go obj/src/network/sendmmsg.lo.go obj/src/network/sendmsg.lo.go obj/src/network/sendto.lo.go obj/src/network/serv.lo.go obj/src/network/setsockopt.lo.go obj/src/network/shutdown.lo.go obj/src/network/sockatmark.lo.go obj/src/network/socket.lo.go obj/src/network/socketpair.lo.go obj/src/passwd/fgetgrent.lo.go obj/src/passwd/fgetpwent.lo.go obj/src/passwd/getgr_a.lo.go obj/src/passwd/getgr_r.lo.go obj/src/passwd/getgrent.lo.go obj/src/passwd/getgrent_a.lo.go obj/src/passwd/getgrouplist.lo.go obj/src/passwd/getpw_a.lo.go obj/src/passwd/getpw_r.lo.go obj/src/passwd/getpwent.lo.go obj/src/passwd/getpwent_a.lo.go obj/src/passwd/getspent.lo.go obj/src/passwd/lckpwdf.lo.go obj/src/passwd/nscd_query.lo.go obj/src/passwd/putgrent.lo.go obj/src/passwd/putpwent.lo.go obj/src/passwd/putspent.lo.go obj/src/prng/__rand48_step.lo.go obj/src/prng/__seed48.lo.go obj/src/prng/drand48.lo.go obj/src/prng/lcong48.lo.go obj/src/prng/lrand48.lo.go obj/src/prng/mrand48.lo.go obj/src/prng/rand.lo.go obj/src/prng/rand_r.lo.go obj/src/prng/random.lo.go obj/src/prng/seed48.lo.go obj/src/prng/srand48.lo.go obj/src/process/execl.lo.go obj/src/process/execle.lo.go obj/src/process/execlp.lo.go obj/src/process/execv.lo.go obj/src/process/execve.lo.go obj/src/process/execvp.lo.go obj/src/process/fexecve.lo.go obj/src/process/fork.lo.go obj/src/process/posix_spawn_file_actions_addchdir.lo.go obj/src/process/posix_spawn_file_actions_addclose.lo.go obj/src/process/posix_spawn_file_actions_adddup2.lo.go obj/src/process/posix_spawn_file_actions_addfchdir.lo.go obj/src/process/posix_spawn_file_actions_addopen.lo.go obj/src/process/posix_spawn_file_actions_destroy.lo.go obj/src/process/posix_spawn_file_actions_init.lo.go obj/src/process/posix_spawnattr_destroy.lo.go obj/src/process/posix_spawnattr_getflags.lo.go obj/src/process/posix_spawnattr_getpgroup.lo.go obj/src/process/posix_spawnattr_getsigdefault.lo.go obj/src/process/posix_spawnattr_getsigmask.lo.go obj/src/process/posix_spawnattr_init.lo.go obj/src/process/posix_spawnattr_sched.lo.go obj/src/process/posix_spawnattr_setflags.lo.go obj/src/process/posix_spawnattr_setpgroup.lo.go obj/src/process/posix_spawnattr_setsigdefault.lo.go obj/src/process/posix_spawnattr_setsigmask.lo.go obj/src/process/vfork.lo.go obj/src/process/wait.lo.go obj/src/process/waitid.lo.go obj/src/process/waitpid.lo.go obj/src/regex/fnmatch.lo.go obj/src/regex/glob.lo.go obj/src/regex/regcomp.lo.go obj/src/regex/regerror.lo.go obj/src/regex/regexec.lo.go obj/src/regex/tre-mem.lo.go obj/src/search/hsearch.lo.go obj/src/search/insque.lo.go obj/src/search/lsearch.lo.go obj/src/search/tdelete.lo.go obj/src/search/tdestroy.lo.go obj/src/search/tfind.lo.go obj/src/search/tsearch.lo.go obj/src/search/twalk.lo.go obj/src/select/poll.lo.go obj/src/select/ppoll.lo.go obj/src/select/pselect.lo.go obj/src/select/select.lo.go obj/src/signal/block.lo.go obj/src/signal/getitimer.lo.go obj/src/signal/kill.lo.go obj/src/signal/killpg.lo.go obj/src/signal/psiginfo.lo.go obj/src/signal/psignal.lo.go obj/src/signal/raise.lo.go obj/src/signal/restore.lo.go obj/src/signal/setitimer.lo.go obj/src/signal/sigaction.lo.go obj/src/signal/sigaddset.lo.go obj/src/signal/sigaltstack.lo.go obj/src/signal/sigandset.lo.go obj/src/signal/sigdelset.lo.go obj/src/signal/sigemptyset.lo.go obj/src/signal/sigfillset.lo.go obj/src/signal/sigisemptyset.lo.go obj/src/signal/sigismember.lo.go obj/src/signal/sigorset.lo.go obj/src/signal/sigpending.lo.go obj/src/signal/sigprocmask.lo.go obj/src/signal/sigqueue.lo.go obj/src/signal/sigrtmax.lo.go obj/src/signal/sigrtmin.lo.go obj/src/signal/sigsetjmp.lo.go obj/src/signal/sigsetjmp_tail.lo.go obj/src/signal/sigsuspend.lo.go obj/src/signal/sigtimedwait.lo.go obj/src/signal/sigwait.lo.go obj/src/signal/sigwaitinfo.lo.go obj/src/stat/__xstat.lo.go obj/src/stat/chmod.lo.go obj/src/stat/fchmod.lo.go obj/src/stat/fchmodat.lo.go obj/src/stat/fstat.lo.go obj/src/stat/fstatat.lo.go obj/src/stat/futimens.lo.go obj/src/stat/futimesat.lo.go obj/src/stat/lchmod.lo.go obj/src/stat/lstat.lo.go obj/src/stat/mkdir.lo.go obj/src/stat/mkdirat.lo.go obj/src/stat/mkfifo.lo.go obj/src/stat/mkfifoat.lo.go obj/src/stat/mknod.lo.go obj/src/stat/mknodat.lo.go obj/src/stat/stat.lo.go obj/src/stat/statvfs.lo.go obj/src/stat/umask.lo.go obj/src/stat/utimensat.lo.go obj/src/stdio/__fclose_ca.lo.go obj/src/stdio/__fdopen.lo.go obj/src/stdio/__fmodeflags.lo.go obj/src/stdio/__fopen_rb_ca.lo.go obj/src/stdio/__overflow.lo.go obj/src/stdio/__stdio_close.lo.go obj/src/stdio/__stdio_exit.lo.go obj/src/stdio/__stdio_read.lo.go obj/src/stdio/__stdio_seek.lo.go obj/src/stdio/__stdio_write.lo.go obj/src/stdio/__stdout_write.lo.go obj/src/stdio/__toread.lo.go obj/src/stdio/__towrite.lo.go obj/src/stdio/__uflow.lo.go obj/src/stdio/asprintf.lo.go obj/src/stdio/clearerr.lo.go obj/src/stdio/dprintf.lo.go obj/src/stdio/ext.lo.go obj/src/stdio/ext2.lo.go obj/src/stdio/fclose.lo.go obj/src/stdio/feof.lo.go obj/src/stdio/ferror.lo.go obj/src/stdio/fflush.lo.go obj/src/stdio/fgetc.lo.go obj/src/stdio/fgetln.lo.go obj/src/stdio/fgetpos.lo.go obj/src/stdio/fgets.lo.go obj/src/stdio/fgetwc.lo.go obj/src/stdio/fgetws.lo.go obj/src/stdio/fileno.lo.go obj/src/stdio/flockfile.lo.go obj/src/stdio/fmemopen.lo.go obj/src/stdio/fopen.lo.go obj/src/stdio/fopencookie.lo.go obj/src/stdio/fprintf.lo.go obj/src/stdio/fputc.lo.go obj/src/stdio/fputs.lo.go obj/src/stdio/fputwc.lo.go obj/src/stdio/fputws.lo.go obj/src/stdio/fread.lo.go obj/src/stdio/freopen.lo.go obj/src/stdio/fscanf.lo.go obj/src/stdio/fseek.lo.go obj/src/stdio/fsetpos.lo.go obj/src/stdio/ftell.lo.go obj/src/stdio/ftrylockfile.lo.go obj/src/stdio/funlockfile.lo.go obj/src/stdio/fwide.lo.go obj/src/stdio/fwprintf.lo.go obj/src/stdio/fwrite.lo.go obj/src/stdio/fwscanf.lo.go obj/src/stdio/getc.lo.go obj/src/stdio/getc_unlocked.lo.go obj/src/stdio/getchar.lo.go obj/src/stdio/getchar_unlocked.lo.go obj/src/stdio/getdelim.lo.go obj/src/stdio/getline.lo.go obj/src/stdio/gets.lo.go obj/src/stdio/getw.lo.go obj/src/stdio/getwc.lo.go obj/src/stdio/getwchar.lo.go obj/src/stdio/ofl.lo.go obj/src/stdio/ofl_add.lo.go obj/src/stdio/open_memstream.lo.go obj/src/stdio/open_wmemstream.lo.go obj/src/stdio/pclose.lo.go obj/src/stdio/perror.lo.go obj/src/stdio/printf.lo.go obj/src/stdio/putc.lo.go obj/src/stdio/putc_unlocked.lo.go obj/src/stdio/putchar.lo.go obj/src/stdio/putchar_unlocked.lo.go obj/src/stdio/puts.lo.go obj/src/stdio/putw.lo.go obj/src/stdio/putwc.lo.go obj/src/stdio/putwchar.lo.go obj/src/stdio/remove.lo.go obj/src/stdio/rename.lo.go obj/src/stdio/rewind.lo.go obj/src/stdio/scanf.lo.go obj/src/stdio/setbuf.lo.go obj/src/stdio/setbuffer.lo.go obj/src/stdio/setlinebuf.lo.go obj/src/stdio/setvbuf.lo.go obj/src/stdio/snprintf.lo.go obj/src/stdio/sprintf.lo.go obj/src/stdio/sscanf.lo.go obj/src/stdio/stderr.lo.go obj/src/stdio/stdin.lo.go obj/src/stdio/stdout.lo.go obj/src/stdio/swprintf.lo.go obj/src/stdio/swscanf.lo.go obj/src/stdio/tempnam.lo.go obj/src/stdio/tmpfile.lo.go obj/src/stdio/tmpnam.lo.go obj/src/stdio/ungetc.lo.go obj/src/stdio/ungetwc.lo.go obj/src/stdio/vasprintf.lo.go obj/src/stdio/vdprintf.lo.go obj/src/stdio/vfprintf.lo.go obj/src/stdio/vfscanf.lo.go obj/src/stdio/vfwprintf.lo.go obj/src/stdio/vfwscanf.lo.go obj/src/stdio/vprintf.lo.go obj/src/stdio/vscanf.lo.go obj/src/stdio/vsnprintf.lo.go obj/src/stdio/vsprintf.lo.go obj/src/stdio/vsscanf.lo.go obj/src/stdio/vswprintf.lo.go obj/src/stdio/vswscanf.lo.go obj/src/stdio/vwprintf.lo.go obj/src/stdio/vwscanf.lo.go obj/src/stdio/wprintf.lo.go obj/src/stdio/wscanf.lo.go obj/src/stdlib/abs.lo.go obj/src/stdlib/atof.lo.go obj/src/stdlib/atoi.lo.go obj/src/stdlib/atol.lo.go obj/src/stdlib/atoll.lo.go obj/src/stdlib/bsearch.lo.go obj/src/stdlib/div.lo.go obj/src/stdlib/ecvt.lo.go obj/src/stdlib/fcvt.lo.go obj/src/stdlib/gcvt.lo.go obj/src/stdlib/imaxabs.lo.go obj/src/stdlib/imaxdiv.lo.go obj/src/stdlib/labs.lo.go obj/src/stdlib/ldiv.lo.go obj/src/stdlib/llabs.lo.go obj/src/stdlib/lldiv.lo.go obj/src/stdlib/qsort.lo.go obj/src/stdlib/qsort_nr.lo.go obj/src/stdlib/strtod.lo.go obj/src/stdlib/strtol.lo.go obj/src/stdlib/wcstod.lo.go obj/src/stdlib/wcstol.lo.go obj/src/string/bcmp.lo.go obj/src/string/bcopy.lo.go obj/src/string/bzero.lo.go obj/src/string/explicit_bzero.lo.go obj/src/string/index.lo.go obj/src/string/memccpy.lo.go obj/src/string/memchr.lo.go obj/src/string/memcmp.lo.go obj/src/string/memcpy.lo.go obj/src/string/memmem.lo.go obj/src/string/memmove.lo.go obj/src/string/mempcpy.lo.go obj/src/string/memrchr.lo.go obj/src/string/memset.lo.go obj/src/string/rindex.lo.go obj/src/string/stpcpy.lo.go obj/src/string/stpncpy.lo.go obj/src/string/strcasecmp.lo.go obj/src/string/strcasestr.lo.go obj/src/string/strcat.lo.go obj/src/string/strchr.lo.go obj/src/string/strchrnul.lo.go obj/src/string/strcmp.lo.go obj/src/string/strcpy.lo.go obj/src/string/strcspn.lo.go obj/src/string/strdup.lo.go obj/src/string/strerror_r.lo.go obj/src/string/strlcat.lo.go obj/src/string/strlcpy.lo.go obj/src/string/strlen.lo.go obj/src/string/strncasecmp.lo.go obj/src/string/strncat.lo.go obj/src/string/strncmp.lo.go obj/src/string/strncpy.lo.go obj/src/string/strndup.lo.go obj/src/string/strnlen.lo.go obj/src/string/strpbrk.lo.go obj/src/string/strrchr.lo.go obj/src/string/strsep.lo.go obj/src/string/strsignal.lo.go obj/src/string/strspn.lo.go obj/src/string/strstr.lo.go obj/src/string/strtok.lo.go obj/src/string/strtok_r.lo.go obj/src/string/strverscmp.lo.go obj/src/string/swab.lo.go obj/src/string/wcpcpy.lo.go obj/src/string/wcpncpy.lo.go obj/src/string/wcscasecmp.lo.go obj/src/string/wcscasecmp_l.lo.go obj/src/string/wcscat.lo.go obj/src/string/wcschr.lo.go obj/src/string/wcscmp.lo.go obj/src/string/wcscpy.lo.go obj/src/string/wcscspn.lo.go obj/src/string/wcsdup.lo.go obj/src/string/wcslen.lo.go obj/src/string/wcsncasecmp.lo.go obj/src/string/wcsncasecmp_l.lo.go obj/src/string/wcsncat.lo.go obj/src/string/wcsncmp.lo.go obj/src/string/wcsncpy.lo.go obj/src/string/wcsnlen.lo.go obj/src/string/wcspbrk.lo.go obj/src/string/wcsrchr.lo.go obj/src/string/wcsspn.lo.go obj/src/string/wcsstr.lo.go obj/src/string/wcstok.lo.go obj/src/string/wcswcs.lo.go obj/src/string/wmemchr.lo.go obj/src/string/wmemcmp.lo.go obj/src/string/wmemcpy.lo.go obj/src/string/wmemmove.lo.go obj/src/string/wmemset.lo.go obj/src/temp/mkdtemp.lo.go obj/src/temp/mkostemp.lo.go obj/src/temp/mkostemps.lo.go obj/src/temp/mkstemp.lo.go obj/src/temp/mkstemps.lo.go obj/src/temp/mktemp.lo.go obj/src/termios/cfgetospeed.lo.go obj/src/termios/cfmakeraw.lo.go obj/src/termios/cfsetospeed.lo.go obj/src/termios/tcdrain.lo.go obj/src/termios/tcflow.lo.go obj/src/termios/tcflush.lo.go obj/src/termios/tcgetattr.lo.go obj/src/termios/tcgetsid.lo.go obj/src/termios/tcgetwinsize.lo.go obj/src/termios/tcsendbreak.lo.go obj/src/termios/tcsetattr.lo.go obj/src/termios/tcsetwinsize.lo.go obj/src/time/__map_file.lo.go obj/src/time/__month_to_secs.lo.go obj/src/time/__secs_to_tm.lo.go obj/src/time/__tm_to_secs.lo.go obj/src/time/__tz.lo.go obj/src/time/__year_to_secs.lo.go obj/src/time/asctime.lo.go obj/src/time/asctime_r.lo.go obj/src/time/clock.lo.go obj/src/time/clock_getcpuclockid.lo.go obj/src/time/clock_getres.lo.go obj/src/time/clock_gettime.lo.go obj/src/time/clock_nanosleep.lo.go obj/src/time/clock_settime.lo.go obj/src/time/ctime.lo.go obj/src/time/ctime_r.lo.go obj/src/time/difftime.lo.go obj/src/time/ftime.lo.go obj/src/time/getdate.lo.go obj/src/time/gettimeofday.lo.go obj/src/time/gmtime.lo.go obj/src/time/gmtime_r.lo.go obj/src/time/localtime.lo.go obj/src/time/localtime_r.lo.go obj/src/time/mktime.lo.go obj/src/time/nanosleep.lo.go obj/src/time/strftime.lo.go obj/src/time/strptime.lo.go obj/src/time/time.lo.go obj/src/time/timegm.lo.go obj/src/time/timer_delete.lo.go obj/src/time/timer_getoverrun.lo.go obj/src/time/timer_gettime.lo.go obj/src/time/timer_settime.lo.go obj/src/time/times.lo.go obj/src/time/timespec_get.lo.go obj/src/time/utime.lo.go obj/src/time/wcsftime.lo.go obj/src/unistd/_exit.lo.go obj/src/unistd/access.lo.go obj/src/unistd/acct.lo.go obj/src/unistd/alarm.lo.go obj/src/unistd/chdir.lo.go obj/src/unistd/chown.lo.go obj/src/unistd/close.lo.go obj/src/unistd/ctermid.lo.go obj/src/unistd/dup.lo.go obj/src/unistd/dup2.lo.go obj/src/unistd/dup3.lo.go obj/src/unistd/faccessat.lo.go obj/src/unistd/fchdir.lo.go obj/src/unistd/fchown.lo.go obj/src/unistd/fchownat.lo.go obj/src/unistd/fdatasync.lo.go obj/src/unistd/fsync.lo.go obj/src/unistd/ftruncate.lo.go obj/src/unistd/getcwd.lo.go obj/src/unistd/getegid.lo.go obj/src/unistd/geteuid.lo.go obj/src/unistd/getgid.lo.go obj/src/unistd/getgroups.lo.go obj/src/unistd/gethostname.lo.go obj/src/unistd/getlogin.lo.go obj/src/unistd/getlogin_r.lo.go obj/src/unistd/getpgid.lo.go obj/src/unistd/getpgrp.lo.go obj/src/unistd/getpid.lo.go obj/src/unistd/getppid.lo.go obj/src/unistd/getsid.lo.go obj/src/unistd/getuid.lo.go obj/src/unistd/isatty.lo.go obj/src/unistd/lchown.lo.go obj/src/unistd/link.lo.go obj/src/unistd/linkat.lo.go obj/src/unistd/lseek.lo.go obj/src/unistd/nice.lo.go obj/src/unistd/pause.lo.go obj/src/unistd/pipe.lo.go obj/src/unistd/pipe2.lo.go obj/src/unistd/posix_close.lo.go obj/src/unistd/pread.lo.go obj/src/unistd/preadv.lo.go obj/src/unistd/pwrite.lo.go obj/src/unistd/pwritev.lo.go obj/src/unistd/read.lo.go obj/src/unistd/readlink.lo.go obj/src/unistd/readlinkat.lo.go obj/src/unistd/readv.lo.go obj/src/unistd/renameat.lo.go obj/src/unistd/rmdir.lo.go obj/src/unistd/setgid.lo.go obj/src/unistd/setpgid.lo.go obj/src/unistd/setpgrp.lo.go obj/src/unistd/setsid.lo.go obj/src/unistd/setuid.lo.go obj/src/unistd/setxid.lo.go obj/src/unistd/sleep.lo.go obj/src/unistd/symlink.lo.go obj/src/unistd/symlinkat.lo.go obj/src/unistd/sync.lo.go obj/src/unistd/tcgetpgrp.lo.go obj/src/unistd/tcsetpgrp.lo.go obj/src/unistd/truncate.lo.go obj/src/unistd/ttyname.lo.go obj/src/unistd/ttyname_r.lo.go obj/src/unistd/ualarm.lo.go obj/src/unistd/unlink.lo.go obj/src/unistd/unlinkat.lo. | 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_loong64.go | vendor/modernc.org/libc/libc_musl_linux_loong64.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/pthread.go | vendor/modernc.org/libc/pthread.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 (
"runtime"
"sync"
"sync/atomic"
"time"
"unsafe"
"modernc.org/libc/errno"
"modernc.org/libc/pthread"
"modernc.org/libc/sys/types"
ctime "modernc.org/libc/time"
)
var (
mutexes = map[uintptr]*mutex{}
mutexesMu sync.Mutex
threads = map[int32]*TLS{}
threadsMu sync.Mutex
threadKey pthread.Pthread_key_t
threadKeyDestructors = map[pthread.Pthread_key_t][]uintptr{} // key: []destructor
threadsKeysMu sync.Mutex
conds = map[uintptr]*cond{}
condsMu sync.Mutex
)
// Thread local storage.
type TLS struct {
errnop uintptr
allocaStack [][]uintptr
allocas []uintptr
jumpBuffers []uintptr
lastError uint32
pthreadData
sp int
stack stackHeader
ID int32
reentryGuard int32 // memgrind
stackHeaderBalance int32
}
var errno0 int32 // Temp errno for NewTLS
func NewTLS() *TLS {
return newTLS(false)
}
func newTLS(detached bool) *TLS {
id := atomic.AddInt32(&tid, 1)
t := &TLS{ID: id, errnop: uintptr(unsafe.Pointer(&errno0))}
t.pthreadData.init(t, detached)
if memgrind {
atomic.AddInt32(&tlsBalance, 1)
}
t.errnop = t.Alloc(int(unsafe.Sizeof(int32(0))))
*(*int32)(unsafe.Pointer(t.errnop)) = 0
return t
}
// StackSlots reports the number of tls stack slots currently in use.
func (tls *TLS) StackSlots() int {
return tls.sp
}
func (t *TLS) alloca(n size_t) (r uintptr) {
r = Xmalloc(t, n)
t.allocas = append(t.allocas, r)
return r
}
func (t *TLS) FreeAlloca() func() {
t.allocaStack = append(t.allocaStack, t.allocas)
t.allocas = nil
return func() {
for _, v := range t.allocas {
Xfree(t, v)
}
n := len(t.allocaStack)
t.allocas = t.allocaStack[n-1]
t.allocaStack = t.allocaStack[:n-1]
}
}
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 Xalloca(tls *TLS, size size_t) uintptr {
if __ccgo_strace {
trc("tls=%v size=%v, (%v:)", tls, size, origin(2))
}
return tls.alloca(size)
}
func X__builtin_alloca(tls *TLS, size size_t) uintptr {
if __ccgo_strace {
trc("tls=%v size=%v, (%v:)", tls, size, origin(2))
}
return Xalloca(tls, size)
}
// Pthread specific part of a TLS.
type pthreadData struct {
done chan struct{}
kv map[pthread.Pthread_key_t]uintptr
retVal uintptr
wait chan struct{} // cond var interaction
detached bool
}
func (d *pthreadData) init(t *TLS, detached bool) {
d.detached = detached
d.wait = make(chan struct{}, 1)
if detached {
return
}
d.done = make(chan struct{})
threadsMu.Lock()
defer threadsMu.Unlock()
threads[t.ID] = t
}
func (d *pthreadData) close(t *TLS) {
threadsMu.Lock()
defer threadsMu.Unlock()
delete(threads, t.ID)
}
// int pthread_attr_destroy(pthread_attr_t *attr);
func Xpthread_attr_destroy(t *TLS, pAttr uintptr) int32 {
if __ccgo_strace {
trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
}
return 0
}
// int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
func Xpthread_attr_setscope(t *TLS, pAttr uintptr, contentionScope int32) int32 {
if __ccgo_strace {
trc("t=%v pAttr=%v contentionScope=%v, (%v:)", t, pAttr, contentionScope, origin(2))
}
switch contentionScope {
case pthread.PTHREAD_SCOPE_SYSTEM:
return 0
default:
panic(todo("", contentionScope))
}
}
// int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
func Xpthread_attr_setstacksize(t *TLS, attr uintptr, stackSize types.Size_t) int32 {
if __ccgo_strace {
trc("t=%v attr=%v stackSize=%v, (%v:)", t, attr, stackSize, origin(2))
}
return 0
}
// Go side data of pthread_cond_t.
type cond struct {
sync.Mutex
waiters map[*TLS]struct{}
}
func newCond() *cond {
return &cond{
waiters: map[*TLS]struct{}{},
}
}
func (c *cond) signal(all bool) int32 {
if c == nil {
return errno.EINVAL
}
c.Lock()
defer c.Unlock()
// The pthread_cond_broadcast() and pthread_cond_signal() functions shall have
// no effect if there are no threads currently blocked on cond.
for tls := range c.waiters {
tls.wait <- struct{}{}
delete(c.waiters, tls)
if !all {
break
}
}
return 0
}
// The pthread_cond_init() function shall initialize the condition variable
// referenced by cond with attributes referenced by attr. If attr is NULL, the
// default condition variable attributes shall be used; the effect is the same
// as passing the address of a default condition variable attributes object.
// Upon successful initialization, the state of the condition variable shall
// become initialized.
//
// If successful, the pthread_cond_destroy() and pthread_cond_init() functions
// shall return zero; otherwise, an error number shall be returned to indicate
// the error.
//
// int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr);
func Xpthread_cond_init(t *TLS, pCond, pAttr uintptr) int32 {
if __ccgo_strace {
trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
}
if pCond == 0 {
return errno.EINVAL
}
if pAttr != 0 {
panic(todo("%#x %#x", pCond, pAttr))
}
condsMu.Lock()
defer condsMu.Unlock()
conds[pCond] = newCond()
return 0
}
// int pthread_cond_destroy(pthread_cond_t *cond);
func Xpthread_cond_destroy(t *TLS, pCond uintptr) int32 {
if __ccgo_strace {
trc("t=%v pCond=%v, (%v:)", t, pCond, origin(2))
}
if pCond == 0 {
return errno.EINVAL
}
condsMu.Lock()
defer condsMu.Unlock()
cond := conds[pCond]
if cond == nil {
return errno.EINVAL
}
cond.Lock()
defer cond.Unlock()
if len(cond.waiters) != 0 {
return errno.EBUSY
}
delete(conds, pCond)
return 0
}
// int pthread_cond_signal(pthread_cond_t *cond);
func Xpthread_cond_signal(t *TLS, pCond uintptr) int32 {
if __ccgo_strace {
trc("t=%v pCond=%v, (%v:)", t, pCond, origin(2))
}
return condSignal(pCond, false)
}
// int pthread_cond_broadcast(pthread_cond_t *cond);
func Xpthread_cond_broadcast(t *TLS, pCond uintptr) int32 {
if __ccgo_strace {
trc("t=%v pCond=%v, (%v:)", t, pCond, origin(2))
}
return condSignal(pCond, true)
}
func condSignal(pCond uintptr, all bool) int32 {
if pCond == 0 {
return errno.EINVAL
}
condsMu.Lock()
cond := conds[pCond]
condsMu.Unlock()
return cond.signal(all)
}
// int pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex);
func Xpthread_cond_wait(t *TLS, pCond, pMutex uintptr) int32 {
if __ccgo_strace {
trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
}
if pCond == 0 {
return errno.EINVAL
}
condsMu.Lock()
cond := conds[pCond]
if cond == nil { // static initialized condition variables are valid
cond = newCond()
conds[pCond] = cond
}
cond.Lock()
cond.waiters[t] = struct{}{}
cond.Unlock()
condsMu.Unlock()
mutexesMu.Lock()
mu := mutexes[pMutex]
mutexesMu.Unlock()
mu.Unlock()
<-t.wait
mu.Lock()
return 0
}
// int pthread_cond_timedwait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime);
func Xpthread_cond_timedwait(t *TLS, pCond, pMutex, pAbsTime uintptr) int32 {
if __ccgo_strace {
trc("t=%v pAbsTime=%v, (%v:)", t, pAbsTime, origin(2))
}
if pCond == 0 {
return errno.EINVAL
}
condsMu.Lock()
cond := conds[pCond]
if cond == nil { // static initialized condition variables are valid
cond = newCond()
conds[pCond] = cond
}
cond.Lock()
cond.waiters[t] = struct{}{}
cond.Unlock()
condsMu.Unlock()
mutexesMu.Lock()
mu := mutexes[pMutex]
mutexesMu.Unlock()
deadlineSecs := (*ctime.Timespec)(unsafe.Pointer(pAbsTime)).Ftv_sec
deadlineNsecs := (*ctime.Timespec)(unsafe.Pointer(pAbsTime)).Ftv_nsec
deadline := time.Unix(int64(deadlineSecs), int64(deadlineNsecs))
d := deadline.Sub(time.Now())
switch {
case d <= 0:
return errno.ETIMEDOUT
default:
to := time.After(d)
mu.Unlock()
defer mu.Lock()
select {
case <-t.wait:
return 0
case <-to:
cond.Lock()
defer cond.Unlock()
delete(cond.waiters, t)
return errno.ETIMEDOUT
}
}
}
// Go side data of pthread_mutex_t
type mutex struct {
sync.Mutex
typ int // PTHREAD_MUTEX_NORMAL, ...
wait sync.Mutex
id int32 // owner's t.ID
cnt int32
robust bool
}
func newMutex(typ int) *mutex {
return &mutex{
typ: typ,
}
}
func (m *mutex) lock(id int32) int32 {
if m.robust {
panic(todo(""))
}
// If successful, the pthread_mutex_lock() and pthread_mutex_unlock() functions
// shall return zero; otherwise, an error number shall be returned to indicate
// the error.
switch m.typ {
default:
fallthrough
case pthread.PTHREAD_MUTEX_NORMAL:
// If the mutex type is PTHREAD_MUTEX_NORMAL, deadlock detection shall not be
// provided. Attempting to relock the mutex causes deadlock. If a thread
// attempts to unlock a mutex that it has not locked or a mutex which is
// unlocked, undefined behavior results.
m.Lock()
m.id = id
return 0
case pthread.PTHREAD_MUTEX_RECURSIVE:
for {
m.Lock()
switch m.id {
case 0:
m.cnt = 1
m.id = id
m.wait.Lock()
m.Unlock()
return 0
case id:
m.cnt++
m.Unlock()
return 0
}
m.Unlock()
m.wait.Lock()
// intentional empty section - wake up other waiters
m.wait.Unlock()
}
}
}
func (m *mutex) tryLock(id int32) int32 {
if m.robust {
panic(todo(""))
}
switch m.typ {
default:
fallthrough
case pthread.PTHREAD_MUTEX_NORMAL:
return errno.EBUSY
case pthread.PTHREAD_MUTEX_RECURSIVE:
m.Lock()
switch m.id {
case 0:
m.cnt = 1
m.id = id
m.wait.Lock()
m.Unlock()
return 0
case id:
m.cnt++
m.Unlock()
return 0
}
m.Unlock()
return errno.EBUSY
}
}
func (m *mutex) unlock() int32 {
if m.robust {
panic(todo(""))
}
// If successful, the pthread_mutex_lock() and pthread_mutex_unlock() functions
// shall return zero; otherwise, an error number shall be returned to indicate
// the error.
switch m.typ {
default:
fallthrough
case pthread.PTHREAD_MUTEX_NORMAL:
// If the mutex type is PTHREAD_MUTEX_NORMAL, deadlock detection shall not be
// provided. Attempting to relock the mutex causes deadlock. If a thread
// attempts to unlock a mutex that it has not locked or a mutex which is
// unlocked, undefined behavior results.
m.id = 0
m.Unlock()
return 0
case pthread.PTHREAD_MUTEX_RECURSIVE:
m.Lock()
m.cnt--
if m.cnt == 0 {
m.id = 0
m.wait.Unlock()
}
m.Unlock()
return 0
}
}
// int pthread_mutex_destroy(pthread_mutex_t *mutex);
func Xpthread_mutex_destroy(t *TLS, pMutex uintptr) int32 {
if __ccgo_strace {
trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
}
mutexesMu.Lock()
defer mutexesMu.Unlock()
delete(mutexes, pMutex)
return 0
}
// int pthread_mutex_lock(pthread_mutex_t *mutex);
func Xpthread_mutex_lock(t *TLS, pMutex uintptr) int32 {
if __ccgo_strace {
trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
}
mutexesMu.Lock()
mu := mutexes[pMutex]
if mu == nil { // static initialized mutexes are valid
mu = newMutex(int(X__ccgo_getMutexType(t, pMutex)))
mutexes[pMutex] = mu
}
mutexesMu.Unlock()
return mu.lock(t.ID)
}
// int pthread_mutex_trylock(pthread_mutex_t *mutex);
func Xpthread_mutex_trylock(t *TLS, pMutex uintptr) int32 {
if __ccgo_strace {
trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
}
mutexesMu.Lock()
mu := mutexes[pMutex]
if mu == nil { // static initialized mutexes are valid
mu = newMutex(int(X__ccgo_getMutexType(t, pMutex)))
mutexes[pMutex] = mu
}
mutexesMu.Unlock()
return mu.tryLock(t.ID)
}
// int pthread_mutex_unlock(pthread_mutex_t *mutex);
func Xpthread_mutex_unlock(t *TLS, pMutex uintptr) int32 {
if __ccgo_strace {
trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
}
mutexesMu.Lock()
defer mutexesMu.Unlock()
return mutexes[pMutex].unlock()
}
// int pthread_key_create(pthread_key_t *key, void (*destructor)(void*));
func Xpthread_key_create(t *TLS, pKey, destructor uintptr) int32 {
threadsKeysMu.Lock()
defer threadsKeysMu.Unlock()
threadKey++
r := threadKey
if destructor != 0 {
threadKeyDestructors[r] = append(threadKeyDestructors[r], destructor)
}
*(*pthread.Pthread_key_t)(unsafe.Pointer(pKey)) = pthread.Pthread_key_t(r)
return 0
}
// int pthread_key_delete(pthread_key_t key);
func Xpthread_key_delete(t *TLS, key pthread.Pthread_key_t) int32 {
if __ccgo_strace {
trc("t=%v key=%v, (%v:)", t, key, origin(2))
}
if _, ok := t.kv[key]; ok {
delete(t.kv, key)
return 0
}
panic(todo(""))
}
// void *pthread_getspecific(pthread_key_t key);
func Xpthread_getspecific(t *TLS, key pthread.Pthread_key_t) uintptr {
if __ccgo_strace {
trc("t=%v key=%v, (%v:)", t, key, origin(2))
}
return t.kv[key]
}
// int pthread_setspecific(pthread_key_t key, const void *value);
func Xpthread_setspecific(t *TLS, key pthread.Pthread_key_t, value uintptr) int32 {
if __ccgo_strace {
trc("t=%v key=%v value=%v, (%v:)", t, key, value, origin(2))
}
if t.kv == nil {
t.kv = map[pthread.Pthread_key_t]uintptr{}
}
t.kv[key] = value
return 0
}
// int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg);
func Xpthread_create(t *TLS, pThread, pAttr, startRoutine, arg uintptr) int32 {
if __ccgo_strace {
trc("t=%v arg=%v, (%v:)", t, arg, origin(2))
}
fn := (*struct {
f func(*TLS, uintptr) uintptr
})(unsafe.Pointer(&struct{ uintptr }{startRoutine})).f
detached := pAttr != 0 && X__ccgo_pthreadAttrGetDetachState(t, pAttr) == pthread.PTHREAD_CREATE_DETACHED
tls := newTLS(detached)
*(*pthread.Pthread_t)(unsafe.Pointer(pThread)) = pthread.Pthread_t(tls.ID)
go func() {
Xpthread_exit(tls, fn(tls, arg))
}()
return 0
}
// int pthread_detach(pthread_t thread);
func Xpthread_detach(t *TLS, thread pthread.Pthread_t) int32 {
if __ccgo_strace {
trc("t=%v thread=%v, (%v:)", t, thread, origin(2))
}
threadsMu.Lock()
threads[int32(thread)].detached = true
threadsMu.Unlock()
return 0
}
// int pthread_equal(pthread_t t1, pthread_t t2);
func Xpthread_equal(t *TLS, t1, t2 pthread.Pthread_t) int32 {
if __ccgo_strace {
trc("t=%v t2=%v, (%v:)", t, t2, origin(2))
}
return Bool32(t1 == t2)
}
// void pthread_exit(void *value_ptr);
func Xpthread_exit(t *TLS, value uintptr) {
if __ccgo_strace {
trc("t=%v value=%v, (%v:)", t, value, origin(2))
}
t.retVal = value
// At thread exit, if a key value has a non-NULL destructor pointer, and the
// thread has a non-NULL value associated with that key, the value of the key
// is set to NULL, and then the function pointed to is called with the
// previously associated value as its sole argument. The order of destructor
// calls is unspecified if more than one destructor exists for a thread when it
// exits.
for k, v := range t.kv {
if v == 0 {
continue
}
threadsKeysMu.Lock()
destructors := threadKeyDestructors[k]
threadsKeysMu.Unlock()
for _, destructor := range destructors {
delete(t.kv, k)
panic(todo("%#x", destructor)) //TODO call destructor(v)
}
}
switch {
case t.detached:
threadsMu.Lock()
delete(threads, t.ID)
threadsMu.Unlock()
default:
close(t.done)
}
runtime.Goexit()
}
// int pthread_join(pthread_t thread, void **value_ptr);
func Xpthread_join(t *TLS, thread pthread.Pthread_t, pValue uintptr) int32 {
if __ccgo_strace {
trc("t=%v thread=%v pValue=%v, (%v:)", t, thread, pValue, origin(2))
}
threadsMu.Lock()
tls := threads[int32(thread)]
delete(threads, int32(thread))
threadsMu.Unlock()
<-tls.done
if pValue != 0 {
*(*uintptr)(unsafe.Pointer(pValue)) = tls.retVal
}
return 0
}
// pthread_t pthread_self(void);
func Xpthread_self(t *TLS) pthread.Pthread_t {
if __ccgo_strace {
trc("t=%v, (%v:)", t, origin(2))
}
return pthread.Pthread_t(t.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/libc/netinet/in/capi_openbsd_386.go | vendor/modernc.org/libc/netinet/in/capi_openbsd_386.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_386.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_linux_riscv64.go | vendor/modernc.org/libc/netinet/in/in_linux_riscv64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_riscv64.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
AF_ALG = 38
AF_APPLETALK = 5
AF_ASH = 18
AF_ATMPVC = 8
AF_ATMSVC = 20
AF_AX25 = 3
AF_BLUETOOTH = 31
AF_BRIDGE = 7
AF_CAIF = 37
AF_CAN = 29
AF_DECnet = 12
AF_ECONET = 19
AF_FILE = 1
AF_IB = 27
AF_IEEE802154 = 36
AF_INET = 2
AF_INET6 = 10
AF_IPX = 4
AF_IRDA = 23
AF_ISDN = 34
AF_IUCV = 32
AF_KCM = 41
AF_KEY = 15
AF_LLC = 26
AF_LOCAL = 1
AF_MAX = 45
AF_MPLS = 28
AF_NETBEUI = 13
AF_NETLINK = 16
AF_NETROM = 6
AF_NFC = 39
AF_PACKET = 17
AF_PHONET = 35
AF_PPPOX = 24
AF_QIPCRTR = 42
AF_RDS = 21
AF_ROSE = 11
AF_ROUTE = 16
AF_RXRPC = 33
AF_SECURITY = 14
AF_SMC = 43
AF_SNA = 22
AF_TIPC = 30
AF_UNIX = 1
AF_UNSPEC = 0
AF_VSOCK = 40
AF_WANPIPE = 25
AF_X25 = 9
AF_XDP = 44
BIG_ENDIAN = 4321
BYTE_ORDER = 1234
FD_SETSIZE = 1024
FIOGETOWN = 0x8903
FIOSETOWN = 0x8901
INET6_ADDRSTRLEN = 46
INET_ADDRSTRLEN = 16
IN_CLASSA_HOST = 16777215
IN_CLASSA_MAX = 128
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 24
IN_CLASSB_HOST = 65535
IN_CLASSB_MAX = 65536
IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 16
IN_CLASSC_HOST = 255
IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 8
IN_LOOPBACKNET = 127
IPV6_2292DSTOPTS = 4
IPV6_2292HOPLIMIT = 8
IPV6_2292HOPOPTS = 3
IPV6_2292PKTINFO = 2
IPV6_2292PKTOPTIONS = 6
IPV6_2292RTHDR = 5
IPV6_ADDRFORM = 1
IPV6_ADDR_PREFERENCES = 72
IPV6_ADD_MEMBERSHIP = 20
IPV6_AUTHHDR = 10
IPV6_AUTOFLOWLABEL = 70
IPV6_CHECKSUM = 7
IPV6_DONTFRAG = 62
IPV6_DROP_MEMBERSHIP = 21
IPV6_DSTOPTS = 59
IPV6_FREEBIND = 78
IPV6_HDRINCL = 36
IPV6_HOPLIMIT = 52
IPV6_HOPOPTS = 54
IPV6_IPSEC_POLICY = 34
IPV6_JOIN_ANYCAST = 27
IPV6_JOIN_GROUP = 20
IPV6_LEAVE_ANYCAST = 28
IPV6_LEAVE_GROUP = 21
IPV6_MINHOPCOUNT = 73
IPV6_MTU = 24
IPV6_MTU_DISCOVER = 23
IPV6_MULTICAST_ALL = 29
IPV6_MULTICAST_HOPS = 18
IPV6_MULTICAST_IF = 17
IPV6_MULTICAST_LOOP = 19
IPV6_NEXTHOP = 9
IPV6_ORIGDSTADDR = 74
IPV6_PATHMTU = 61
IPV6_PKTINFO = 50
IPV6_PMTUDISC_DO = 2
IPV6_PMTUDISC_DONT = 0
IPV6_PMTUDISC_INTERFACE = 4
IPV6_PMTUDISC_OMIT = 5
IPV6_PMTUDISC_PROBE = 3
IPV6_PMTUDISC_WANT = 1
IPV6_RECVDSTOPTS = 58
IPV6_RECVERR = 25
IPV6_RECVERR_RFC4884 = 31
IPV6_RECVFRAGSIZE = 77
IPV6_RECVHOPLIMIT = 51
IPV6_RECVHOPOPTS = 53
IPV6_RECVORIGDSTADDR = 74
IPV6_RECVPATHMTU = 60
IPV6_RECVPKTINFO = 49
IPV6_RECVRTHDR = 56
IPV6_RECVTCLASS = 66
IPV6_ROUTER_ALERT = 22
IPV6_ROUTER_ALERT_ISOLATE = 30
IPV6_RTHDR = 57
IPV6_RTHDRDSTOPTS = 55
IPV6_RTHDR_LOOSE = 0
IPV6_RTHDR_STRICT = 1
IPV6_RTHDR_TYPE_0 = 0
IPV6_RXDSTOPTS = 59
IPV6_RXHOPOPTS = 54
IPV6_TCLASS = 67
IPV6_TRANSPARENT = 75
IPV6_UNICAST_HOPS = 16
IPV6_UNICAST_IF = 76
IPV6_V6ONLY = 26
IPV6_XFRM_POLICY = 35
IP_ADD_MEMBERSHIP = 35
IP_ADD_SOURCE_MEMBERSHIP = 39
IP_BIND_ADDRESS_NO_PORT = 24
IP_BLOCK_SOURCE = 38
IP_CHECKSUM = 23
IP_DEFAULT_MULTICAST_LOOP = 1
IP_DEFAULT_MULTICAST_TTL = 1
IP_DROP_MEMBERSHIP = 36
IP_DROP_SOURCE_MEMBERSHIP = 40
IP_FREEBIND = 15
IP_HDRINCL = 3
IP_IPSEC_POLICY = 16
IP_MAX_MEMBERSHIPS = 20
IP_MINTTL = 21
IP_MSFILTER = 41
IP_MTU = 14
IP_MTU_DISCOVER = 10
IP_MULTICAST_ALL = 49
IP_MULTICAST_IF = 32
IP_MULTICAST_LOOP = 34
IP_MULTICAST_TTL = 33
IP_NODEFRAG = 22
IP_OPTIONS = 4
IP_ORIGDSTADDR = 20
IP_PASSSEC = 18
IP_PKTINFO = 8
IP_PKTOPTIONS = 9
IP_PMTUDISC = 10
IP_PMTUDISC_DO = 2
IP_PMTUDISC_DONT = 0
IP_PMTUDISC_INTERFACE = 4
IP_PMTUDISC_OMIT = 5
IP_PMTUDISC_PROBE = 3
IP_PMTUDISC_WANT = 1
IP_RECVERR = 11
IP_RECVERR_RFC4884 = 26
IP_RECVFRAGSIZE = 25
IP_RECVOPTS = 6
IP_RECVORIGDSTADDR = 20
IP_RECVRETOPTS = 7
IP_RECVTOS = 13
IP_RECVTTL = 12
IP_RETOPTS = 7
IP_ROUTER_ALERT = 5
IP_TOS = 1
IP_TRANSPARENT = 19
IP_TTL = 2
IP_UNBLOCK_SOURCE = 37
IP_UNICAST_IF = 50
IP_XFRM_POLICY = 17
LITTLE_ENDIAN = 1234
MCAST_BLOCK_SOURCE = 43
MCAST_EXCLUDE = 0
MCAST_INCLUDE = 1
MCAST_JOIN_GROUP = 42
MCAST_JOIN_SOURCE_GROUP = 46
MCAST_LEAVE_GROUP = 45
MCAST_LEAVE_SOURCE_GROUP = 47
MCAST_MSFILTER = 48
MCAST_UNBLOCK_SOURCE = 44
PDP_ENDIAN = 3412
PF_ALG = 38
PF_APPLETALK = 5
PF_ASH = 18
PF_ATMPVC = 8
PF_ATMSVC = 20
PF_AX25 = 3
PF_BLUETOOTH = 31
PF_BRIDGE = 7
PF_CAIF = 37
PF_CAN = 29
PF_DECnet = 12
PF_ECONET = 19
PF_FILE = 1
PF_IB = 27
PF_IEEE802154 = 36
PF_INET = 2
PF_INET6 = 10
PF_IPX = 4
PF_IRDA = 23
PF_ISDN = 34
PF_IUCV = 32
PF_KCM = 41
PF_KEY = 15
PF_LLC = 26
PF_LOCAL = 1
PF_MAX = 45
PF_MPLS = 28
PF_NETBEUI = 13
PF_NETLINK = 16
PF_NETROM = 6
PF_NFC = 39
PF_PACKET = 17
PF_PHONET = 35
PF_PPPOX = 24
PF_QIPCRTR = 42
PF_RDS = 21
PF_ROSE = 11
PF_ROUTE = 16
PF_RXRPC = 33
PF_SECURITY = 14
PF_SMC = 43
PF_SNA = 22
PF_TIPC = 30
PF_UNIX = 1
PF_UNSPEC = 0
PF_VSOCK = 40
PF_WANPIPE = 25
PF_X25 = 9
PF_XDP = 44
SCM_TIMESTAMP = 29
SCM_TIMESTAMPING = 37
SCM_TIMESTAMPING_OPT_STATS = 54
SCM_TIMESTAMPING_PKTINFO = 58
SCM_TIMESTAMPNS = 35
SCM_TXTIME = 61
SCM_WIFI_STATUS = 41
SIOCATMARK = 0x8905
SIOCGPGRP = 0x8904
SIOCGSTAMPNS_OLD = 0x8907
SIOCGSTAMP_OLD = 0x8906
SIOCSPGRP = 0x8902
SOL_AAL = 265
SOL_ALG = 279
SOL_ATM = 264
SOL_BLUETOOTH = 274
SOL_CAIF = 278
SOL_DCCP = 269
SOL_DECNET = 261
SOL_ICMPV6 = 58
SOL_IP = 0
SOL_IPV6 = 41
SOL_IRDA = 266
SOL_IUCV = 277
SOL_KCM = 281
SOL_LLC = 268
SOL_NETBEUI = 267
SOL_NETLINK = 270
SOL_NFC = 280
SOL_PACKET = 263
SOL_PNPIPE = 275
SOL_PPPOL2TP = 273
SOL_RAW = 255
SOL_RDS = 276
SOL_RXRPC = 272
SOL_SOCKET = 1
SOL_TIPC = 271
SOL_TLS = 282
SOL_X25 = 262
SOL_XDP = 283
SOMAXCONN = 4096
SO_ACCEPTCONN = 30
SO_ATTACH_BPF = 50
SO_ATTACH_FILTER = 26
SO_ATTACH_REUSEPORT_CBPF = 51
SO_ATTACH_REUSEPORT_EBPF = 52
SO_BINDTODEVICE = 25
SO_BINDTOIFINDEX = 62
SO_BPF_EXTENSIONS = 48
SO_BROADCAST = 6
SO_BSDCOMPAT = 14
SO_BUSY_POLL = 46
SO_BUSY_POLL_BUDGET = 70
SO_CNX_ADVICE = 53
SO_COOKIE = 57
SO_DEBUG = 1
SO_DETACH_BPF = 27
SO_DETACH_FILTER = 27
SO_DETACH_REUSEPORT_BPF = 68
SO_DOMAIN = 39
SO_DONTROUTE = 5
SO_ERROR = 4
SO_GET_FILTER = 26
SO_INCOMING_CPU = 49
SO_INCOMING_NAPI_ID = 56
SO_KEEPALIVE = 9
SO_LINGER = 13
SO_LOCK_FILTER = 44
SO_MARK = 36
SO_MAX_PACING_RATE = 47
SO_MEMINFO = 55
SO_NETNS_COOKIE = 71
SO_NOFCS = 43
SO_NO_CHECK = 11
SO_OOBINLINE = 10
SO_PASSCRED = 16
SO_PASSSEC = 34
SO_PEEK_OFF = 42
SO_PEERCRED = 17
SO_PEERGROUPS = 59
SO_PEERNAME = 28
SO_PEERSEC = 31
SO_PREFER_BUSY_POLL = 69
SO_PRIORITY = 12
SO_PROTOCOL = 38
SO_RCVBUF = 8
SO_RCVBUFFORCE = 33
SO_RCVLOWAT = 18
SO_RCVTIMEO = 20
SO_RCVTIMEO_NEW = 66
SO_RCVTIMEO_OLD = 20
SO_REUSEADDR = 2
SO_REUSEPORT = 15
SO_RXQ_OVFL = 40
SO_SECURITY_AUTHENTICATION = 22
SO_SECURITY_ENCRYPTION_NETWORK = 24
SO_SECURITY_ENCRYPTION_TRANSPORT = 23
SO_SELECT_ERR_QUEUE = 45
SO_SNDBUF = 7
SO_SNDBUFFORCE = 32
SO_SNDLOWAT = 19
SO_SNDTIMEO = 21
SO_SNDTIMEO_NEW = 67
SO_SNDTIMEO_OLD = 21
SO_TIMESTAMP = 29
SO_TIMESTAMPING = 37
SO_TIMESTAMPING_NEW = 65
SO_TIMESTAMPING_OLD = 37
SO_TIMESTAMPNS = 35
SO_TIMESTAMPNS_NEW = 64
SO_TIMESTAMPNS_OLD = 35
SO_TIMESTAMP_NEW = 63
SO_TIMESTAMP_OLD = 29
SO_TXTIME = 61
SO_TYPE = 3
SO_WIFI_STATUS = 41
SO_ZEROCOPY = 60
X_ASM_RISCV_BITSPERLONG_H = 0
X_ATFILE_SOURCE = 1
X_BITS_BYTESWAP_H = 1
X_BITS_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_PTHREADTYPES_ARCH_H = 1
X_BITS_PTHREADTYPES_COMMON_H = 1
X_BITS_SOCKADDR_H = 1
X_BITS_STDINT_INTN_H = 1
X_BITS_STDINT_UINTN_H = 1
X_BITS_TIME64_H = 1
X_BITS_TYPESIZES_H = 1
X_BITS_TYPES_H = 1
X_BITS_UINTN_IDENTITY_H = 1
X_BSD_SIZE_T_ = 0
X_BSD_SIZE_T_DEFINED_ = 0
X_DEFAULT_SOURCE = 1
X_ENDIAN_H = 1
X_FEATURES_H = 1
X_FILE_OFFSET_BITS = 64
X_GCC_SIZE_T = 0
X_LINUX_POSIX_TYPES_H = 0
X_LP64 = 1
X_NETINET_IN_H = 1
X_POSIX_C_SOURCE = 200809
X_POSIX_SOURCE = 1
X_RWLOCK_INTERNAL_H = 0
X_SIZET_ = 0
X_SIZE_T = 0
X_SIZE_T_ = 0
X_SIZE_T_DECLARED = 0
X_SIZE_T_DEFINED = 0
X_SIZE_T_DEFINED_ = 0
X_SS_SIZE = 128
X_STDC_PREDEF_H = 1
X_STRUCT_TIMESPEC = 1
X_SYS_CDEFS_H = 1
X_SYS_SELECT_H = 1
X_SYS_SIZE_T_H = 0
X_SYS_SOCKET_H = 1
X_SYS_TYPES_H = 1
X_THREAD_MUTEX_INTERNAL_H = 1
X_THREAD_SHARED_TYPES_H = 1
X_T_SIZE = 0
X_T_SIZE_ = 0
Linux = 1
Unix = 1
)
// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
//
// network headers first and we should use those ABI-identical definitions
// instead of our own, otherwise 0.
const ( /* in.h:103:1: */
IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
IPPROTO_ROUTING = 43 // IPv6 routing header.
IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
IPPROTO_ICMPV6 = 58 // ICMPv6.
IPPROTO_NONE = 59 // IPv6 no next header.
IPPROTO_DSTOPTS = 60 // IPv6 destination options.
IPPROTO_MH = 135
)
// Standard well-known ports.
const ( /* in.h:126:1: */
IPPORT_ECHO = 7 // Echo service.
IPPORT_DISCARD = 9 // Discard transmissions service.
IPPORT_SYSTAT = 11 // System status service.
IPPORT_DAYTIME = 13 // Time of day service.
IPPORT_NETSTAT = 15 // Network status service.
IPPORT_FTP = 21 // File Transfer Protocol.
IPPORT_TELNET = 23 // Telnet protocol.
IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
IPPORT_TIMESERVER = 37 // Timeserver service.
IPPORT_NAMESERVER = 42 // Domain Name Service.
IPPORT_WHOIS = 43 // Internet Whois service.
IPPORT_MTP = 57
IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
IPPORT_RJE = 77
IPPORT_FINGER = 79 // Finger service.
IPPORT_TTYLINK = 87
IPPORT_SUPDUP = 95 // SUPDUP protocol.
IPPORT_EXECSERVER = 512 // execd service.
IPPORT_LOGINSERVER = 513 // rlogind service.
IPPORT_CMDSERVER = 514
IPPORT_EFSSERVER = 520
// UDP ports.
IPPORT_BIFFUDP = 512
IPPORT_WHOSERVER = 513
IPPORT_ROUTESERVER = 520
// Ports less than this value are reserved for privileged processes.
IPPORT_RESERVED = 1024
// Ports greater this value are reserved for (non-privileged) servers.
IPPORT_USERRESERVED = 5000
)
// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
// The first word in the comment at the right is the data type used;
// "bool" means a boolean value stored in an `int'.
// Advanced API (RFC3542) (1).
// Advanced API (RFC3542) (2).
// RFC5014.
// RFC5082.
// Obsolete synonyms for the above.
// IPV6_MTU_DISCOVER values.
// Socket level values for IPv6.
// Routing header options for IPv6.
// Standard well-defined IP protocols.
const ( /* in.h:40:1: */
IPPROTO_IP = 0 // Dummy protocol for TCP.
IPPROTO_ICMP = 1 // Internet Control Message Protocol.
IPPROTO_IGMP = 2 // Internet Group Management Protocol.
IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
IPPROTO_TCP = 6 // Transmission Control Protocol.
IPPROTO_EGP = 8 // Exterior Gateway Protocol.
IPPROTO_PUP = 12 // PUP protocol.
IPPROTO_UDP = 17 // User Datagram Protocol.
IPPROTO_IDP = 22 // XNS IDP protocol.
IPPROTO_TP = 29 // SO Transport Protocol Class 4.
IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
IPPROTO_IPV6 = 41 // IPv6 header.
IPPROTO_RSVP = 46 // Reservation Protocol.
IPPROTO_GRE = 47 // General Routing Encapsulation.
IPPROTO_ESP = 50 // encapsulating security payload.
IPPROTO_AH = 51 // authentication header.
IPPROTO_MTP = 92 // Multicast Transport Protocol.
IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
IPPROTO_ENCAP = 98 // Encapsulation Header.
IPPROTO_PIM = 103 // Protocol Independent Multicast.
IPPROTO_COMP = 108 // Compression Header Protocol.
IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
IPPROTO_MPLS = 137 // MPLS in IP.
IPPROTO_ETHERNET = 143 // Ethernet-within-IPv6 Encapsulation.
IPPROTO_RAW = 255 // Raw IP packets.
IPPROTO_MPTCP = 262 // Multipath TCP connection.
IPPROTO_MAX = 263
)
// Bits in the FLAGS argument to `send', `recv', et al.
const ( /* socket.h:200:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
MSG_CTRUNC = 8 // Control data lost before delivery.
MSG_PROXY = 16 // Supply or ask second address.
MSG_TRUNC = 32
MSG_DONTWAIT = 64 // Nonblocking IO.
MSG_EOR = 128 // End of record.
MSG_WAITALL = 256 // Wait for a full request.
MSG_FIN = 512
MSG_SYN = 1024
MSG_CONFIRM = 2048 // Confirm path validity.
MSG_RST = 4096
MSG_ERRQUEUE = 8192 // Fetch message from error queue.
MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
MSG_MORE = 32768 // Sender will send more.
MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
MSG_BATCH = 262144 // sendmmsg: more messages coming.
MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
MSG_CMSG_CLOEXEC = 1073741824
)
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
const ( /* socket.h:332:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
// Copyright (C) 1991-2021 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Types of sockets.
const ( /* socket_type.h:24:1: */
SOCK_STREAM = 1 // Sequenced, reliable, connection-based
// byte streams.
SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
// of fixed maximum length.
SOCK_RAW = 3 // Raw protocol interface.
SOCK_RDM = 4 // Reliably-delivered messages.
SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
// datagrams of fixed maximum length.
SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
SOCK_PACKET = 10 // Linux specific way of getting packets
// at the dev level. For writing rarp and
// other similar things on the user level.
// Flags to be ORed into the type parameter of socket and socketpair and
// used for the flags parameter of paccept.
SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
// new descriptor(s).
SOCK_NONBLOCK = 2048
)
// The following constants should be used for the second parameter of
//
// `shutdown'.
const ( /* socket.h:41:1: */
SHUT_RD = 0 // No more receptions.
SHUT_WR = 1 // No more transmissions.
SHUT_RDWR = 2
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
type Size_t = uint64 /* <builtin>:9:23 */
type Wchar_t = int32 /* <builtin>:15:24 */
type X__int128_t = struct {
Flo int64
Fhi int64
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
type X__uint128_t = struct {
Flo uint64
Fhi uint64
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Copyright (C) 1991-2021 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Copyright (C) 1991-2021 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
//
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
// Extensions to ISO C11 from TS 18661-1:2014.
// __STDC_WANT_IEC_60559_FUNCS_EXT__
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
// __STDC_WANT_IEC_60559_EXT__
// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
// if >=199309L, add IEEE Std 1003.1b-1993;
// if >=199506L, add IEEE Std 1003.1c-1995;
// if >=200112L, all of IEEE 1003.1-2004
// if >=200809L, all of IEEE 1003.1-2008
// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
// Single Unix conformance is wanted, to 600 for the
// sixth revision, to 700 for the seventh revision.
// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
// Set to 1 or 2; 2 performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
//
// The `-ansi' switch to the GNU C compiler, and standards conformance
// options such as `-std=c99', define __STRICT_ANSI__. If none of
// these are defined, or if _DEFAULT_SOURCE is defined, the default is
// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
// 200809L, as well as enabling miscellaneous functions from BSD and
// SVID. If more than one of these are defined, they accumulate. For
// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
// give you ISO C, 1003.1, and 1003.2, but nothing else.
//
// These are defined by this file and are used by the
// header files to decide what to declare or define:
//
// __GLIBC_USE (F) Define things from feature set F. This is defined
// to 1 or 0; the subsequent macros are either defined
// or undefined, and those tests should be moved to
// __GLIBC_USE.
// __USE_ISOC11 Define ISO C11 things.
// __USE_ISOC99 Define ISO C99 things.
// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
// __USE_ISOCXX11 Define ISO C++11 things.
// __USE_POSIX Define IEEE Std 1003.1 things.
// __USE_POSIX2 Define IEEE Std 1003.2 things.
// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
// __USE_XOPEN Define XPG things.
// __USE_XOPEN_EXTENDED Define X/Open Unix things.
// __USE_UNIX98 Define Single Unix V2 things.
// __USE_XOPEN2K Define XPG6 things.
// __USE_XOPEN2KXSI Define XPG6 XSI things.
// __USE_XOPEN2K8 Define XPG7 things.
// __USE_XOPEN2K8XSI Define XPG7 XSI things.
// __USE_LARGEFILE Define correct standard I/O things.
// __USE_LARGEFILE64 Define LFS things with separate names.
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
// only for compatibility. All new code should use the other symbols
// to test for features.
//
// All macros listed above as possibly being defined by this file are
// explicitly undefined if they are not explicitly defined.
// Feature-test macros that are not defined by the user or compiler
// but are implied by the other feature-test macros defined (or by the
// lack of any definitions) are defined by the file.
//
// ISO C feature test macros depend on the definition of the macro
// when an affected header is included, not when the first system
// header is included, and so they are handled in
// <bits/libc-header-start.h>, which does not have a multiple include
// guard. Feature test macros that can be handled from the first
// system header included are handled here.
// Undefine everything, so we get a clean slate.
// Suppress kernel-name space pollution unless user expressedly asks
// for it.
// Convenience macro to test the version of gcc.
// Use like this:
// #if __GNUC_PREREQ (2,8)
// ... code requiring gcc 2.8 or later ...
// #endif
// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
// added in 2.0.
// Similarly for clang. Features added to GCC after version 4.2 may
// or may not also be available in clang, and clang's definitions of
// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
// features can be queried via __has_extension/__has_feature.
// Whether to use feature set F.
// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
// issue a warning; the expectation is that the source is being
// transitioned to use the new macro.
// If _GNU_SOURCE was defined by the user, turn on all the other features.
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
// This is to enable the ISO C90 Amendment 1:1995 extension.
// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
// is defined, use POSIX.1-2008 (or another version depending on
// _XOPEN_SOURCE).
// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
// defined in all multithreaded code. GNU libc has not required this
// for many years. We now treat them as compatibility synonyms for
// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
// Features part to handle 64-bit time_t support.
| 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/netinet/in/capi_freebsd_386.go | vendor/modernc.org/libc/netinet/in/capi_freebsd_386.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_386.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_linux_mips64le.go | vendor/modernc.org/libc/netinet/in/in_linux_mips64le.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_amd64.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
AF_ALG = 38 // socket.h:133:1:
AF_APPLETALK = 5 // socket.h:99:1:
AF_ASH = 18 // socket.h:113:1:
AF_ATMPVC = 8 // socket.h:102:1:
AF_ATMSVC = 20 // socket.h:115:1:
AF_AX25 = 3 // socket.h:97:1:
AF_BLUETOOTH = 31 // socket.h:126:1:
AF_BRIDGE = 7 // socket.h:101:1:
AF_CAIF = 37 // socket.h:132:1:
AF_CAN = 29 // socket.h:124:1:
AF_DECnet = 12 // socket.h:106:1:
AF_ECONET = 19 // socket.h:114:1:
AF_FILE = 1 // socket.h:95:1:
AF_IB = 27 // socket.h:122:1:
AF_IEEE802154 = 36 // socket.h:131:1:
AF_INET = 2 // socket.h:96:1:
AF_INET6 = 10 // socket.h:104:1:
AF_IPX = 4 // socket.h:98:1:
AF_IRDA = 23 // socket.h:118:1:
AF_ISDN = 34 // socket.h:129:1:
AF_IUCV = 32 // socket.h:127:1:
AF_KCM = 41 // socket.h:136:1:
AF_KEY = 15 // socket.h:109:1:
AF_LLC = 26 // socket.h:121:1:
AF_LOCAL = 1 // socket.h:93:1:
AF_MAX = 45 // socket.h:140:1:
AF_MPLS = 28 // socket.h:123:1:
AF_NETBEUI = 13 // socket.h:107:1:
AF_NETLINK = 16 // socket.h:110:1:
AF_NETROM = 6 // socket.h:100:1:
AF_NFC = 39 // socket.h:134:1:
AF_PACKET = 17 // socket.h:112:1:
AF_PHONET = 35 // socket.h:130:1:
AF_PPPOX = 24 // socket.h:119:1:
AF_QIPCRTR = 42 // socket.h:137:1:
AF_RDS = 21 // socket.h:116:1:
AF_ROSE = 11 // socket.h:105:1:
AF_ROUTE = 16 // socket.h:111:1:
AF_RXRPC = 33 // socket.h:128:1:
AF_SECURITY = 14 // socket.h:108:1:
AF_SMC = 43 // socket.h:138:1:
AF_SNA = 22 // socket.h:117:1:
AF_TIPC = 30 // socket.h:125:1:
AF_UNIX = 1 // socket.h:94:1:
AF_UNSPEC = 0 // socket.h:92:1:
AF_VSOCK = 40 // socket.h:135:1:
AF_WANPIPE = 25 // socket.h:120:1:
AF_X25 = 9 // socket.h:103:1:
AF_XDP = 44 // socket.h:139:1:
BIG_ENDIAN = 4321 // endian.h:28:1:
BYTE_ORDER = 1234 // endian.h:30:1:
FD_SETSIZE = 1024 // select.h:73:1:
FIOGETOWN = 0x8903 // sockios.h:8:1:
FIOSETOWN = 0x8901 // sockios.h:6:1:
INET6_ADDRSTRLEN = 46 // in.h:234:1:
INET_ADDRSTRLEN = 16 // in.h:233:1:
IN_CLASSA_HOST = 16777215 // in.h:169:1:
IN_CLASSA_MAX = 128 // in.h:170:1:
IN_CLASSA_NET = 0xff000000 // in.h:167:1:
IN_CLASSA_NSHIFT = 24 // in.h:168:1:
IN_CLASSB_HOST = 65535 // in.h:175:1:
IN_CLASSB_MAX = 65536 // in.h:176:1:
IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
IN_CLASSB_NSHIFT = 16 // in.h:174:1:
IN_CLASSC_HOST = 255 // in.h:181:1:
IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
IN_CLASSC_NSHIFT = 8 // in.h:180:1:
IN_LOOPBACKNET = 127 // in.h:197:1:
IPV6_2292DSTOPTS = 4 // in.h:171:1:
IPV6_2292HOPLIMIT = 8 // in.h:175:1:
IPV6_2292HOPOPTS = 3 // in.h:170:1:
IPV6_2292PKTINFO = 2 // in.h:169:1:
IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
IPV6_2292RTHDR = 5 // in.h:172:1:
IPV6_ADDRFORM = 1 // in.h:168:1:
IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
IPV6_AUTHHDR = 10 // in.h:180:1:
IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
IPV6_CHECKSUM = 7 // in.h:174:1:
IPV6_DONTFRAG = 62 // in.h:214:1:
IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
IPV6_DSTOPTS = 59 // in.h:211:1:
IPV6_FREEBIND = 78 // in.h:233:1:
IPV6_HDRINCL = 36 // in.h:198:1:
IPV6_HOPLIMIT = 52 // in.h:204:1:
IPV6_HOPOPTS = 54 // in.h:206:1:
IPV6_IPSEC_POLICY = 34 // in.h:196:1:
IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
IPV6_JOIN_GROUP = 20 // in.h:185:1:
IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
IPV6_LEAVE_GROUP = 21 // in.h:186:1:
IPV6_MINHOPCOUNT = 73 // in.h:226:1:
IPV6_MTU = 24 // in.h:189:1:
IPV6_MTU_DISCOVER = 23 // in.h:188:1:
IPV6_MULTICAST_ALL = 29 // in.h:194:1:
IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
IPV6_MULTICAST_IF = 17 // in.h:182:1:
IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
IPV6_NEXTHOP = 9 // in.h:179:1:
IPV6_ORIGDSTADDR = 74 // in.h:228:1:
IPV6_PATHMTU = 61 // in.h:213:1:
IPV6_PKTINFO = 50 // in.h:202:1:
IPV6_PMTUDISC_DO = 2 // in.h:246:1:
IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
IPV6_RECVDSTOPTS = 58 // in.h:210:1:
IPV6_RECVERR = 25 // in.h:190:1:
IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
IPV6_RECVHOPOPTS = 53 // in.h:205:1:
IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
IPV6_RECVPATHMTU = 60 // in.h:212:1:
IPV6_RECVPKTINFO = 49 // in.h:201:1:
IPV6_RECVRTHDR = 56 // in.h:208:1:
IPV6_RECVTCLASS = 66 // in.h:217:1:
IPV6_ROUTER_ALERT = 22 // in.h:187:1:
IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
IPV6_RTHDR = 57 // in.h:209:1:
IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
IPV6_RTHDR_STRICT = 1 // in.h:257:1:
IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
IPV6_RXDSTOPTS = 59 // in.h:241:1:
IPV6_RXHOPOPTS = 54 // in.h:240:1:
IPV6_TCLASS = 67 // in.h:218:1:
IPV6_TRANSPARENT = 75 // in.h:230:1:
IPV6_UNICAST_HOPS = 16 // in.h:181:1:
IPV6_UNICAST_IF = 76 // in.h:231:1:
IPV6_V6ONLY = 26 // in.h:191:1:
IPV6_XFRM_POLICY = 35 // in.h:197:1:
IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
IP_BLOCK_SOURCE = 38 // in.h:124:1:
IP_CHECKSUM = 23 // in.h:102:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
IP_FREEBIND = 15 // in.h:89:1:
IP_HDRINCL = 3 // in.h:48:1:
IP_IPSEC_POLICY = 16 // in.h:90:1:
IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
IP_MINTTL = 21 // in.h:100:1:
IP_MSFILTER = 41 // in.h:127:1:
IP_MTU = 14 // in.h:88:1:
IP_MTU_DISCOVER = 10 // in.h:84:1:
IP_MULTICAST_ALL = 49 // in.h:128:1:
IP_MULTICAST_IF = 32 // in.h:118:1:
IP_MULTICAST_LOOP = 34 // in.h:120:1:
IP_MULTICAST_TTL = 33 // in.h:119:1:
IP_NODEFRAG = 22 // in.h:101:1:
IP_OPTIONS = 4 // in.h:47:1:
IP_ORIGDSTADDR = 20 // in.h:97:1:
IP_PASSSEC = 18 // in.h:92:1:
IP_PKTINFO = 8 // in.h:81:1:
IP_PKTOPTIONS = 9 // in.h:82:1:
IP_PMTUDISC = 10 // in.h:83:1:
IP_PMTUDISC_DO = 2 // in.h:109:1:
IP_PMTUDISC_DONT = 0 // in.h:107:1:
IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
IP_PMTUDISC_OMIT = 5 // in.h:116:1:
IP_PMTUDISC_PROBE = 3 // in.h:110:1:
IP_PMTUDISC_WANT = 1 // in.h:108:1:
IP_RECVERR = 11 // in.h:85:1:
IP_RECVFRAGSIZE = 25 // in.h:104:1:
IP_RECVOPTS = 6 // in.h:51:1:
IP_RECVORIGDSTADDR = 20 // in.h:98:1:
IP_RECVRETOPTS = 7 // in.h:53:1:
IP_RECVTOS = 13 // in.h:87:1:
IP_RECVTTL = 12 // in.h:86:1:
IP_RETOPTS = 7 // in.h:54:1:
IP_ROUTER_ALERT = 5 // in.h:80:1:
IP_TOS = 1 // in.h:49:1:
IP_TRANSPARENT = 19 // in.h:93:1:
IP_TTL = 2 // in.h:50:1:
IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
IP_UNICAST_IF = 50 // in.h:129:1:
IP_XFRM_POLICY = 17 // in.h:91:1:
LITTLE_ENDIAN = 1234 // endian.h:27:1:
MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
MCAST_EXCLUDE = 0 // in.h:76:1:
MCAST_INCLUDE = 1 // in.h:77:1:
MCAST_JOIN_GROUP = 42 // in.h:66:1:
MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
MCAST_LEAVE_GROUP = 45 // in.h:69:1:
MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
MCAST_MSFILTER = 48 // in.h:72:1:
MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
PDP_ENDIAN = 3412 // endian.h:29:1:
PF_ALG = 38 // socket.h:82:1:
PF_APPLETALK = 5 // socket.h:48:1:
PF_ASH = 18 // socket.h:62:1:
PF_ATMPVC = 8 // socket.h:51:1:
PF_ATMSVC = 20 // socket.h:64:1:
PF_AX25 = 3 // socket.h:46:1:
PF_BLUETOOTH = 31 // socket.h:75:1:
PF_BRIDGE = 7 // socket.h:50:1:
PF_CAIF = 37 // socket.h:81:1:
PF_CAN = 29 // socket.h:73:1:
PF_DECnet = 12 // socket.h:55:1:
PF_ECONET = 19 // socket.h:63:1:
PF_FILE = 1 // socket.h:44:1:
PF_IB = 27 // socket.h:71:1:
PF_IEEE802154 = 36 // socket.h:80:1:
PF_INET = 2 // socket.h:45:1:
PF_INET6 = 10 // socket.h:53:1:
PF_IPX = 4 // socket.h:47:1:
PF_IRDA = 23 // socket.h:67:1:
PF_ISDN = 34 // socket.h:78:1:
PF_IUCV = 32 // socket.h:76:1:
PF_KCM = 41 // socket.h:85:1:
PF_KEY = 15 // socket.h:58:1:
PF_LLC = 26 // socket.h:70:1:
PF_LOCAL = 1 // socket.h:42:1:
PF_MAX = 45 // socket.h:89:1:
PF_MPLS = 28 // socket.h:72:1:
PF_NETBEUI = 13 // socket.h:56:1:
PF_NETLINK = 16 // socket.h:59:1:
PF_NETROM = 6 // socket.h:49:1:
PF_NFC = 39 // socket.h:83:1:
PF_PACKET = 17 // socket.h:61:1:
PF_PHONET = 35 // socket.h:79:1:
PF_PPPOX = 24 // socket.h:68:1:
PF_QIPCRTR = 42 // socket.h:86:1:
PF_RDS = 21 // socket.h:65:1:
PF_ROSE = 11 // socket.h:54:1:
PF_ROUTE = 16 // socket.h:60:1:
PF_RXRPC = 33 // socket.h:77:1:
PF_SECURITY = 14 // socket.h:57:1:
PF_SMC = 43 // socket.h:87:1:
PF_SNA = 22 // socket.h:66:1:
PF_TIPC = 30 // socket.h:74:1:
PF_UNIX = 1 // socket.h:43:1:
PF_UNSPEC = 0 // socket.h:41:1:
PF_VSOCK = 40 // socket.h:84:1:
PF_WANPIPE = 25 // socket.h:69:1:
PF_X25 = 9 // socket.h:52:1:
PF_XDP = 44 // socket.h:88:1:
SCM_TIMESTAMP = 29 // socket.h:140:1:
SCM_TIMESTAMPING = 37 // socket.h:142:1:
SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
SCM_TIMESTAMPNS = 35 // socket.h:141:1:
SCM_TXTIME = 61 // socket.h:105:1:
SCM_WIFI_STATUS = 41 // socket.h:64:1:
SIOCATMARK = 0x8905 // sockios.h:10:1:
SIOCGPGRP = 0x8904 // sockios.h:9:1:
SIOCGSTAMP = 0x8906 // sockios.h:11:1:
SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
SIOCSPGRP = 0x8902 // sockios.h:7:1:
SOL_AAL = 265 // socket.h:151:1:
SOL_ALG = 279 // socket.h:165:1:
SOL_ATM = 264 // socket.h:150:1:
SOL_BLUETOOTH = 274 // socket.h:160:1:
SOL_CAIF = 278 // socket.h:164:1:
SOL_DCCP = 269 // socket.h:155:1:
SOL_DECNET = 261 // socket.h:147:1:
SOL_ICMPV6 = 58 // in.h:253:1:
SOL_IP = 0 // in.h:132:1:
SOL_IPV6 = 41 // in.h:252:1:
SOL_IRDA = 266 // socket.h:152:1:
SOL_IUCV = 277 // socket.h:163:1:
SOL_KCM = 281 // socket.h:167:1:
SOL_LLC = 268 // socket.h:154:1:
SOL_NETBEUI = 267 // socket.h:153:1:
SOL_NETLINK = 270 // socket.h:156:1:
SOL_NFC = 280 // socket.h:166:1:
SOL_PACKET = 263 // socket.h:149:1:
SOL_PNPIPE = 275 // socket.h:161:1:
SOL_PPPOL2TP = 273 // socket.h:159:1:
SOL_RAW = 255 // socket.h:146:1:
SOL_RDS = 276 // socket.h:162:1:
SOL_RXRPC = 272 // socket.h:158:1:
SOL_SOCKET = 1 // socket.h:9:1:
SOL_TIPC = 271 // socket.h:157:1:
SOL_TLS = 282 // socket.h:168:1:
SOL_X25 = 262 // socket.h:148:1:
SOL_XDP = 283 // socket.h:169:1:
SOMAXCONN = 4096 // socket.h:172:1:
SO_ACCEPTCONN = 30 // socket.h:51:1:
SO_ATTACH_BPF = 50 // socket.h:82:1:
SO_ATTACH_FILTER = 26 // socket.h:45:1:
SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
SO_BINDTODEVICE = 25 // socket.h:42:1:
SO_BINDTOIFINDEX = 62 // socket.h:107:1:
SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
SO_BROADCAST = 6 // socket.h:16:1:
SO_BSDCOMPAT = 14 // socket.h:26:1:
SO_BUSY_POLL = 46 // socket.h:74:1:
SO_CNX_ADVICE = 53 // socket.h:88:1:
SO_COOKIE = 57 // socket.h:96:1:
SO_DEBUG = 1 // socket.h:11:1:
SO_DETACH_BPF = 27 // socket.h:83:1:
SO_DETACH_FILTER = 27 // socket.h:46:1:
SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
SO_DOMAIN = 39 // socket.h:59:1:
SO_DONTROUTE = 5 // socket.h:15:1:
SO_ERROR = 4 // socket.h:14:1:
SO_GET_FILTER = 26 // socket.h:47:1:
SO_INCOMING_CPU = 49 // socket.h:80:1:
SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
SO_KEEPALIVE = 9 // socket.h:21:1:
SO_LINGER = 13 // socket.h:25:1:
SO_LOCK_FILTER = 44 // socket.h:70:1:
SO_MARK = 36 // socket.h:56:1:
SO_MAX_PACING_RATE = 47 // socket.h:76:1:
SO_MEMINFO = 55 // socket.h:92:1:
SO_NOFCS = 43 // socket.h:68:1:
SO_NO_CHECK = 11 // socket.h:23:1:
SO_OOBINLINE = 10 // socket.h:22:1:
SO_PASSCRED = 16 // socket.h:29:1:
SO_PASSSEC = 34 // socket.h:54:1:
SO_PEEK_OFF = 42 // socket.h:65:1:
SO_PEERCRED = 17 // socket.h:30:1:
SO_PEERGROUPS = 59 // socket.h:100:1:
SO_PEERNAME = 28 // socket.h:49:1:
SO_PEERSEC = 31 // socket.h:53:1:
SO_PRIORITY = 12 // socket.h:24:1:
SO_PROTOCOL = 38 // socket.h:58:1:
SO_RCVBUF = 8 // socket.h:18:1:
SO_RCVBUFFORCE = 33 // socket.h:20:1:
SO_RCVLOWAT = 18 // socket.h:31:1:
SO_RCVTIMEO = 20 // socket.h:129:1:
SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
SO_REUSEADDR = 2 // socket.h:12:1:
SO_REUSEPORT = 15 // socket.h:27:1:
SO_RXQ_OVFL = 40 // socket.h:61:1:
SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
SO_SNDBUF = 7 // socket.h:17:1:
SO_SNDBUFFORCE = 32 // socket.h:19:1:
SO_SNDLOWAT = 19 // socket.h:32:1:
SO_SNDTIMEO = 21 // socket.h:130:1:
SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
SO_TIMESTAMP = 29 // socket.h:125:1:
SO_TIMESTAMPING = 37 // socket.h:127:1:
SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
SO_TIMESTAMPNS = 35 // socket.h:126:1:
SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
SO_TXTIME = 61 // socket.h:104:1:
SO_TYPE = 3 // socket.h:13:1:
SO_WIFI_STATUS = 41 // socket.h:63:1:
SO_ZEROCOPY = 60 // socket.h:102:1:
X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
X_ATFILE_SOURCE = 1 // features.h:342:1:
X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
X_BITS_ENDIAN_H = 1 // endian.h:20:1:
X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
X_BITS_TIME64_H = 1 // time64.h:24:1:
X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
X_BITS_TYPES_H = 1 // types.h:24:1:
X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
X_DEFAULT_SOURCE = 1 // features.h:227:1:
X_ENDIAN_H = 1 // endian.h:19:1:
X_FEATURES_H = 1 // features.h:19:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_GCC_SIZE_T = 0 // stddef.h:195:1:
X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
X_LP64 = 1 // <predefined>:284:1:
X_NETINET_IN_H = 1 // in.h:19:1:
X_POSIX_C_SOURCE = 200809 // features.h:281:1:
X_POSIX_SOURCE = 1 // features.h:279:1:
X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
X_SIZET_ = 0 // stddef.h:196:1:
X_SIZE_T = 0 // stddef.h:183:1:
X_SIZE_T_ = 0 // stddef.h:188:1:
X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
X_SS_SIZE = 128 // sockaddr.h:40:1:
X_STDC_PREDEF_H = 1 // <predefined>:162:1:
X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
X_SYS_SELECT_H = 1 // select.h:22:1:
X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
X_SYS_SOCKET_H = 1 // socket.h:20:1:
X_SYS_TYPES_H = 1 // types.h:23:1:
X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
X_T_SIZE = 0 // stddef.h:186:1:
X_T_SIZE_ = 0 // stddef.h:185:1:
Linux = 1 // <predefined>:231:1:
Unix = 1 // <predefined>:177:1:
)
// Standard well-known ports.
const ( /* in.h:122:1: */
IPPORT_ECHO = 7 // Echo service.
IPPORT_DISCARD = 9 // Discard transmissions service.
IPPORT_SYSTAT = 11 // System status service.
IPPORT_DAYTIME = 13 // Time of day service.
IPPORT_NETSTAT = 15 // Network status service.
IPPORT_FTP = 21 // File Transfer Protocol.
IPPORT_TELNET = 23 // Telnet protocol.
IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
IPPORT_TIMESERVER = 37 // Timeserver service.
IPPORT_NAMESERVER = 42 // Domain Name Service.
IPPORT_WHOIS = 43 // Internet Whois service.
IPPORT_MTP = 57
IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
IPPORT_RJE = 77
IPPORT_FINGER = 79 // Finger service.
IPPORT_TTYLINK = 87
IPPORT_SUPDUP = 95 // SUPDUP protocol.
IPPORT_EXECSERVER = 512 // execd service.
IPPORT_LOGINSERVER = 513 // rlogind service.
IPPORT_CMDSERVER = 514
IPPORT_EFSSERVER = 520
// UDP ports.
IPPORT_BIFFUDP = 512
IPPORT_WHOSERVER = 513
IPPORT_ROUTESERVER = 520
// Ports less than this value are reserved for privileged processes.
IPPORT_RESERVED = 1024
// Ports greater this value are reserved for (non-privileged) servers.
IPPORT_USERRESERVED = 5000
)
// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
// The first word in the comment at the right is the data type used;
// "bool" means a boolean value stored in an `int'.
// Advanced API (RFC3542) (1).
// Advanced API (RFC3542) (2).
// RFC5014.
// RFC5082.
// Obsolete synonyms for the above.
// IPV6_MTU_DISCOVER values.
// Socket level values for IPv6.
// Routing header options for IPv6.
// Standard well-defined IP protocols.
const ( /* in.h:40:1: */
IPPROTO_IP = 0 // Dummy protocol for TCP.
IPPROTO_ICMP = 1 // Internet Control Message Protocol.
IPPROTO_IGMP = 2 // Internet Group Management Protocol.
IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
IPPROTO_TCP = 6 // Transmission Control Protocol.
IPPROTO_EGP = 8 // Exterior Gateway Protocol.
IPPROTO_PUP = 12 // PUP protocol.
IPPROTO_UDP = 17 // User Datagram Protocol.
IPPROTO_IDP = 22 // XNS IDP protocol.
IPPROTO_TP = 29 // SO Transport Protocol Class 4.
IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
IPPROTO_IPV6 = 41 // IPv6 header.
IPPROTO_RSVP = 46 // Reservation Protocol.
IPPROTO_GRE = 47 // General Routing Encapsulation.
IPPROTO_ESP = 50 // encapsulating security payload.
IPPROTO_AH = 51 // authentication header.
IPPROTO_MTP = 92 // Multicast Transport Protocol.
IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
IPPROTO_ENCAP = 98 // Encapsulation Header.
IPPROTO_PIM = 103 // Protocol Independent Multicast.
IPPROTO_COMP = 108 // Compression Header Protocol.
IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
IPPROTO_MPLS = 137 // MPLS in IP.
IPPROTO_RAW = 255 // Raw IP packets.
IPPROTO_MAX = 256
)
// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
//
// network headers first and we should use those ABI-identical definitions
// instead of our own, otherwise 0.
const ( /* in.h:99:1: */
IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
IPPROTO_ROUTING = 43 // IPv6 routing header.
IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
IPPROTO_ICMPV6 = 58 // ICMPv6.
IPPROTO_NONE = 59 // IPv6 no next header.
IPPROTO_DSTOPTS = 60 // IPv6 destination options.
IPPROTO_MH = 135
)
// Bits in the FLAGS argument to `send', `recv', et al.
const ( /* socket.h:200:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
MSG_CTRUNC = 8 // Control data lost before delivery.
MSG_PROXY = 16 // Supply or ask second address.
MSG_TRUNC = 32
MSG_DONTWAIT = 64 // Nonblocking IO.
MSG_EOR = 128 // End of record.
MSG_WAITALL = 256 // Wait for a full request.
MSG_FIN = 512
MSG_SYN = 1024
MSG_CONFIRM = 2048 // Confirm path validity.
MSG_RST = 4096
MSG_ERRQUEUE = 8192 // Fetch message from error queue.
MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
MSG_MORE = 32768 // Sender will send more.
MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
MSG_BATCH = 262144 // sendmmsg: more messages coming.
MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
MSG_CMSG_CLOEXEC = 1073741824
)
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
const ( /* socket.h:332:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Types of sockets.
const ( /* socket_type.h:24:1: */
SOCK_STREAM = 1 // Sequenced, reliable, connection-based
// byte streams.
SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
// of fixed maximum length.
SOCK_RAW = 3 // Raw protocol interface.
SOCK_RDM = 4 // Reliably-delivered messages.
SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
// datagrams of fixed maximum length.
SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
| 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/netinet/in/in_linux_ppc64le.go | vendor/modernc.org/libc/netinet/in/in_linux_ppc64le.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_ppc64le.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
AF_ALG = 38 // socket.h:133:1:
AF_APPLETALK = 5 // socket.h:99:1:
AF_ASH = 18 // socket.h:113:1:
AF_ATMPVC = 8 // socket.h:102:1:
AF_ATMSVC = 20 // socket.h:115:1:
AF_AX25 = 3 // socket.h:97:1:
AF_BLUETOOTH = 31 // socket.h:126:1:
AF_BRIDGE = 7 // socket.h:101:1:
AF_CAIF = 37 // socket.h:132:1:
AF_CAN = 29 // socket.h:124:1:
AF_DECnet = 12 // socket.h:106:1:
AF_ECONET = 19 // socket.h:114:1:
AF_FILE = 1 // socket.h:95:1:
AF_IB = 27 // socket.h:122:1:
AF_IEEE802154 = 36 // socket.h:131:1:
AF_INET = 2 // socket.h:96:1:
AF_INET6 = 10 // socket.h:104:1:
AF_IPX = 4 // socket.h:98:1:
AF_IRDA = 23 // socket.h:118:1:
AF_ISDN = 34 // socket.h:129:1:
AF_IUCV = 32 // socket.h:127:1:
AF_KCM = 41 // socket.h:136:1:
AF_KEY = 15 // socket.h:109:1:
AF_LLC = 26 // socket.h:121:1:
AF_LOCAL = 1 // socket.h:93:1:
AF_MAX = 45 // socket.h:140:1:
AF_MPLS = 28 // socket.h:123:1:
AF_NETBEUI = 13 // socket.h:107:1:
AF_NETLINK = 16 // socket.h:110:1:
AF_NETROM = 6 // socket.h:100:1:
AF_NFC = 39 // socket.h:134:1:
AF_PACKET = 17 // socket.h:112:1:
AF_PHONET = 35 // socket.h:130:1:
AF_PPPOX = 24 // socket.h:119:1:
AF_QIPCRTR = 42 // socket.h:137:1:
AF_RDS = 21 // socket.h:116:1:
AF_ROSE = 11 // socket.h:105:1:
AF_ROUTE = 16 // socket.h:111:1:
AF_RXRPC = 33 // socket.h:128:1:
AF_SECURITY = 14 // socket.h:108:1:
AF_SMC = 43 // socket.h:138:1:
AF_SNA = 22 // socket.h:117:1:
AF_TIPC = 30 // socket.h:125:1:
AF_UNIX = 1 // socket.h:94:1:
AF_UNSPEC = 0 // socket.h:92:1:
AF_VSOCK = 40 // socket.h:135:1:
AF_WANPIPE = 25 // socket.h:120:1:
AF_X25 = 9 // socket.h:103:1:
AF_XDP = 44 // socket.h:139:1:
BIG_ENDIAN = 4321 // endian.h:28:1:
BYTE_ORDER = 1234 // endian.h:30:1:
FD_SETSIZE = 1024 // select.h:73:1:
FIOGETOWN = 0x8903 // sockios.h:8:1:
FIOSETOWN = 0x8901 // sockios.h:6:1:
INET6_ADDRSTRLEN = 46 // in.h:234:1:
INET_ADDRSTRLEN = 16 // in.h:233:1:
IN_CLASSA_HOST = 16777215 // in.h:169:1:
IN_CLASSA_MAX = 128 // in.h:170:1:
IN_CLASSA_NET = 0xff000000 // in.h:167:1:
IN_CLASSA_NSHIFT = 24 // in.h:168:1:
IN_CLASSB_HOST = 65535 // in.h:175:1:
IN_CLASSB_MAX = 65536 // in.h:176:1:
IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
IN_CLASSB_NSHIFT = 16 // in.h:174:1:
IN_CLASSC_HOST = 255 // in.h:181:1:
IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
IN_CLASSC_NSHIFT = 8 // in.h:180:1:
IN_LOOPBACKNET = 127 // in.h:197:1:
IPV6_2292DSTOPTS = 4 // in.h:171:1:
IPV6_2292HOPLIMIT = 8 // in.h:175:1:
IPV6_2292HOPOPTS = 3 // in.h:170:1:
IPV6_2292PKTINFO = 2 // in.h:169:1:
IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
IPV6_2292RTHDR = 5 // in.h:172:1:
IPV6_ADDRFORM = 1 // in.h:168:1:
IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
IPV6_AUTHHDR = 10 // in.h:180:1:
IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
IPV6_CHECKSUM = 7 // in.h:174:1:
IPV6_DONTFRAG = 62 // in.h:214:1:
IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
IPV6_DSTOPTS = 59 // in.h:211:1:
IPV6_FREEBIND = 78 // in.h:233:1:
IPV6_HDRINCL = 36 // in.h:198:1:
IPV6_HOPLIMIT = 52 // in.h:204:1:
IPV6_HOPOPTS = 54 // in.h:206:1:
IPV6_IPSEC_POLICY = 34 // in.h:196:1:
IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
IPV6_JOIN_GROUP = 20 // in.h:185:1:
IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
IPV6_LEAVE_GROUP = 21 // in.h:186:1:
IPV6_MINHOPCOUNT = 73 // in.h:226:1:
IPV6_MTU = 24 // in.h:189:1:
IPV6_MTU_DISCOVER = 23 // in.h:188:1:
IPV6_MULTICAST_ALL = 29 // in.h:194:1:
IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
IPV6_MULTICAST_IF = 17 // in.h:182:1:
IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
IPV6_NEXTHOP = 9 // in.h:179:1:
IPV6_ORIGDSTADDR = 74 // in.h:228:1:
IPV6_PATHMTU = 61 // in.h:213:1:
IPV6_PKTINFO = 50 // in.h:202:1:
IPV6_PMTUDISC_DO = 2 // in.h:246:1:
IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
IPV6_RECVDSTOPTS = 58 // in.h:210:1:
IPV6_RECVERR = 25 // in.h:190:1:
IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
IPV6_RECVHOPOPTS = 53 // in.h:205:1:
IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
IPV6_RECVPATHMTU = 60 // in.h:212:1:
IPV6_RECVPKTINFO = 49 // in.h:201:1:
IPV6_RECVRTHDR = 56 // in.h:208:1:
IPV6_RECVTCLASS = 66 // in.h:217:1:
IPV6_ROUTER_ALERT = 22 // in.h:187:1:
IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
IPV6_RTHDR = 57 // in.h:209:1:
IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
IPV6_RTHDR_STRICT = 1 // in.h:257:1:
IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
IPV6_RXDSTOPTS = 59 // in.h:241:1:
IPV6_RXHOPOPTS = 54 // in.h:240:1:
IPV6_TCLASS = 67 // in.h:218:1:
IPV6_TRANSPARENT = 75 // in.h:230:1:
IPV6_UNICAST_HOPS = 16 // in.h:181:1:
IPV6_UNICAST_IF = 76 // in.h:231:1:
IPV6_V6ONLY = 26 // in.h:191:1:
IPV6_XFRM_POLICY = 35 // in.h:197:1:
IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
IP_BLOCK_SOURCE = 38 // in.h:124:1:
IP_CHECKSUM = 23 // in.h:102:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
IP_FREEBIND = 15 // in.h:89:1:
IP_HDRINCL = 3 // in.h:48:1:
IP_IPSEC_POLICY = 16 // in.h:90:1:
IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
IP_MINTTL = 21 // in.h:100:1:
IP_MSFILTER = 41 // in.h:127:1:
IP_MTU = 14 // in.h:88:1:
IP_MTU_DISCOVER = 10 // in.h:84:1:
IP_MULTICAST_ALL = 49 // in.h:128:1:
IP_MULTICAST_IF = 32 // in.h:118:1:
IP_MULTICAST_LOOP = 34 // in.h:120:1:
IP_MULTICAST_TTL = 33 // in.h:119:1:
IP_NODEFRAG = 22 // in.h:101:1:
IP_OPTIONS = 4 // in.h:47:1:
IP_ORIGDSTADDR = 20 // in.h:97:1:
IP_PASSSEC = 18 // in.h:92:1:
IP_PKTINFO = 8 // in.h:81:1:
IP_PKTOPTIONS = 9 // in.h:82:1:
IP_PMTUDISC = 10 // in.h:83:1:
IP_PMTUDISC_DO = 2 // in.h:109:1:
IP_PMTUDISC_DONT = 0 // in.h:107:1:
IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
IP_PMTUDISC_OMIT = 5 // in.h:116:1:
IP_PMTUDISC_PROBE = 3 // in.h:110:1:
IP_PMTUDISC_WANT = 1 // in.h:108:1:
IP_RECVERR = 11 // in.h:85:1:
IP_RECVFRAGSIZE = 25 // in.h:104:1:
IP_RECVOPTS = 6 // in.h:51:1:
IP_RECVORIGDSTADDR = 20 // in.h:98:1:
IP_RECVRETOPTS = 7 // in.h:53:1:
IP_RECVTOS = 13 // in.h:87:1:
IP_RECVTTL = 12 // in.h:86:1:
IP_RETOPTS = 7 // in.h:54:1:
IP_ROUTER_ALERT = 5 // in.h:80:1:
IP_TOS = 1 // in.h:49:1:
IP_TRANSPARENT = 19 // in.h:93:1:
IP_TTL = 2 // in.h:50:1:
IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
IP_UNICAST_IF = 50 // in.h:129:1:
IP_XFRM_POLICY = 17 // in.h:91:1:
LITTLE_ENDIAN = 1234 // endian.h:27:1:
MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
MCAST_EXCLUDE = 0 // in.h:76:1:
MCAST_INCLUDE = 1 // in.h:77:1:
MCAST_JOIN_GROUP = 42 // in.h:66:1:
MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
MCAST_LEAVE_GROUP = 45 // in.h:69:1:
MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
MCAST_MSFILTER = 48 // in.h:72:1:
MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
PDP_ENDIAN = 3412 // endian.h:29:1:
PF_ALG = 38 // socket.h:82:1:
PF_APPLETALK = 5 // socket.h:48:1:
PF_ASH = 18 // socket.h:62:1:
PF_ATMPVC = 8 // socket.h:51:1:
PF_ATMSVC = 20 // socket.h:64:1:
PF_AX25 = 3 // socket.h:46:1:
PF_BLUETOOTH = 31 // socket.h:75:1:
PF_BRIDGE = 7 // socket.h:50:1:
PF_CAIF = 37 // socket.h:81:1:
PF_CAN = 29 // socket.h:73:1:
PF_DECnet = 12 // socket.h:55:1:
PF_ECONET = 19 // socket.h:63:1:
PF_FILE = 1 // socket.h:44:1:
PF_IB = 27 // socket.h:71:1:
PF_IEEE802154 = 36 // socket.h:80:1:
PF_INET = 2 // socket.h:45:1:
PF_INET6 = 10 // socket.h:53:1:
PF_IPX = 4 // socket.h:47:1:
PF_IRDA = 23 // socket.h:67:1:
PF_ISDN = 34 // socket.h:78:1:
PF_IUCV = 32 // socket.h:76:1:
PF_KCM = 41 // socket.h:85:1:
PF_KEY = 15 // socket.h:58:1:
PF_LLC = 26 // socket.h:70:1:
PF_LOCAL = 1 // socket.h:42:1:
PF_MAX = 45 // socket.h:89:1:
PF_MPLS = 28 // socket.h:72:1:
PF_NETBEUI = 13 // socket.h:56:1:
PF_NETLINK = 16 // socket.h:59:1:
PF_NETROM = 6 // socket.h:49:1:
PF_NFC = 39 // socket.h:83:1:
PF_PACKET = 17 // socket.h:61:1:
PF_PHONET = 35 // socket.h:79:1:
PF_PPPOX = 24 // socket.h:68:1:
PF_QIPCRTR = 42 // socket.h:86:1:
PF_RDS = 21 // socket.h:65:1:
PF_ROSE = 11 // socket.h:54:1:
PF_ROUTE = 16 // socket.h:60:1:
PF_RXRPC = 33 // socket.h:77:1:
PF_SECURITY = 14 // socket.h:57:1:
PF_SMC = 43 // socket.h:87:1:
PF_SNA = 22 // socket.h:66:1:
PF_TIPC = 30 // socket.h:74:1:
PF_UNIX = 1 // socket.h:43:1:
PF_UNSPEC = 0 // socket.h:41:1:
PF_VSOCK = 40 // socket.h:84:1:
PF_WANPIPE = 25 // socket.h:69:1:
PF_X25 = 9 // socket.h:52:1:
PF_XDP = 44 // socket.h:88:1:
SCM_TIMESTAMP = 29 // socket.h:140:1:
SCM_TIMESTAMPING = 37 // socket.h:142:1:
SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
SCM_TIMESTAMPNS = 35 // socket.h:141:1:
SCM_TXTIME = 61 // socket.h:105:1:
SCM_WIFI_STATUS = 41 // socket.h:64:1:
SIOCATMARK = 0x8905 // sockios.h:10:1:
SIOCGPGRP = 0x8904 // sockios.h:9:1:
SIOCGSTAMP = 0x8906 // sockios.h:11:1:
SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
SIOCSPGRP = 0x8902 // sockios.h:7:1:
SOL_AAL = 265 // socket.h:151:1:
SOL_ALG = 279 // socket.h:165:1:
SOL_ATM = 264 // socket.h:150:1:
SOL_BLUETOOTH = 274 // socket.h:160:1:
SOL_CAIF = 278 // socket.h:164:1:
SOL_DCCP = 269 // socket.h:155:1:
SOL_DECNET = 261 // socket.h:147:1:
SOL_ICMPV6 = 58 // in.h:253:1:
SOL_IP = 0 // in.h:132:1:
SOL_IPV6 = 41 // in.h:252:1:
SOL_IRDA = 266 // socket.h:152:1:
SOL_IUCV = 277 // socket.h:163:1:
SOL_KCM = 281 // socket.h:167:1:
SOL_LLC = 268 // socket.h:154:1:
SOL_NETBEUI = 267 // socket.h:153:1:
SOL_NETLINK = 270 // socket.h:156:1:
SOL_NFC = 280 // socket.h:166:1:
SOL_PACKET = 263 // socket.h:149:1:
SOL_PNPIPE = 275 // socket.h:161:1:
SOL_PPPOL2TP = 273 // socket.h:159:1:
SOL_RAW = 255 // socket.h:146:1:
SOL_RDS = 276 // socket.h:162:1:
SOL_RXRPC = 272 // socket.h:158:1:
SOL_SOCKET = 1 // socket.h:9:1:
SOL_TIPC = 271 // socket.h:157:1:
SOL_TLS = 282 // socket.h:168:1:
SOL_X25 = 262 // socket.h:148:1:
SOL_XDP = 283 // socket.h:169:1:
SOMAXCONN = 4096 // socket.h:172:1:
SO_ACCEPTCONN = 30 // socket.h:51:1:
SO_ATTACH_BPF = 50 // socket.h:82:1:
SO_ATTACH_FILTER = 26 // socket.h:45:1:
SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
SO_BINDTODEVICE = 25 // socket.h:42:1:
SO_BINDTOIFINDEX = 62 // socket.h:107:1:
SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
SO_BROADCAST = 6 // socket.h:16:1:
SO_BSDCOMPAT = 14 // socket.h:26:1:
SO_BUSY_POLL = 46 // socket.h:74:1:
SO_CNX_ADVICE = 53 // socket.h:88:1:
SO_COOKIE = 57 // socket.h:96:1:
SO_DEBUG = 1 // socket.h:11:1:
SO_DETACH_BPF = 27 // socket.h:83:1:
SO_DETACH_FILTER = 27 // socket.h:46:1:
SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
SO_DOMAIN = 39 // socket.h:59:1:
SO_DONTROUTE = 5 // socket.h:15:1:
SO_ERROR = 4 // socket.h:14:1:
SO_GET_FILTER = 26 // socket.h:47:1:
SO_INCOMING_CPU = 49 // socket.h:80:1:
SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
SO_KEEPALIVE = 9 // socket.h:21:1:
SO_LINGER = 13 // socket.h:25:1:
SO_LOCK_FILTER = 44 // socket.h:70:1:
SO_MARK = 36 // socket.h:56:1:
SO_MAX_PACING_RATE = 47 // socket.h:76:1:
SO_MEMINFO = 55 // socket.h:92:1:
SO_NOFCS = 43 // socket.h:68:1:
SO_NO_CHECK = 11 // socket.h:23:1:
SO_OOBINLINE = 10 // socket.h:22:1:
SO_PASSCRED = 20 // socket.h:16:1:
SO_PASSSEC = 34 // socket.h:54:1:
SO_PEEK_OFF = 42 // socket.h:65:1:
SO_PEERCRED = 21 // socket.h:17:1:
SO_PEERGROUPS = 59 // socket.h:100:1:
SO_PEERNAME = 28 // socket.h:49:1:
SO_PEERSEC = 31 // socket.h:53:1:
SO_PRIORITY = 12 // socket.h:24:1:
SO_PROTOCOL = 38 // socket.h:58:1:
SO_RCVBUF = 8 // socket.h:18:1:
SO_RCVBUFFORCE = 33 // socket.h:20:1:
SO_RCVLOWAT = 16 // socket.h:12:1:
SO_RCVTIMEO = 18 // socket.h:129:1:
SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
SO_RCVTIMEO_OLD = 18 // socket.h:14:1:
SO_REUSEADDR = 2 // socket.h:12:1:
SO_REUSEPORT = 15 // socket.h:27:1:
SO_RXQ_OVFL = 40 // socket.h:61:1:
SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
SO_SNDBUF = 7 // socket.h:17:1:
SO_SNDBUFFORCE = 32 // socket.h:19:1:
SO_SNDLOWAT = 17 // socket.h:13:1:
SO_SNDTIMEO = 19 // socket.h:130:1:
SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
SO_SNDTIMEO_OLD = 19 // socket.h:15:1:
SO_TIMESTAMP = 29 // socket.h:125:1:
SO_TIMESTAMPING = 37 // socket.h:127:1:
SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
SO_TIMESTAMPNS = 35 // socket.h:126:1:
SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
SO_TXTIME = 61 // socket.h:104:1:
SO_TYPE = 3 // socket.h:13:1:
SO_WIFI_STATUS = 41 // socket.h:63:1:
SO_ZEROCOPY = 60 // socket.h:102:1:
X_ARCH_PPC = 1 // <predefined>:198:1:
X_ARCH_PPC64 = 1 // <predefined>:402:1:
X_ARCH_PPCGR = 1 // <predefined>:15:1:
X_ARCH_PPCSQ = 1 // <predefined>:43:1:
X_ARCH_PWR4 = 1 // <predefined>:381:1:
X_ARCH_PWR5 = 1 // <predefined>:90:1:
X_ARCH_PWR5X = 1 // <predefined>:137:1:
X_ARCH_PWR6 = 1 // <predefined>:91:1:
X_ARCH_PWR7 = 1 // <predefined>:92:1:
X_ARCH_PWR8 = 1 // <predefined>:93:1:
X_ASM_POWERPC_POSIX_TYPES_H = 0 // posix_types.h:3:1:
X_ASM_POWERPC_SOCKET_H = 0 // socket.h:3:1:
X_ATFILE_SOURCE = 1 // features.h:342:1:
X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
X_BITS_ENDIAN_H = 1 // endian.h:20:1:
X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
X_BITS_TIME64_H = 1 // time64.h:24:1:
X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
X_BITS_TYPES_H = 1 // types.h:24:1:
X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
X_CALL_ELF = 2 // <predefined>:415:1:
X_CALL_LINUX = 1 // <predefined>:123:1:
X_DEFAULT_SOURCE = 1 // features.h:227:1:
X_ENDIAN_H = 1 // endian.h:19:1:
X_FEATURES_H = 1 // features.h:19:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_GCC_SIZE_T = 0 // stddef.h:195:1:
X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
X_LITTLE_ENDIAN = 1 // <predefined>:37:1:
X_LP64 = 1 // <predefined>:335:1:
X_NETINET_IN_H = 1 // in.h:19:1:
X_POSIX_C_SOURCE = 200809 // features.h:281:1:
X_POSIX_SOURCE = 1 // features.h:279:1:
X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
X_SIZET_ = 0 // stddef.h:196:1:
X_SIZE_T = 0 // stddef.h:183:1:
X_SIZE_T_ = 0 // stddef.h:188:1:
X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
X_SS_SIZE = 128 // sockaddr.h:40:1:
X_STDC_PREDEF_H = 1 // <predefined>:203:1:
X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
X_SYS_SELECT_H = 1 // select.h:22:1:
X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
X_SYS_SOCKET_H = 1 // socket.h:20:1:
X_SYS_TYPES_H = 1 // types.h:23:1:
X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
X_T_SIZE = 0 // stddef.h:186:1:
X_T_SIZE_ = 0 // stddef.h:185:1:
Linux = 1 // <predefined>:263:1:
Unix = 1 // <predefined>:222:1:
)
// Bits in the FLAGS argument to `send', `recv', et al.
const ( /* socket.h:200:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
MSG_CTRUNC = 8 // Control data lost before delivery.
MSG_PROXY = 16 // Supply or ask second address.
MSG_TRUNC = 32
MSG_DONTWAIT = 64 // Nonblocking IO.
MSG_EOR = 128 // End of record.
MSG_WAITALL = 256 // Wait for a full request.
MSG_FIN = 512
MSG_SYN = 1024
MSG_CONFIRM = 2048 // Confirm path validity.
MSG_RST = 4096
MSG_ERRQUEUE = 8192 // Fetch message from error queue.
MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
MSG_MORE = 32768 // Sender will send more.
MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
MSG_BATCH = 262144 // sendmmsg: more messages coming.
MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
MSG_CMSG_CLOEXEC = 1073741824
)
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
const ( /* socket.h:332:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Types of sockets.
const ( /* socket_type.h:24:1: */
SOCK_STREAM = 1 // Sequenced, reliable, connection-based
// byte streams.
SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
// of fixed maximum length.
SOCK_RAW = 3 // Raw protocol interface.
SOCK_RDM = 4 // Reliably-delivered messages.
SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
// datagrams of fixed maximum length.
SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
SOCK_PACKET = 10 // Linux specific way of getting packets
// at the dev level. For writing rarp and
// other similar things on the user level.
// Flags to be ORed into the type parameter of socket and socketpair and
// used for the flags parameter of paccept.
SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
// new descriptor(s).
SOCK_NONBLOCK = 2048
)
// Standard well-known ports.
const ( /* in.h:122:1: */
IPPORT_ECHO = 7 // Echo service.
IPPORT_DISCARD = 9 // Discard transmissions service.
IPPORT_SYSTAT = 11 // System status service.
IPPORT_DAYTIME = 13 // Time of day service.
IPPORT_NETSTAT = 15 // Network status service.
IPPORT_FTP = 21 // File Transfer Protocol.
IPPORT_TELNET = 23 // Telnet protocol.
IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
IPPORT_TIMESERVER = 37 // Timeserver service.
IPPORT_NAMESERVER = 42 // Domain Name Service.
IPPORT_WHOIS = 43 // Internet Whois service.
IPPORT_MTP = 57
IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
IPPORT_RJE = 77
IPPORT_FINGER = 79 // Finger service.
IPPORT_TTYLINK = 87
IPPORT_SUPDUP = 95 // SUPDUP protocol.
IPPORT_EXECSERVER = 512 // execd service.
IPPORT_LOGINSERVER = 513 // rlogind service.
IPPORT_CMDSERVER = 514
IPPORT_EFSSERVER = 520
// UDP ports.
IPPORT_BIFFUDP = 512
IPPORT_WHOSERVER = 513
IPPORT_ROUTESERVER = 520
// Ports less than this value are reserved for privileged processes.
IPPORT_RESERVED = 1024
// Ports greater this value are reserved for (non-privileged) servers.
IPPORT_USERRESERVED = 5000
)
// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
// The first word in the comment at the right is the data type used;
// "bool" means a boolean value stored in an `int'.
// Advanced API (RFC3542) (1).
// Advanced API (RFC3542) (2).
// RFC5014.
// RFC5082.
// Obsolete synonyms for the above.
// IPV6_MTU_DISCOVER values.
// Socket level values for IPv6.
// Routing header options for IPv6.
// Standard well-defined IP protocols.
const ( /* in.h:40:1: */
IPPROTO_IP = 0 // Dummy protocol for TCP.
IPPROTO_ICMP = 1 // Internet Control Message Protocol.
IPPROTO_IGMP = 2 // Internet Group Management Protocol.
IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
IPPROTO_TCP = 6 // Transmission Control Protocol.
IPPROTO_EGP = 8 // Exterior Gateway Protocol.
IPPROTO_PUP = 12 // PUP protocol.
IPPROTO_UDP = 17 // User Datagram Protocol.
IPPROTO_IDP = 22 // XNS IDP protocol.
| 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/netinet/in/capi_openbsd_arm64.go | vendor/modernc.org/libc/netinet/in/capi_openbsd_arm64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_arm64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_openbsd_arm64.go | vendor/modernc.org/libc/netinet/in/in_openbsd_arm64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_arm64.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
BIG_ENDIAN = 4321 // endian.h:45:1:
BYTE_ORDER = 1234 // endian.h:47:1:
ICMP6_FILTER = 18 // in6.h:304:1:
INET6_ADDRSTRLEN = 46 // in6.h:97:1:
INET_ADDRSTRLEN = 16 // in.h:382:1:
IN_CLASSA_MAX = 128 // in.h:195:1:
IN_CLASSA_NSHIFT = 24 // in.h:193:1:
IN_CLASSB_MAX = 65536 // in.h:202:1:
IN_CLASSB_NSHIFT = 16 // in.h:200:1:
IN_CLASSC_NSHIFT = 8 // in.h:207:1:
IN_CLASSD_NSHIFT = 28 // in.h:214:1:
IN_LOOPBACKNET = 127 // in.h:253:1:
IN_RFC3021_NSHIFT = 31 // in.h:219:1:
IPCTL_ARPDOWN = 40 // in.h:698:1:
IPCTL_ARPQUEUE = 41 // in.h:699:1:
IPCTL_ARPQUEUED = 36 // in.h:694:1:
IPCTL_ARPTIMEOUT = 39 // in.h:697:1:
IPCTL_DEFTTL = 3 // in.h:662:1:
IPCTL_DIRECTEDBCAST = 6 // in.h:664:1:
IPCTL_ENCDEBUG = 12 // in.h:670:1:
IPCTL_FORWARDING = 1 // in.h:660:1:
IPCTL_IFQUEUE = 30 // in.h:688:1:
IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1:
IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1:
IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1:
IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1:
IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1:
IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1:
IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1:
IPCTL_IPSEC_BYTES = 20 // in.h:678:1:
IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1:
IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1:
IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1:
IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1:
IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1:
IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1:
IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1:
IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1:
IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1:
IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1:
IPCTL_IPSEC_STATS = 13 // in.h:671:1:
IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1:
IPCTL_MAXID = 42 // in.h:700:1:
IPCTL_MFORWARDING = 31 // in.h:689:1:
IPCTL_MRTMFC = 37 // in.h:695:1:
IPCTL_MRTPROTO = 34 // in.h:692:1:
IPCTL_MRTSTATS = 35 // in.h:693:1:
IPCTL_MRTVIF = 38 // in.h:696:1:
IPCTL_MTUDISC = 27 // in.h:685:1:
IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1:
IPCTL_MULTIPATH = 32 // in.h:690:1:
IPCTL_SENDREDIRECTS = 2 // in.h:661:1:
IPCTL_SOURCEROUTE = 5 // in.h:663:1:
IPCTL_STATS = 33 // in.h:691:1:
IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1:
IPPORT_HILASTAUTO = 65535 // in.h:160:1:
IPPORT_RESERVED = 1024 // in.h:153:1:
IPPORT_USERRESERVED = 49151 // in.h:154:1:
IPPROTO_AH = 51 // in.h:89:1:
IPPROTO_CARP = 112 // in.h:99:1:
IPPROTO_DIVERT = 258 // in.h:109:1:
IPPROTO_DONE = 257 // in.h:173:1:
IPPROTO_DSTOPTS = 60 // in.h:93:1:
IPPROTO_EGP = 8 // in.h:78:1:
IPPROTO_ENCAP = 98 // in.h:96:1:
IPPROTO_EON = 80 // in.h:94:1:
IPPROTO_ESP = 50 // in.h:88:1:
IPPROTO_ETHERIP = 97 // in.h:95:1:
IPPROTO_FRAGMENT = 44 // in.h:85:1:
IPPROTO_GGP = 3 // in.h:74:1:
IPPROTO_GRE = 47 // in.h:87:1:
IPPROTO_HOPOPTS = 0 // in.h:71:1:
IPPROTO_ICMP = 1 // in.h:72:1:
IPPROTO_ICMPV6 = 58 // in.h:91:1:
IPPROTO_IDP = 22 // in.h:81:1:
IPPROTO_IGMP = 2 // in.h:73:1:
IPPROTO_IP = 0 // in.h:70:1:
IPPROTO_IPCOMP = 108 // in.h:98:1:
IPPROTO_IPIP = 4 // in.h:75:1:
IPPROTO_IPV4 = 4 // in.h:76:1:
IPPROTO_IPV6 = 41 // in.h:83:1:
IPPROTO_MAX = 256 // in.h:106:1:
IPPROTO_MAXID = 259 // in.h:393:1:
IPPROTO_MOBILE = 55 // in.h:90:1:
IPPROTO_MPLS = 137 // in.h:102:1:
IPPROTO_NONE = 59 // in.h:92:1:
IPPROTO_PFSYNC = 240 // in.h:103:1:
IPPROTO_PIM = 103 // in.h:97:1:
IPPROTO_PUP = 12 // in.h:79:1:
IPPROTO_RAW = 255 // in.h:104:1:
IPPROTO_ROUTING = 43 // in.h:84:1:
IPPROTO_RSVP = 46 // in.h:86:1:
IPPROTO_SCTP = 132 // in.h:100:1:
IPPROTO_TCP = 6 // in.h:77:1:
IPPROTO_TP = 29 // in.h:82:1:
IPPROTO_UDP = 17 // in.h:80:1:
IPPROTO_UDPLITE = 136 // in.h:101:1:
IPSEC6_OUTSA = 56 // in6.h:337:1:
IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1:
IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1:
IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1:
IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1:
IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1:
IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1:
IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1:
IPSEC_LEVEL_NONE = 0x00 // in.h:329:1:
IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1:
IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1:
IPSEC_LEVEL_USE = 0x02 // in.h:331:1:
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1:
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1:
IPV6CTL_DAD_COUNT = 16 // in6.h:578:1:
IPV6CTL_DAD_PENDING = 49 // in6.h:589:1:
IPV6CTL_DEFHLIM = 3 // in6.h:567:1:
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1:
IPV6CTL_FORWARDING = 1 // in6.h:565:1:
IPV6CTL_FORWSRCRT = 5 // in6.h:568:1:
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1:
IPV6CTL_IFQUEUE = 51 // in6.h:591:1:
IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1:
IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1:
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1:
IPV6CTL_MAXFRAGS = 41 // in6.h:583:1:
IPV6CTL_MAXID = 55 // in6.h:595:1:
IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1:
IPV6CTL_MFORWARDING = 42 // in6.h:584:1:
IPV6CTL_MRTMFC = 53 // in6.h:593:1:
IPV6CTL_MRTMIF = 52 // in6.h:592:1:
IPV6CTL_MRTPROTO = 8 // in6.h:571:1:
IPV6CTL_MRTSTATS = 7 // in6.h:570:1:
IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1:
IPV6CTL_MULTIPATH = 43 // in6.h:585:1:
IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1:
IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1:
IPV6CTL_SOIIKEY = 54 // in6.h:594:1:
IPV6CTL_SOURCECHECK = 10 // in6.h:573:1:
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1:
IPV6CTL_STATS = 6 // in6.h:569:1:
IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1:
IPV6PROTO_MAXID = 259 // in6.h:470:1:
IPV6_AUTH_LEVEL = 53 // in6.h:333:1:
IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1:
IPV6_CHECKSUM = 26 // in6.h:307:1:
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1:
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1:
IPV6_DONTFRAG = 62 // in6.h:345:1:
IPV6_DSTOPTS = 50 // in6.h:330:1:
IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1:
IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1:
IPV6_HOPLIMIT = 47 // in6.h:327:1:
IPV6_HOPOPTS = 49 // in6.h:329:1:
IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1:
IPV6_JOIN_GROUP = 12 // in6.h:300:1:
IPV6_LEAVE_GROUP = 13 // in6.h:301:1:
IPV6_MINHOPCOUNT = 65 // in6.h:349:1:
IPV6_MULTICAST_HOPS = 10 // in6.h:298:1:
IPV6_MULTICAST_IF = 9 // in6.h:297:1:
IPV6_MULTICAST_LOOP = 11 // in6.h:299:1:
IPV6_NEXTHOP = 48 // in6.h:328:1:
IPV6_PATHMTU = 44 // in6.h:322:1:
IPV6_PIPEX = 63 // in6.h:346:1:
IPV6_PKTINFO = 46 // in6.h:326:1:
IPV6_PORTRANGE = 14 // in6.h:302:1:
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1:
IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1:
IPV6_PORTRANGE_LOW = 2 // in6.h:395:1:
IPV6_RECVDSTOPTS = 40 // in6.h:317:1:
IPV6_RECVDSTPORT = 64 // in6.h:348:1:
IPV6_RECVHOPLIMIT = 37 // in6.h:314:1:
IPV6_RECVHOPOPTS = 39 // in6.h:316:1:
IPV6_RECVPATHMTU = 43 // in6.h:320:1:
IPV6_RECVPKTINFO = 36 // in6.h:313:1:
IPV6_RECVRTHDR = 38 // in6.h:315:1:
IPV6_RECVTCLASS = 57 // in6.h:339:1:
IPV6_RTABLE = 0x1021 // in6.h:351:1:
IPV6_RTHDR = 51 // in6.h:331:1:
IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1:
IPV6_RTHDR_LOOSE = 0 // in6.h:354:1:
IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1:
IPV6_TCLASS = 61 // in6.h:344:1:
IPV6_UNICAST_HOPS = 4 // in6.h:296:1:
IPV6_USE_MIN_MTU = 42 // in6.h:319:1:
IPV6_V6ONLY = 27 // in6.h:308:1:
IP_ADD_MEMBERSHIP = 12 // in.h:297:1:
IP_AUTH_LEVEL = 20 // in.h:300:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1:
IP_DROP_MEMBERSHIP = 13 // in.h:298:1:
IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1:
IP_ESP_TRANS_LEVEL = 21 // in.h:301:1:
IP_HDRINCL = 2 // in.h:287:1:
IP_IPCOMP_LEVEL = 29 // in.h:309:1:
IP_IPDEFTTL = 37 // in.h:317:1:
IP_IPSECFLOWINFO = 36 // in.h:316:1:
IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1:
IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1:
IP_IPSEC_LOCAL_ID = 23 // in.h:303:1:
IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1:
IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1:
IP_IPSEC_REMOTE_ID = 24 // in.h:304:1:
IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1:
IP_MINTTL = 32 // in.h:312:1:
IP_MIN_MEMBERSHIPS = 15 // in.h:353:1:
IP_MULTICAST_IF = 9 // in.h:294:1:
IP_MULTICAST_LOOP = 11 // in.h:296:1:
IP_MULTICAST_TTL = 10 // in.h:295:1:
IP_OPTIONS = 1 // in.h:286:1:
IP_PIPEX = 34 // in.h:314:1:
IP_PORTRANGE = 19 // in.h:299:1:
IP_PORTRANGE_DEFAULT = 0 // in.h:374:1:
IP_PORTRANGE_HIGH = 1 // in.h:375:1:
IP_PORTRANGE_LOW = 2 // in.h:376:1:
IP_RECVDSTADDR = 7 // in.h:292:1:
IP_RECVDSTPORT = 33 // in.h:313:1:
IP_RECVIF = 30 // in.h:310:1:
IP_RECVOPTS = 5 // in.h:290:1:
IP_RECVRETOPTS = 6 // in.h:291:1:
IP_RECVRTABLE = 35 // in.h:315:1:
IP_RECVTTL = 31 // in.h:311:1:
IP_RETOPTS = 8 // in.h:293:1:
IP_RTABLE = 0x1021 // in.h:321:1:
IP_SENDSRCADDR = 7 // in.h:318:1:
IP_TOS = 3 // in.h:288:1:
IP_TTL = 4 // in.h:289:1:
LITTLE_ENDIAN = 1234 // endian.h:44:1:
PDP_ENDIAN = 3412 // endian.h:46:1:
SIN6_LEN = 0 // in6.h:104:1:
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
X_BYTE_ORDER = 1234 // endian.h:60:1:
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
X_IN_ADDR_DECLARED = 0 // in.h:163:1:
X_IN_TYPES_DEFINED_ = 0 // in.h:62:1:
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
X_LP64 = 1 // <predefined>:1:1:
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
X_NETINET6_IN6_H_ = 0 // in6.h:69:1:
X_NETINET_IN_H_ = 0 // in.h:39:1:
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
X_PID_T_DEFINED_ = 0 // types.h:167:1:
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
X_RET_PROTECTOR = 1 // <predefined>:2:1:
X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1:
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1:
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
X_STACKALIGNBYTES = 15 // _types.h:54:1:
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
X_SYS_TYPES_H_ = 0 // types.h:41:1:
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
Unix = 1 // <predefined>:360:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
type Size_t = uint64 /* <builtin>:9:23 */
type Wchar_t = int32 /* <builtin>:15:24 */
type X__int128_t = struct {
Flo int64
Fhi int64
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
type X__uint128_t = struct {
Flo uint64
Fhi uint64
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $
// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $
// Copyright (c) 1982, 1986, 1990, 1993
// The Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
// Constants and structures defined by the internet system,
// Per RFC 790, September 1981, and numerous additions.
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
// Macro to test if we're using a specific version of gcc or later.
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
// in between its arguments. Do not use __CONCAT on double-quoted strings,
// such as those from the __STRING macro: to concatenate strings just put
// them next to each other.
// GCC1 and some versions of GCC2 declare dead (non-returning) and
// pure (no side effects) functions using "volatile" and "const";
// unfortunately, these then cause warnings under "-ansi -pedantic".
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
// the distribution version of 2.5.5).
// __returns_twice makes the compiler not assume the function
// only returns once. This affects registerisation of variables:
// even local variables need to be in memory across such a call.
// Example: setjmp()
// __only_inline makes the compiler only use this function definition
// for inlining; references that can't be inlined will be left as
// external references instead of generating a local copy. The
// matching library should include a simple extern definition for
// the function to handle those references. c.f. ctype.h
// GNU C version 2.96 adds explicit branch prediction so that
// the CPU back-end can hint the processor and also so that
// code blocks can be reordered such that the predicted path
// sees a more linear flow, thus improving cache behavior, etc.
//
// The following two macros provide us with a way to utilize this
// compiler feature. Use __predict_true() if you expect the expression
// to evaluate to true, and __predict_false() if you expect the
// expression to evaluate to false.
//
// A few notes about usage:
//
// * Generally, __predict_false() error condition checks (unless
// you have some _strong_ reason to do otherwise, in which case
// document it), and/or __predict_true() `no-error' condition
// checks, assuming you want to optimize for the no-error case.
//
// * Other than that, if you don't know the likelihood of a test
// succeeding from empirical or other `hard' evidence, don't
// make predictions.
//
// * These are meant to be used in places that are run `a lot'.
// It is wasteful to make predictions in code that is run
// seldomly (e.g. at subsystem initialization time) as the
// basic block reordering that this affects can often generate
// larger code.
// Delete pseudo-keywords wherever they are not available or needed.
// The __packed macro indicates that a variable or structure members
// should have the smallest possible alignment, despite any host CPU
// alignment requirements.
//
// The __aligned(x) macro specifies the minimum alignment of a
// variable or structure.
//
// These macros together are useful for describing the layout and
// alignment of messages exchanged with hardware or other systems.
// "The nice thing about standards is that there are so many to choose from."
// There are a number of "feature test macros" specified by (different)
// standards that determine which interfaces and types the header files
// should expose.
//
// Because of inconsistencies in these macros, we define our own
// set in the private name space that end in _VISIBLE. These are
// always defined and so headers can test their values easily.
// Things can get tricky when multiple feature macros are defined.
// We try to take the union of all the features requested.
//
// The following macros are guaranteed to have a value after cdefs.h
// has been included:
// __POSIX_VISIBLE
// __XPG_VISIBLE
// __ISO_C_VISIBLE
// __BSD_VISIBLE
// X/Open Portability Guides and Single Unix Specifications.
// _XOPEN_SOURCE XPG3
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
// _XOPEN_SOURCE == 500 XPG5
// _XOPEN_SOURCE == 520 XPG5v2
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
//
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
// POSIX macros, these checks must follow the XOPEN ones above.
//
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
// _POSIX_C_SOURCE == 1 1003.1-1990
// _POSIX_C_SOURCE == 2 1003.2-1992
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
// and the omnibus ISO/IEC 9945-1:1996
// _POSIX_C_SOURCE == 200112L 1003.1-2001
// _POSIX_C_SOURCE == 200809L 1003.1-2008
//
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
// this may be overridden by the _ISOC99_SOURCE macro later.
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
// If the user defines it in addition to one of the POSIX or XOPEN
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
// override any of the other macros since they are non-exclusive.
// Finally deal with BSD-specific interfaces that are not covered
// by any standards. We expose these when none of the POSIX or XPG
// macros is defined or if the user explicitly asks for them.
// Default values.
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
// -
// Copyright (c) 1982, 1986, 1991, 1993
// The Regents of the University of California. All rights reserved.
// (c) UNIX System Laboratories, Inc.
// All or some portions of this file are derived from material licensed
// to the University of California by American Telephone and Telegraph
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
// the permission of UNIX System Laboratories, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)types.h 8.4 (Berkeley) 1/21/94
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
// -
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Public definitions for little- and big-endian systems.
// This file should be included as <endian.h> in userspace and as
// <sys/endian.h> in the kernel.
//
// System headers that need endian information but that can't or don't
// want to export the public names here should include <sys/_endian.h>
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
| 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/netinet/in/in_openbsd_386.go | vendor/modernc.org/libc/netinet/in/in_openbsd_386.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_386.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
BIG_ENDIAN = 4321 // endian.h:45:1:
BYTE_ORDER = 1234 // endian.h:47:1:
ICMP6_FILTER = 18 // in6.h:304:1:
INET6_ADDRSTRLEN = 46 // in6.h:97:1:
INET_ADDRSTRLEN = 16 // in.h:382:1:
IN_CLASSA_MAX = 128 // in.h:195:1:
IN_CLASSA_NSHIFT = 24 // in.h:193:1:
IN_CLASSB_MAX = 65536 // in.h:202:1:
IN_CLASSB_NSHIFT = 16 // in.h:200:1:
IN_CLASSC_NSHIFT = 8 // in.h:207:1:
IN_CLASSD_NSHIFT = 28 // in.h:214:1:
IN_LOOPBACKNET = 127 // in.h:253:1:
IN_RFC3021_NSHIFT = 31 // in.h:219:1:
IPCTL_ARPDOWN = 40 // in.h:698:1:
IPCTL_ARPQUEUE = 41 // in.h:699:1:
IPCTL_ARPQUEUED = 36 // in.h:694:1:
IPCTL_ARPTIMEOUT = 39 // in.h:697:1:
IPCTL_DEFTTL = 3 // in.h:662:1:
IPCTL_DIRECTEDBCAST = 6 // in.h:664:1:
IPCTL_ENCDEBUG = 12 // in.h:670:1:
IPCTL_FORWARDING = 1 // in.h:660:1:
IPCTL_IFQUEUE = 30 // in.h:688:1:
IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1:
IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1:
IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1:
IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1:
IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1:
IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1:
IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1:
IPCTL_IPSEC_BYTES = 20 // in.h:678:1:
IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1:
IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1:
IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1:
IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1:
IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1:
IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1:
IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1:
IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1:
IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1:
IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1:
IPCTL_IPSEC_STATS = 13 // in.h:671:1:
IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1:
IPCTL_MAXID = 42 // in.h:700:1:
IPCTL_MFORWARDING = 31 // in.h:689:1:
IPCTL_MRTMFC = 37 // in.h:695:1:
IPCTL_MRTPROTO = 34 // in.h:692:1:
IPCTL_MRTSTATS = 35 // in.h:693:1:
IPCTL_MRTVIF = 38 // in.h:696:1:
IPCTL_MTUDISC = 27 // in.h:685:1:
IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1:
IPCTL_MULTIPATH = 32 // in.h:690:1:
IPCTL_SENDREDIRECTS = 2 // in.h:661:1:
IPCTL_SOURCEROUTE = 5 // in.h:663:1:
IPCTL_STATS = 33 // in.h:691:1:
IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1:
IPPORT_HILASTAUTO = 65535 // in.h:160:1:
IPPORT_RESERVED = 1024 // in.h:153:1:
IPPORT_USERRESERVED = 49151 // in.h:154:1:
IPPROTO_AH = 51 // in.h:89:1:
IPPROTO_CARP = 112 // in.h:99:1:
IPPROTO_DIVERT = 258 // in.h:109:1:
IPPROTO_DONE = 257 // in.h:173:1:
IPPROTO_DSTOPTS = 60 // in.h:93:1:
IPPROTO_EGP = 8 // in.h:78:1:
IPPROTO_ENCAP = 98 // in.h:96:1:
IPPROTO_EON = 80 // in.h:94:1:
IPPROTO_ESP = 50 // in.h:88:1:
IPPROTO_ETHERIP = 97 // in.h:95:1:
IPPROTO_FRAGMENT = 44 // in.h:85:1:
IPPROTO_GGP = 3 // in.h:74:1:
IPPROTO_GRE = 47 // in.h:87:1:
IPPROTO_HOPOPTS = 0 // in.h:71:1:
IPPROTO_ICMP = 1 // in.h:72:1:
IPPROTO_ICMPV6 = 58 // in.h:91:1:
IPPROTO_IDP = 22 // in.h:81:1:
IPPROTO_IGMP = 2 // in.h:73:1:
IPPROTO_IP = 0 // in.h:70:1:
IPPROTO_IPCOMP = 108 // in.h:98:1:
IPPROTO_IPIP = 4 // in.h:75:1:
IPPROTO_IPV4 = 4 // in.h:76:1:
IPPROTO_IPV6 = 41 // in.h:83:1:
IPPROTO_MAX = 256 // in.h:106:1:
IPPROTO_MAXID = 259 // in.h:393:1:
IPPROTO_MOBILE = 55 // in.h:90:1:
IPPROTO_MPLS = 137 // in.h:102:1:
IPPROTO_NONE = 59 // in.h:92:1:
IPPROTO_PFSYNC = 240 // in.h:103:1:
IPPROTO_PIM = 103 // in.h:97:1:
IPPROTO_PUP = 12 // in.h:79:1:
IPPROTO_RAW = 255 // in.h:104:1:
IPPROTO_ROUTING = 43 // in.h:84:1:
IPPROTO_RSVP = 46 // in.h:86:1:
IPPROTO_SCTP = 132 // in.h:100:1:
IPPROTO_TCP = 6 // in.h:77:1:
IPPROTO_TP = 29 // in.h:82:1:
IPPROTO_UDP = 17 // in.h:80:1:
IPPROTO_UDPLITE = 136 // in.h:101:1:
IPSEC6_OUTSA = 56 // in6.h:337:1:
IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1:
IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1:
IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1:
IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1:
IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1:
IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1:
IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1:
IPSEC_LEVEL_NONE = 0x00 // in.h:329:1:
IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1:
IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1:
IPSEC_LEVEL_USE = 0x02 // in.h:331:1:
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1:
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1:
IPV6CTL_DAD_COUNT = 16 // in6.h:578:1:
IPV6CTL_DAD_PENDING = 49 // in6.h:589:1:
IPV6CTL_DEFHLIM = 3 // in6.h:567:1:
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1:
IPV6CTL_FORWARDING = 1 // in6.h:565:1:
IPV6CTL_FORWSRCRT = 5 // in6.h:568:1:
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1:
IPV6CTL_IFQUEUE = 51 // in6.h:591:1:
IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1:
IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1:
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1:
IPV6CTL_MAXFRAGS = 41 // in6.h:583:1:
IPV6CTL_MAXID = 55 // in6.h:595:1:
IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1:
IPV6CTL_MFORWARDING = 42 // in6.h:584:1:
IPV6CTL_MRTMFC = 53 // in6.h:593:1:
IPV6CTL_MRTMIF = 52 // in6.h:592:1:
IPV6CTL_MRTPROTO = 8 // in6.h:571:1:
IPV6CTL_MRTSTATS = 7 // in6.h:570:1:
IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1:
IPV6CTL_MULTIPATH = 43 // in6.h:585:1:
IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1:
IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1:
IPV6CTL_SOIIKEY = 54 // in6.h:594:1:
IPV6CTL_SOURCECHECK = 10 // in6.h:573:1:
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1:
IPV6CTL_STATS = 6 // in6.h:569:1:
IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1:
IPV6PROTO_MAXID = 259 // in6.h:470:1:
IPV6_AUTH_LEVEL = 53 // in6.h:333:1:
IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1:
IPV6_CHECKSUM = 26 // in6.h:307:1:
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1:
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1:
IPV6_DONTFRAG = 62 // in6.h:345:1:
IPV6_DSTOPTS = 50 // in6.h:330:1:
IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1:
IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1:
IPV6_HOPLIMIT = 47 // in6.h:327:1:
IPV6_HOPOPTS = 49 // in6.h:329:1:
IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1:
IPV6_JOIN_GROUP = 12 // in6.h:300:1:
IPV6_LEAVE_GROUP = 13 // in6.h:301:1:
IPV6_MINHOPCOUNT = 65 // in6.h:349:1:
IPV6_MULTICAST_HOPS = 10 // in6.h:298:1:
IPV6_MULTICAST_IF = 9 // in6.h:297:1:
IPV6_MULTICAST_LOOP = 11 // in6.h:299:1:
IPV6_NEXTHOP = 48 // in6.h:328:1:
IPV6_PATHMTU = 44 // in6.h:322:1:
IPV6_PIPEX = 63 // in6.h:346:1:
IPV6_PKTINFO = 46 // in6.h:326:1:
IPV6_PORTRANGE = 14 // in6.h:302:1:
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1:
IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1:
IPV6_PORTRANGE_LOW = 2 // in6.h:395:1:
IPV6_RECVDSTOPTS = 40 // in6.h:317:1:
IPV6_RECVDSTPORT = 64 // in6.h:348:1:
IPV6_RECVHOPLIMIT = 37 // in6.h:314:1:
IPV6_RECVHOPOPTS = 39 // in6.h:316:1:
IPV6_RECVPATHMTU = 43 // in6.h:320:1:
IPV6_RECVPKTINFO = 36 // in6.h:313:1:
IPV6_RECVRTHDR = 38 // in6.h:315:1:
IPV6_RECVTCLASS = 57 // in6.h:339:1:
IPV6_RTABLE = 0x1021 // in6.h:351:1:
IPV6_RTHDR = 51 // in6.h:331:1:
IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1:
IPV6_RTHDR_LOOSE = 0 // in6.h:354:1:
IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1:
IPV6_TCLASS = 61 // in6.h:344:1:
IPV6_UNICAST_HOPS = 4 // in6.h:296:1:
IPV6_USE_MIN_MTU = 42 // in6.h:319:1:
IPV6_V6ONLY = 27 // in6.h:308:1:
IP_ADD_MEMBERSHIP = 12 // in.h:297:1:
IP_AUTH_LEVEL = 20 // in.h:300:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1:
IP_DROP_MEMBERSHIP = 13 // in.h:298:1:
IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1:
IP_ESP_TRANS_LEVEL = 21 // in.h:301:1:
IP_HDRINCL = 2 // in.h:287:1:
IP_IPCOMP_LEVEL = 29 // in.h:309:1:
IP_IPDEFTTL = 37 // in.h:317:1:
IP_IPSECFLOWINFO = 36 // in.h:316:1:
IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1:
IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1:
IP_IPSEC_LOCAL_ID = 23 // in.h:303:1:
IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1:
IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1:
IP_IPSEC_REMOTE_ID = 24 // in.h:304:1:
IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1:
IP_MINTTL = 32 // in.h:312:1:
IP_MIN_MEMBERSHIPS = 15 // in.h:353:1:
IP_MULTICAST_IF = 9 // in.h:294:1:
IP_MULTICAST_LOOP = 11 // in.h:296:1:
IP_MULTICAST_TTL = 10 // in.h:295:1:
IP_OPTIONS = 1 // in.h:286:1:
IP_PIPEX = 34 // in.h:314:1:
IP_PORTRANGE = 19 // in.h:299:1:
IP_PORTRANGE_DEFAULT = 0 // in.h:374:1:
IP_PORTRANGE_HIGH = 1 // in.h:375:1:
IP_PORTRANGE_LOW = 2 // in.h:376:1:
IP_RECVDSTADDR = 7 // in.h:292:1:
IP_RECVDSTPORT = 33 // in.h:313:1:
IP_RECVIF = 30 // in.h:310:1:
IP_RECVOPTS = 5 // in.h:290:1:
IP_RECVRETOPTS = 6 // in.h:291:1:
IP_RECVRTABLE = 35 // in.h:315:1:
IP_RECVTTL = 31 // in.h:311:1:
IP_RETOPTS = 8 // in.h:293:1:
IP_RTABLE = 0x1021 // in.h:321:1:
IP_SENDSRCADDR = 7 // in.h:318:1:
IP_TOS = 3 // in.h:288:1:
IP_TTL = 4 // in.h:289:1:
LITTLE_ENDIAN = 1234 // endian.h:44:1:
PDP_ENDIAN = 3412 // endian.h:46:1:
SIN6_LEN = 0 // in6.h:104:1:
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
X_BYTE_ORDER = 1234 // endian.h:58:1:
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_ILP32 = 1 // <predefined>:1:1:
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
X_IN_ADDR_DECLARED = 0 // in.h:163:1:
X_IN_TYPES_DEFINED_ = 0 // in.h:62:1:
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
X_NETINET6_IN6_H_ = 0 // in6.h:69:1:
X_NETINET_IN_H_ = 0 // in.h:39:1:
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
X_PID_T_DEFINED_ = 0 // types.h:167:1:
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1:
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1:
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
X_STACKALIGNBYTES = 15 // _types.h:49:1:
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
X_SYS_TYPES_H_ = 0 // types.h:41:1:
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
I386 = 1 // <predefined>:339:1:
Unix = 1 // <predefined>:340:1:
)
type Ptrdiff_t = int32 /* <builtin>:3:26 */
type Size_t = uint32 /* <builtin>:9:23 */
type Wchar_t = int32 /* <builtin>:15:24 */
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $
// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $
// Copyright (c) 1982, 1986, 1990, 1993
// The Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
// Constants and structures defined by the internet system,
// Per RFC 790, September 1981, and numerous additions.
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $
// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
// Public domain.
// Macro to test if we're using a specific version of gcc or later.
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
// in between its arguments. Do not use __CONCAT on double-quoted strings,
// such as those from the __STRING macro: to concatenate strings just put
// them next to each other.
// GCC1 and some versions of GCC2 declare dead (non-returning) and
// pure (no side effects) functions using "volatile" and "const";
// unfortunately, these then cause warnings under "-ansi -pedantic".
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
// the distribution version of 2.5.5).
// __returns_twice makes the compiler not assume the function
// only returns once. This affects registerisation of variables:
// even local variables need to be in memory across such a call.
// Example: setjmp()
// __only_inline makes the compiler only use this function definition
// for inlining; references that can't be inlined will be left as
// external references instead of generating a local copy. The
// matching library should include a simple extern definition for
// the function to handle those references. c.f. ctype.h
// GNU C version 2.96 adds explicit branch prediction so that
// the CPU back-end can hint the processor and also so that
// code blocks can be reordered such that the predicted path
// sees a more linear flow, thus improving cache behavior, etc.
//
// The following two macros provide us with a way to utilize this
// compiler feature. Use __predict_true() if you expect the expression
// to evaluate to true, and __predict_false() if you expect the
// expression to evaluate to false.
//
// A few notes about usage:
//
// * Generally, __predict_false() error condition checks (unless
// you have some _strong_ reason to do otherwise, in which case
// document it), and/or __predict_true() `no-error' condition
// checks, assuming you want to optimize for the no-error case.
//
// * Other than that, if you don't know the likelihood of a test
// succeeding from empirical or other `hard' evidence, don't
// make predictions.
//
// * These are meant to be used in places that are run `a lot'.
// It is wasteful to make predictions in code that is run
// seldomly (e.g. at subsystem initialization time) as the
// basic block reordering that this affects can often generate
// larger code.
// Delete pseudo-keywords wherever they are not available or needed.
// The __packed macro indicates that a variable or structure members
// should have the smallest possible alignment, despite any host CPU
// alignment requirements.
//
// The __aligned(x) macro specifies the minimum alignment of a
// variable or structure.
//
// These macros together are useful for describing the layout and
// alignment of messages exchanged with hardware or other systems.
// "The nice thing about standards is that there are so many to choose from."
// There are a number of "feature test macros" specified by (different)
// standards that determine which interfaces and types the header files
// should expose.
//
// Because of inconsistencies in these macros, we define our own
// set in the private name space that end in _VISIBLE. These are
// always defined and so headers can test their values easily.
// Things can get tricky when multiple feature macros are defined.
// We try to take the union of all the features requested.
//
// The following macros are guaranteed to have a value after cdefs.h
// has been included:
// __POSIX_VISIBLE
// __XPG_VISIBLE
// __ISO_C_VISIBLE
// __BSD_VISIBLE
// X/Open Portability Guides and Single Unix Specifications.
// _XOPEN_SOURCE XPG3
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
// _XOPEN_SOURCE == 500 XPG5
// _XOPEN_SOURCE == 520 XPG5v2
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
//
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
// POSIX macros, these checks must follow the XOPEN ones above.
//
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
// _POSIX_C_SOURCE == 1 1003.1-1990
// _POSIX_C_SOURCE == 2 1003.2-1992
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
// and the omnibus ISO/IEC 9945-1:1996
// _POSIX_C_SOURCE == 200112L 1003.1-2001
// _POSIX_C_SOURCE == 200809L 1003.1-2008
//
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
// this may be overridden by the _ISOC99_SOURCE macro later.
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
// If the user defines it in addition to one of the POSIX or XOPEN
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
// override any of the other macros since they are non-exclusive.
// Finally deal with BSD-specific interfaces that are not covered
// by any standards. We expose these when none of the POSIX or XPG
// macros is defined or if the user explicitly asks for them.
// Default values.
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
// -
// Copyright (c) 1982, 1986, 1991, 1993
// The Regents of the University of California. All rights reserved.
// (c) UNIX System Laboratories, Inc.
// All or some portions of this file are derived from material licensed
// to the University of California by American Telephone and Telegraph
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
// the permission of UNIX System Laboratories, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)types.h 8.4 (Berkeley) 1/21/94
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
// -
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Public definitions for little- and big-endian systems.
// This file should be included as <endian.h> in userspace and as
// <sys/endian.h> in the kernel.
//
// System headers that need endian information but that can't or don't
// want to export the public names here should include <sys/_endian.h>
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
| 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/netinet/in/capi_linux_amd64.go | vendor/modernc.org/libc/netinet/in/capi_linux_amd64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_amd64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/capi_netbsd_arm.go | vendor/modernc.org/libc/netinet/in/capi_netbsd_arm.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_netbsd_arm.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/capi_linux_386.go | vendor/modernc.org/libc/netinet/in/capi_linux_386.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_386.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_freebsd_arm.go | vendor/modernc.org/libc/netinet/in/in_freebsd_arm.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_arm.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
BIG_ENDIAN = 4321 // _endian.h:70:1:
BYTE_ORDER = 1234 // _endian.h:72:1:
ICMP6_FILTER = 18 // in6.h:420:1:
ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 // in6.h:638:1:
INET6_ADDRSTRLEN = 46 // in6.h:112:1:
INET_ADDRSTRLEN = 16 // in.h:130:1:
IN_CLASSA_HOST = 0x00ffffff // in.h:357:1:
IN_CLASSA_MAX = 128 // in.h:358:1:
IN_CLASSA_NET = 0xff000000 // in.h:355:1:
IN_CLASSA_NSHIFT = 24 // in.h:356:1:
IN_CLASSB_HOST = 0x0000ffff // in.h:363:1:
IN_CLASSB_MAX = 65536 // in.h:364:1:
IN_CLASSB_NET = 0xffff0000 // in.h:361:1:
IN_CLASSB_NSHIFT = 16 // in.h:362:1:
IN_CLASSC_HOST = 0x000000ff // in.h:369:1:
IN_CLASSC_NET = 0xffffff00 // in.h:367:1:
IN_CLASSC_NSHIFT = 8 // in.h:368:1:
IN_CLASSD_HOST = 0x0fffffff // in.h:379:1:
IN_CLASSD_NET = 0xf0000000 // in.h:377:1:
IN_CLASSD_NSHIFT = 28 // in.h:378:1:
IN_HISTORICAL_NETS = 0 // in.h:351:1:
IN_LOOPBACKNET = 127 // in.h:412:1:
IN_NETMASK_DEFAULT = 0xffffff00 // in.h:372:1:
IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:646:1:
IPCTL_DEFTTL = 3 // in.h:634:1:
IPCTL_DIRECTEDBROADCAST = 9 // in.h:642:1:
IPCTL_FASTFORWARDING = 14 // in.h:647:1:
IPCTL_FORWARDING = 1 // in.h:632:1:
IPCTL_GIF_TTL = 16 // in.h:649:1:
IPCTL_INTRDQDROPS = 18 // in.h:651:1:
IPCTL_INTRDQMAXLEN = 17 // in.h:650:1:
IPCTL_INTRQDROPS = 11 // in.h:644:1:
IPCTL_INTRQMAXLEN = 10 // in.h:643:1:
IPCTL_SENDREDIRECTS = 2 // in.h:633:1:
IPCTL_SOURCEROUTE = 8 // in.h:641:1:
IPCTL_STATS = 12 // in.h:645:1:
IPPORT_EPHEMERALFIRST = 10000 // in.h:325:1:
IPPORT_EPHEMERALLAST = 65535 // in.h:326:1:
IPPORT_HIFIRSTAUTO = 49152 // in.h:331:1:
IPPORT_HILASTAUTO = 65535 // in.h:332:1:
IPPORT_MAX = 65535 // in.h:342:1:
IPPORT_RESERVED = 1024 // in.h:320:1:
IPPORT_RESERVEDSTART = 600 // in.h:340:1:
IPPROTO_3PC = 34 // in.h:173:1:
IPPROTO_ADFS = 68 // in.h:206:1:
IPPROTO_AH = 51 // in.h:189:1:
IPPROTO_AHIP = 61 // in.h:199:1:
IPPROTO_APES = 99 // in.h:237:1:
IPPROTO_ARGUS = 13 // in.h:153:1:
IPPROTO_AX25 = 93 // in.h:231:1:
IPPROTO_BHA = 49 // in.h:187:1:
IPPROTO_BLT = 30 // in.h:169:1:
IPPROTO_BRSATMON = 76 // in.h:214:1:
IPPROTO_CARP = 112 // in.h:247:1:
IPPROTO_CFTP = 62 // in.h:200:1:
IPPROTO_CHAOS = 16 // in.h:156:1:
IPPROTO_CMTP = 38 // in.h:177:1:
IPPROTO_CPHB = 73 // in.h:211:1:
IPPROTO_CPNX = 72 // in.h:210:1:
IPPROTO_DCCP = 33 // in.h:172:1:
IPPROTO_DDP = 37 // in.h:176:1:
IPPROTO_DGP = 86 // in.h:224:1:
IPPROTO_DIVERT = 258 // in.h:262:1:
IPPROTO_DONE = 257 // in.h:259:1:
IPPROTO_DSTOPTS = 60 // in.h:198:1:
IPPROTO_EGP = 8 // in.h:148:1:
IPPROTO_EMCON = 14 // in.h:154:1:
IPPROTO_ENCAP = 98 // in.h:236:1:
IPPROTO_EON = 80 // in.h:218:1:
IPPROTO_ESP = 50 // in.h:188:1:
IPPROTO_ETHERIP = 97 // in.h:235:1:
IPPROTO_FRAGMENT = 44 // in.h:182:1:
IPPROTO_GGP = 3 // in.h:144:1:
IPPROTO_GMTP = 100 // in.h:238:1:
IPPROTO_GRE = 47 // in.h:185:1:
IPPROTO_HELLO = 63 // in.h:201:1:
IPPROTO_HIP = 139 // in.h:243:1:
IPPROTO_HMP = 20 // in.h:159:1:
IPPROTO_HOPOPTS = 0 // in.h:142:1:
IPPROTO_ICMP = 1 // in.h:44:1:
IPPROTO_ICMPV6 = 58 // in.h:196:1:
IPPROTO_IDP = 22 // in.h:161:1:
IPPROTO_IDPR = 35 // in.h:174:1:
IPPROTO_IDRP = 45 // in.h:183:1:
IPPROTO_IGMP = 2 // in.h:143:1:
IPPROTO_IGP = 85 // in.h:223:1:
IPPROTO_IGRP = 88 // in.h:226:1:
IPPROTO_IL = 40 // in.h:179:1:
IPPROTO_INLSP = 52 // in.h:190:1:
IPPROTO_INP = 32 // in.h:171:1:
IPPROTO_IP = 0 // in.h:43:1:
IPPROTO_IPCOMP = 108 // in.h:239:1:
IPPROTO_IPCV = 71 // in.h:209:1:
IPPROTO_IPEIP = 94 // in.h:232:1:
IPPROTO_IPIP = 4 // in.h:146:1:
IPPROTO_IPPC = 67 // in.h:205:1:
IPPROTO_IPV4 = 4 // in.h:145:1:
IPPROTO_IPV6 = 41 // in.h:128:1:
IPPROTO_IRTP = 28 // in.h:167:1:
IPPROTO_KRYPTOLAN = 65 // in.h:203:1:
IPPROTO_LARP = 91 // in.h:229:1:
IPPROTO_LEAF1 = 25 // in.h:164:1:
IPPROTO_LEAF2 = 26 // in.h:165:1:
IPPROTO_MAX = 256 // in.h:256:1:
IPPROTO_MEAS = 19 // in.h:158:1:
IPPROTO_MH = 135 // in.h:241:1:
IPPROTO_MHRP = 48 // in.h:186:1:
IPPROTO_MICP = 95 // in.h:233:1:
IPPROTO_MOBILE = 55 // in.h:193:1:
IPPROTO_MPLS = 137 // in.h:249:1:
IPPROTO_MTP = 92 // in.h:230:1:
IPPROTO_MUX = 18 // in.h:157:1:
IPPROTO_ND = 77 // in.h:215:1:
IPPROTO_NHRP = 54 // in.h:192:1:
IPPROTO_NONE = 59 // in.h:197:1:
IPPROTO_NSP = 31 // in.h:170:1:
IPPROTO_NVPII = 11 // in.h:151:1:
IPPROTO_OLD_DIVERT = 254 // in.h:255:1:
IPPROTO_OSPFIGP = 89 // in.h:227:1:
IPPROTO_PFSYNC = 240 // in.h:250:1:
IPPROTO_PGM = 113 // in.h:248:1:
IPPROTO_PIGP = 9 // in.h:149:1:
IPPROTO_PIM = 103 // in.h:246:1:
IPPROTO_PRM = 21 // in.h:160:1:
IPPROTO_PUP = 12 // in.h:152:1:
IPPROTO_PVP = 75 // in.h:213:1:
IPPROTO_RAW = 255 // in.h:129:1:
IPPROTO_RCCMON = 10 // in.h:150:1:
IPPROTO_RDP = 27 // in.h:166:1:
IPPROTO_RESERVED_253 = 253 // in.h:251:1:
IPPROTO_RESERVED_254 = 254 // in.h:252:1:
IPPROTO_ROUTING = 43 // in.h:181:1:
IPPROTO_RSVP = 46 // in.h:184:1:
IPPROTO_RVD = 66 // in.h:204:1:
IPPROTO_SATEXPAK = 64 // in.h:202:1:
IPPROTO_SATMON = 69 // in.h:207:1:
IPPROTO_SCCSP = 96 // in.h:234:1:
IPPROTO_SCTP = 132 // in.h:240:1:
IPPROTO_SDRP = 42 // in.h:180:1:
IPPROTO_SEND = 259 // in.h:263:1:
IPPROTO_SHIM6 = 140 // in.h:244:1:
IPPROTO_SKIP = 57 // in.h:195:1:
IPPROTO_SPACER = 32767 // in.h:269:1:
IPPROTO_SRPC = 90 // in.h:228:1:
IPPROTO_ST = 7 // in.h:147:1:
IPPROTO_SVMTP = 82 // in.h:220:1:
IPPROTO_SWIPE = 53 // in.h:191:1:
IPPROTO_TCF = 87 // in.h:225:1:
IPPROTO_TCP = 6 // in.h:45:1:
IPPROTO_TLSP = 56 // in.h:194:1:
IPPROTO_TP = 29 // in.h:168:1:
IPPROTO_TPXX = 39 // in.h:178:1:
IPPROTO_TRUNK1 = 23 // in.h:162:1:
IPPROTO_TRUNK2 = 24 // in.h:163:1:
IPPROTO_TTP = 84 // in.h:222:1:
IPPROTO_UDP = 17 // in.h:46:1:
IPPROTO_UDPLITE = 136 // in.h:242:1:
IPPROTO_VINES = 83 // in.h:221:1:
IPPROTO_VISA = 70 // in.h:208:1:
IPPROTO_VMTP = 81 // in.h:219:1:
IPPROTO_WBEXPAK = 79 // in.h:217:1:
IPPROTO_WBMON = 78 // in.h:216:1:
IPPROTO_WSN = 74 // in.h:212:1:
IPPROTO_XNET = 15 // in.h:155:1:
IPPROTO_XTP = 36 // in.h:175:1:
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:599:1:
IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:624:1:
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:604:1:
IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:621:1:
IPV6CTL_DAD_COUNT = 16 // in6.h:603:1:
IPV6CTL_DEFHLIM = 3 // in6.h:588:1:
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:605:1:
IPV6CTL_FORWARDING = 1 // in6.h:586:1:
IPV6CTL_FORWSRCRT = 5 // in6.h:592:1:
IPV6CTL_GIF_HLIM = 19 // in6.h:606:1:
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:602:1:
IPV6CTL_INTRDQMAXLEN = 52 // in6.h:645:1:
IPV6CTL_INTRQMAXLEN = 51 // in6.h:644:1:
IPV6CTL_KAME_VERSION = 20 // in6.h:607:1:
IPV6CTL_LOG_INTERVAL = 14 // in6.h:601:1:
IPV6CTL_MAXFRAGBUCKETSIZE = 54 // in6.h:648:1:
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:596:1:
IPV6CTL_MAXFRAGS = 41 // in6.h:627:1:
IPV6CTL_MAXFRAGSPERPACKET = 53 // in6.h:647:1:
IPV6CTL_MAXID = 55 // in6.h:649:1:
IPV6CTL_MCAST_PMTU = 44 // in6.h:632:1:
IPV6CTL_MRTPROTO = 8 // in6.h:595:1:
IPV6CTL_MRTSTATS = 7 // in6.h:594:1:
IPV6CTL_NORBIT_RAIF = 49 // in6.h:640:1:
IPV6CTL_NO_RADR = 48 // in6.h:639:1:
IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:623:1:
IPV6CTL_RFC6204W3 = 50 // in6.h:642:1:
IPV6CTL_RIP6STATS = 36 // in6.h:622:1:
IPV6CTL_RR_PRUNE = 22 // in6.h:609:1:
IPV6CTL_SENDREDIRECTS = 2 // in6.h:587:1:
IPV6CTL_SOURCECHECK = 10 // in6.h:597:1:
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:598:1:
IPV6CTL_STATS = 6 // in6.h:593:1:
IPV6CTL_STEALTH = 45 // in6.h:636:1:
IPV6CTL_TEMPPLTIME = 33 // in6.h:619:1:
IPV6CTL_TEMPVLTIME = 34 // in6.h:620:1:
IPV6CTL_USETEMPADDR = 32 // in6.h:618:1:
IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:625:1:
IPV6CTL_USE_DEPRECATED = 21 // in6.h:608:1:
IPV6CTL_V6ONLY = 24 // in6.h:613:1:
IPV6PORT_ANONMAX = 65535 // in6.h:89:1:
IPV6PORT_ANONMIN = 49152 // in6.h:88:1:
IPV6PORT_RESERVED = 1024 // in6.h:87:1:
IPV6PORT_RESERVEDMAX = 1023 // in6.h:91:1:
IPV6PORT_RESERVEDMIN = 600 // in6.h:90:1:
IPV6PROTO_MAXID = 104 // in6.h:581:1:
IPV6_AUTOFLOWLABEL = 59 // in6.h:484:1:
IPV6_BINDANY = 64 // in6.h:493:1:
IPV6_BINDMULTI = 65 // in6.h:495:1:
IPV6_BINDV6ONLY = 27 // in6.h:435:1:
IPV6_CHECKSUM = 26 // in6.h:432:1:
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:527:1:
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:528:1:
IPV6_DONTFRAG = 62 // in6.h:487:1:
IPV6_DSTOPTS = 50 // in6.h:475:1:
IPV6_FLOWID = 67 // in6.h:497:1:
IPV6_FLOWTYPE = 68 // in6.h:498:1:
IPV6_FW_ADD = 30 // in6.h:441:1:
IPV6_FW_DEL = 31 // in6.h:442:1:
IPV6_FW_FLUSH = 32 // in6.h:443:1:
IPV6_FW_GET = 34 // in6.h:445:1:
IPV6_FW_ZERO = 33 // in6.h:444:1:
IPV6_HOPLIMIT = 47 // in6.h:472:1:
IPV6_HOPOPTS = 49 // in6.h:474:1:
IPV6_IPSEC_POLICY = 28 // in6.h:438:1:
IPV6_JOIN_GROUP = 12 // in6.h:417:1:
IPV6_LEAVE_GROUP = 13 // in6.h:418:1:
IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:539:1:
IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:533:1:
IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:540:1:
IPV6_MSFILTER = 74 // in6.h:510:1:
IPV6_MULTICAST_HOPS = 10 // in6.h:415:1:
IPV6_MULTICAST_IF = 9 // in6.h:414:1:
IPV6_MULTICAST_LOOP = 11 // in6.h:416:1:
IPV6_NEXTHOP = 48 // in6.h:473:1:
IPV6_ORIGDSTADDR = 72 // in6.h:503:1:
IPV6_PATHMTU = 44 // in6.h:463:1:
IPV6_PKTINFO = 46 // in6.h:471:1:
IPV6_PORTRANGE = 14 // in6.h:419:1:
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:570:1:
IPV6_PORTRANGE_HIGH = 1 // in6.h:571:1:
IPV6_PORTRANGE_LOW = 2 // in6.h:572:1:
IPV6_PREFER_TEMPADDR = 63 // in6.h:489:1:
IPV6_RECVDSTOPTS = 40 // in6.h:455:1:
IPV6_RECVFLOWID = 70 // in6.h:500:1:
IPV6_RECVHOPLIMIT = 37 // in6.h:452:1:
IPV6_RECVHOPOPTS = 39 // in6.h:454:1:
IPV6_RECVORIGDSTADDR = 72 // in6.h:504:1:
IPV6_RECVPATHMTU = 43 // in6.h:461:1:
IPV6_RECVPKTINFO = 36 // in6.h:451:1:
IPV6_RECVRSSBUCKETID = 71 // in6.h:501:1:
IPV6_RECVRTHDR = 38 // in6.h:453:1:
IPV6_RECVTCLASS = 57 // in6.h:482:1:
IPV6_RSSBUCKETID = 69 // in6.h:499:1:
IPV6_RSS_LISTEN_BUCKET = 66 // in6.h:496:1:
IPV6_RTHDR = 51 // in6.h:476:1:
IPV6_RTHDRDSTOPTS = 35 // in6.h:449:1:
IPV6_RTHDR_LOOSE = 0 // in6.h:520:1:
IPV6_RTHDR_STRICT = 1 // in6.h:521:1:
IPV6_RTHDR_TYPE_0 = 0 // in6.h:522:1:
IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:412:1:
IPV6_TCLASS = 61 // in6.h:486:1:
IPV6_UNICAST_HOPS = 4 // in6.h:413:1:
IPV6_USE_MIN_MTU = 42 // in6.h:460:1:
IPV6_V6ONLY = 27 // in6.h:433:1:
IPV6_VLAN_PCP = 75 // in6.h:515:1:
IP_ADD_MEMBERSHIP = 12 // in.h:434:1:
IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:490:1:
IP_BINDANY = 24 // in.h:447:1:
IP_BINDMULTI = 25 // in.h:448:1:
IP_BLOCK_SOURCE = 72 // in.h:492:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:521:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:520:1:
IP_DONTFRAG = 67 // in.h:486:1:
IP_DROP_MEMBERSHIP = 13 // in.h:435:1:
IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:491:1:
IP_DUMMYNET3 = 49 // in.h:465:1:
IP_DUMMYNET_CONFIGURE = 60 // in.h:479:1:
IP_DUMMYNET_DEL = 61 // in.h:480:1:
IP_DUMMYNET_FLUSH = 62 // in.h:481:1:
IP_DUMMYNET_GET = 64 // in.h:482:1:
IP_FLOWID = 90 // in.h:511:1:
IP_FLOWTYPE = 91 // in.h:512:1:
IP_FW3 = 48 // in.h:464:1:
IP_FW_ADD = 50 // in.h:467:1:
IP_FW_DEL = 51 // in.h:468:1:
IP_FW_FLUSH = 52 // in.h:469:1:
IP_FW_GET = 54 // in.h:471:1:
IP_FW_NAT_CFG = 56 // in.h:474:1:
IP_FW_NAT_DEL = 57 // in.h:475:1:
IP_FW_NAT_GET_CONFIG = 58 // in.h:476:1:
IP_FW_NAT_GET_LOG = 59 // in.h:477:1:
IP_FW_RESETLOG = 55 // in.h:472:1:
IP_FW_TABLE_ADD = 40 // in.h:458:1:
IP_FW_TABLE_DEL = 41 // in.h:459:1:
IP_FW_TABLE_FLUSH = 42 // in.h:460:1:
IP_FW_TABLE_GETSIZE = 43 // in.h:461:1:
IP_FW_TABLE_LIST = 44 // in.h:462:1:
IP_FW_ZERO = 53 // in.h:470:1:
IP_HDRINCL = 2 // in.h:422:1:
IP_IPSEC_POLICY = 21 // in.h:444:1:
IP_MAX_GROUP_SRC_FILTER = 512 // in.h:532:1:
IP_MAX_MEMBERSHIPS = 4095 // in.h:526:1:
IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:534:1:
IP_MAX_SOCK_SRC_FILTER = 128 // in.h:533:1:
IP_MINTTL = 66 // in.h:485:1:
IP_MSFILTER = 74 // in.h:496:1:
IP_MULTICAST_IF = 9 // in.h:430:1:
IP_MULTICAST_LOOP = 11 // in.h:433:1:
IP_MULTICAST_TTL = 10 // in.h:432:1:
IP_MULTICAST_VIF = 14 // in.h:436:1:
IP_ONESBCAST = 23 // in.h:446:1:
IP_OPTIONS = 1 // in.h:421:1:
IP_ORIGDSTADDR = 27 // in.h:450:1:
IP_PORTRANGE = 19 // in.h:441:1:
IP_PORTRANGE_DEFAULT = 0 // in.h:625:1:
IP_PORTRANGE_HIGH = 1 // in.h:626:1:
IP_PORTRANGE_LOW = 2 // in.h:627:1:
IP_RECVDSTADDR = 7 // in.h:427:1:
IP_RECVFLOWID = 93 // in.h:514:1:
IP_RECVIF = 20 // in.h:442:1:
IP_RECVOPTS = 5 // in.h:425:1:
IP_RECVORIGDSTADDR = 27 // in.h:451:1:
IP_RECVRETOPTS = 6 // in.h:426:1:
IP_RECVRSSBUCKETID = 94 // in.h:515:1:
IP_RECVTOS = 68 // in.h:487:1:
IP_RECVTTL = 65 // in.h:484:1:
IP_RETOPTS = 8 // in.h:429:1:
IP_RSSBUCKETID = 92 // in.h:513:1:
IP_RSS_LISTEN_BUCKET = 26 // in.h:449:1:
IP_RSVP_OFF = 16 // in.h:438:1:
IP_RSVP_ON = 15 // in.h:437:1:
IP_RSVP_VIF_OFF = 18 // in.h:440:1:
IP_RSVP_VIF_ON = 17 // in.h:439:1:
IP_SENDSRCADDR = 7 // in.h:428:1:
IP_TOS = 3 // in.h:423:1:
IP_TTL = 4 // in.h:424:1:
IP_UNBLOCK_SOURCE = 73 // in.h:493:1:
IP_VLAN_PCP = 75 // in.h:499:1:
LITTLE_ENDIAN = 1234 // _endian.h:69:1:
MCAST_BLOCK_SOURCE = 84 // in.h:507:1:
MCAST_EXCLUDE = 2 // in.h:619:1:
MCAST_INCLUDE = 1 // in.h:618:1:
MCAST_JOIN_GROUP = 80 // in.h:503:1:
MCAST_JOIN_SOURCE_GROUP = 82 // in.h:505:1:
MCAST_LEAVE_GROUP = 81 // in.h:504:1:
MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:506:1:
MCAST_UNBLOCK_SOURCE = 85 // in.h:508:1:
MCAST_UNDEFINED = 0 // in.h:617:1:
PDP_ENDIAN = 3412 // _endian.h:71:1:
SIN6_LEN = 0 // in6.h:122:1:
X_BIG_ENDIAN = 4321 // _endian.h:47:1:
X_BYTEORDER_FUNC_DEFINED = 0 // in.h:118:1:
X_BYTEORDER_PROTOTYPED = 0 // in.h:108:1:
X_BYTE_ORDER = 1234 // _endian.h:40:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_ILP32 = 1 // <predefined>:1:1:
X_IN_ADDR_T_DECLARED = 0 // in.h:68:1:
X_IN_PORT_T_DECLARED = 0 // in.h:73:1:
X_LITTLE_ENDIAN = 1234 // _endian.h:46:1:
X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1:
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
X_NETINET6_IN6_H_ = 0 // in6.h:71:1:
X_NETINET_IN_H_ = 0 // in.h:36:1:
X_Nonnull = 0 // cdefs.h:790:1:
X_Null_unspecified = 0 // cdefs.h:792:1:
X_Nullable = 0 // cdefs.h:791:1:
X_PDP_ENDIAN = 3412 // _endian.h:48:1:
X_QUAD_HIGHWORD = 1 // _endian.h:55:1:
X_QUAD_LOWWORD = 0 // _endian.h:56:1:
X_SA_FAMILY_T_DECLARED = 0 // in.h:78:1:
X_SIZE_T_DECLARED = 0 // in6.h:701:1:
X_SOCKLEN_T_DECLARED = 0 // in.h:91:1:
X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1:
X_STRUCT_IN_ADDR_DECLARED = 0 // in.h:86:1:
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1:
X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1:
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
X_UINT16_T_DECLARED = 0 // in.h:58:1:
X_UINT32_T_DECLARED = 0 // in.h:63:1:
X_UINT8_T_DECLARED = 0 // in.h:53:1:
Unix = 1 // <predefined>:367:1:
)
type Ptrdiff_t = int32 /* <builtin>:3:26 */
type Size_t = uint32 /* <builtin>:9:23 */
type Wchar_t = uint32 /* <builtin>:15:24 */
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// -
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright (c) 1982, 1986, 1990, 1993
// The Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)in.h 8.3 (Berkeley) 1/3/94
// $FreeBSD$
// -
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
// $FreeBSD$
// Testing against Clang-specific extensions.
// This code has been put in place to help reduce the addition of
// compiler specific defines in FreeBSD code. It helps to aid in
// having a compiler-agnostic source tree.
// Compiler memory barriers, specific to gcc and clang.
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
// Macro to test if we're using a specific version of gcc or later.
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
// mode -- there must be no spaces between its arguments, and for nested
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
// concatenate double-quoted strings produced by the __STRING macro, but
// this only works with ANSI C.
//
// __XSTRING is like __STRING, but it expands any macros in its argument
// first. It is only available with ANSI C.
// Compiler-dependent macros to help declare dead (non-returning) and
// pure (no side effects) functions, and unused variables. They are
// null except for versions of gcc that are known to support the features
// properly (old versions of gcc-2 supported the dead and pure features
// in a different (wrong) way). If we do not provide an implementation
// for a given compiler, let the compile fail if it is told to use
// a feature that we cannot live without.
// Keywords added in C11.
// Emulation of C11 _Generic(). Unlike the previously defined C11
// keywords, it is not possible to implement this using exactly the same
// syntax. Therefore implement something similar under the name
// __generic(). Unlike _Generic(), this macro can only distinguish
// between a single type, so it requires nested invocations to
// distinguish multiple cases.
// C99 Static array indices in function parameter declarations. Syntax such as:
// void bar(int myArray[static 10]);
// is allowed in C99 but not in C++. Define __min_size appropriately so
// headers using it can be compiled in either language. Use like this:
// void bar(int myArray[__min_size(10)]);
// XXX: should use `#if __STDC_VERSION__ < 199901'.
// C++11 exposes a load of C99 stuff
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
// a way to define the `restrict' type qualifier without disturbing older
// software that is unaware of C99 keywords.
// GNU C version 2.96 adds explicit branch prediction so that
// the CPU back-end can hint the processor and also so that
// code blocks can be reordered such that the predicted path
// sees a more linear flow, thus improving cache behavior, etc.
//
// The following two macros provide us with a way to utilize this
// compiler feature. Use __predict_true() if you expect the expression
// to evaluate to true, and __predict_false() if you expect the
// expression to evaluate to false.
//
// A few notes about usage:
//
// * Generally, __predict_false() error condition checks (unless
// you have some _strong_ reason to do otherwise, in which case
// document it), and/or __predict_true() `no-error' condition
// checks, assuming you want to optimize for the no-error case.
//
// * Other than that, if you don't know the likelihood of a test
// succeeding from empirical or other `hard' evidence, don't
// make predictions.
//
// * These are meant to be used in places that are run `a lot'.
// It is wasteful to make predictions in code that is run
// seldomly (e.g. at subsystem initialization time) as the
// basic block reordering that this affects can often generate
// larger code.
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
// require it.
// Given the pointer x to the member m of the struct s, return
// a pointer to the containing structure. When using GCC, we first
// assign pointer x to a local variable, to check that its type is
// compatible with member m.
// Compiler-dependent macros to declare that functions take printf-like
// or scanf-like arguments. They are null except for versions of gcc
// that are known to support the features properly (old versions of gcc-2
// didn't permit keeping the keywords out of the application namespace).
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
// Embed the rcs id of a source file in the resulting library. Note that in
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
// Usage:
// __FBSDID("$FreeBSD$");
// -
// The following definitions are an extension of the behavior originally
// implemented in <sys/_posix.h>, but with a different level of granularity.
// POSIX.1 requires that the macros we test be defined before any standard
// header file is included.
//
// Here's a quick run-down of the versions:
// defined(_POSIX_SOURCE) 1003.1-1988
// _POSIX_C_SOURCE == 1 1003.1-1990
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
// _POSIX_C_SOURCE == 199309 1003.1b-1993
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
// and the omnibus ISO/IEC 9945-1: 1996
// _POSIX_C_SOURCE == 200112 1003.1-2001
// _POSIX_C_SOURCE == 200809 1003.1-2008
//
// In addition, the X/Open Portability Guide, which is now the Single UNIX
// Specification, defines a feature-test macro which indicates the version of
| 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/netinet/in/in_linux_386.go | vendor/modernc.org/libc/netinet/in/in_linux_386.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_386.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
AF_ALG = 38
AF_APPLETALK = 5
AF_ASH = 18
AF_ATMPVC = 8
AF_ATMSVC = 20
AF_AX25 = 3
AF_BLUETOOTH = 31
AF_BRIDGE = 7
AF_CAIF = 37
AF_CAN = 29
AF_DECnet = 12
AF_ECONET = 19
AF_FILE = 1
AF_IB = 27
AF_IEEE802154 = 36
AF_INET = 2
AF_INET6 = 10
AF_IPX = 4
AF_IRDA = 23
AF_ISDN = 34
AF_IUCV = 32
AF_KCM = 41
AF_KEY = 15
AF_LLC = 26
AF_LOCAL = 1
AF_MAX = 45
AF_MPLS = 28
AF_NETBEUI = 13
AF_NETLINK = 16
AF_NETROM = 6
AF_NFC = 39
AF_PACKET = 17
AF_PHONET = 35
AF_PPPOX = 24
AF_QIPCRTR = 42
AF_RDS = 21
AF_ROSE = 11
AF_ROUTE = 16
AF_RXRPC = 33
AF_SECURITY = 14
AF_SMC = 43
AF_SNA = 22
AF_TIPC = 30
AF_UNIX = 1
AF_UNSPEC = 0
AF_VSOCK = 40
AF_WANPIPE = 25
AF_X25 = 9
AF_XDP = 44
BIG_ENDIAN = 4321
BYTE_ORDER = 1234
FD_SETSIZE = 1024
FIOGETOWN = 0x8903
FIOSETOWN = 0x8901
INET6_ADDRSTRLEN = 46
INET_ADDRSTRLEN = 16
IN_CLASSA_HOST = 16777215
IN_CLASSA_MAX = 128
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 24
IN_CLASSB_HOST = 65535
IN_CLASSB_MAX = 65536
IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 16
IN_CLASSC_HOST = 255
IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 8
IN_LOOPBACKNET = 127
IPV6_2292DSTOPTS = 4
IPV6_2292HOPLIMIT = 8
IPV6_2292HOPOPTS = 3
IPV6_2292PKTINFO = 2
IPV6_2292PKTOPTIONS = 6
IPV6_2292RTHDR = 5
IPV6_ADDRFORM = 1
IPV6_ADDR_PREFERENCES = 72
IPV6_ADD_MEMBERSHIP = 20
IPV6_AUTHHDR = 10
IPV6_AUTOFLOWLABEL = 70
IPV6_CHECKSUM = 7
IPV6_DONTFRAG = 62
IPV6_DROP_MEMBERSHIP = 21
IPV6_DSTOPTS = 59
IPV6_FREEBIND = 78
IPV6_HDRINCL = 36
IPV6_HOPLIMIT = 52
IPV6_HOPOPTS = 54
IPV6_IPSEC_POLICY = 34
IPV6_JOIN_ANYCAST = 27
IPV6_JOIN_GROUP = 20
IPV6_LEAVE_ANYCAST = 28
IPV6_LEAVE_GROUP = 21
IPV6_MINHOPCOUNT = 73
IPV6_MTU = 24
IPV6_MTU_DISCOVER = 23
IPV6_MULTICAST_ALL = 29
IPV6_MULTICAST_HOPS = 18
IPV6_MULTICAST_IF = 17
IPV6_MULTICAST_LOOP = 19
IPV6_NEXTHOP = 9
IPV6_ORIGDSTADDR = 74
IPV6_PATHMTU = 61
IPV6_PKTINFO = 50
IPV6_PMTUDISC_DO = 2
IPV6_PMTUDISC_DONT = 0
IPV6_PMTUDISC_INTERFACE = 4
IPV6_PMTUDISC_OMIT = 5
IPV6_PMTUDISC_PROBE = 3
IPV6_PMTUDISC_WANT = 1
IPV6_RECVDSTOPTS = 58
IPV6_RECVERR = 25
IPV6_RECVFRAGSIZE = 77
IPV6_RECVHOPLIMIT = 51
IPV6_RECVHOPOPTS = 53
IPV6_RECVORIGDSTADDR = 74
IPV6_RECVPATHMTU = 60
IPV6_RECVPKTINFO = 49
IPV6_RECVRTHDR = 56
IPV6_RECVTCLASS = 66
IPV6_ROUTER_ALERT = 22
IPV6_ROUTER_ALERT_ISOLATE = 30
IPV6_RTHDR = 57
IPV6_RTHDRDSTOPTS = 55
IPV6_RTHDR_LOOSE = 0
IPV6_RTHDR_STRICT = 1
IPV6_RTHDR_TYPE_0 = 0
IPV6_RXDSTOPTS = 59
IPV6_RXHOPOPTS = 54
IPV6_TCLASS = 67
IPV6_TRANSPARENT = 75
IPV6_UNICAST_HOPS = 16
IPV6_UNICAST_IF = 76
IPV6_V6ONLY = 26
IPV6_XFRM_POLICY = 35
IP_ADD_MEMBERSHIP = 35
IP_ADD_SOURCE_MEMBERSHIP = 39
IP_BIND_ADDRESS_NO_PORT = 24
IP_BLOCK_SOURCE = 38
IP_CHECKSUM = 23
IP_DEFAULT_MULTICAST_LOOP = 1
IP_DEFAULT_MULTICAST_TTL = 1
IP_DROP_MEMBERSHIP = 36
IP_DROP_SOURCE_MEMBERSHIP = 40
IP_FREEBIND = 15
IP_HDRINCL = 3
IP_IPSEC_POLICY = 16
IP_MAX_MEMBERSHIPS = 20
IP_MINTTL = 21
IP_MSFILTER = 41
IP_MTU = 14
IP_MTU_DISCOVER = 10
IP_MULTICAST_ALL = 49
IP_MULTICAST_IF = 32
IP_MULTICAST_LOOP = 34
IP_MULTICAST_TTL = 33
IP_NODEFRAG = 22
IP_OPTIONS = 4
IP_ORIGDSTADDR = 20
IP_PASSSEC = 18
IP_PKTINFO = 8
IP_PKTOPTIONS = 9
IP_PMTUDISC = 10
IP_PMTUDISC_DO = 2
IP_PMTUDISC_DONT = 0
IP_PMTUDISC_INTERFACE = 4
IP_PMTUDISC_OMIT = 5
IP_PMTUDISC_PROBE = 3
IP_PMTUDISC_WANT = 1
IP_RECVERR = 11
IP_RECVFRAGSIZE = 25
IP_RECVOPTS = 6
IP_RECVORIGDSTADDR = 20
IP_RECVRETOPTS = 7
IP_RECVTOS = 13
IP_RECVTTL = 12
IP_RETOPTS = 7
IP_ROUTER_ALERT = 5
IP_TOS = 1
IP_TRANSPARENT = 19
IP_TTL = 2
IP_UNBLOCK_SOURCE = 37
IP_UNICAST_IF = 50
IP_XFRM_POLICY = 17
LITTLE_ENDIAN = 1234
MCAST_BLOCK_SOURCE = 43
MCAST_EXCLUDE = 0
MCAST_INCLUDE = 1
MCAST_JOIN_GROUP = 42
MCAST_JOIN_SOURCE_GROUP = 46
MCAST_LEAVE_GROUP = 45
MCAST_LEAVE_SOURCE_GROUP = 47
MCAST_MSFILTER = 48
MCAST_UNBLOCK_SOURCE = 44
PDP_ENDIAN = 3412
PF_ALG = 38
PF_APPLETALK = 5
PF_ASH = 18
PF_ATMPVC = 8
PF_ATMSVC = 20
PF_AX25 = 3
PF_BLUETOOTH = 31
PF_BRIDGE = 7
PF_CAIF = 37
PF_CAN = 29
PF_DECnet = 12
PF_ECONET = 19
PF_FILE = 1
PF_IB = 27
PF_IEEE802154 = 36
PF_INET = 2
PF_INET6 = 10
PF_IPX = 4
PF_IRDA = 23
PF_ISDN = 34
PF_IUCV = 32
PF_KCM = 41
PF_KEY = 15
PF_LLC = 26
PF_LOCAL = 1
PF_MAX = 45
PF_MPLS = 28
PF_NETBEUI = 13
PF_NETLINK = 16
PF_NETROM = 6
PF_NFC = 39
PF_PACKET = 17
PF_PHONET = 35
PF_PPPOX = 24
PF_QIPCRTR = 42
PF_RDS = 21
PF_ROSE = 11
PF_ROUTE = 16
PF_RXRPC = 33
PF_SECURITY = 14
PF_SMC = 43
PF_SNA = 22
PF_TIPC = 30
PF_UNIX = 1
PF_UNSPEC = 0
PF_VSOCK = 40
PF_WANPIPE = 25
PF_X25 = 9
PF_XDP = 44
SCM_TIMESTAMPING_OPT_STATS = 54
SCM_TIMESTAMPING_PKTINFO = 58
SCM_TXTIME = 61
SCM_WIFI_STATUS = 41
SIOCATMARK = 0x8905
SIOCGPGRP = 0x8904
SIOCGSTAMP = 0x8906
SIOCGSTAMPNS = 0x8907
SIOCSPGRP = 0x8902
SOL_AAL = 265
SOL_ALG = 279
SOL_ATM = 264
SOL_BLUETOOTH = 274
SOL_CAIF = 278
SOL_DCCP = 269
SOL_DECNET = 261
SOL_ICMPV6 = 58
SOL_IP = 0
SOL_IPV6 = 41
SOL_IRDA = 266
SOL_IUCV = 277
SOL_KCM = 281
SOL_LLC = 268
SOL_NETBEUI = 267
SOL_NETLINK = 270
SOL_NFC = 280
SOL_PACKET = 263
SOL_PNPIPE = 275
SOL_PPPOL2TP = 273
SOL_RAW = 255
SOL_RDS = 276
SOL_RXRPC = 272
SOL_SOCKET = 1
SOL_TIPC = 271
SOL_TLS = 282
SOL_X25 = 262
SOL_XDP = 283
SOMAXCONN = 4096
SO_ACCEPTCONN = 30
SO_ATTACH_BPF = 50
SO_ATTACH_FILTER = 26
SO_ATTACH_REUSEPORT_CBPF = 51
SO_ATTACH_REUSEPORT_EBPF = 52
SO_BINDTODEVICE = 25
SO_BINDTOIFINDEX = 62
SO_BPF_EXTENSIONS = 48
SO_BROADCAST = 6
SO_BSDCOMPAT = 14
SO_BUSY_POLL = 46
SO_CNX_ADVICE = 53
SO_COOKIE = 57
SO_DEBUG = 1
SO_DETACH_BPF = 27
SO_DETACH_FILTER = 27
SO_DETACH_REUSEPORT_BPF = 68
SO_DOMAIN = 39
SO_DONTROUTE = 5
SO_ERROR = 4
SO_GET_FILTER = 26
SO_INCOMING_CPU = 49
SO_INCOMING_NAPI_ID = 56
SO_KEEPALIVE = 9
SO_LINGER = 13
SO_LOCK_FILTER = 44
SO_MARK = 36
SO_MAX_PACING_RATE = 47
SO_MEMINFO = 55
SO_NOFCS = 43
SO_NO_CHECK = 11
SO_OOBINLINE = 10
SO_PASSCRED = 16
SO_PASSSEC = 34
SO_PEEK_OFF = 42
SO_PEERCRED = 17
SO_PEERGROUPS = 59
SO_PEERNAME = 28
SO_PEERSEC = 31
SO_PRIORITY = 12
SO_PROTOCOL = 38
SO_RCVBUF = 8
SO_RCVBUFFORCE = 33
SO_RCVLOWAT = 18
SO_RCVTIMEO_NEW = 66
SO_RCVTIMEO_OLD = 20
SO_REUSEADDR = 2
SO_REUSEPORT = 15
SO_RXQ_OVFL = 40
SO_SECURITY_AUTHENTICATION = 22
SO_SECURITY_ENCRYPTION_NETWORK = 24
SO_SECURITY_ENCRYPTION_TRANSPORT = 23
SO_SELECT_ERR_QUEUE = 45
SO_SNDBUF = 7
SO_SNDBUFFORCE = 32
SO_SNDLOWAT = 19
SO_SNDTIMEO_NEW = 67
SO_SNDTIMEO_OLD = 21
SO_TIMESTAMPING_NEW = 65
SO_TIMESTAMPING_OLD = 37
SO_TIMESTAMPNS_NEW = 64
SO_TIMESTAMPNS_OLD = 35
SO_TIMESTAMP_NEW = 63
SO_TIMESTAMP_OLD = 29
SO_TXTIME = 61
SO_TYPE = 3
SO_WIFI_STATUS = 41
SO_ZEROCOPY = 60
X_ASM_X86_POSIX_TYPES_32_H = 0
X_ATFILE_SOURCE = 1
X_BITS_BYTESWAP_H = 1
X_BITS_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_PTHREADTYPES_ARCH_H = 1
X_BITS_PTHREADTYPES_COMMON_H = 1
X_BITS_SOCKADDR_H = 1
X_BITS_STDINT_INTN_H = 1
X_BITS_STDINT_UINTN_H = 1
X_BITS_TIME64_H = 1
X_BITS_TYPESIZES_H = 1
X_BITS_TYPES_H = 1
X_BITS_UINTN_IDENTITY_H = 1
X_BSD_SIZE_T_ = 0
X_BSD_SIZE_T_DEFINED_ = 0
X_DEFAULT_SOURCE = 1
X_ENDIAN_H = 1
X_FEATURES_H = 1
X_FILE_OFFSET_BITS = 64
X_GCC_SIZE_T = 0
X_ILP32 = 1
X_LINUX_POSIX_TYPES_H = 0
X_NETINET_IN_H = 1
X_POSIX_C_SOURCE = 200809
X_POSIX_SOURCE = 1
X_RWLOCK_INTERNAL_H = 0
X_SIZET_ = 0
X_SIZE_T = 0
X_SIZE_T_ = 0
X_SIZE_T_DECLARED = 0
X_SIZE_T_DEFINED = 0
X_SIZE_T_DEFINED_ = 0
X_SS_SIZE = 128
X_STDC_PREDEF_H = 1
X_STRUCT_TIMESPEC = 1
X_SYS_CDEFS_H = 1
X_SYS_SELECT_H = 1
X_SYS_SIZE_T_H = 0
X_SYS_SOCKET_H = 1
X_SYS_TYPES_H = 1
X_THREAD_MUTEX_INTERNAL_H = 1
X_THREAD_SHARED_TYPES_H = 1
X_T_SIZE = 0
X_T_SIZE_ = 0
I386 = 1
Linux = 1
Unix = 1
)
// Bits in the FLAGS argument to `send', `recv', et al.
const ( /* socket.h:200:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
MSG_CTRUNC = 8 // Control data lost before delivery.
MSG_PROXY = 16 // Supply or ask second address.
MSG_TRUNC = 32
MSG_DONTWAIT = 64 // Nonblocking IO.
MSG_EOR = 128 // End of record.
MSG_WAITALL = 256 // Wait for a full request.
MSG_FIN = 512
MSG_SYN = 1024
MSG_CONFIRM = 2048 // Confirm path validity.
MSG_RST = 4096
MSG_ERRQUEUE = 8192 // Fetch message from error queue.
MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
MSG_MORE = 32768 // Sender will send more.
MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
MSG_BATCH = 262144 // sendmmsg: more messages coming.
MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
MSG_CMSG_CLOEXEC = 1073741824
)
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
const ( /* socket.h:332:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Types of sockets.
const ( /* socket_type.h:24:1: */
SOCK_STREAM = 1 // Sequenced, reliable, connection-based
// byte streams.
SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
// of fixed maximum length.
SOCK_RAW = 3 // Raw protocol interface.
SOCK_RDM = 4 // Reliably-delivered messages.
SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
// datagrams of fixed maximum length.
SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
SOCK_PACKET = 10 // Linux specific way of getting packets
// at the dev level. For writing rarp and
// other similar things on the user level.
// Flags to be ORed into the type parameter of socket and socketpair and
// used for the flags parameter of paccept.
SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
// new descriptor(s).
SOCK_NONBLOCK = 2048
)
// Standard well-known ports.
const ( /* in.h:122:1: */
IPPORT_ECHO = 7 // Echo service.
IPPORT_DISCARD = 9 // Discard transmissions service.
IPPORT_SYSTAT = 11 // System status service.
IPPORT_DAYTIME = 13 // Time of day service.
IPPORT_NETSTAT = 15 // Network status service.
IPPORT_FTP = 21 // File Transfer Protocol.
IPPORT_TELNET = 23 // Telnet protocol.
IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
IPPORT_TIMESERVER = 37 // Timeserver service.
IPPORT_NAMESERVER = 42 // Domain Name Service.
IPPORT_WHOIS = 43 // Internet Whois service.
IPPORT_MTP = 57
IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
IPPORT_RJE = 77
IPPORT_FINGER = 79 // Finger service.
IPPORT_TTYLINK = 87
IPPORT_SUPDUP = 95 // SUPDUP protocol.
IPPORT_EXECSERVER = 512 // execd service.
IPPORT_LOGINSERVER = 513 // rlogind service.
IPPORT_CMDSERVER = 514
IPPORT_EFSSERVER = 520
// UDP ports.
IPPORT_BIFFUDP = 512
IPPORT_WHOSERVER = 513
IPPORT_ROUTESERVER = 520
// Ports less than this value are reserved for privileged processes.
IPPORT_RESERVED = 1024
// Ports greater this value are reserved for (non-privileged) servers.
IPPORT_USERRESERVED = 5000
)
// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
// The first word in the comment at the right is the data type used;
// "bool" means a boolean value stored in an `int'.
// Advanced API (RFC3542) (1).
// Advanced API (RFC3542) (2).
// RFC5014.
// RFC5082.
// Obsolete synonyms for the above.
// IPV6_MTU_DISCOVER values.
// Socket level values for IPv6.
// Routing header options for IPv6.
// Standard well-defined IP protocols.
const ( /* in.h:40:1: */
IPPROTO_IP = 0 // Dummy protocol for TCP.
IPPROTO_ICMP = 1 // Internet Control Message Protocol.
IPPROTO_IGMP = 2 // Internet Group Management Protocol.
IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
IPPROTO_TCP = 6 // Transmission Control Protocol.
IPPROTO_EGP = 8 // Exterior Gateway Protocol.
IPPROTO_PUP = 12 // PUP protocol.
IPPROTO_UDP = 17 // User Datagram Protocol.
IPPROTO_IDP = 22 // XNS IDP protocol.
IPPROTO_TP = 29 // SO Transport Protocol Class 4.
IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
IPPROTO_IPV6 = 41 // IPv6 header.
IPPROTO_RSVP = 46 // Reservation Protocol.
IPPROTO_GRE = 47 // General Routing Encapsulation.
IPPROTO_ESP = 50 // encapsulating security payload.
IPPROTO_AH = 51 // authentication header.
IPPROTO_MTP = 92 // Multicast Transport Protocol.
IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
IPPROTO_ENCAP = 98 // Encapsulation Header.
IPPROTO_PIM = 103 // Protocol Independent Multicast.
IPPROTO_COMP = 108 // Compression Header Protocol.
IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
IPPROTO_MPLS = 137 // MPLS in IP.
IPPROTO_RAW = 255 // Raw IP packets.
IPPROTO_MAX = 256
)
// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
//
// network headers first and we should use those ABI-identical definitions
// instead of our own, otherwise 0.
const ( /* in.h:99:1: */
IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
IPPROTO_ROUTING = 43 // IPv6 routing header.
IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
IPPROTO_ICMPV6 = 58 // ICMPv6.
IPPROTO_NONE = 59 // IPv6 no next header.
IPPROTO_DSTOPTS = 60 // IPv6 destination options.
IPPROTO_MH = 135
)
// The following constants should be used for the second parameter of
//
// `shutdown'.
const ( /* socket.h:41:1: */
SHUT_RD = 0 // No more receptions.
SHUT_WR = 1 // No more transmissions.
SHUT_RDWR = 2
)
type Ptrdiff_t = int32 /* <builtin>:3:26 */
type Size_t = uint32 /* <builtin>:9:23 */
type Wchar_t = int32 /* <builtin>:15:24 */
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
//
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
// Extensions to ISO C11 from TS 18661-1:2014.
// __STDC_WANT_IEC_60559_FUNCS_EXT__
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
// if >=199309L, add IEEE Std 1003.1b-1993;
// if >=199506L, add IEEE Std 1003.1c-1995;
// if >=200112L, all of IEEE 1003.1-2004
// if >=200809L, all of IEEE 1003.1-2008
// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
// Single Unix conformance is wanted, to 600 for the
// sixth revision, to 700 for the seventh revision.
// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
// Set to 1 or 2; 2 performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
//
// The `-ansi' switch to the GNU C compiler, and standards conformance
// options such as `-std=c99', define __STRICT_ANSI__. If none of
// these are defined, or if _DEFAULT_SOURCE is defined, the default is
// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
// 200809L, as well as enabling miscellaneous functions from BSD and
// SVID. If more than one of these are defined, they accumulate. For
// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
// give you ISO C, 1003.1, and 1003.2, but nothing else.
//
// These are defined by this file and are used by the
// header files to decide what to declare or define:
//
// __GLIBC_USE (F) Define things from feature set F. This is defined
// to 1 or 0; the subsequent macros are either defined
// or undefined, and those tests should be moved to
// __GLIBC_USE.
// __USE_ISOC11 Define ISO C11 things.
// __USE_ISOC99 Define ISO C99 things.
// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
// __USE_ISOCXX11 Define ISO C++11 things.
// __USE_POSIX Define IEEE Std 1003.1 things.
// __USE_POSIX2 Define IEEE Std 1003.2 things.
// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
// __USE_XOPEN Define XPG things.
// __USE_XOPEN_EXTENDED Define X/Open Unix things.
// __USE_UNIX98 Define Single Unix V2 things.
// __USE_XOPEN2K Define XPG6 things.
// __USE_XOPEN2KXSI Define XPG6 XSI things.
// __USE_XOPEN2K8 Define XPG7 things.
// __USE_XOPEN2K8XSI Define XPG7 XSI things.
// __USE_LARGEFILE Define correct standard I/O things.
// __USE_LARGEFILE64 Define LFS things with separate names.
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
// only for compatibility. All new code should use the other symbols
// to test for features.
//
// All macros listed above as possibly being defined by this file are
// explicitly undefined if they are not explicitly defined.
// Feature-test macros that are not defined by the user or compiler
// but are implied by the other feature-test macros defined (or by the
// lack of any definitions) are defined by the file.
//
// ISO C feature test macros depend on the definition of the macro
// when an affected header is included, not when the first system
// header is included, and so they are handled in
// <bits/libc-header-start.h>, which does not have a multiple include
// guard. Feature test macros that can be handled from the first
// system header included are handled here.
// Undefine everything, so we get a clean slate.
// Suppress kernel-name space pollution unless user expressedly asks
// for it.
// Convenience macro to test the version of gcc.
// Use like this:
// #if __GNUC_PREREQ (2,8)
// ... code requiring gcc 2.8 or later ...
// #endif
// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
// added in 2.0.
// Similarly for clang. Features added to GCC after version 4.2 may
// or may not also be available in clang, and clang's definitions of
// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
// features can be queried via __has_extension/__has_feature.
// Whether to use feature set F.
// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
// issue a warning; the expectation is that the source is being
// transitioned to use the new macro.
// If _GNU_SOURCE was defined by the user, turn on all the other features.
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
// This is to enable the ISO C90 Amendment 1:1995 extension.
// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
// is defined, use POSIX.1-2008 (or another version depending on
// _XOPEN_SOURCE).
// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
// defined in all multithreaded code. GNU libc has not required this
// for many years. We now treat them as compatibility synonyms for
// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
// must consider only the value of __cplusplus when compiling C++.
// GNU formerly extended the scanf functions with modified format
// specifiers %as, %aS, and %a[...] that allocate a buffer for the
// input using malloc. This extension conflicts with ISO C99, which
// defines %a as a standalone format specifier that reads a floating-
// point number; moreover, POSIX.1-2008 provides the same feature
// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
//
// We now follow C99 unless GNU extensions are active and the compiler
// is specifically in C89 or C++98 mode (strict or not). For
// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
| 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/netinet/in/in_netbsd_amd64.go | vendor/modernc.org/libc/netinet/in/in_netbsd_amd64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_netbsd_amd64.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
AF_APPLETALK = 16 // socket.h:218:1:
AF_ARP = 28 // socket.h:237:1:
AF_BLUETOOTH = 31 // socket.h:243:1:
AF_CAN = 35 // socket.h:247:1:
AF_CCITT = 10 // socket.h:212:1:
AF_CHAOS = 5 // socket.h:206:1:
AF_CNT = 21 // socket.h:225:1:
AF_COIP = 20 // socket.h:224:1:
AF_DATAKIT = 9 // socket.h:211:1:
AF_DECnet = 12 // socket.h:214:1:
AF_DLI = 13 // socket.h:215:1:
AF_E164 = 26 // socket.h:235:1:
AF_ECMA = 8 // socket.h:210:1:
AF_ETHER = 36 // socket.h:248:1:
AF_HYLINK = 15 // socket.h:217:1:
AF_IEEE80211 = 32 // socket.h:244:1:
AF_IMPLINK = 3 // socket.h:204:1:
AF_INET = 2 // socket.h:203:1:
AF_INET6 = 24 // socket.h:230:1:
AF_IPX = 23 // socket.h:229:1:
AF_ISDN = 26 // socket.h:234:1:
AF_ISO = 7 // socket.h:208:1:
AF_LAT = 14 // socket.h:216:1:
AF_LINK = 18 // socket.h:220:1:
AF_LOCAL = 1 // socket.h:201:1:
AF_MAX = 37 // socket.h:249:1:
AF_MPLS = 33 // socket.h:245:1:
AF_NATM = 27 // socket.h:236:1:
AF_NS = 6 // socket.h:207:1:
AF_OROUTE = 17 // socket.h:219:1:
AF_OSI = 7 // socket.h:209:1:
AF_PUP = 4 // socket.h:205:1:
AF_ROUTE = 34 // socket.h:246:1:
AF_SNA = 11 // socket.h:213:1:
AF_UNIX = 1 // socket.h:202:1:
AF_UNSPEC = 0 // socket.h:200:1:
BIG_ENDIAN = 4321 // endian.h:101:1:
BYTE_ORDER = 1234 // endian.h:103:1:
CTL_IPPROTO_IPSEC = 258 // in.h:118:1:
FD_SETSIZE = 256 // fd_set.h:59:1:
ICMP6_FILTER = 18 // in6.h:393:1:
INET6_ADDRSTRLEN = 46 // in6.h:138:1:
INET6_IS_ADDR_LINKLOCAL = 1 // in6.h:678:1:
INET6_IS_ADDR_MC_LINKLOCAL = 2 // in6.h:679:1:
INET6_IS_ADDR_SITELOCAL = 4 // in6.h:680:1:
INET_ADDRSTRLEN = 16 // in.h:249:1:
INT16_MAX = 32767 // common_int_limits.h:53:1:
INT16_MIN = -32768 // common_int_limits.h:47:1:
INT32_MAX = 2147483647 // common_int_limits.h:54:1:
INT32_MIN = -2147483648 // common_int_limits.h:48:1:
INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1:
INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1:
INT8_MAX = 127 // common_int_limits.h:52:1:
INT8_MIN = -128 // common_int_limits.h:46:1:
INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1:
INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1:
INTPTR_MAX = 9223372036854775807 // common_int_limits.h:105:1:
INTPTR_MIN = -9223372036854775808 // common_int_limits.h:104:1:
INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1:
INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1:
INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1:
INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1:
INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1:
INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1:
INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1:
INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1:
INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1:
INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1:
INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1:
INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1:
INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1:
INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1:
INT_LEAST8_MAX = 127 // common_int_limits.h:72:1:
INT_LEAST8_MIN = -128 // common_int_limits.h:66:1:
IN_CLASSA_MAX = 128 // in.h:182:1:
IN_CLASSA_NSHIFT = 24 // in.h:180:1:
IN_CLASSB_MAX = 65536 // in.h:189:1:
IN_CLASSB_NSHIFT = 16 // in.h:187:1:
IN_CLASSC_NSHIFT = 8 // in.h:194:1:
IN_CLASSD_NSHIFT = 28 // in.h:201:1:
IN_LOOPBACKNET = 127 // in.h:236:1:
IPCTL_ALLOWSRCRT = 7 // in.h:348:1:
IPCTL_ANONPORTMAX = 11 // in.h:352:1:
IPCTL_ANONPORTMIN = 10 // in.h:351:1:
IPCTL_CHECKINTERFACE = 20 // in.h:361:1:
IPCTL_DAD_COUNT = 25 // in.h:366:1:
IPCTL_DEFTTL = 3 // in.h:344:1:
IPCTL_DIRECTEDBCAST = 6 // in.h:347:1:
IPCTL_FORWARDING = 1 // in.h:342:1:
IPCTL_FORWSRCRT = 5 // in.h:346:1:
IPCTL_GIF_TTL = 15 // in.h:356:1:
IPCTL_GRE_TTL = 19 // in.h:360:1:
IPCTL_HOSTZEROBROADCAST = 14 // in.h:355:1:
IPCTL_IFQ = 21 // in.h:362:1:
IPCTL_LOOPBACKCKSUM = 23 // in.h:364:1:
IPCTL_LOWPORTMAX = 17 // in.h:358:1:
IPCTL_LOWPORTMIN = 16 // in.h:357:1:
IPCTL_MAXFLOWS = 13 // in.h:354:1:
IPCTL_MAXFRAGPACKETS = 18 // in.h:359:1:
IPCTL_MTUDISC = 9 // in.h:350:1:
IPCTL_MTUDISCTIMEOUT = 12 // in.h:353:1:
IPCTL_RANDOMID = 22 // in.h:363:1:
IPCTL_SENDREDIRECTS = 2 // in.h:343:1:
IPCTL_STATS = 24 // in.h:365:1:
IPCTL_SUBNETSARELOCAL = 8 // in.h:349:1:
IPPORT_ANONMAX = 65535 // in.h:151:1:
IPPORT_ANONMIN = 49152 // in.h:150:1:
IPPORT_RESERVED = 1024 // in.h:149:1:
IPPORT_RESERVEDMAX = 1023 // in.h:153:1:
IPPORT_RESERVEDMIN = 600 // in.h:152:1:
IPPROTO_AH = 51 // in.h:95:1:
IPPROTO_CARP = 112 // in.h:107:1:
IPPROTO_DCCP = 33 // in.h:88:1:
IPPROTO_DONE = 257 // in.h:115:1:
IPPROTO_DSTOPTS = 60 // in.h:100:1:
IPPROTO_EGP = 8 // in.h:83:1:
IPPROTO_ENCAP = 98 // in.h:103:1:
IPPROTO_EON = 80 // in.h:101:1:
IPPROTO_ESP = 50 // in.h:94:1:
IPPROTO_ETHERIP = 97 // in.h:102:1:
IPPROTO_FRAGMENT = 44 // in.h:91:1:
IPPROTO_GGP = 3 // in.h:79:1:
IPPROTO_GRE = 47 // in.h:93:1:
IPPROTO_HOPOPTS = 0 // in.h:76:1:
IPPROTO_ICMP = 1 // in.h:77:1:
IPPROTO_ICMPV6 = 58 // in.h:98:1:
IPPROTO_IDP = 22 // in.h:86:1:
IPPROTO_IGMP = 2 // in.h:78:1:
IPPROTO_IP = 0 // in.h:75:1:
IPPROTO_IPCOMP = 108 // in.h:105:1:
IPPROTO_IPIP = 4 // in.h:81:1:
IPPROTO_IPV4 = 4 // in.h:80:1:
IPPROTO_IPV6 = 41 // in.h:89:1:
IPPROTO_IPV6_ICMP = 58 // in.h:97:1:
IPPROTO_L2TP = 115 // in.h:108:1:
IPPROTO_MAX = 256 // in.h:112:1:
IPPROTO_MOBILE = 55 // in.h:96:1:
IPPROTO_NONE = 59 // in.h:99:1:
IPPROTO_PFSYNC = 240 // in.h:110:1:
IPPROTO_PIM = 103 // in.h:104:1:
IPPROTO_PUP = 12 // in.h:84:1:
IPPROTO_RAW = 255 // in.h:111:1:
IPPROTO_ROUTING = 43 // in.h:90:1:
IPPROTO_RSVP = 46 // in.h:92:1:
IPPROTO_SCTP = 132 // in.h:109:1:
IPPROTO_TCP = 6 // in.h:82:1:
IPPROTO_TP = 29 // in.h:87:1:
IPPROTO_UDP = 17 // in.h:85:1:
IPPROTO_VRRP = 112 // in.h:106:1:
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:509:1:
IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:530:1:
IPV6CTL_ANONPORTMAX = 29 // in6.h:524:1:
IPV6CTL_ANONPORTMIN = 28 // in6.h:523:1:
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:514:1:
IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:528:1:
IPV6CTL_DAD_COUNT = 16 // in6.h:513:1:
IPV6CTL_DEFHLIM = 3 // in6.h:500:1:
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:515:1:
IPV6CTL_FORWARDING = 1 // in6.h:498:1:
IPV6CTL_FORWSRCRT = 5 // in6.h:502:1:
IPV6CTL_GIF_HLIM = 19 // in6.h:516:1:
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:512:1:
IPV6CTL_IFQ = 42 // in6.h:534:1:
IPV6CTL_KAME_VERSION = 20 // in6.h:517:1:
IPV6CTL_KEEPFAITH = 13 // in6.h:510:1:
IPV6CTL_LOG_INTERVAL = 14 // in6.h:511:1:
IPV6CTL_LOWPORTMAX = 31 // in6.h:526:1:
IPV6CTL_LOWPORTMIN = 30 // in6.h:525:1:
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:506:1:
IPV6CTL_MAXFRAGS = 41 // in6.h:533:1:
IPV6CTL_MRTPROTO = 8 // in6.h:505:1:
IPV6CTL_MRTSTATS = 7 // in6.h:504:1:
IPV6CTL_RR_PRUNE = 22 // in6.h:519:1:
IPV6CTL_RTADV_MAXROUTES = 43 // in6.h:535:1:
IPV6CTL_RTADV_NUMROUTES = 44 // in6.h:537:1:
IPV6CTL_SENDREDIRECTS = 2 // in6.h:499:1:
IPV6CTL_SOURCECHECK = 10 // in6.h:507:1:
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:508:1:
IPV6CTL_STATS = 6 // in6.h:503:1:
IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:531:1:
IPV6CTL_USE_DEPRECATED = 21 // in6.h:518:1:
IPV6CTL_V6ONLY = 24 // in6.h:521:1:
IPV6PORT_ANONMAX = 65535 // in6.h:115:1:
IPV6PORT_ANONMIN = 49152 // in6.h:114:1:
IPV6PORT_RESERVED = 1024 // in6.h:113:1:
IPV6PORT_RESERVEDMAX = 1023 // in6.h:117:1:
IPV6PORT_RESERVEDMIN = 600 // in6.h:116:1:
IPV6_CHECKSUM = 26 // in6.h:405:1:
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:453:1:
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:454:1:
IPV6_DONTFRAG = 62 // in6.h:441:1:
IPV6_DSTOPTS = 50 // in6.h:432:1:
IPV6_FAITH = 29 // in6.h:409:1:
IPV6_HOPLIMIT = 47 // in6.h:429:1:
IPV6_HOPOPTS = 49 // in6.h:431:1:
IPV6_IPSEC_POLICY = 28 // in6.h:408:1:
IPV6_JOIN_GROUP = 12 // in6.h:388:1:
IPV6_LEAVE_GROUP = 13 // in6.h:389:1:
IPV6_MULTICAST_HOPS = 10 // in6.h:385:1:
IPV6_MULTICAST_IF = 9 // in6.h:384:1:
IPV6_MULTICAST_LOOP = 11 // in6.h:386:1:
IPV6_NEXTHOP = 48 // in6.h:430:1:
IPV6_PATHMTU = 44 // in6.h:424:1:
IPV6_PKTINFO = 46 // in6.h:428:1:
IPV6_PORTALGO = 17 // in6.h:392:1:
IPV6_PORTRANGE = 14 // in6.h:390:1:
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:484:1:
IPV6_PORTRANGE_HIGH = 1 // in6.h:485:1:
IPV6_PORTRANGE_LOW = 2 // in6.h:486:1:
IPV6_PREFER_TEMPADDR = 63 // in6.h:442:1:
IPV6_RECVDSTOPTS = 40 // in6.h:418:1:
IPV6_RECVHOPLIMIT = 37 // in6.h:415:1:
IPV6_RECVHOPOPTS = 39 // in6.h:417:1:
IPV6_RECVPATHMTU = 43 // in6.h:423:1:
IPV6_RECVPKTINFO = 36 // in6.h:414:1:
IPV6_RECVRTHDR = 38 // in6.h:416:1:
IPV6_RECVTCLASS = 57 // in6.h:435:1:
IPV6_RTHDR = 51 // in6.h:433:1:
IPV6_RTHDRDSTOPTS = 35 // in6.h:412:1:
IPV6_RTHDR_LOOSE = 0 // in6.h:446:1:
IPV6_RTHDR_STRICT = 1 // in6.h:447:1:
IPV6_RTHDR_TYPE_0 = 0 // in6.h:448:1:
IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:382:1:
IPV6_TCLASS = 61 // in6.h:440:1:
IPV6_UNICAST_HOPS = 4 // in6.h:383:1:
IPV6_USE_MIN_MTU = 42 // in6.h:422:1:
IPV6_V6ONLY = 27 // in6.h:406:1:
IP_ADD_MEMBERSHIP = 12 // in.h:283:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:312:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:311:1:
IP_DROP_MEMBERSHIP = 13 // in.h:284:1:
IP_ERRORMTU = 21 // in.h:288:1:
IP_HDRINCL = 2 // in.h:272:1:
IP_IPSEC_POLICY = 22 // in.h:289:1:
IP_MAX_MEMBERSHIPS = 20 // in.h:313:1:
IP_MINTTL = 24 // in.h:291:1:
IP_MULTICAST_IF = 9 // in.h:279:1:
IP_MULTICAST_LOOP = 11 // in.h:281:1:
IP_MULTICAST_TTL = 10 // in.h:280:1:
IP_OPTIONS = 1 // in.h:271:1:
IP_PKTINFO = 25 // in.h:292:1:
IP_PORTALGO = 18 // in.h:285:1:
IP_PORTRANGE = 19 // in.h:286:1:
IP_PORTRANGE_DEFAULT = 0 // in.h:327:1:
IP_PORTRANGE_HIGH = 1 // in.h:328:1:
IP_PORTRANGE_LOW = 2 // in.h:329:1:
IP_RECVDSTADDR = 7 // in.h:277:1:
IP_RECVIF = 20 // in.h:287:1:
IP_RECVOPTS = 5 // in.h:275:1:
IP_RECVPKTINFO = 26 // in.h:293:1:
IP_RECVRETOPTS = 6 // in.h:276:1:
IP_RECVTTL = 23 // in.h:290:1:
IP_RETOPTS = 8 // in.h:278:1:
IP_SENDSRCADDR = 7 // in.h:295:1:
IP_TOS = 3 // in.h:273:1:
IP_TTL = 4 // in.h:274:1:
LITTLE_ENDIAN = 1234 // endian.h:100:1:
MSG_BCAST = 0x0100 // socket.h:497:1:
MSG_CMSG_CLOEXEC = 0x0800 // socket.h:501:1:
MSG_CONTROLMBUF = 0x2000000 // socket.h:515:1:
MSG_CTRUNC = 0x0020 // socket.h:494:1:
MSG_DONTROUTE = 0x0004 // socket.h:491:1:
MSG_DONTWAIT = 0x0080 // socket.h:496:1:
MSG_EOR = 0x0008 // socket.h:492:1:
MSG_IOVUSRSPACE = 0x4000000 // socket.h:516:1:
MSG_LENUSRSPACE = 0x8000000 // socket.h:517:1:
MSG_MCAST = 0x0200 // socket.h:498:1:
MSG_NAMEMBUF = 0x1000000 // socket.h:514:1:
MSG_NBIO = 0x1000 // socket.h:502:1:
MSG_NOSIGNAL = 0x0400 // socket.h:499:1:
MSG_NOTIFICATION = 0x4000 // socket.h:504:1:
MSG_OOB = 0x0001 // socket.h:489:1:
MSG_PEEK = 0x0002 // socket.h:490:1:
MSG_TRUNC = 0x0010 // socket.h:493:1:
MSG_USERFLAGS = 0x0ffffff // socket.h:513:1:
MSG_WAITALL = 0x0040 // socket.h:495:1:
MSG_WAITFORONE = 0x2000 // socket.h:503:1:
NBBY = 8 // types.h:316:1:
NET_RT_DUMP = 1 // socket.h:457:1:
NET_RT_FLAGS = 2 // socket.h:458:1:
NET_RT_IFLIST = 6 // socket.h:462:1:
NET_RT_OIFLIST = 5 // socket.h:461:1:
NET_RT_OOIFLIST = 4 // socket.h:460:1:
NET_RT_OOOIFLIST = 3 // socket.h:459:1:
NFDBITS = 32 // fd_set.h:93:1:
NODEVMAJOR = -1 // types.h:258:1:
PCB_ALL = 0 // socket.h:444:1:
PCB_SLOP = 20 // socket.h:443:1:
PDP_ENDIAN = 3412 // endian.h:102:1:
PF_APPLETALK = 16 // socket.h:334:1:
PF_ARP = 28 // socket.h:351:1:
PF_BLUETOOTH = 31 // socket.h:355:1:
PF_CAN = 35 // socket.h:358:1:
PF_CCITT = 10 // socket.h:328:1:
PF_CHAOS = 5 // socket.h:322:1:
PF_CNT = 21 // socket.h:341:1:
PF_COIP = 20 // socket.h:340:1:
PF_DATAKIT = 9 // socket.h:327:1:
PF_DECnet = 12 // socket.h:330:1:
PF_DLI = 13 // socket.h:331:1:
PF_E164 = 26 // socket.h:349:1:
PF_ECMA = 8 // socket.h:326:1:
PF_ETHER = 36 // socket.h:359:1:
PF_HYLINK = 15 // socket.h:333:1:
PF_IMPLINK = 3 // socket.h:320:1:
PF_INET = 2 // socket.h:319:1:
PF_INET6 = 24 // socket.h:342:1:
PF_IPX = 23 // socket.h:343:1:
PF_ISDN = 26 // socket.h:348:1:
PF_ISO = 7 // socket.h:324:1:
PF_KEY = 29 // socket.h:353:1:
PF_LAT = 14 // socket.h:332:1:
PF_LINK = 18 // socket.h:336:1:
PF_LOCAL = 1 // socket.h:317:1:
PF_MAX = 37 // socket.h:361:1:
PF_MPLS = 33 // socket.h:356:1:
PF_NATM = 27 // socket.h:350:1:
PF_NS = 6 // socket.h:323:1:
PF_OROUTE = 17 // socket.h:335:1:
PF_OSI = 7 // socket.h:325:1:
PF_PIP = 25 // socket.h:346:1:
PF_PUP = 4 // socket.h:321:1:
PF_ROUTE = 34 // socket.h:357:1:
PF_RTIP = 22 // socket.h:345:1:
PF_SNA = 11 // socket.h:329:1:
PF_UNIX = 1 // socket.h:318:1:
PF_UNSPEC = 0 // socket.h:316:1:
PF_XTP = 19 // socket.h:338:1:
PTRDIFF_MAX = 9223372036854775807 // common_int_limits.h:121:1:
PTRDIFF_MIN = -9223372036854775808 // common_int_limits.h:120:1:
SCM_CREDS = 0x10 // socket.h:581:1:
SCM_RIGHTS = 0x01 // socket.h:576:1:
SCM_TIMESTAMP = 0x08 // socket.h:580:1:
SHUT_RD = 0 // socket.h:587:1:
SHUT_RDWR = 2 // socket.h:589:1:
SHUT_WR = 1 // socket.h:588:1:
SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1:
SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1:
SIN6_LEN = 0 // in6.h:144:1:
SIZE_MAX = 18446744073709551615 // common_int_limits.h:128:1:
SOCK_CLOEXEC = 0x10000000 // socket.h:113:1:
SOCK_CONN_DGRAM = 6 // socket.h:110:1:
SOCK_DCCP = 6 // socket.h:111:1:
SOCK_DGRAM = 2 // socket.h:106:1:
SOCK_FLAGS_MASK = 0xf0000000 // socket.h:116:1:
SOCK_NONBLOCK = 0x20000000 // socket.h:114:1:
SOCK_NOSIGPIPE = 0x40000000 // socket.h:115:1:
SOCK_RAW = 3 // socket.h:107:1:
SOCK_RDM = 4 // socket.h:108:1:
SOCK_SEQPACKET = 5 // socket.h:109:1:
SOCK_STREAM = 1 // socket.h:105:1:
SOL_SOCKET = 0xffff // socket.h:195:1:
SOMAXCONN = 128 // socket.h:470:1:
SO_ACCEPTCONN = 0x0002 // socket.h:122:1:
SO_ACCEPTFILTER = 0x1000 // socket.h:133:1:
SO_BROADCAST = 0x0020 // socket.h:126:1:
SO_DEBUG = 0x0001 // socket.h:121:1:
SO_DEFOPTS = 27645 // socket.h:138:1:
SO_DONTROUTE = 0x0010 // socket.h:125:1:
SO_ERROR = 0x1007 // socket.h:169:1:
SO_KEEPALIVE = 0x0008 // socket.h:124:1:
SO_LINGER = 0x0080 // socket.h:128:1:
SO_NOHEADER = 0x100a // socket.h:173:1:
SO_NOSIGPIPE = 0x0800 // socket.h:132:1:
SO_OOBINLINE = 0x0100 // socket.h:129:1:
SO_OVERFLOWED = 0x1009 // socket.h:171:1:
SO_RCVBUF = 0x1002 // socket.h:164:1:
SO_RCVLOWAT = 0x1004 // socket.h:166:1:
SO_RCVTIMEO = 0x100c // socket.h:178:1:
SO_RERROR = 0x4000 // socket.h:135:1:
SO_REUSEADDR = 0x0004 // socket.h:123:1:
SO_REUSEPORT = 0x0200 // socket.h:130:1:
SO_SNDBUF = 0x1001 // socket.h:163:1:
SO_SNDLOWAT = 0x1003 // socket.h:165:1:
SO_SNDTIMEO = 0x100b // socket.h:177:1:
SO_TIMESTAMP = 0x2000 // socket.h:134:1:
SO_TYPE = 0x1008 // socket.h:170:1:
SO_USELOOPBACK = 0x0040 // socket.h:127:1:
UINT16_MAX = 65535 // common_int_limits.h:59:1:
UINT32_MAX = 4294967295 // common_int_limits.h:60:1:
UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1:
UINT8_MAX = 255 // common_int_limits.h:58:1:
UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1:
UINTPTR_MAX = 18446744073709551615 // common_int_limits.h:106:1:
UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1:
UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1:
UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1:
UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1:
UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1:
UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1:
UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1:
UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1:
UIO_MAXIOV = 1024 // uio.h:97:1:
WCHAR_MAX = 0x7fffffff // wchar_limits.h:41:1:
WCHAR_MIN = -2147483648 // wchar_limits.h:40:1:
WINT_MAX = 0x7fffffff // wchar_limits.h:45:1:
WINT_MIN = -2147483648 // wchar_limits.h:44:1:
X_AMD64_BYTE_SWAP_H_ = 0 // byte_swap.h:37:1:
X_AMD64_INT_CONST_H_ = 0 // int_const.h:33:1:
X_AMD64_INT_LIMITS_H_ = 0 // int_limits.h:33:1:
X_AMD64_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1:
X_AMD64_INT_TYPES_H_ = 0 // int_types.h:35:1:
X_AMD64_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1:
X_BIG_ENDIAN = 4321 // endian.h:44:1:
X_BSD_INT16_T_ = 0 // types.h:65:1:
X_BSD_INT32_T_ = 0 // types.h:75:1:
X_BSD_INT64_T_ = 0 // types.h:85:1:
X_BSD_INT8_T_ = 0 // types.h:55:1:
X_BSD_INTPTR_T_ = 0 // stdint.h:80:1:
X_BSD_UINT16_T_ = 0 // types.h:70:1:
X_BSD_UINT32_T_ = 0 // in.h:52:1:
X_BSD_UINT64_T_ = 0 // types.h:90:1:
X_BSD_UINT8_T_ = 0 // in.h:47:1:
X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1:
X_BYTE_ORDER = 1234 // endian_machdep.h:3:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1:
X_LITTLE_ENDIAN = 1234 // endian.h:43:1:
X_LP64 = 1 // <predefined>:268:1:
X_NETBSD_SOURCE = 1 // featuretest.h:70:1:
X_NETINET6_IN6_H_ = 0 // in6.h:65:1:
X_NETINET_IN_H_ = 0 // in.h:40:1:
X_PDP_ENDIAN = 3412 // endian.h:45:1:
X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1:
X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1:
X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1:
X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1:
X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1:
X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1:
X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1:
X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1:
X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1:
X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1:
X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1:
X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1:
X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1:
X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1:
X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1:
X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1:
X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1:
X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1:
X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1:
X_QUAD_HIGHWORD = 1 // endian.h:84: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/libc/netinet/in/capi_linux_mips64le.go | vendor/modernc.org/libc/netinet/in/capi_linux_mips64le.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_amd64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_freebsd_386.go | vendor/modernc.org/libc/netinet/in/in_freebsd_386.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_386.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
BIG_ENDIAN = 4321 // _endian.h:70:1:
BYTE_ORDER = 1234 // _endian.h:72:1:
ICMP6_FILTER = 18 // in6.h:420:1:
ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47 // in6.h:638:1:
INET6_ADDRSTRLEN = 46 // in6.h:112:1:
INET_ADDRSTRLEN = 16 // in.h:130:1:
IN_CLASSA_HOST = 0x00ffffff // in.h:357:1:
IN_CLASSA_MAX = 128 // in.h:358:1:
IN_CLASSA_NET = 0xff000000 // in.h:355:1:
IN_CLASSA_NSHIFT = 24 // in.h:356:1:
IN_CLASSB_HOST = 0x0000ffff // in.h:363:1:
IN_CLASSB_MAX = 65536 // in.h:364:1:
IN_CLASSB_NET = 0xffff0000 // in.h:361:1:
IN_CLASSB_NSHIFT = 16 // in.h:362:1:
IN_CLASSC_HOST = 0x000000ff // in.h:369:1:
IN_CLASSC_NET = 0xffffff00 // in.h:367:1:
IN_CLASSC_NSHIFT = 8 // in.h:368:1:
IN_CLASSD_HOST = 0x0fffffff // in.h:379:1:
IN_CLASSD_NET = 0xf0000000 // in.h:377:1:
IN_CLASSD_NSHIFT = 28 // in.h:378:1:
IN_HISTORICAL_NETS = 0 // in.h:351:1:
IN_LOOPBACKNET = 127 // in.h:412:1:
IN_NETMASK_DEFAULT = 0xffffff00 // in.h:372:1:
IPCTL_ACCEPTSOURCEROUTE = 13 // in.h:646:1:
IPCTL_DEFTTL = 3 // in.h:634:1:
IPCTL_DIRECTEDBROADCAST = 9 // in.h:642:1:
IPCTL_FASTFORWARDING = 14 // in.h:647:1:
IPCTL_FORWARDING = 1 // in.h:632:1:
IPCTL_GIF_TTL = 16 // in.h:649:1:
IPCTL_INTRDQDROPS = 18 // in.h:651:1:
IPCTL_INTRDQMAXLEN = 17 // in.h:650:1:
IPCTL_INTRQDROPS = 11 // in.h:644:1:
IPCTL_INTRQMAXLEN = 10 // in.h:643:1:
IPCTL_SENDREDIRECTS = 2 // in.h:633:1:
IPCTL_SOURCEROUTE = 8 // in.h:641:1:
IPCTL_STATS = 12 // in.h:645:1:
IPPORT_EPHEMERALFIRST = 10000 // in.h:325:1:
IPPORT_EPHEMERALLAST = 65535 // in.h:326:1:
IPPORT_HIFIRSTAUTO = 49152 // in.h:331:1:
IPPORT_HILASTAUTO = 65535 // in.h:332:1:
IPPORT_MAX = 65535 // in.h:342:1:
IPPORT_RESERVED = 1024 // in.h:320:1:
IPPORT_RESERVEDSTART = 600 // in.h:340:1:
IPPROTO_3PC = 34 // in.h:173:1:
IPPROTO_ADFS = 68 // in.h:206:1:
IPPROTO_AH = 51 // in.h:189:1:
IPPROTO_AHIP = 61 // in.h:199:1:
IPPROTO_APES = 99 // in.h:237:1:
IPPROTO_ARGUS = 13 // in.h:153:1:
IPPROTO_AX25 = 93 // in.h:231:1:
IPPROTO_BHA = 49 // in.h:187:1:
IPPROTO_BLT = 30 // in.h:169:1:
IPPROTO_BRSATMON = 76 // in.h:214:1:
IPPROTO_CARP = 112 // in.h:247:1:
IPPROTO_CFTP = 62 // in.h:200:1:
IPPROTO_CHAOS = 16 // in.h:156:1:
IPPROTO_CMTP = 38 // in.h:177:1:
IPPROTO_CPHB = 73 // in.h:211:1:
IPPROTO_CPNX = 72 // in.h:210:1:
IPPROTO_DCCP = 33 // in.h:172:1:
IPPROTO_DDP = 37 // in.h:176:1:
IPPROTO_DGP = 86 // in.h:224:1:
IPPROTO_DIVERT = 258 // in.h:262:1:
IPPROTO_DONE = 257 // in.h:259:1:
IPPROTO_DSTOPTS = 60 // in.h:198:1:
IPPROTO_EGP = 8 // in.h:148:1:
IPPROTO_EMCON = 14 // in.h:154:1:
IPPROTO_ENCAP = 98 // in.h:236:1:
IPPROTO_EON = 80 // in.h:218:1:
IPPROTO_ESP = 50 // in.h:188:1:
IPPROTO_ETHERIP = 97 // in.h:235:1:
IPPROTO_FRAGMENT = 44 // in.h:182:1:
IPPROTO_GGP = 3 // in.h:144:1:
IPPROTO_GMTP = 100 // in.h:238:1:
IPPROTO_GRE = 47 // in.h:185:1:
IPPROTO_HELLO = 63 // in.h:201:1:
IPPROTO_HIP = 139 // in.h:243:1:
IPPROTO_HMP = 20 // in.h:159:1:
IPPROTO_HOPOPTS = 0 // in.h:142:1:
IPPROTO_ICMP = 1 // in.h:44:1:
IPPROTO_ICMPV6 = 58 // in.h:196:1:
IPPROTO_IDP = 22 // in.h:161:1:
IPPROTO_IDPR = 35 // in.h:174:1:
IPPROTO_IDRP = 45 // in.h:183:1:
IPPROTO_IGMP = 2 // in.h:143:1:
IPPROTO_IGP = 85 // in.h:223:1:
IPPROTO_IGRP = 88 // in.h:226:1:
IPPROTO_IL = 40 // in.h:179:1:
IPPROTO_INLSP = 52 // in.h:190:1:
IPPROTO_INP = 32 // in.h:171:1:
IPPROTO_IP = 0 // in.h:43:1:
IPPROTO_IPCOMP = 108 // in.h:239:1:
IPPROTO_IPCV = 71 // in.h:209:1:
IPPROTO_IPEIP = 94 // in.h:232:1:
IPPROTO_IPIP = 4 // in.h:146:1:
IPPROTO_IPPC = 67 // in.h:205:1:
IPPROTO_IPV4 = 4 // in.h:145:1:
IPPROTO_IPV6 = 41 // in.h:128:1:
IPPROTO_IRTP = 28 // in.h:167:1:
IPPROTO_KRYPTOLAN = 65 // in.h:203:1:
IPPROTO_LARP = 91 // in.h:229:1:
IPPROTO_LEAF1 = 25 // in.h:164:1:
IPPROTO_LEAF2 = 26 // in.h:165:1:
IPPROTO_MAX = 256 // in.h:256:1:
IPPROTO_MEAS = 19 // in.h:158:1:
IPPROTO_MH = 135 // in.h:241:1:
IPPROTO_MHRP = 48 // in.h:186:1:
IPPROTO_MICP = 95 // in.h:233:1:
IPPROTO_MOBILE = 55 // in.h:193:1:
IPPROTO_MPLS = 137 // in.h:249:1:
IPPROTO_MTP = 92 // in.h:230:1:
IPPROTO_MUX = 18 // in.h:157:1:
IPPROTO_ND = 77 // in.h:215:1:
IPPROTO_NHRP = 54 // in.h:192:1:
IPPROTO_NONE = 59 // in.h:197:1:
IPPROTO_NSP = 31 // in.h:170:1:
IPPROTO_NVPII = 11 // in.h:151:1:
IPPROTO_OLD_DIVERT = 254 // in.h:255:1:
IPPROTO_OSPFIGP = 89 // in.h:227:1:
IPPROTO_PFSYNC = 240 // in.h:250:1:
IPPROTO_PGM = 113 // in.h:248:1:
IPPROTO_PIGP = 9 // in.h:149:1:
IPPROTO_PIM = 103 // in.h:246:1:
IPPROTO_PRM = 21 // in.h:160:1:
IPPROTO_PUP = 12 // in.h:152:1:
IPPROTO_PVP = 75 // in.h:213:1:
IPPROTO_RAW = 255 // in.h:129:1:
IPPROTO_RCCMON = 10 // in.h:150:1:
IPPROTO_RDP = 27 // in.h:166:1:
IPPROTO_RESERVED_253 = 253 // in.h:251:1:
IPPROTO_RESERVED_254 = 254 // in.h:252:1:
IPPROTO_ROUTING = 43 // in.h:181:1:
IPPROTO_RSVP = 46 // in.h:184:1:
IPPROTO_RVD = 66 // in.h:204:1:
IPPROTO_SATEXPAK = 64 // in.h:202:1:
IPPROTO_SATMON = 69 // in.h:207:1:
IPPROTO_SCCSP = 96 // in.h:234:1:
IPPROTO_SCTP = 132 // in.h:240:1:
IPPROTO_SDRP = 42 // in.h:180:1:
IPPROTO_SEND = 259 // in.h:263:1:
IPPROTO_SHIM6 = 140 // in.h:244:1:
IPPROTO_SKIP = 57 // in.h:195:1:
IPPROTO_SPACER = 32767 // in.h:269:1:
IPPROTO_SRPC = 90 // in.h:228:1:
IPPROTO_ST = 7 // in.h:147:1:
IPPROTO_SVMTP = 82 // in.h:220:1:
IPPROTO_SWIPE = 53 // in.h:191:1:
IPPROTO_TCF = 87 // in.h:225:1:
IPPROTO_TCP = 6 // in.h:45:1:
IPPROTO_TLSP = 56 // in.h:194:1:
IPPROTO_TP = 29 // in.h:168:1:
IPPROTO_TPXX = 39 // in.h:178:1:
IPPROTO_TRUNK1 = 23 // in.h:162:1:
IPPROTO_TRUNK2 = 24 // in.h:163:1:
IPPROTO_TTP = 84 // in.h:222:1:
IPPROTO_UDP = 17 // in.h:46:1:
IPPROTO_UDPLITE = 136 // in.h:242:1:
IPPROTO_VINES = 83 // in.h:221:1:
IPPROTO_VISA = 70 // in.h:208:1:
IPPROTO_VMTP = 81 // in.h:219:1:
IPPROTO_WBEXPAK = 79 // in.h:217:1:
IPPROTO_WBMON = 78 // in.h:216:1:
IPPROTO_WSN = 74 // in.h:212:1:
IPPROTO_XNET = 15 // in.h:155:1:
IPPROTO_XTP = 36 // in.h:175:1:
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:599:1:
IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:624:1:
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:604:1:
IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:621:1:
IPV6CTL_DAD_COUNT = 16 // in6.h:603:1:
IPV6CTL_DEFHLIM = 3 // in6.h:588:1:
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:605:1:
IPV6CTL_FORWARDING = 1 // in6.h:586:1:
IPV6CTL_FORWSRCRT = 5 // in6.h:592:1:
IPV6CTL_GIF_HLIM = 19 // in6.h:606:1:
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:602:1:
IPV6CTL_INTRDQMAXLEN = 52 // in6.h:645:1:
IPV6CTL_INTRQMAXLEN = 51 // in6.h:644:1:
IPV6CTL_KAME_VERSION = 20 // in6.h:607:1:
IPV6CTL_LOG_INTERVAL = 14 // in6.h:601:1:
IPV6CTL_MAXFRAGBUCKETSIZE = 54 // in6.h:648:1:
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:596:1:
IPV6CTL_MAXFRAGS = 41 // in6.h:627:1:
IPV6CTL_MAXFRAGSPERPACKET = 53 // in6.h:647:1:
IPV6CTL_MAXID = 55 // in6.h:649:1:
IPV6CTL_MCAST_PMTU = 44 // in6.h:632:1:
IPV6CTL_MRTPROTO = 8 // in6.h:595:1:
IPV6CTL_MRTSTATS = 7 // in6.h:594:1:
IPV6CTL_NORBIT_RAIF = 49 // in6.h:640:1:
IPV6CTL_NO_RADR = 48 // in6.h:639:1:
IPV6CTL_PREFER_TEMPADDR = 37 // in6.h:623:1:
IPV6CTL_RFC6204W3 = 50 // in6.h:642:1:
IPV6CTL_RIP6STATS = 36 // in6.h:622:1:
IPV6CTL_RR_PRUNE = 22 // in6.h:609:1:
IPV6CTL_SENDREDIRECTS = 2 // in6.h:587:1:
IPV6CTL_SOURCECHECK = 10 // in6.h:597:1:
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:598:1:
IPV6CTL_STATS = 6 // in6.h:593:1:
IPV6CTL_STEALTH = 45 // in6.h:636:1:
IPV6CTL_TEMPPLTIME = 33 // in6.h:619:1:
IPV6CTL_TEMPVLTIME = 34 // in6.h:620:1:
IPV6CTL_USETEMPADDR = 32 // in6.h:618:1:
IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:625:1:
IPV6CTL_USE_DEPRECATED = 21 // in6.h:608:1:
IPV6CTL_V6ONLY = 24 // in6.h:613:1:
IPV6PORT_ANONMAX = 65535 // in6.h:89:1:
IPV6PORT_ANONMIN = 49152 // in6.h:88:1:
IPV6PORT_RESERVED = 1024 // in6.h:87:1:
IPV6PORT_RESERVEDMAX = 1023 // in6.h:91:1:
IPV6PORT_RESERVEDMIN = 600 // in6.h:90:1:
IPV6PROTO_MAXID = 104 // in6.h:581:1:
IPV6_AUTOFLOWLABEL = 59 // in6.h:484:1:
IPV6_BINDANY = 64 // in6.h:493:1:
IPV6_BINDMULTI = 65 // in6.h:495:1:
IPV6_BINDV6ONLY = 27 // in6.h:435:1:
IPV6_CHECKSUM = 26 // in6.h:432:1:
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:527:1:
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:528:1:
IPV6_DONTFRAG = 62 // in6.h:487:1:
IPV6_DSTOPTS = 50 // in6.h:475:1:
IPV6_FLOWID = 67 // in6.h:497:1:
IPV6_FLOWTYPE = 68 // in6.h:498:1:
IPV6_FW_ADD = 30 // in6.h:441:1:
IPV6_FW_DEL = 31 // in6.h:442:1:
IPV6_FW_FLUSH = 32 // in6.h:443:1:
IPV6_FW_GET = 34 // in6.h:445:1:
IPV6_FW_ZERO = 33 // in6.h:444:1:
IPV6_HOPLIMIT = 47 // in6.h:472:1:
IPV6_HOPOPTS = 49 // in6.h:474:1:
IPV6_IPSEC_POLICY = 28 // in6.h:438:1:
IPV6_JOIN_GROUP = 12 // in6.h:417:1:
IPV6_LEAVE_GROUP = 13 // in6.h:418:1:
IPV6_MAX_GROUP_SRC_FILTER = 512 // in6.h:539:1:
IPV6_MAX_MEMBERSHIPS = 4095 // in6.h:533:1:
IPV6_MAX_SOCK_SRC_FILTER = 128 // in6.h:540:1:
IPV6_MSFILTER = 74 // in6.h:510:1:
IPV6_MULTICAST_HOPS = 10 // in6.h:415:1:
IPV6_MULTICAST_IF = 9 // in6.h:414:1:
IPV6_MULTICAST_LOOP = 11 // in6.h:416:1:
IPV6_NEXTHOP = 48 // in6.h:473:1:
IPV6_ORIGDSTADDR = 72 // in6.h:503:1:
IPV6_PATHMTU = 44 // in6.h:463:1:
IPV6_PKTINFO = 46 // in6.h:471:1:
IPV6_PORTRANGE = 14 // in6.h:419:1:
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:570:1:
IPV6_PORTRANGE_HIGH = 1 // in6.h:571:1:
IPV6_PORTRANGE_LOW = 2 // in6.h:572:1:
IPV6_PREFER_TEMPADDR = 63 // in6.h:489:1:
IPV6_RECVDSTOPTS = 40 // in6.h:455:1:
IPV6_RECVFLOWID = 70 // in6.h:500:1:
IPV6_RECVHOPLIMIT = 37 // in6.h:452:1:
IPV6_RECVHOPOPTS = 39 // in6.h:454:1:
IPV6_RECVORIGDSTADDR = 72 // in6.h:504:1:
IPV6_RECVPATHMTU = 43 // in6.h:461:1:
IPV6_RECVPKTINFO = 36 // in6.h:451:1:
IPV6_RECVRSSBUCKETID = 71 // in6.h:501:1:
IPV6_RECVRTHDR = 38 // in6.h:453:1:
IPV6_RECVTCLASS = 57 // in6.h:482:1:
IPV6_RSSBUCKETID = 69 // in6.h:499:1:
IPV6_RSS_LISTEN_BUCKET = 66 // in6.h:496:1:
IPV6_RTHDR = 51 // in6.h:476:1:
IPV6_RTHDRDSTOPTS = 35 // in6.h:449:1:
IPV6_RTHDR_LOOSE = 0 // in6.h:520:1:
IPV6_RTHDR_STRICT = 1 // in6.h:521:1:
IPV6_RTHDR_TYPE_0 = 0 // in6.h:522:1:
IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:412:1:
IPV6_TCLASS = 61 // in6.h:486:1:
IPV6_UNICAST_HOPS = 4 // in6.h:413:1:
IPV6_USE_MIN_MTU = 42 // in6.h:460:1:
IPV6_V6ONLY = 27 // in6.h:433:1:
IPV6_VLAN_PCP = 75 // in6.h:515:1:
IP_ADD_MEMBERSHIP = 12 // in.h:434:1:
IP_ADD_SOURCE_MEMBERSHIP = 70 // in.h:490:1:
IP_BINDANY = 24 // in.h:447:1:
IP_BINDMULTI = 25 // in.h:448:1:
IP_BLOCK_SOURCE = 72 // in.h:492:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:521:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:520:1:
IP_DONTFRAG = 67 // in.h:486:1:
IP_DROP_MEMBERSHIP = 13 // in.h:435:1:
IP_DROP_SOURCE_MEMBERSHIP = 71 // in.h:491:1:
IP_DUMMYNET3 = 49 // in.h:465:1:
IP_DUMMYNET_CONFIGURE = 60 // in.h:479:1:
IP_DUMMYNET_DEL = 61 // in.h:480:1:
IP_DUMMYNET_FLUSH = 62 // in.h:481:1:
IP_DUMMYNET_GET = 64 // in.h:482:1:
IP_FLOWID = 90 // in.h:511:1:
IP_FLOWTYPE = 91 // in.h:512:1:
IP_FW3 = 48 // in.h:464:1:
IP_FW_ADD = 50 // in.h:467:1:
IP_FW_DEL = 51 // in.h:468:1:
IP_FW_FLUSH = 52 // in.h:469:1:
IP_FW_GET = 54 // in.h:471:1:
IP_FW_NAT_CFG = 56 // in.h:474:1:
IP_FW_NAT_DEL = 57 // in.h:475:1:
IP_FW_NAT_GET_CONFIG = 58 // in.h:476:1:
IP_FW_NAT_GET_LOG = 59 // in.h:477:1:
IP_FW_RESETLOG = 55 // in.h:472:1:
IP_FW_TABLE_ADD = 40 // in.h:458:1:
IP_FW_TABLE_DEL = 41 // in.h:459:1:
IP_FW_TABLE_FLUSH = 42 // in.h:460:1:
IP_FW_TABLE_GETSIZE = 43 // in.h:461:1:
IP_FW_TABLE_LIST = 44 // in.h:462:1:
IP_FW_ZERO = 53 // in.h:470:1:
IP_HDRINCL = 2 // in.h:422:1:
IP_IPSEC_POLICY = 21 // in.h:444:1:
IP_MAX_GROUP_SRC_FILTER = 512 // in.h:532:1:
IP_MAX_MEMBERSHIPS = 4095 // in.h:526:1:
IP_MAX_SOCK_MUTE_FILTER = 128 // in.h:534:1:
IP_MAX_SOCK_SRC_FILTER = 128 // in.h:533:1:
IP_MINTTL = 66 // in.h:485:1:
IP_MSFILTER = 74 // in.h:496:1:
IP_MULTICAST_IF = 9 // in.h:430:1:
IP_MULTICAST_LOOP = 11 // in.h:433:1:
IP_MULTICAST_TTL = 10 // in.h:432:1:
IP_MULTICAST_VIF = 14 // in.h:436:1:
IP_ONESBCAST = 23 // in.h:446:1:
IP_OPTIONS = 1 // in.h:421:1:
IP_ORIGDSTADDR = 27 // in.h:450:1:
IP_PORTRANGE = 19 // in.h:441:1:
IP_PORTRANGE_DEFAULT = 0 // in.h:625:1:
IP_PORTRANGE_HIGH = 1 // in.h:626:1:
IP_PORTRANGE_LOW = 2 // in.h:627:1:
IP_RECVDSTADDR = 7 // in.h:427:1:
IP_RECVFLOWID = 93 // in.h:514:1:
IP_RECVIF = 20 // in.h:442:1:
IP_RECVOPTS = 5 // in.h:425:1:
IP_RECVORIGDSTADDR = 27 // in.h:451:1:
IP_RECVRETOPTS = 6 // in.h:426:1:
IP_RECVRSSBUCKETID = 94 // in.h:515:1:
IP_RECVTOS = 68 // in.h:487:1:
IP_RECVTTL = 65 // in.h:484:1:
IP_RETOPTS = 8 // in.h:429:1:
IP_RSSBUCKETID = 92 // in.h:513:1:
IP_RSS_LISTEN_BUCKET = 26 // in.h:449:1:
IP_RSVP_OFF = 16 // in.h:438:1:
IP_RSVP_ON = 15 // in.h:437:1:
IP_RSVP_VIF_OFF = 18 // in.h:440:1:
IP_RSVP_VIF_ON = 17 // in.h:439:1:
IP_SENDSRCADDR = 7 // in.h:428:1:
IP_TOS = 3 // in.h:423:1:
IP_TTL = 4 // in.h:424:1:
IP_UNBLOCK_SOURCE = 73 // in.h:493:1:
IP_VLAN_PCP = 75 // in.h:499:1:
LITTLE_ENDIAN = 1234 // _endian.h:69:1:
MCAST_BLOCK_SOURCE = 84 // in.h:507:1:
MCAST_EXCLUDE = 2 // in.h:619:1:
MCAST_INCLUDE = 1 // in.h:618:1:
MCAST_JOIN_GROUP = 80 // in.h:503:1:
MCAST_JOIN_SOURCE_GROUP = 82 // in.h:505:1:
MCAST_LEAVE_GROUP = 81 // in.h:504:1:
MCAST_LEAVE_SOURCE_GROUP = 83 // in.h:506:1:
MCAST_UNBLOCK_SOURCE = 85 // in.h:508:1:
MCAST_UNDEFINED = 0 // in.h:617:1:
PDP_ENDIAN = 3412 // _endian.h:71:1:
SIN6_LEN = 0 // in6.h:122:1:
X_BIG_ENDIAN = 4321 // _endian.h:47:1:
X_BYTEORDER_FUNC_DEFINED = 0 // in.h:118:1:
X_BYTEORDER_PROTOTYPED = 0 // in.h:108:1:
X_BYTE_ORDER = 1234 // _endian.h:40:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_ILP32 = 1 // <predefined>:1:1:
X_IN_ADDR_T_DECLARED = 0 // in.h:68:1:
X_IN_PORT_T_DECLARED = 0 // in.h:73:1:
X_LITTLE_ENDIAN = 1234 // _endian.h:46:1:
X_MACHINE_ENDIAN_H_ = 0 // endian.h:36:1:
X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1:
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
X_NETINET6_IN6_H_ = 0 // in6.h:71:1:
X_NETINET_IN_H_ = 0 // in.h:36:1:
X_Nonnull = 0 // cdefs.h:790:1:
X_Null_unspecified = 0 // cdefs.h:792:1:
X_Nullable = 0 // cdefs.h:791:1:
X_PDP_ENDIAN = 3412 // _endian.h:48:1:
X_QUAD_HIGHWORD = 1 // _endian.h:55:1:
X_QUAD_LOWWORD = 0 // _endian.h:56:1:
X_SA_FAMILY_T_DECLARED = 0 // in.h:78:1:
X_SIZE_T_DECLARED = 0 // in6.h:701:1:
X_SOCKLEN_T_DECLARED = 0 // in.h:91:1:
X_SS_MAXSIZE = 128 // _sockaddr_storage.h:41:1:
X_STRUCT_IN_ADDR_DECLARED = 0 // in.h:86:1:
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
X_SYS__ENDIAN_H_ = 0 // _endian.h:33:1:
X_SYS__SOCKADDR_STORAGE_H_ = 0 // _sockaddr_storage.h:36:1:
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
X_UINT16_T_DECLARED = 0 // in.h:58:1:
X_UINT32_T_DECLARED = 0 // in.h:63:1:
X_UINT8_T_DECLARED = 0 // in.h:53:1:
I386 = 1 // <predefined>:335:1:
Unix = 1 // <predefined>:336:1:
)
type Ptrdiff_t = int32 /* <builtin>:3:26 */
type Size_t = uint32 /* <builtin>:9:23 */
type Wchar_t = int32 /* <builtin>:15:24 */
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// -
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright (c) 1982, 1986, 1990, 1993
// The Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)in.h 8.3 (Berkeley) 1/3/94
// $FreeBSD$
// -
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
// $FreeBSD$
// Testing against Clang-specific extensions.
// This code has been put in place to help reduce the addition of
// compiler specific defines in FreeBSD code. It helps to aid in
// having a compiler-agnostic source tree.
// Compiler memory barriers, specific to gcc and clang.
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
// Macro to test if we're using a specific version of gcc or later.
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
// mode -- there must be no spaces between its arguments, and for nested
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
// concatenate double-quoted strings produced by the __STRING macro, but
// this only works with ANSI C.
//
// __XSTRING is like __STRING, but it expands any macros in its argument
// first. It is only available with ANSI C.
// Compiler-dependent macros to help declare dead (non-returning) and
// pure (no side effects) functions, and unused variables. They are
// null except for versions of gcc that are known to support the features
// properly (old versions of gcc-2 supported the dead and pure features
// in a different (wrong) way). If we do not provide an implementation
// for a given compiler, let the compile fail if it is told to use
// a feature that we cannot live without.
// Keywords added in C11.
// Emulation of C11 _Generic(). Unlike the previously defined C11
// keywords, it is not possible to implement this using exactly the same
// syntax. Therefore implement something similar under the name
// __generic(). Unlike _Generic(), this macro can only distinguish
// between a single type, so it requires nested invocations to
// distinguish multiple cases.
// C99 Static array indices in function parameter declarations. Syntax such as:
// void bar(int myArray[static 10]);
// is allowed in C99 but not in C++. Define __min_size appropriately so
// headers using it can be compiled in either language. Use like this:
// void bar(int myArray[__min_size(10)]);
// XXX: should use `#if __STDC_VERSION__ < 199901'.
// C++11 exposes a load of C99 stuff
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
// a way to define the `restrict' type qualifier without disturbing older
// software that is unaware of C99 keywords.
// GNU C version 2.96 adds explicit branch prediction so that
// the CPU back-end can hint the processor and also so that
// code blocks can be reordered such that the predicted path
// sees a more linear flow, thus improving cache behavior, etc.
//
// The following two macros provide us with a way to utilize this
// compiler feature. Use __predict_true() if you expect the expression
// to evaluate to true, and __predict_false() if you expect the
// expression to evaluate to false.
//
// A few notes about usage:
//
// * Generally, __predict_false() error condition checks (unless
// you have some _strong_ reason to do otherwise, in which case
// document it), and/or __predict_true() `no-error' condition
// checks, assuming you want to optimize for the no-error case.
//
// * Other than that, if you don't know the likelihood of a test
// succeeding from empirical or other `hard' evidence, don't
// make predictions.
//
// * These are meant to be used in places that are run `a lot'.
// It is wasteful to make predictions in code that is run
// seldomly (e.g. at subsystem initialization time) as the
// basic block reordering that this affects can often generate
// larger code.
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
// require it.
// Given the pointer x to the member m of the struct s, return
// a pointer to the containing structure. When using GCC, we first
// assign pointer x to a local variable, to check that its type is
// compatible with member m.
// Compiler-dependent macros to declare that functions take printf-like
// or scanf-like arguments. They are null except for versions of gcc
// that are known to support the features properly (old versions of gcc-2
// didn't permit keeping the keywords out of the application namespace).
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
// Embed the rcs id of a source file in the resulting library. Note that in
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
// Usage:
// __FBSDID("$FreeBSD$");
// -
// The following definitions are an extension of the behavior originally
// implemented in <sys/_posix.h>, but with a different level of granularity.
// POSIX.1 requires that the macros we test be defined before any standard
// header file is included.
//
// Here's a quick run-down of the versions:
// defined(_POSIX_SOURCE) 1003.1-1988
// _POSIX_C_SOURCE == 1 1003.1-1990
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
// _POSIX_C_SOURCE == 199309 1003.1b-1993
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
// and the omnibus ISO/IEC 9945-1: 1996
// _POSIX_C_SOURCE == 200112 1003.1-2001
// _POSIX_C_SOURCE == 200809 1003.1-2008
//
| 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/netinet/in/capi_linux_s390x.go | vendor/modernc.org/libc/netinet/in/capi_linux_s390x.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_s390x.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/capi_darwin_amd64.go | vendor/modernc.org/libc/netinet/in/capi_darwin_amd64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_darwin_amd64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{
"__darwin_check_fd_set": {},
"__darwin_check_fd_set_overflow": {},
"__darwin_fd_clr": {},
"__darwin_fd_isset": {},
"__darwin_fd_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/netinet/in/capi_linux_arm64.go | vendor/modernc.org/libc/netinet/in/capi_linux_arm64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o netinet/in/in_linux_arm64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_linux_amd64.go | vendor/modernc.org/libc/netinet/in/in_linux_amd64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_amd64.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
AF_ALG = 38 // socket.h:133:1:
AF_APPLETALK = 5 // socket.h:99:1:
AF_ASH = 18 // socket.h:113:1:
AF_ATMPVC = 8 // socket.h:102:1:
AF_ATMSVC = 20 // socket.h:115:1:
AF_AX25 = 3 // socket.h:97:1:
AF_BLUETOOTH = 31 // socket.h:126:1:
AF_BRIDGE = 7 // socket.h:101:1:
AF_CAIF = 37 // socket.h:132:1:
AF_CAN = 29 // socket.h:124:1:
AF_DECnet = 12 // socket.h:106:1:
AF_ECONET = 19 // socket.h:114:1:
AF_FILE = 1 // socket.h:95:1:
AF_IB = 27 // socket.h:122:1:
AF_IEEE802154 = 36 // socket.h:131:1:
AF_INET = 2 // socket.h:96:1:
AF_INET6 = 10 // socket.h:104:1:
AF_IPX = 4 // socket.h:98:1:
AF_IRDA = 23 // socket.h:118:1:
AF_ISDN = 34 // socket.h:129:1:
AF_IUCV = 32 // socket.h:127:1:
AF_KCM = 41 // socket.h:136:1:
AF_KEY = 15 // socket.h:109:1:
AF_LLC = 26 // socket.h:121:1:
AF_LOCAL = 1 // socket.h:93:1:
AF_MAX = 45 // socket.h:140:1:
AF_MPLS = 28 // socket.h:123:1:
AF_NETBEUI = 13 // socket.h:107:1:
AF_NETLINK = 16 // socket.h:110:1:
AF_NETROM = 6 // socket.h:100:1:
AF_NFC = 39 // socket.h:134:1:
AF_PACKET = 17 // socket.h:112:1:
AF_PHONET = 35 // socket.h:130:1:
AF_PPPOX = 24 // socket.h:119:1:
AF_QIPCRTR = 42 // socket.h:137:1:
AF_RDS = 21 // socket.h:116:1:
AF_ROSE = 11 // socket.h:105:1:
AF_ROUTE = 16 // socket.h:111:1:
AF_RXRPC = 33 // socket.h:128:1:
AF_SECURITY = 14 // socket.h:108:1:
AF_SMC = 43 // socket.h:138:1:
AF_SNA = 22 // socket.h:117:1:
AF_TIPC = 30 // socket.h:125:1:
AF_UNIX = 1 // socket.h:94:1:
AF_UNSPEC = 0 // socket.h:92:1:
AF_VSOCK = 40 // socket.h:135:1:
AF_WANPIPE = 25 // socket.h:120:1:
AF_X25 = 9 // socket.h:103:1:
AF_XDP = 44 // socket.h:139:1:
BIG_ENDIAN = 4321 // endian.h:28:1:
BYTE_ORDER = 1234 // endian.h:30:1:
FD_SETSIZE = 1024 // select.h:73:1:
FIOGETOWN = 0x8903 // sockios.h:8:1:
FIOSETOWN = 0x8901 // sockios.h:6:1:
INET6_ADDRSTRLEN = 46 // in.h:234:1:
INET_ADDRSTRLEN = 16 // in.h:233:1:
IN_CLASSA_HOST = 16777215 // in.h:169:1:
IN_CLASSA_MAX = 128 // in.h:170:1:
IN_CLASSA_NET = 0xff000000 // in.h:167:1:
IN_CLASSA_NSHIFT = 24 // in.h:168:1:
IN_CLASSB_HOST = 65535 // in.h:175:1:
IN_CLASSB_MAX = 65536 // in.h:176:1:
IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
IN_CLASSB_NSHIFT = 16 // in.h:174:1:
IN_CLASSC_HOST = 255 // in.h:181:1:
IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
IN_CLASSC_NSHIFT = 8 // in.h:180:1:
IN_LOOPBACKNET = 127 // in.h:197:1:
IPV6_2292DSTOPTS = 4 // in.h:171:1:
IPV6_2292HOPLIMIT = 8 // in.h:175:1:
IPV6_2292HOPOPTS = 3 // in.h:170:1:
IPV6_2292PKTINFO = 2 // in.h:169:1:
IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
IPV6_2292RTHDR = 5 // in.h:172:1:
IPV6_ADDRFORM = 1 // in.h:168:1:
IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
IPV6_AUTHHDR = 10 // in.h:180:1:
IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
IPV6_CHECKSUM = 7 // in.h:174:1:
IPV6_DONTFRAG = 62 // in.h:214:1:
IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
IPV6_DSTOPTS = 59 // in.h:211:1:
IPV6_FREEBIND = 78 // in.h:233:1:
IPV6_HDRINCL = 36 // in.h:198:1:
IPV6_HOPLIMIT = 52 // in.h:204:1:
IPV6_HOPOPTS = 54 // in.h:206:1:
IPV6_IPSEC_POLICY = 34 // in.h:196:1:
IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
IPV6_JOIN_GROUP = 20 // in.h:185:1:
IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
IPV6_LEAVE_GROUP = 21 // in.h:186:1:
IPV6_MINHOPCOUNT = 73 // in.h:226:1:
IPV6_MTU = 24 // in.h:189:1:
IPV6_MTU_DISCOVER = 23 // in.h:188:1:
IPV6_MULTICAST_ALL = 29 // in.h:194:1:
IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
IPV6_MULTICAST_IF = 17 // in.h:182:1:
IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
IPV6_NEXTHOP = 9 // in.h:179:1:
IPV6_ORIGDSTADDR = 74 // in.h:228:1:
IPV6_PATHMTU = 61 // in.h:213:1:
IPV6_PKTINFO = 50 // in.h:202:1:
IPV6_PMTUDISC_DO = 2 // in.h:246:1:
IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
IPV6_RECVDSTOPTS = 58 // in.h:210:1:
IPV6_RECVERR = 25 // in.h:190:1:
IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
IPV6_RECVHOPOPTS = 53 // in.h:205:1:
IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
IPV6_RECVPATHMTU = 60 // in.h:212:1:
IPV6_RECVPKTINFO = 49 // in.h:201:1:
IPV6_RECVRTHDR = 56 // in.h:208:1:
IPV6_RECVTCLASS = 66 // in.h:217:1:
IPV6_ROUTER_ALERT = 22 // in.h:187:1:
IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
IPV6_RTHDR = 57 // in.h:209:1:
IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
IPV6_RTHDR_STRICT = 1 // in.h:257:1:
IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
IPV6_RXDSTOPTS = 59 // in.h:241:1:
IPV6_RXHOPOPTS = 54 // in.h:240:1:
IPV6_TCLASS = 67 // in.h:218:1:
IPV6_TRANSPARENT = 75 // in.h:230:1:
IPV6_UNICAST_HOPS = 16 // in.h:181:1:
IPV6_UNICAST_IF = 76 // in.h:231:1:
IPV6_V6ONLY = 26 // in.h:191:1:
IPV6_XFRM_POLICY = 35 // in.h:197:1:
IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
IP_BLOCK_SOURCE = 38 // in.h:124:1:
IP_CHECKSUM = 23 // in.h:102:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
IP_FREEBIND = 15 // in.h:89:1:
IP_HDRINCL = 3 // in.h:48:1:
IP_IPSEC_POLICY = 16 // in.h:90:1:
IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
IP_MINTTL = 21 // in.h:100:1:
IP_MSFILTER = 41 // in.h:127:1:
IP_MTU = 14 // in.h:88:1:
IP_MTU_DISCOVER = 10 // in.h:84:1:
IP_MULTICAST_ALL = 49 // in.h:128:1:
IP_MULTICAST_IF = 32 // in.h:118:1:
IP_MULTICAST_LOOP = 34 // in.h:120:1:
IP_MULTICAST_TTL = 33 // in.h:119:1:
IP_NODEFRAG = 22 // in.h:101:1:
IP_OPTIONS = 4 // in.h:47:1:
IP_ORIGDSTADDR = 20 // in.h:97:1:
IP_PASSSEC = 18 // in.h:92:1:
IP_PKTINFO = 8 // in.h:81:1:
IP_PKTOPTIONS = 9 // in.h:82:1:
IP_PMTUDISC = 10 // in.h:83:1:
IP_PMTUDISC_DO = 2 // in.h:109:1:
IP_PMTUDISC_DONT = 0 // in.h:107:1:
IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
IP_PMTUDISC_OMIT = 5 // in.h:116:1:
IP_PMTUDISC_PROBE = 3 // in.h:110:1:
IP_PMTUDISC_WANT = 1 // in.h:108:1:
IP_RECVERR = 11 // in.h:85:1:
IP_RECVFRAGSIZE = 25 // in.h:104:1:
IP_RECVOPTS = 6 // in.h:51:1:
IP_RECVORIGDSTADDR = 20 // in.h:98:1:
IP_RECVRETOPTS = 7 // in.h:53:1:
IP_RECVTOS = 13 // in.h:87:1:
IP_RECVTTL = 12 // in.h:86:1:
IP_RETOPTS = 7 // in.h:54:1:
IP_ROUTER_ALERT = 5 // in.h:80:1:
IP_TOS = 1 // in.h:49:1:
IP_TRANSPARENT = 19 // in.h:93:1:
IP_TTL = 2 // in.h:50:1:
IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
IP_UNICAST_IF = 50 // in.h:129:1:
IP_XFRM_POLICY = 17 // in.h:91:1:
LITTLE_ENDIAN = 1234 // endian.h:27:1:
MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
MCAST_EXCLUDE = 0 // in.h:76:1:
MCAST_INCLUDE = 1 // in.h:77:1:
MCAST_JOIN_GROUP = 42 // in.h:66:1:
MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
MCAST_LEAVE_GROUP = 45 // in.h:69:1:
MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
MCAST_MSFILTER = 48 // in.h:72:1:
MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
PDP_ENDIAN = 3412 // endian.h:29:1:
PF_ALG = 38 // socket.h:82:1:
PF_APPLETALK = 5 // socket.h:48:1:
PF_ASH = 18 // socket.h:62:1:
PF_ATMPVC = 8 // socket.h:51:1:
PF_ATMSVC = 20 // socket.h:64:1:
PF_AX25 = 3 // socket.h:46:1:
PF_BLUETOOTH = 31 // socket.h:75:1:
PF_BRIDGE = 7 // socket.h:50:1:
PF_CAIF = 37 // socket.h:81:1:
PF_CAN = 29 // socket.h:73:1:
PF_DECnet = 12 // socket.h:55:1:
PF_ECONET = 19 // socket.h:63:1:
PF_FILE = 1 // socket.h:44:1:
PF_IB = 27 // socket.h:71:1:
PF_IEEE802154 = 36 // socket.h:80:1:
PF_INET = 2 // socket.h:45:1:
PF_INET6 = 10 // socket.h:53:1:
PF_IPX = 4 // socket.h:47:1:
PF_IRDA = 23 // socket.h:67:1:
PF_ISDN = 34 // socket.h:78:1:
PF_IUCV = 32 // socket.h:76:1:
PF_KCM = 41 // socket.h:85:1:
PF_KEY = 15 // socket.h:58:1:
PF_LLC = 26 // socket.h:70:1:
PF_LOCAL = 1 // socket.h:42:1:
PF_MAX = 45 // socket.h:89:1:
PF_MPLS = 28 // socket.h:72:1:
PF_NETBEUI = 13 // socket.h:56:1:
PF_NETLINK = 16 // socket.h:59:1:
PF_NETROM = 6 // socket.h:49:1:
PF_NFC = 39 // socket.h:83:1:
PF_PACKET = 17 // socket.h:61:1:
PF_PHONET = 35 // socket.h:79:1:
PF_PPPOX = 24 // socket.h:68:1:
PF_QIPCRTR = 42 // socket.h:86:1:
PF_RDS = 21 // socket.h:65:1:
PF_ROSE = 11 // socket.h:54:1:
PF_ROUTE = 16 // socket.h:60:1:
PF_RXRPC = 33 // socket.h:77:1:
PF_SECURITY = 14 // socket.h:57:1:
PF_SMC = 43 // socket.h:87:1:
PF_SNA = 22 // socket.h:66:1:
PF_TIPC = 30 // socket.h:74:1:
PF_UNIX = 1 // socket.h:43:1:
PF_UNSPEC = 0 // socket.h:41:1:
PF_VSOCK = 40 // socket.h:84:1:
PF_WANPIPE = 25 // socket.h:69:1:
PF_X25 = 9 // socket.h:52:1:
PF_XDP = 44 // socket.h:88:1:
SCM_TIMESTAMP = 29 // socket.h:140:1:
SCM_TIMESTAMPING = 37 // socket.h:142:1:
SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
SCM_TIMESTAMPNS = 35 // socket.h:141:1:
SCM_TXTIME = 61 // socket.h:105:1:
SCM_WIFI_STATUS = 41 // socket.h:64:1:
SIOCATMARK = 0x8905 // sockios.h:10:1:
SIOCGPGRP = 0x8904 // sockios.h:9:1:
SIOCGSTAMP = 0x8906 // sockios.h:11:1:
SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
SIOCSPGRP = 0x8902 // sockios.h:7:1:
SOL_AAL = 265 // socket.h:151:1:
SOL_ALG = 279 // socket.h:165:1:
SOL_ATM = 264 // socket.h:150:1:
SOL_BLUETOOTH = 274 // socket.h:160:1:
SOL_CAIF = 278 // socket.h:164:1:
SOL_DCCP = 269 // socket.h:155:1:
SOL_DECNET = 261 // socket.h:147:1:
SOL_ICMPV6 = 58 // in.h:253:1:
SOL_IP = 0 // in.h:132:1:
SOL_IPV6 = 41 // in.h:252:1:
SOL_IRDA = 266 // socket.h:152:1:
SOL_IUCV = 277 // socket.h:163:1:
SOL_KCM = 281 // socket.h:167:1:
SOL_LLC = 268 // socket.h:154:1:
SOL_NETBEUI = 267 // socket.h:153:1:
SOL_NETLINK = 270 // socket.h:156:1:
SOL_NFC = 280 // socket.h:166:1:
SOL_PACKET = 263 // socket.h:149:1:
SOL_PNPIPE = 275 // socket.h:161:1:
SOL_PPPOL2TP = 273 // socket.h:159:1:
SOL_RAW = 255 // socket.h:146:1:
SOL_RDS = 276 // socket.h:162:1:
SOL_RXRPC = 272 // socket.h:158:1:
SOL_SOCKET = 1 // socket.h:9:1:
SOL_TIPC = 271 // socket.h:157:1:
SOL_TLS = 282 // socket.h:168:1:
SOL_X25 = 262 // socket.h:148:1:
SOL_XDP = 283 // socket.h:169:1:
SOMAXCONN = 4096 // socket.h:172:1:
SO_ACCEPTCONN = 30 // socket.h:51:1:
SO_ATTACH_BPF = 50 // socket.h:82:1:
SO_ATTACH_FILTER = 26 // socket.h:45:1:
SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
SO_BINDTODEVICE = 25 // socket.h:42:1:
SO_BINDTOIFINDEX = 62 // socket.h:107:1:
SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
SO_BROADCAST = 6 // socket.h:16:1:
SO_BSDCOMPAT = 14 // socket.h:26:1:
SO_BUSY_POLL = 46 // socket.h:74:1:
SO_CNX_ADVICE = 53 // socket.h:88:1:
SO_COOKIE = 57 // socket.h:96:1:
SO_DEBUG = 1 // socket.h:11:1:
SO_DETACH_BPF = 27 // socket.h:83:1:
SO_DETACH_FILTER = 27 // socket.h:46:1:
SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
SO_DOMAIN = 39 // socket.h:59:1:
SO_DONTROUTE = 5 // socket.h:15:1:
SO_ERROR = 4 // socket.h:14:1:
SO_GET_FILTER = 26 // socket.h:47:1:
SO_INCOMING_CPU = 49 // socket.h:80:1:
SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
SO_KEEPALIVE = 9 // socket.h:21:1:
SO_LINGER = 13 // socket.h:25:1:
SO_LOCK_FILTER = 44 // socket.h:70:1:
SO_MARK = 36 // socket.h:56:1:
SO_MAX_PACING_RATE = 47 // socket.h:76:1:
SO_MEMINFO = 55 // socket.h:92:1:
SO_NOFCS = 43 // socket.h:68:1:
SO_NO_CHECK = 11 // socket.h:23:1:
SO_OOBINLINE = 10 // socket.h:22:1:
SO_PASSCRED = 16 // socket.h:29:1:
SO_PASSSEC = 34 // socket.h:54:1:
SO_PEEK_OFF = 42 // socket.h:65:1:
SO_PEERCRED = 17 // socket.h:30:1:
SO_PEERGROUPS = 59 // socket.h:100:1:
SO_PEERNAME = 28 // socket.h:49:1:
SO_PEERSEC = 31 // socket.h:53:1:
SO_PRIORITY = 12 // socket.h:24:1:
SO_PROTOCOL = 38 // socket.h:58:1:
SO_RCVBUF = 8 // socket.h:18:1:
SO_RCVBUFFORCE = 33 // socket.h:20:1:
SO_RCVLOWAT = 18 // socket.h:31:1:
SO_RCVTIMEO = 20 // socket.h:129:1:
SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
SO_REUSEADDR = 2 // socket.h:12:1:
SO_REUSEPORT = 15 // socket.h:27:1:
SO_RXQ_OVFL = 40 // socket.h:61:1:
SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
SO_SNDBUF = 7 // socket.h:17:1:
SO_SNDBUFFORCE = 32 // socket.h:19:1:
SO_SNDLOWAT = 19 // socket.h:32:1:
SO_SNDTIMEO = 21 // socket.h:130:1:
SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
SO_TIMESTAMP = 29 // socket.h:125:1:
SO_TIMESTAMPING = 37 // socket.h:127:1:
SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
SO_TIMESTAMPNS = 35 // socket.h:126:1:
SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
SO_TXTIME = 61 // socket.h:104:1:
SO_TYPE = 3 // socket.h:13:1:
SO_WIFI_STATUS = 41 // socket.h:63:1:
SO_ZEROCOPY = 60 // socket.h:102:1:
X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
X_ATFILE_SOURCE = 1 // features.h:342:1:
X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
X_BITS_ENDIAN_H = 1 // endian.h:20:1:
X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
X_BITS_TIME64_H = 1 // time64.h:24:1:
X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
X_BITS_TYPES_H = 1 // types.h:24:1:
X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
X_DEFAULT_SOURCE = 1 // features.h:227:1:
X_ENDIAN_H = 1 // endian.h:19:1:
X_FEATURES_H = 1 // features.h:19:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_GCC_SIZE_T = 0 // stddef.h:195:1:
X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
X_LP64 = 1 // <predefined>:284:1:
X_NETINET_IN_H = 1 // in.h:19:1:
X_POSIX_C_SOURCE = 200809 // features.h:281:1:
X_POSIX_SOURCE = 1 // features.h:279:1:
X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
X_SIZET_ = 0 // stddef.h:196:1:
X_SIZE_T = 0 // stddef.h:183:1:
X_SIZE_T_ = 0 // stddef.h:188:1:
X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
X_SS_SIZE = 128 // sockaddr.h:40:1:
X_STDC_PREDEF_H = 1 // <predefined>:162:1:
X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
X_SYS_SELECT_H = 1 // select.h:22:1:
X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
X_SYS_SOCKET_H = 1 // socket.h:20:1:
X_SYS_TYPES_H = 1 // types.h:23:1:
X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
X_T_SIZE = 0 // stddef.h:186:1:
X_T_SIZE_ = 0 // stddef.h:185:1:
Linux = 1 // <predefined>:231:1:
Unix = 1 // <predefined>:177:1:
)
// Standard well-known ports.
const ( /* in.h:122:1: */
IPPORT_ECHO = 7 // Echo service.
IPPORT_DISCARD = 9 // Discard transmissions service.
IPPORT_SYSTAT = 11 // System status service.
IPPORT_DAYTIME = 13 // Time of day service.
IPPORT_NETSTAT = 15 // Network status service.
IPPORT_FTP = 21 // File Transfer Protocol.
IPPORT_TELNET = 23 // Telnet protocol.
IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
IPPORT_TIMESERVER = 37 // Timeserver service.
IPPORT_NAMESERVER = 42 // Domain Name Service.
IPPORT_WHOIS = 43 // Internet Whois service.
IPPORT_MTP = 57
IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
IPPORT_RJE = 77
IPPORT_FINGER = 79 // Finger service.
IPPORT_TTYLINK = 87
IPPORT_SUPDUP = 95 // SUPDUP protocol.
IPPORT_EXECSERVER = 512 // execd service.
IPPORT_LOGINSERVER = 513 // rlogind service.
IPPORT_CMDSERVER = 514
IPPORT_EFSSERVER = 520
// UDP ports.
IPPORT_BIFFUDP = 512
IPPORT_WHOSERVER = 513
IPPORT_ROUTESERVER = 520
// Ports less than this value are reserved for privileged processes.
IPPORT_RESERVED = 1024
// Ports greater this value are reserved for (non-privileged) servers.
IPPORT_USERRESERVED = 5000
)
// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
// The first word in the comment at the right is the data type used;
// "bool" means a boolean value stored in an `int'.
// Advanced API (RFC3542) (1).
// Advanced API (RFC3542) (2).
// RFC5014.
// RFC5082.
// Obsolete synonyms for the above.
// IPV6_MTU_DISCOVER values.
// Socket level values for IPv6.
// Routing header options for IPv6.
// Standard well-defined IP protocols.
const ( /* in.h:40:1: */
IPPROTO_IP = 0 // Dummy protocol for TCP.
IPPROTO_ICMP = 1 // Internet Control Message Protocol.
IPPROTO_IGMP = 2 // Internet Group Management Protocol.
IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
IPPROTO_TCP = 6 // Transmission Control Protocol.
IPPROTO_EGP = 8 // Exterior Gateway Protocol.
IPPROTO_PUP = 12 // PUP protocol.
IPPROTO_UDP = 17 // User Datagram Protocol.
IPPROTO_IDP = 22 // XNS IDP protocol.
IPPROTO_TP = 29 // SO Transport Protocol Class 4.
IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
IPPROTO_IPV6 = 41 // IPv6 header.
IPPROTO_RSVP = 46 // Reservation Protocol.
IPPROTO_GRE = 47 // General Routing Encapsulation.
IPPROTO_ESP = 50 // encapsulating security payload.
IPPROTO_AH = 51 // authentication header.
IPPROTO_MTP = 92 // Multicast Transport Protocol.
IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
IPPROTO_ENCAP = 98 // Encapsulation Header.
IPPROTO_PIM = 103 // Protocol Independent Multicast.
IPPROTO_COMP = 108 // Compression Header Protocol.
IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
IPPROTO_MPLS = 137 // MPLS in IP.
IPPROTO_RAW = 255 // Raw IP packets.
IPPROTO_MAX = 256
)
// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
//
// network headers first and we should use those ABI-identical definitions
// instead of our own, otherwise 0.
const ( /* in.h:99:1: */
IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
IPPROTO_ROUTING = 43 // IPv6 routing header.
IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
IPPROTO_ICMPV6 = 58 // ICMPv6.
IPPROTO_NONE = 59 // IPv6 no next header.
IPPROTO_DSTOPTS = 60 // IPv6 destination options.
IPPROTO_MH = 135
)
// Bits in the FLAGS argument to `send', `recv', et al.
const ( /* socket.h:200:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
MSG_CTRUNC = 8 // Control data lost before delivery.
MSG_PROXY = 16 // Supply or ask second address.
MSG_TRUNC = 32
MSG_DONTWAIT = 64 // Nonblocking IO.
MSG_EOR = 128 // End of record.
MSG_WAITALL = 256 // Wait for a full request.
MSG_FIN = 512
MSG_SYN = 1024
MSG_CONFIRM = 2048 // Confirm path validity.
MSG_RST = 4096
MSG_ERRQUEUE = 8192 // Fetch message from error queue.
MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
MSG_MORE = 32768 // Sender will send more.
MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
MSG_BATCH = 262144 // sendmmsg: more messages coming.
MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
MSG_CMSG_CLOEXEC = 1073741824
)
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
const ( /* socket.h:332:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Types of sockets.
const ( /* socket_type.h:24:1: */
SOCK_STREAM = 1 // Sequenced, reliable, connection-based
// byte streams.
SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
// of fixed maximum length.
SOCK_RAW = 3 // Raw protocol interface.
SOCK_RDM = 4 // Reliably-delivered messages.
SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
// datagrams of fixed maximum length.
SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
| 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/netinet/in/capi_linux_loong64.go | vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_loong64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/capi_linux_ppc64le.go | vendor/modernc.org/libc/netinet/in/capi_linux_ppc64le.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_ppc64le.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/in_openbsd_amd64.go | vendor/modernc.org/libc/netinet/in/in_openbsd_amd64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_openbsd_amd64.go -pkgname in', DO NOT EDIT.
package in
import (
"math"
"reflect"
"sync/atomic"
"unsafe"
)
var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
const (
BIG_ENDIAN = 4321 // endian.h:45:1:
BYTE_ORDER = 1234 // endian.h:47:1:
ICMP6_FILTER = 18 // in6.h:304:1:
INET6_ADDRSTRLEN = 46 // in6.h:97:1:
INET_ADDRSTRLEN = 16 // in.h:382:1:
IN_CLASSA_MAX = 128 // in.h:195:1:
IN_CLASSA_NSHIFT = 24 // in.h:193:1:
IN_CLASSB_MAX = 65536 // in.h:202:1:
IN_CLASSB_NSHIFT = 16 // in.h:200:1:
IN_CLASSC_NSHIFT = 8 // in.h:207:1:
IN_CLASSD_NSHIFT = 28 // in.h:214:1:
IN_LOOPBACKNET = 127 // in.h:253:1:
IN_RFC3021_NSHIFT = 31 // in.h:219:1:
IPCTL_ARPDOWN = 40 // in.h:698:1:
IPCTL_ARPQUEUE = 41 // in.h:699:1:
IPCTL_ARPQUEUED = 36 // in.h:694:1:
IPCTL_ARPTIMEOUT = 39 // in.h:697:1:
IPCTL_DEFTTL = 3 // in.h:662:1:
IPCTL_DIRECTEDBCAST = 6 // in.h:664:1:
IPCTL_ENCDEBUG = 12 // in.h:670:1:
IPCTL_FORWARDING = 1 // in.h:660:1:
IPCTL_IFQUEUE = 30 // in.h:688:1:
IPCTL_IPPORT_FIRSTAUTO = 7 // in.h:665:1:
IPCTL_IPPORT_HIFIRSTAUTO = 9 // in.h:667:1:
IPCTL_IPPORT_HILASTAUTO = 10 // in.h:668:1:
IPCTL_IPPORT_LASTAUTO = 8 // in.h:666:1:
IPCTL_IPPORT_MAXQUEUE = 11 // in.h:669:1:
IPCTL_IPSEC_ALLOCATIONS = 18 // in.h:676:1:
IPCTL_IPSEC_AUTH_ALGORITHM = 26 // in.h:684:1:
IPCTL_IPSEC_BYTES = 20 // in.h:678:1:
IPCTL_IPSEC_EMBRYONIC_SA_TIMEOUT = 15 // in.h:673:1:
IPCTL_IPSEC_ENC_ALGORITHM = 25 // in.h:683:1:
IPCTL_IPSEC_EXPIRE_ACQUIRE = 14 // in.h:672:1:
IPCTL_IPSEC_FIRSTUSE = 24 // in.h:682:1:
IPCTL_IPSEC_IPCOMP_ALGORITHM = 29 // in.h:687:1:
IPCTL_IPSEC_REQUIRE_PFS = 16 // in.h:674:1:
IPCTL_IPSEC_SOFT_ALLOCATIONS = 17 // in.h:675:1:
IPCTL_IPSEC_SOFT_BYTES = 19 // in.h:677:1:
IPCTL_IPSEC_SOFT_FIRSTUSE = 23 // in.h:681:1:
IPCTL_IPSEC_SOFT_TIMEOUT = 22 // in.h:680:1:
IPCTL_IPSEC_STATS = 13 // in.h:671:1:
IPCTL_IPSEC_TIMEOUT = 21 // in.h:679:1:
IPCTL_MAXID = 42 // in.h:700:1:
IPCTL_MFORWARDING = 31 // in.h:689:1:
IPCTL_MRTMFC = 37 // in.h:695:1:
IPCTL_MRTPROTO = 34 // in.h:692:1:
IPCTL_MRTSTATS = 35 // in.h:693:1:
IPCTL_MRTVIF = 38 // in.h:696:1:
IPCTL_MTUDISC = 27 // in.h:685:1:
IPCTL_MTUDISCTIMEOUT = 28 // in.h:686:1:
IPCTL_MULTIPATH = 32 // in.h:690:1:
IPCTL_SENDREDIRECTS = 2 // in.h:661:1:
IPCTL_SOURCEROUTE = 5 // in.h:663:1:
IPCTL_STATS = 33 // in.h:691:1:
IPPORT_HIFIRSTAUTO = 49152 // in.h:159:1:
IPPORT_HILASTAUTO = 65535 // in.h:160:1:
IPPORT_RESERVED = 1024 // in.h:153:1:
IPPORT_USERRESERVED = 49151 // in.h:154:1:
IPPROTO_AH = 51 // in.h:89:1:
IPPROTO_CARP = 112 // in.h:99:1:
IPPROTO_DIVERT = 258 // in.h:109:1:
IPPROTO_DONE = 257 // in.h:173:1:
IPPROTO_DSTOPTS = 60 // in.h:93:1:
IPPROTO_EGP = 8 // in.h:78:1:
IPPROTO_ENCAP = 98 // in.h:96:1:
IPPROTO_EON = 80 // in.h:94:1:
IPPROTO_ESP = 50 // in.h:88:1:
IPPROTO_ETHERIP = 97 // in.h:95:1:
IPPROTO_FRAGMENT = 44 // in.h:85:1:
IPPROTO_GGP = 3 // in.h:74:1:
IPPROTO_GRE = 47 // in.h:87:1:
IPPROTO_HOPOPTS = 0 // in.h:71:1:
IPPROTO_ICMP = 1 // in.h:72:1:
IPPROTO_ICMPV6 = 58 // in.h:91:1:
IPPROTO_IDP = 22 // in.h:81:1:
IPPROTO_IGMP = 2 // in.h:73:1:
IPPROTO_IP = 0 // in.h:70:1:
IPPROTO_IPCOMP = 108 // in.h:98:1:
IPPROTO_IPIP = 4 // in.h:75:1:
IPPROTO_IPV4 = 4 // in.h:76:1:
IPPROTO_IPV6 = 41 // in.h:83:1:
IPPROTO_MAX = 256 // in.h:106:1:
IPPROTO_MAXID = 259 // in.h:393:1:
IPPROTO_MOBILE = 55 // in.h:90:1:
IPPROTO_MPLS = 137 // in.h:102:1:
IPPROTO_NONE = 59 // in.h:92:1:
IPPROTO_PFSYNC = 240 // in.h:103:1:
IPPROTO_PIM = 103 // in.h:97:1:
IPPROTO_PUP = 12 // in.h:79:1:
IPPROTO_RAW = 255 // in.h:104:1:
IPPROTO_ROUTING = 43 // in.h:84:1:
IPPROTO_RSVP = 46 // in.h:86:1:
IPPROTO_SCTP = 132 // in.h:100:1:
IPPROTO_TCP = 6 // in.h:77:1:
IPPROTO_TP = 29 // in.h:82:1:
IPPROTO_UDP = 17 // in.h:80:1:
IPPROTO_UDPLITE = 136 // in.h:101:1:
IPSEC6_OUTSA = 56 // in6.h:337:1:
IPSEC_AUTH_LEVEL_DEFAULT = 1 // in.h:336:1:
IPSEC_ESP_NETWORK_LEVEL_DEFAULT = 1 // in.h:338:1:
IPSEC_ESP_TRANS_LEVEL_DEFAULT = 1 // in.h:337:1:
IPSEC_IPCOMP_LEVEL_DEFAULT = 1 // in.h:339:1:
IPSEC_LEVEL_AVAIL = 0x01 // in.h:330:1:
IPSEC_LEVEL_BYPASS = 0x00 // in.h:328:1:
IPSEC_LEVEL_DEFAULT = 1 // in.h:334:1:
IPSEC_LEVEL_NONE = 0x00 // in.h:329:1:
IPSEC_LEVEL_REQUIRE = 0x03 // in.h:332:1:
IPSEC_LEVEL_UNIQUE = 0x04 // in.h:333:1:
IPSEC_LEVEL_USE = 0x02 // in.h:331:1:
IPV6CTL_ACCEPT_RTADV = 12 // in6.h:575:1:
IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:579:1:
IPV6CTL_DAD_COUNT = 16 // in6.h:578:1:
IPV6CTL_DAD_PENDING = 49 // in6.h:589:1:
IPV6CTL_DEFHLIM = 3 // in6.h:567:1:
IPV6CTL_DEFMCASTHLIM = 18 // in6.h:580:1:
IPV6CTL_FORWARDING = 1 // in6.h:565:1:
IPV6CTL_FORWSRCRT = 5 // in6.h:568:1:
IPV6CTL_HDRNESTLIMIT = 15 // in6.h:577:1:
IPV6CTL_IFQUEUE = 51 // in6.h:591:1:
IPV6CTL_LOG_INTERVAL = 14 // in6.h:576:1:
IPV6CTL_MAXDYNROUTES = 48 // in6.h:588:1:
IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:572:1:
IPV6CTL_MAXFRAGS = 41 // in6.h:583:1:
IPV6CTL_MAXID = 55 // in6.h:595:1:
IPV6CTL_MCAST_PMTU = 44 // in6.h:586:1:
IPV6CTL_MFORWARDING = 42 // in6.h:584:1:
IPV6CTL_MRTMFC = 53 // in6.h:593:1:
IPV6CTL_MRTMIF = 52 // in6.h:592:1:
IPV6CTL_MRTPROTO = 8 // in6.h:571:1:
IPV6CTL_MRTSTATS = 7 // in6.h:570:1:
IPV6CTL_MTUDISCTIMEOUT = 50 // in6.h:590:1:
IPV6CTL_MULTIPATH = 43 // in6.h:585:1:
IPV6CTL_NEIGHBORGCTHRESH = 45 // in6.h:587:1:
IPV6CTL_SENDREDIRECTS = 2 // in6.h:566:1:
IPV6CTL_SOIIKEY = 54 // in6.h:594:1:
IPV6CTL_SOURCECHECK = 10 // in6.h:573:1:
IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:574:1:
IPV6CTL_STATS = 6 // in6.h:569:1:
IPV6CTL_USE_DEPRECATED = 21 // in6.h:581:1:
IPV6PROTO_MAXID = 259 // in6.h:470:1:
IPV6_AUTH_LEVEL = 53 // in6.h:333:1:
IPV6_AUTOFLOWLABEL = 59 // in6.h:341:1:
IPV6_CHECKSUM = 26 // in6.h:307:1:
IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:360:1:
IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:361:1:
IPV6_DONTFRAG = 62 // in6.h:345:1:
IPV6_DSTOPTS = 50 // in6.h:330:1:
IPV6_ESP_NETWORK_LEVEL = 55 // in6.h:335:1:
IPV6_ESP_TRANS_LEVEL = 54 // in6.h:334:1:
IPV6_HOPLIMIT = 47 // in6.h:327:1:
IPV6_HOPOPTS = 49 // in6.h:329:1:
IPV6_IPCOMP_LEVEL = 60 // in6.h:342:1:
IPV6_JOIN_GROUP = 12 // in6.h:300:1:
IPV6_LEAVE_GROUP = 13 // in6.h:301:1:
IPV6_MINHOPCOUNT = 65 // in6.h:349:1:
IPV6_MULTICAST_HOPS = 10 // in6.h:298:1:
IPV6_MULTICAST_IF = 9 // in6.h:297:1:
IPV6_MULTICAST_LOOP = 11 // in6.h:299:1:
IPV6_NEXTHOP = 48 // in6.h:328:1:
IPV6_PATHMTU = 44 // in6.h:322:1:
IPV6_PIPEX = 63 // in6.h:346:1:
IPV6_PKTINFO = 46 // in6.h:326:1:
IPV6_PORTRANGE = 14 // in6.h:302:1:
IPV6_PORTRANGE_DEFAULT = 0 // in6.h:393:1:
IPV6_PORTRANGE_HIGH = 1 // in6.h:394:1:
IPV6_PORTRANGE_LOW = 2 // in6.h:395:1:
IPV6_RECVDSTOPTS = 40 // in6.h:317:1:
IPV6_RECVDSTPORT = 64 // in6.h:348:1:
IPV6_RECVHOPLIMIT = 37 // in6.h:314:1:
IPV6_RECVHOPOPTS = 39 // in6.h:316:1:
IPV6_RECVPATHMTU = 43 // in6.h:320:1:
IPV6_RECVPKTINFO = 36 // in6.h:313:1:
IPV6_RECVRTHDR = 38 // in6.h:315:1:
IPV6_RECVTCLASS = 57 // in6.h:339:1:
IPV6_RTABLE = 0x1021 // in6.h:351:1:
IPV6_RTHDR = 51 // in6.h:331:1:
IPV6_RTHDRDSTOPTS = 35 // in6.h:311:1:
IPV6_RTHDR_LOOSE = 0 // in6.h:354:1:
IPV6_RTHDR_TYPE_0 = 0 // in6.h:355:1:
IPV6_TCLASS = 61 // in6.h:344:1:
IPV6_UNICAST_HOPS = 4 // in6.h:296:1:
IPV6_USE_MIN_MTU = 42 // in6.h:319:1:
IPV6_V6ONLY = 27 // in6.h:308:1:
IP_ADD_MEMBERSHIP = 12 // in.h:297:1:
IP_AUTH_LEVEL = 20 // in.h:300:1:
IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:347:1:
IP_DEFAULT_MULTICAST_TTL = 1 // in.h:346:1:
IP_DROP_MEMBERSHIP = 13 // in.h:298:1:
IP_ESP_NETWORK_LEVEL = 22 // in.h:302:1:
IP_ESP_TRANS_LEVEL = 21 // in.h:301:1:
IP_HDRINCL = 2 // in.h:287:1:
IP_IPCOMP_LEVEL = 29 // in.h:309:1:
IP_IPDEFTTL = 37 // in.h:317:1:
IP_IPSECFLOWINFO = 36 // in.h:316:1:
IP_IPSEC_LOCAL_AUTH = 27 // in.h:307:1:
IP_IPSEC_LOCAL_CRED = 25 // in.h:305:1:
IP_IPSEC_LOCAL_ID = 23 // in.h:303:1:
IP_IPSEC_REMOTE_AUTH = 28 // in.h:308:1:
IP_IPSEC_REMOTE_CRED = 26 // in.h:306:1:
IP_IPSEC_REMOTE_ID = 24 // in.h:304:1:
IP_MAX_MEMBERSHIPS = 4095 // in.h:354:1:
IP_MINTTL = 32 // in.h:312:1:
IP_MIN_MEMBERSHIPS = 15 // in.h:353:1:
IP_MULTICAST_IF = 9 // in.h:294:1:
IP_MULTICAST_LOOP = 11 // in.h:296:1:
IP_MULTICAST_TTL = 10 // in.h:295:1:
IP_OPTIONS = 1 // in.h:286:1:
IP_PIPEX = 34 // in.h:314:1:
IP_PORTRANGE = 19 // in.h:299:1:
IP_PORTRANGE_DEFAULT = 0 // in.h:374:1:
IP_PORTRANGE_HIGH = 1 // in.h:375:1:
IP_PORTRANGE_LOW = 2 // in.h:376:1:
IP_RECVDSTADDR = 7 // in.h:292:1:
IP_RECVDSTPORT = 33 // in.h:313:1:
IP_RECVIF = 30 // in.h:310:1:
IP_RECVOPTS = 5 // in.h:290:1:
IP_RECVRETOPTS = 6 // in.h:291:1:
IP_RECVRTABLE = 35 // in.h:315:1:
IP_RECVTTL = 31 // in.h:311:1:
IP_RETOPTS = 8 // in.h:293:1:
IP_RTABLE = 0x1021 // in.h:321:1:
IP_SENDSRCADDR = 7 // in.h:318:1:
IP_TOS = 3 // in.h:288:1:
IP_TTL = 4 // in.h:289:1:
LITTLE_ENDIAN = 1234 // endian.h:44:1:
PDP_ENDIAN = 3412 // endian.h:46:1:
SIN6_LEN = 0 // in6.h:104:1:
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
X_BYTE_ORDER = 1234 // endian.h:58:1:
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
X_IN_ADDR_DECLARED = 0 // in.h:163:1:
X_IN_TYPES_DEFINED_ = 0 // in.h:62:1:
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
X_LP64 = 1 // <predefined>:1:1:
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
X_NETINET6_IN6_H_ = 0 // in6.h:69:1:
X_NETINET_IN_H_ = 0 // in.h:39:1:
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
X_PID_T_DEFINED_ = 0 // types.h:167:1:
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
X_RET_PROTECTOR = 1 // <predefined>:2:1:
X_SA_FAMILY_T_DEFINED_ = 0 // in.h:57:1:
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
X_SOCKLEN_T_DEFINED_ = 0 // in6.h:400:1:
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
X_STACKALIGNBYTES = 15 // _types.h:49:1:
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
X_SYS_TYPES_H_ = 0 // types.h:41:1:
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
Unix = 1 // <predefined>:344:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
type Size_t = uint64 /* <builtin>:9:23 */
type Wchar_t = int32 /* <builtin>:15:24 */
type X__int128_t = struct {
Flo int64
Fhi int64
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
type X__uint128_t = struct {
Flo uint64
Fhi uint64
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// $OpenBSD: in.h,v 1.141 2021/06/02 00:09:57 dlg Exp $
// $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $
// Copyright (c) 1982, 1986, 1990, 1993
// The Regents of the University of California. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
// Constants and structures defined by the internet system,
// Per RFC 790, September 1981, and numerous additions.
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
// Public domain.
// Macro to test if we're using a specific version of gcc or later.
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
// in between its arguments. Do not use __CONCAT on double-quoted strings,
// such as those from the __STRING macro: to concatenate strings just put
// them next to each other.
// GCC1 and some versions of GCC2 declare dead (non-returning) and
// pure (no side effects) functions using "volatile" and "const";
// unfortunately, these then cause warnings under "-ansi -pedantic".
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
// the distribution version of 2.5.5).
// __returns_twice makes the compiler not assume the function
// only returns once. This affects registerisation of variables:
// even local variables need to be in memory across such a call.
// Example: setjmp()
// __only_inline makes the compiler only use this function definition
// for inlining; references that can't be inlined will be left as
// external references instead of generating a local copy. The
// matching library should include a simple extern definition for
// the function to handle those references. c.f. ctype.h
// GNU C version 2.96 adds explicit branch prediction so that
// the CPU back-end can hint the processor and also so that
// code blocks can be reordered such that the predicted path
// sees a more linear flow, thus improving cache behavior, etc.
//
// The following two macros provide us with a way to utilize this
// compiler feature. Use __predict_true() if you expect the expression
// to evaluate to true, and __predict_false() if you expect the
// expression to evaluate to false.
//
// A few notes about usage:
//
// * Generally, __predict_false() error condition checks (unless
// you have some _strong_ reason to do otherwise, in which case
// document it), and/or __predict_true() `no-error' condition
// checks, assuming you want to optimize for the no-error case.
//
// * Other than that, if you don't know the likelihood of a test
// succeeding from empirical or other `hard' evidence, don't
// make predictions.
//
// * These are meant to be used in places that are run `a lot'.
// It is wasteful to make predictions in code that is run
// seldomly (e.g. at subsystem initialization time) as the
// basic block reordering that this affects can often generate
// larger code.
// Delete pseudo-keywords wherever they are not available or needed.
// The __packed macro indicates that a variable or structure members
// should have the smallest possible alignment, despite any host CPU
// alignment requirements.
//
// The __aligned(x) macro specifies the minimum alignment of a
// variable or structure.
//
// These macros together are useful for describing the layout and
// alignment of messages exchanged with hardware or other systems.
// "The nice thing about standards is that there are so many to choose from."
// There are a number of "feature test macros" specified by (different)
// standards that determine which interfaces and types the header files
// should expose.
//
// Because of inconsistencies in these macros, we define our own
// set in the private name space that end in _VISIBLE. These are
// always defined and so headers can test their values easily.
// Things can get tricky when multiple feature macros are defined.
// We try to take the union of all the features requested.
//
// The following macros are guaranteed to have a value after cdefs.h
// has been included:
// __POSIX_VISIBLE
// __XPG_VISIBLE
// __ISO_C_VISIBLE
// __BSD_VISIBLE
// X/Open Portability Guides and Single Unix Specifications.
// _XOPEN_SOURCE XPG3
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
// _XOPEN_SOURCE == 500 XPG5
// _XOPEN_SOURCE == 520 XPG5v2
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
//
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
// POSIX macros, these checks must follow the XOPEN ones above.
//
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
// _POSIX_C_SOURCE == 1 1003.1-1990
// _POSIX_C_SOURCE == 2 1003.2-1992
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
// and the omnibus ISO/IEC 9945-1:1996
// _POSIX_C_SOURCE == 200112L 1003.1-2001
// _POSIX_C_SOURCE == 200809L 1003.1-2008
//
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
// this may be overridden by the _ISOC99_SOURCE macro later.
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
// If the user defines it in addition to one of the POSIX or XOPEN
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
// override any of the other macros since they are non-exclusive.
// Finally deal with BSD-specific interfaces that are not covered
// by any standards. We expose these when none of the POSIX or XPG
// macros is defined or if the user explicitly asks for them.
// Default values.
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
// -
// Copyright (c) 1982, 1986, 1991, 1993
// The Regents of the University of California. All rights reserved.
// (c) UNIX System Laboratories, Inc.
// All or some portions of this file are derived from material licensed
// to the University of California by American Telephone and Telegraph
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
// the permission of UNIX System Laboratories, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)types.h 8.4 (Berkeley) 1/21/94
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
//
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
// -
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Public definitions for little- and big-endian systems.
// This file should be included as <endian.h> in userspace and as
// <sys/endian.h> in the kernel.
//
// System headers that need endian information but that can't or don't
// want to export the public names here should include <sys/_endian.h>
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
// Copyright (c) 1991, 1993
// The Regents of the University of California. All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Berkeley Software Design, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
| 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/netinet/in/capi_netbsd_amd64.go | vendor/modernc.org/libc/netinet/in/capi_netbsd_amd64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_netbsd_amd64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| 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/netinet/in/capi_freebsd_arm64.go | vendor/modernc.org/libc/netinet/in/capi_freebsd_arm64.go | // Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_freebsd_amd64.go -pkgname in', DO NOT EDIT.
package in
var CAPI = map[string]struct{}{}
| go | Apache-2.0 | b3b4703e958c25d54c4d48138d9e80ae32fadac3 | 2026-01-07T09:44:30.792320Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.