From 5ddf26b549b4ef2df76b12b642f0cdd0e17c9471 Mon Sep 17 00:00:00 2001 From: Mahdi Sharifi Date: Wed, 24 Jan 2024 12:34:33 +0330 Subject: [PATCH 1/7] Add a basic implementation for the Zig port with proper testings --- cmake/FindZig.cmake | 47 + source/ports/CMakeLists.txt | 2 + source/ports/zig_port/.gitignore | 6 + source/ports/zig_port/CMakeLists.txt | 56 + source/ports/zig_port/metacall.zig | 18 - .../ports/zig_port/src/metacall-bindings.zig | 2675 +++++++++++++++++ source/ports/zig_port/src/root.zig | 117 + .../ports/zig_port/src/tests/integrated.zig | 42 + source/ports/zig_port/src/tests/test.c | 25 + source/ports/zig_port/src/tests/test.py | 2 + .../tests/metacall_rust_test/CMakeLists.txt | 2 +- tools/metacall-configure.ps1 | 13 + tools/metacall-configure.sh | 13 + 13 files changed, 2999 insertions(+), 19 deletions(-) create mode 100644 cmake/FindZig.cmake create mode 100644 source/ports/zig_port/.gitignore create mode 100644 source/ports/zig_port/CMakeLists.txt delete mode 100644 source/ports/zig_port/metacall.zig create mode 100644 source/ports/zig_port/src/metacall-bindings.zig create mode 100644 source/ports/zig_port/src/root.zig create mode 100644 source/ports/zig_port/src/tests/integrated.zig create mode 100644 source/ports/zig_port/src/tests/test.c create mode 100644 source/ports/zig_port/src/tests/test.py diff --git a/cmake/FindZig.cmake b/cmake/FindZig.cmake new file mode 100644 index 000000000..28769f7b0 --- /dev/null +++ b/cmake/FindZig.cmake @@ -0,0 +1,47 @@ +# +# CMake Find Zig by Parra Studios +# CMake script to find Zig compiler and tools. +# +# Copyright (C) 2016 - 2022 Vicente Eduardo Ferrer Garcia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Find Zig executables and paths +# +# Zig_FOUND - True if Zig was found +# Zig_COMPILER_EXECUTABLE - Zig compiler executable path + +# Options +# +# Zig_CMAKE_DEBUG - Print the debug information and all constants values + +option(Zig_CMAKE_DEBUG "Show full output of the Zig related commands for debugging." OFF) + +find_program(Zig_COMPILER_EXECUTABLE zig +) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(Zig + FOUND_VAR Zig_FOUND +) + +mark_as_advanced( + Zig_FOUND + Zig_COMPILER_EXECUTABLE +) + +if(Zig_CMAKE_DEBUG) + message(STATUS "Zig_COMPILER_EXECUTABLE: ${Zig_COMPILER_EXECUTABLE}") +endif() diff --git a/source/ports/CMakeLists.txt b/source/ports/CMakeLists.txt index 06a624c5b..c27949d5f 100644 --- a/source/ports/CMakeLists.txt +++ b/source/ports/CMakeLists.txt @@ -42,6 +42,7 @@ option(OPTION_BUILD_PORTS_R "Build R port." OFF) option(OPTION_BUILD_PORTS_RB "Build Ruby port." ON) option(OPTION_BUILD_PORTS_RS "Build Rust port." OFF) option(OPTION_BUILD_PORTS_TS "Build TypeScript port." OFF) +option(OPTION_BUILD_PORTS_ZIG "Build Zig port." OFF) # # Port languages (Standalone) @@ -52,6 +53,7 @@ add_subdirectory(node_port) add_subdirectory(py_port) add_subdirectory(go_port) add_subdirectory(rs_port) +add_subdirectory(zig_port) # # External dependencies diff --git a/source/ports/zig_port/.gitignore b/source/ports/zig_port/.gitignore new file mode 100644 index 000000000..556a043dd --- /dev/null +++ b/source/ports/zig_port/.gitignore @@ -0,0 +1,6 @@ +# Zig cache and binary directories +zig-cache +zig-out + +# Python loader cache in testings +src/tests/__pycache__ \ No newline at end of file diff --git a/source/ports/zig_port/CMakeLists.txt b/source/ports/zig_port/CMakeLists.txt new file mode 100644 index 000000000..72f2ff33b --- /dev/null +++ b/source/ports/zig_port/CMakeLists.txt @@ -0,0 +1,56 @@ +# Check if this port is enabled +if(NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_ZIG) + return() +endif() + +# +# Port name and options +# + +find_package(Zig) + +if(NOT Zig_FOUND) + message(SEND_ERROR "Zig not found") + return() +endif() + +# Target name +set(target zig_port) + +# Exit here if required dependencies are not met +message(STATUS "Port ${target}") + +# Build Zig Port +if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(TARGET_BUILD_TYPE "-Doptimize=ReleaseFast") +else() + set(TARGET_BUILD_TYPE) +endif() + +# +# Define test +# + +add_test(NAME ${target} + COMMAND ${Zig_COMPILER_EXECUTABLE} build test + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +include(TestEnvironmentVariables) +include(Portability) + +project_library_path(TEST_LIB_PATH + ${PROJECT_OUTPUT_DIR} +) + +test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} + "${PROJECT_LIBRARY_PATH_NAME}=${TEST_LIB_PATH}" + "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" + "PROJECT_OUTPUT_DIR=${PROJECT_OUTPUT_DIR}" +) diff --git a/source/ports/zig_port/metacall.zig b/source/ports/zig_port/metacall.zig deleted file mode 100644 index e5aaaa487..000000000 --- a/source/ports/zig_port/metacall.zig +++ /dev/null @@ -1,18 +0,0 @@ -fn metacall(comptime R: type, method: []const u8, args: anytype) !R { - const T = @TypeOf(args); - const fields = meta.fields(T); - - var args: [fields.len]MetaCall.Arg = undefined; - var last: usize = 0; - - defer for (args[0..last]) |arg| metacall_value_destroy(arg); - inline for (fields) |field, index| { - last = index; - args[index] = try metacall_value_create(field.field_type, @field(args, field.name)); - } - - const ret = metacallv_s(method, args.len, &args); - defer metacall_value_destroy(ret); - - return metacall_value_to(R, ret); -} diff --git a/source/ports/zig_port/src/metacall-bindings.zig b/source/ports/zig_port/src/metacall-bindings.zig new file mode 100644 index 000000000..05243d242 --- /dev/null +++ b/source/ports/zig_port/src/metacall-bindings.zig @@ -0,0 +1,2675 @@ +pub const __builtin_bswap16 = @import("std").zig.c_builtins.__builtin_bswap16; +pub const __builtin_bswap32 = @import("std").zig.c_builtins.__builtin_bswap32; +pub const __builtin_bswap64 = @import("std").zig.c_builtins.__builtin_bswap64; +pub const __builtin_signbit = @import("std").zig.c_builtins.__builtin_signbit; +pub const __builtin_signbitf = @import("std").zig.c_builtins.__builtin_signbitf; +pub const __builtin_popcount = @import("std").zig.c_builtins.__builtin_popcount; +pub const __builtin_ctz = @import("std").zig.c_builtins.__builtin_ctz; +pub const __builtin_clz = @import("std").zig.c_builtins.__builtin_clz; +pub const __builtin_sqrt = @import("std").zig.c_builtins.__builtin_sqrt; +pub const __builtin_sqrtf = @import("std").zig.c_builtins.__builtin_sqrtf; +pub const __builtin_sin = @import("std").zig.c_builtins.__builtin_sin; +pub const __builtin_sinf = @import("std").zig.c_builtins.__builtin_sinf; +pub const __builtin_cos = @import("std").zig.c_builtins.__builtin_cos; +pub const __builtin_cosf = @import("std").zig.c_builtins.__builtin_cosf; +pub const __builtin_exp = @import("std").zig.c_builtins.__builtin_exp; +pub const __builtin_expf = @import("std").zig.c_builtins.__builtin_expf; +pub const __builtin_exp2 = @import("std").zig.c_builtins.__builtin_exp2; +pub const __builtin_exp2f = @import("std").zig.c_builtins.__builtin_exp2f; +pub const __builtin_log = @import("std").zig.c_builtins.__builtin_log; +pub const __builtin_logf = @import("std").zig.c_builtins.__builtin_logf; +pub const __builtin_log2 = @import("std").zig.c_builtins.__builtin_log2; +pub const __builtin_log2f = @import("std").zig.c_builtins.__builtin_log2f; +pub const __builtin_log10 = @import("std").zig.c_builtins.__builtin_log10; +pub const __builtin_log10f = @import("std").zig.c_builtins.__builtin_log10f; +pub const __builtin_abs = @import("std").zig.c_builtins.__builtin_abs; +pub const __builtin_labs = @import("std").zig.c_builtins.__builtin_labs; +pub const __builtin_llabs = @import("std").zig.c_builtins.__builtin_llabs; +pub const __builtin_fabs = @import("std").zig.c_builtins.__builtin_fabs; +pub const __builtin_fabsf = @import("std").zig.c_builtins.__builtin_fabsf; +pub const __builtin_floor = @import("std").zig.c_builtins.__builtin_floor; +pub const __builtin_floorf = @import("std").zig.c_builtins.__builtin_floorf; +pub const __builtin_ceil = @import("std").zig.c_builtins.__builtin_ceil; +pub const __builtin_ceilf = @import("std").zig.c_builtins.__builtin_ceilf; +pub const __builtin_trunc = @import("std").zig.c_builtins.__builtin_trunc; +pub const __builtin_truncf = @import("std").zig.c_builtins.__builtin_truncf; +pub const __builtin_round = @import("std").zig.c_builtins.__builtin_round; +pub const __builtin_roundf = @import("std").zig.c_builtins.__builtin_roundf; +pub const __builtin_strlen = @import("std").zig.c_builtins.__builtin_strlen; +pub const __builtin_strcmp = @import("std").zig.c_builtins.__builtin_strcmp; +pub const __builtin_object_size = @import("std").zig.c_builtins.__builtin_object_size; +pub const __builtin___memset_chk = @import("std").zig.c_builtins.__builtin___memset_chk; +pub const __builtin_memset = @import("std").zig.c_builtins.__builtin_memset; +pub const __builtin___memcpy_chk = @import("std").zig.c_builtins.__builtin___memcpy_chk; +pub const __builtin_memcpy = @import("std").zig.c_builtins.__builtin_memcpy; +pub const __builtin_expect = @import("std").zig.c_builtins.__builtin_expect; +pub const __builtin_nanf = @import("std").zig.c_builtins.__builtin_nanf; +pub const __builtin_huge_valf = @import("std").zig.c_builtins.__builtin_huge_valf; +pub const __builtin_inff = @import("std").zig.c_builtins.__builtin_inff; +pub const __builtin_isnan = @import("std").zig.c_builtins.__builtin_isnan; +pub const __builtin_isinf = @import("std").zig.c_builtins.__builtin_isinf; +pub const __builtin_isinf_sign = @import("std").zig.c_builtins.__builtin_isinf_sign; +pub const __has_builtin = @import("std").zig.c_builtins.__has_builtin; +pub const __builtin_assume = @import("std").zig.c_builtins.__builtin_assume; +pub const __builtin_unreachable = @import("std").zig.c_builtins.__builtin_unreachable; +pub const __builtin_constant_p = @import("std").zig.c_builtins.__builtin_constant_p; +pub const __builtin_mul_overflow = @import("std").zig.c_builtins.__builtin_mul_overflow; +pub const __u_char = u8; +pub const __u_short = c_ushort; +pub const __u_int = c_uint; +pub const __u_long = c_ulong; +pub const __int8_t = i8; +pub const __uint8_t = u8; +pub const __int16_t = c_short; +pub const __uint16_t = c_ushort; +pub const __int32_t = c_int; +pub const __uint32_t = c_uint; +pub const __int64_t = c_long; +pub const __uint64_t = c_ulong; +pub const __int_least8_t = __int8_t; +pub const __uint_least8_t = __uint8_t; +pub const __int_least16_t = __int16_t; +pub const __uint_least16_t = __uint16_t; +pub const __int_least32_t = __int32_t; +pub const __uint_least32_t = __uint32_t; +pub const __int_least64_t = __int64_t; +pub const __uint_least64_t = __uint64_t; +pub const __quad_t = c_long; +pub const __u_quad_t = c_ulong; +pub const __intmax_t = c_long; +pub const __uintmax_t = c_ulong; +pub const __dev_t = c_ulong; +pub const __uid_t = c_uint; +pub const __gid_t = c_uint; +pub const __ino_t = c_ulong; +pub const __ino64_t = c_ulong; +pub const __mode_t = c_uint; +pub const __nlink_t = c_ulong; +pub const __off_t = c_long; +pub const __off64_t = c_long; +pub const __pid_t = c_int; +pub const __fsid_t = extern struct { + __val: [2]c_int = @import("std").mem.zeroes([2]c_int), +}; +pub const __clock_t = c_long; +pub const __rlim_t = c_ulong; +pub const __rlim64_t = c_ulong; +pub const __id_t = c_uint; +pub const __time_t = c_long; +pub const __useconds_t = c_uint; +pub const __suseconds_t = c_long; +pub const __suseconds64_t = c_long; +pub const __daddr_t = c_int; +pub const __key_t = c_int; +pub const __clockid_t = c_int; +pub const __timer_t = ?*anyopaque; +pub const __blksize_t = c_long; +pub const __blkcnt_t = c_long; +pub const __blkcnt64_t = c_long; +pub const __fsblkcnt_t = c_ulong; +pub const __fsblkcnt64_t = c_ulong; +pub const __fsfilcnt_t = c_ulong; +pub const __fsfilcnt64_t = c_ulong; +pub const __fsword_t = c_long; +pub const __ssize_t = c_long; +pub const __syscall_slong_t = c_long; +pub const __syscall_ulong_t = c_ulong; +pub const __loff_t = __off64_t; +pub const __caddr_t = [*c]u8; +pub const __intptr_t = c_long; +pub const __socklen_t = c_uint; +pub const __sig_atomic_t = c_int; +pub const int_least8_t = __int_least8_t; +pub const int_least16_t = __int_least16_t; +pub const int_least32_t = __int_least32_t; +pub const int_least64_t = __int_least64_t; +pub const uint_least8_t = __uint_least8_t; +pub const uint_least16_t = __uint_least16_t; +pub const uint_least32_t = __uint_least32_t; +pub const uint_least64_t = __uint_least64_t; +pub const int_fast8_t = i8; +pub const int_fast16_t = c_long; +pub const int_fast32_t = c_long; +pub const int_fast64_t = c_long; +pub const uint_fast8_t = u8; +pub const uint_fast16_t = c_ulong; +pub const uint_fast32_t = c_ulong; +pub const uint_fast64_t = c_ulong; +pub const intmax_t = __intmax_t; +pub const uintmax_t = __uintmax_t; +pub const wchar_t = c_int; +pub const _Float32 = f32; +pub const _Float64 = f64; +pub const _Float32x = f64; +pub const _Float64x = c_longdouble; +pub const div_t = extern struct { + quot: c_int = @import("std").mem.zeroes(c_int), + rem: c_int = @import("std").mem.zeroes(c_int), +}; +pub const ldiv_t = extern struct { + quot: c_long = @import("std").mem.zeroes(c_long), + rem: c_long = @import("std").mem.zeroes(c_long), +}; +pub const lldiv_t = extern struct { + quot: c_longlong = @import("std").mem.zeroes(c_longlong), + rem: c_longlong = @import("std").mem.zeroes(c_longlong), +}; +pub extern fn __ctype_get_mb_cur_max() usize; +pub extern fn atof(__nptr: [*c]const u8) f64; +pub extern fn atoi(__nptr: [*c]const u8) c_int; +pub extern fn atol(__nptr: [*c]const u8) c_long; +pub extern fn atoll(__nptr: [*c]const u8) c_longlong; +pub extern fn strtod(__nptr: [*c]const u8, __endptr: [*c][*c]u8) f64; +pub extern fn strtof(__nptr: [*c]const u8, __endptr: [*c][*c]u8) f32; +pub extern fn strtold(__nptr: [*c]const u8, __endptr: [*c][*c]u8) c_longdouble; +pub extern fn strtol(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_long; +pub extern fn strtoul(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_ulong; +pub extern fn strtoq(noalias __nptr: [*c]const u8, noalias __endptr: [*c][*c]u8, __base: c_int) c_longlong; +pub extern fn strtouq(noalias __nptr: [*c]const u8, noalias __endptr: [*c][*c]u8, __base: c_int) c_ulonglong; +pub extern fn strtoll(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_longlong; +pub extern fn strtoull(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_ulonglong; +pub extern fn l64a(__n: c_long) [*c]u8; +pub extern fn a64l(__s: [*c]const u8) c_long; +pub const u_char = __u_char; +pub const u_short = __u_short; +pub const u_int = __u_int; +pub const u_long = __u_long; +pub const quad_t = __quad_t; +pub const u_quad_t = __u_quad_t; +pub const fsid_t = __fsid_t; +pub const loff_t = __loff_t; +pub const ino_t = __ino_t; +pub const dev_t = __dev_t; +pub const gid_t = __gid_t; +pub const mode_t = __mode_t; +pub const nlink_t = __nlink_t; +pub const uid_t = __uid_t; +pub const off_t = __off_t; +pub const pid_t = __pid_t; +pub const id_t = __id_t; +pub const daddr_t = __daddr_t; +pub const caddr_t = __caddr_t; +pub const key_t = __key_t; +pub const clock_t = __clock_t; +pub const clockid_t = __clockid_t; +pub const time_t = __time_t; +pub const timer_t = __timer_t; +pub const ulong = c_ulong; +pub const ushort = c_ushort; +pub const uint = c_uint; +pub const u_int8_t = __uint8_t; +pub const u_int16_t = __uint16_t; +pub const u_int32_t = __uint32_t; +pub const u_int64_t = __uint64_t; +pub const register_t = c_long; +pub fn __bswap_16(arg___bsx: __uint16_t) callconv(.C) __uint16_t { + var __bsx = arg___bsx; + _ = &__bsx; + return @as(__uint16_t, @bitCast(@as(c_short, @truncate(((@as(c_int, @bitCast(@as(c_uint, __bsx))) >> @intCast(8)) & @as(c_int, 255)) | ((@as(c_int, @bitCast(@as(c_uint, __bsx))) & @as(c_int, 255)) << @intCast(8)))))); +} +pub fn __bswap_32(arg___bsx: __uint32_t) callconv(.C) __uint32_t { + var __bsx = arg___bsx; + _ = &__bsx; + return ((((__bsx & @as(c_uint, 4278190080)) >> @intCast(24)) | ((__bsx & @as(c_uint, 16711680)) >> @intCast(8))) | ((__bsx & @as(c_uint, 65280)) << @intCast(8))) | ((__bsx & @as(c_uint, 255)) << @intCast(24)); +} +pub fn __bswap_64(arg___bsx: __uint64_t) callconv(.C) __uint64_t { + var __bsx = arg___bsx; + _ = &__bsx; + return @as(__uint64_t, @bitCast(@as(c_ulong, @truncate(((((((((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 18374686479671623680)) >> @intCast(56)) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 71776119061217280)) >> @intCast(40))) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 280375465082880)) >> @intCast(24))) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 1095216660480)) >> @intCast(8))) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 4278190080)) << @intCast(8))) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 16711680)) << @intCast(24))) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 65280)) << @intCast(40))) | ((@as(c_ulonglong, @bitCast(@as(c_ulonglong, __bsx))) & @as(c_ulonglong, 255)) << @intCast(56)))))); +} +pub fn __uint16_identity(arg___x: __uint16_t) callconv(.C) __uint16_t { + var __x = arg___x; + _ = &__x; + return __x; +} +pub fn __uint32_identity(arg___x: __uint32_t) callconv(.C) __uint32_t { + var __x = arg___x; + _ = &__x; + return __x; +} +pub fn __uint64_identity(arg___x: __uint64_t) callconv(.C) __uint64_t { + var __x = arg___x; + _ = &__x; + return __x; +} +pub const __sigset_t = extern struct { + __val: [16]c_ulong = @import("std").mem.zeroes([16]c_ulong), +}; +pub const sigset_t = __sigset_t; +pub const struct_timeval = extern struct { + tv_sec: __time_t = @import("std").mem.zeroes(__time_t), + tv_usec: __suseconds_t = @import("std").mem.zeroes(__suseconds_t), +}; +pub const struct_timespec = extern struct { + tv_sec: __time_t = @import("std").mem.zeroes(__time_t), + tv_nsec: __syscall_slong_t = @import("std").mem.zeroes(__syscall_slong_t), +}; +pub const suseconds_t = __suseconds_t; +pub const __fd_mask = c_long; +pub const fd_set = extern struct { + __fds_bits: [16]__fd_mask = @import("std").mem.zeroes([16]__fd_mask), +}; +pub const fd_mask = __fd_mask; +pub extern fn select(__nfds: c_int, noalias __readfds: [*c]fd_set, noalias __writefds: [*c]fd_set, noalias __exceptfds: [*c]fd_set, noalias __timeout: [*c]struct_timeval) c_int; +pub extern fn pselect(__nfds: c_int, noalias __readfds: [*c]fd_set, noalias __writefds: [*c]fd_set, noalias __exceptfds: [*c]fd_set, noalias __timeout: [*c]const struct_timespec, noalias __sigmask: [*c]const __sigset_t) c_int; +pub const blksize_t = __blksize_t; +pub const blkcnt_t = __blkcnt_t; +pub const fsblkcnt_t = __fsblkcnt_t; +pub const fsfilcnt_t = __fsfilcnt_t; +const struct_unnamed_1 = extern struct { + __low: c_uint = @import("std").mem.zeroes(c_uint), + __high: c_uint = @import("std").mem.zeroes(c_uint), +}; +pub const __atomic_wide_counter = extern union { + __value64: c_ulonglong, + __value32: struct_unnamed_1, +}; +pub const struct___pthread_internal_list = extern struct { + __prev: [*c]struct___pthread_internal_list = @import("std").mem.zeroes([*c]struct___pthread_internal_list), + __next: [*c]struct___pthread_internal_list = @import("std").mem.zeroes([*c]struct___pthread_internal_list), +}; +pub const __pthread_list_t = struct___pthread_internal_list; +pub const struct___pthread_internal_slist = extern struct { + __next: [*c]struct___pthread_internal_slist = @import("std").mem.zeroes([*c]struct___pthread_internal_slist), +}; +pub const __pthread_slist_t = struct___pthread_internal_slist; +pub const struct___pthread_mutex_s = extern struct { + __lock: c_int = @import("std").mem.zeroes(c_int), + __count: c_uint = @import("std").mem.zeroes(c_uint), + __owner: c_int = @import("std").mem.zeroes(c_int), + __nusers: c_uint = @import("std").mem.zeroes(c_uint), + __kind: c_int = @import("std").mem.zeroes(c_int), + __spins: c_short = @import("std").mem.zeroes(c_short), + __elision: c_short = @import("std").mem.zeroes(c_short), + __list: __pthread_list_t = @import("std").mem.zeroes(__pthread_list_t), +}; +pub const struct___pthread_rwlock_arch_t = extern struct { + __readers: c_uint = @import("std").mem.zeroes(c_uint), + __writers: c_uint = @import("std").mem.zeroes(c_uint), + __wrphase_futex: c_uint = @import("std").mem.zeroes(c_uint), + __writers_futex: c_uint = @import("std").mem.zeroes(c_uint), + __pad3: c_uint = @import("std").mem.zeroes(c_uint), + __pad4: c_uint = @import("std").mem.zeroes(c_uint), + __cur_writer: c_int = @import("std").mem.zeroes(c_int), + __shared: c_int = @import("std").mem.zeroes(c_int), + __rwelision: i8 = @import("std").mem.zeroes(i8), + __pad1: [7]u8 = @import("std").mem.zeroes([7]u8), + __pad2: c_ulong = @import("std").mem.zeroes(c_ulong), + __flags: c_uint = @import("std").mem.zeroes(c_uint), +}; +pub const struct___pthread_cond_s = extern struct { + __wseq: __atomic_wide_counter = @import("std").mem.zeroes(__atomic_wide_counter), + __g1_start: __atomic_wide_counter = @import("std").mem.zeroes(__atomic_wide_counter), + __g_refs: [2]c_uint = @import("std").mem.zeroes([2]c_uint), + __g_size: [2]c_uint = @import("std").mem.zeroes([2]c_uint), + __g1_orig_size: c_uint = @import("std").mem.zeroes(c_uint), + __wrefs: c_uint = @import("std").mem.zeroes(c_uint), + __g_signals: [2]c_uint = @import("std").mem.zeroes([2]c_uint), +}; +pub const __tss_t = c_uint; +pub const __thrd_t = c_ulong; +pub const __once_flag = extern struct { + __data: c_int = @import("std").mem.zeroes(c_int), +}; +pub const pthread_t = c_ulong; +pub const pthread_mutexattr_t = extern union { + __size: [4]u8, + __align: c_int, +}; +pub const pthread_condattr_t = extern union { + __size: [4]u8, + __align: c_int, +}; +pub const pthread_key_t = c_uint; +pub const pthread_once_t = c_int; +pub const union_pthread_attr_t = extern union { + __size: [56]u8, + __align: c_long, +}; +pub const pthread_attr_t = union_pthread_attr_t; +pub const pthread_mutex_t = extern union { + __data: struct___pthread_mutex_s, + __size: [40]u8, + __align: c_long, +}; +pub const pthread_cond_t = extern union { + __data: struct___pthread_cond_s, + __size: [48]u8, + __align: c_longlong, +}; +pub const pthread_rwlock_t = extern union { + __data: struct___pthread_rwlock_arch_t, + __size: [56]u8, + __align: c_long, +}; +pub const pthread_rwlockattr_t = extern union { + __size: [8]u8, + __align: c_long, +}; +pub const pthread_spinlock_t = c_int; +pub const pthread_barrier_t = extern union { + __size: [32]u8, + __align: c_long, +}; +pub const pthread_barrierattr_t = extern union { + __size: [4]u8, + __align: c_int, +}; +pub extern fn random() c_long; +pub extern fn srandom(__seed: c_uint) void; +pub extern fn initstate(__seed: c_uint, __statebuf: [*c]u8, __statelen: usize) [*c]u8; +pub extern fn setstate(__statebuf: [*c]u8) [*c]u8; +pub const struct_random_data = extern struct { + fptr: [*c]i32 = @import("std").mem.zeroes([*c]i32), + rptr: [*c]i32 = @import("std").mem.zeroes([*c]i32), + state: [*c]i32 = @import("std").mem.zeroes([*c]i32), + rand_type: c_int = @import("std").mem.zeroes(c_int), + rand_deg: c_int = @import("std").mem.zeroes(c_int), + rand_sep: c_int = @import("std").mem.zeroes(c_int), + end_ptr: [*c]i32 = @import("std").mem.zeroes([*c]i32), +}; +pub extern fn random_r(noalias __buf: [*c]struct_random_data, noalias __result: [*c]i32) c_int; +pub extern fn srandom_r(__seed: c_uint, __buf: [*c]struct_random_data) c_int; +pub extern fn initstate_r(__seed: c_uint, noalias __statebuf: [*c]u8, __statelen: usize, noalias __buf: [*c]struct_random_data) c_int; +pub extern fn setstate_r(noalias __statebuf: [*c]u8, noalias __buf: [*c]struct_random_data) c_int; +pub extern fn rand() c_int; +pub extern fn srand(__seed: c_uint) void; +pub extern fn rand_r(__seed: [*c]c_uint) c_int; +pub extern fn drand48() f64; +pub extern fn erand48(__xsubi: [*c]c_ushort) f64; +pub extern fn lrand48() c_long; +pub extern fn nrand48(__xsubi: [*c]c_ushort) c_long; +pub extern fn mrand48() c_long; +pub extern fn jrand48(__xsubi: [*c]c_ushort) c_long; +pub extern fn srand48(__seedval: c_long) void; +pub extern fn seed48(__seed16v: [*c]c_ushort) [*c]c_ushort; +pub extern fn lcong48(__param: [*c]c_ushort) void; +pub const struct_drand48_data = extern struct { + __x: [3]c_ushort = @import("std").mem.zeroes([3]c_ushort), + __old_x: [3]c_ushort = @import("std").mem.zeroes([3]c_ushort), + __c: c_ushort = @import("std").mem.zeroes(c_ushort), + __init: c_ushort = @import("std").mem.zeroes(c_ushort), + __a: c_ulonglong = @import("std").mem.zeroes(c_ulonglong), +}; +pub extern fn drand48_r(noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]f64) c_int; +pub extern fn erand48_r(__xsubi: [*c]c_ushort, noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]f64) c_int; +pub extern fn lrand48_r(noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; +pub extern fn nrand48_r(__xsubi: [*c]c_ushort, noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; +pub extern fn mrand48_r(noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; +pub extern fn jrand48_r(__xsubi: [*c]c_ushort, noalias __buffer: [*c]struct_drand48_data, noalias __result: [*c]c_long) c_int; +pub extern fn srand48_r(__seedval: c_long, __buffer: [*c]struct_drand48_data) c_int; +pub extern fn seed48_r(__seed16v: [*c]c_ushort, __buffer: [*c]struct_drand48_data) c_int; +pub extern fn lcong48_r(__param: [*c]c_ushort, __buffer: [*c]struct_drand48_data) c_int; +pub extern fn arc4random() __uint32_t; +pub extern fn arc4random_buf(__buf: ?*anyopaque, __size: usize) void; +pub extern fn arc4random_uniform(__upper_bound: __uint32_t) __uint32_t; +pub extern fn malloc(__size: c_ulong) ?*anyopaque; +pub extern fn calloc(__nmemb: c_ulong, __size: c_ulong) ?*anyopaque; +pub extern fn realloc(__ptr: ?*anyopaque, __size: c_ulong) ?*anyopaque; +pub extern fn free(__ptr: ?*anyopaque) void; +pub extern fn reallocarray(__ptr: ?*anyopaque, __nmemb: usize, __size: usize) ?*anyopaque; +pub extern fn alloca(__size: c_ulong) ?*anyopaque; +pub extern fn valloc(__size: usize) ?*anyopaque; +pub extern fn posix_memalign(__memptr: [*c]?*anyopaque, __alignment: usize, __size: usize) c_int; +pub extern fn aligned_alloc(__alignment: c_ulong, __size: c_ulong) ?*anyopaque; +pub extern fn abort() noreturn; +pub extern fn atexit(__func: ?*const fn () callconv(.C) void) c_int; +pub extern fn at_quick_exit(__func: ?*const fn () callconv(.C) void) c_int; +pub extern fn on_exit(__func: ?*const fn (c_int, ?*anyopaque) callconv(.C) void, __arg: ?*anyopaque) c_int; +pub extern fn exit(__status: c_int) noreturn; +pub extern fn quick_exit(__status: c_int) noreturn; +pub extern fn _Exit(__status: c_int) noreturn; +pub extern fn getenv(__name: [*c]const u8) [*c]u8; +pub extern fn putenv(__string: [*c]u8) c_int; +pub extern fn setenv(__name: [*c]const u8, __value: [*c]const u8, __replace: c_int) c_int; +pub extern fn unsetenv(__name: [*c]const u8) c_int; +pub extern fn clearenv() c_int; +pub extern fn mktemp(__template: [*c]u8) [*c]u8; +pub extern fn mkstemp(__template: [*c]u8) c_int; +pub extern fn mkstemps(__template: [*c]u8, __suffixlen: c_int) c_int; +pub extern fn mkdtemp(__template: [*c]u8) [*c]u8; +pub extern fn system(__command: [*c]const u8) c_int; +pub extern fn realpath(noalias __name: [*c]const u8, noalias __resolved: [*c]u8) [*c]u8; +pub const __compar_fn_t = ?*const fn (?*const anyopaque, ?*const anyopaque) callconv(.C) c_int; +pub extern fn bsearch(__key: ?*const anyopaque, __base: ?*const anyopaque, __nmemb: usize, __size: usize, __compar: __compar_fn_t) ?*anyopaque; +pub extern fn qsort(__base: ?*anyopaque, __nmemb: usize, __size: usize, __compar: __compar_fn_t) void; +pub extern fn abs(__x: c_int) c_int; +pub extern fn labs(__x: c_long) c_long; +pub extern fn llabs(__x: c_longlong) c_longlong; +pub extern fn div(__numer: c_int, __denom: c_int) div_t; +pub extern fn ldiv(__numer: c_long, __denom: c_long) ldiv_t; +pub extern fn lldiv(__numer: c_longlong, __denom: c_longlong) lldiv_t; +pub extern fn ecvt(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; +pub extern fn fcvt(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; +pub extern fn gcvt(__value: f64, __ndigit: c_int, __buf: [*c]u8) [*c]u8; +pub extern fn qecvt(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; +pub extern fn qfcvt(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int) [*c]u8; +pub extern fn qgcvt(__value: c_longdouble, __ndigit: c_int, __buf: [*c]u8) [*c]u8; +pub extern fn ecvt_r(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; +pub extern fn fcvt_r(__value: f64, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; +pub extern fn qecvt_r(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; +pub extern fn qfcvt_r(__value: c_longdouble, __ndigit: c_int, noalias __decpt: [*c]c_int, noalias __sign: [*c]c_int, noalias __buf: [*c]u8, __len: usize) c_int; +pub extern fn mblen(__s: [*c]const u8, __n: usize) c_int; +pub extern fn mbtowc(noalias __pwc: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize) c_int; +pub extern fn wctomb(__s: [*c]u8, __wchar: wchar_t) c_int; +pub extern fn mbstowcs(noalias __pwcs: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize) usize; +pub extern fn wcstombs(noalias __s: [*c]u8, noalias __pwcs: [*c]const wchar_t, __n: usize) usize; +pub extern fn rpmatch(__response: [*c]const u8) c_int; +pub extern fn getsubopt(noalias __optionp: [*c][*c]u8, noalias __tokens: [*c]const [*c]u8, noalias __valuep: [*c][*c]u8) c_int; +pub extern fn getloadavg(__loadavg: [*c]f64, __nelem: c_int) c_int; +pub const METACALL_ALLOCATOR_STD: c_int = 0; +pub const METACALL_ALLOCATOR_NGINX: c_int = 1; +pub const enum_metacall_allocator_id = c_uint; +pub const struct_ngx_pool_s = opaque {}; +pub const struct_metacall_allocator_std_type = extern struct { + malloc: ?*const fn (usize) callconv(.C) ?*anyopaque = @import("std").mem.zeroes(?*const fn (usize) callconv(.C) ?*anyopaque), + realloc: ?*const fn (?*anyopaque, usize) callconv(.C) ?*anyopaque = @import("std").mem.zeroes(?*const fn (?*anyopaque, usize) callconv(.C) ?*anyopaque), + free: ?*const fn (?*anyopaque) callconv(.C) void = @import("std").mem.zeroes(?*const fn (?*anyopaque) callconv(.C) void), +}; +pub const metacall_allocator_std = [*c]struct_metacall_allocator_std_type; +pub const ngx_pool_t = struct_ngx_pool_s; +pub const struct_metacall_allocator_nginx_type = extern struct { + pool: ?*ngx_pool_t = @import("std").mem.zeroes(?*ngx_pool_t), + palloc: ?*const fn (?*ngx_pool_t, usize) callconv(.C) ?*anyopaque = @import("std").mem.zeroes(?*const fn (?*ngx_pool_t, usize) callconv(.C) ?*anyopaque), + pcopy: ?*const fn (?*anyopaque, ?*const anyopaque, usize) callconv(.C) ?*anyopaque = @import("std").mem.zeroes(?*const fn (?*anyopaque, ?*const anyopaque, usize) callconv(.C) ?*anyopaque), + pfree: ?*const fn (?*ngx_pool_t, ?*anyopaque) callconv(.C) isize = @import("std").mem.zeroes(?*const fn (?*ngx_pool_t, ?*anyopaque) callconv(.C) isize), +}; +pub const metacall_allocator_nginx = [*c]struct_metacall_allocator_nginx_type; +pub extern fn metacall_allocator_create(allocator_id: enum_metacall_allocator_id, ctx: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_allocator_alloc(allocator: ?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_allocator_realloc(allocator: ?*anyopaque, data: ?*anyopaque, size: usize, new_size: usize) ?*anyopaque; +pub extern fn metacall_allocator_free(allocator: ?*anyopaque, data: ?*anyopaque) void; +pub extern fn metacall_allocator_destroy(allocator: ?*anyopaque) void; +pub const struct_metacall_exception_type = extern struct { + message: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), + label: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), + code: i64 = @import("std").mem.zeroes(i64), + stacktrace: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), +}; +pub const metacall_exception = [*c]struct_metacall_exception_type; +pub extern fn metacall_error_from_value(v: ?*anyopaque, ex: metacall_exception) c_int; +pub extern fn metacall_error_last(ex: metacall_exception) c_int; +pub extern fn metacall_error_clear() void; +pub const struct___va_list_tag_2 = extern struct { + gp_offset: c_uint = @import("std").mem.zeroes(c_uint), + fp_offset: c_uint = @import("std").mem.zeroes(c_uint), + overflow_arg_area: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), + reg_save_area: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), +}; +pub const __builtin_va_list = [1]struct___va_list_tag_2; +pub const __gnuc_va_list = __builtin_va_list; +pub const va_list = __builtin_va_list; +const union_unnamed_3 = extern union { + __wch: c_uint, + __wchb: [4]u8, +}; +pub const __mbstate_t = extern struct { + __count: c_int = @import("std").mem.zeroes(c_int), + __value: union_unnamed_3 = @import("std").mem.zeroes(union_unnamed_3), +}; +pub const struct__G_fpos_t = extern struct { + __pos: __off_t = @import("std").mem.zeroes(__off_t), + __state: __mbstate_t = @import("std").mem.zeroes(__mbstate_t), +}; +pub const __fpos_t = struct__G_fpos_t; +pub const struct__G_fpos64_t = extern struct { + __pos: __off64_t = @import("std").mem.zeroes(__off64_t), + __state: __mbstate_t = @import("std").mem.zeroes(__mbstate_t), +}; +pub const __fpos64_t = struct__G_fpos64_t; +pub const struct__IO_marker = opaque {}; +pub const _IO_lock_t = anyopaque; +pub const struct__IO_codecvt = opaque {}; +pub const struct__IO_wide_data = opaque {}; +pub const struct__IO_FILE = extern struct { + _flags: c_int = @import("std").mem.zeroes(c_int), + _IO_read_ptr: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_read_end: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_read_base: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_write_base: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_write_ptr: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_write_end: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_buf_base: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_buf_end: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_save_base: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_backup_base: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _IO_save_end: [*c]u8 = @import("std").mem.zeroes([*c]u8), + _markers: ?*struct__IO_marker = @import("std").mem.zeroes(?*struct__IO_marker), + _chain: [*c]struct__IO_FILE = @import("std").mem.zeroes([*c]struct__IO_FILE), + _fileno: c_int = @import("std").mem.zeroes(c_int), + _flags2: c_int = @import("std").mem.zeroes(c_int), + _old_offset: __off_t = @import("std").mem.zeroes(__off_t), + _cur_column: c_ushort = @import("std").mem.zeroes(c_ushort), + _vtable_offset: i8 = @import("std").mem.zeroes(i8), + _shortbuf: [1]u8 = @import("std").mem.zeroes([1]u8), + _lock: ?*_IO_lock_t = @import("std").mem.zeroes(?*_IO_lock_t), + _offset: __off64_t = @import("std").mem.zeroes(__off64_t), + _codecvt: ?*struct__IO_codecvt = @import("std").mem.zeroes(?*struct__IO_codecvt), + _wide_data: ?*struct__IO_wide_data = @import("std").mem.zeroes(?*struct__IO_wide_data), + _freeres_list: [*c]struct__IO_FILE = @import("std").mem.zeroes([*c]struct__IO_FILE), + _freeres_buf: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), + __pad5: usize = @import("std").mem.zeroes(usize), + _mode: c_int = @import("std").mem.zeroes(c_int), + _unused2: [20]u8 = @import("std").mem.zeroes([20]u8), +}; +pub const __FILE = struct__IO_FILE; +pub const FILE = struct__IO_FILE; +pub const cookie_read_function_t = fn (?*anyopaque, [*c]u8, usize) callconv(.C) __ssize_t; +pub const cookie_write_function_t = fn (?*anyopaque, [*c]const u8, usize) callconv(.C) __ssize_t; +pub const cookie_seek_function_t = fn (?*anyopaque, [*c]__off64_t, c_int) callconv(.C) c_int; +pub const cookie_close_function_t = fn (?*anyopaque) callconv(.C) c_int; +pub const struct__IO_cookie_io_functions_t = extern struct { + read: ?*const cookie_read_function_t = @import("std").mem.zeroes(?*const cookie_read_function_t), + write: ?*const cookie_write_function_t = @import("std").mem.zeroes(?*const cookie_write_function_t), + seek: ?*const cookie_seek_function_t = @import("std").mem.zeroes(?*const cookie_seek_function_t), + close: ?*const cookie_close_function_t = @import("std").mem.zeroes(?*const cookie_close_function_t), +}; +pub const cookie_io_functions_t = struct__IO_cookie_io_functions_t; +pub const fpos_t = __fpos_t; +pub extern var stdin: [*c]FILE; +pub extern var stdout: [*c]FILE; +pub extern var stderr: [*c]FILE; +pub extern fn remove(__filename: [*c]const u8) c_int; +pub extern fn rename(__old: [*c]const u8, __new: [*c]const u8) c_int; +pub extern fn renameat(__oldfd: c_int, __old: [*c]const u8, __newfd: c_int, __new: [*c]const u8) c_int; +pub extern fn fclose(__stream: [*c]FILE) c_int; +pub extern fn tmpfile() [*c]FILE; +pub extern fn tmpnam([*c]u8) [*c]u8; +pub extern fn tmpnam_r(__s: [*c]u8) [*c]u8; +pub extern fn tempnam(__dir: [*c]const u8, __pfx: [*c]const u8) [*c]u8; +pub extern fn fflush(__stream: [*c]FILE) c_int; +pub extern fn fflush_unlocked(__stream: [*c]FILE) c_int; +pub extern fn fopen(__filename: [*c]const u8, __modes: [*c]const u8) [*c]FILE; +pub extern fn freopen(noalias __filename: [*c]const u8, noalias __modes: [*c]const u8, noalias __stream: [*c]FILE) [*c]FILE; +pub extern fn fdopen(__fd: c_int, __modes: [*c]const u8) [*c]FILE; +pub extern fn fopencookie(noalias __magic_cookie: ?*anyopaque, noalias __modes: [*c]const u8, __io_funcs: cookie_io_functions_t) [*c]FILE; +pub extern fn fmemopen(__s: ?*anyopaque, __len: usize, __modes: [*c]const u8) [*c]FILE; +pub extern fn open_memstream(__bufloc: [*c][*c]u8, __sizeloc: [*c]usize) [*c]FILE; +pub extern fn setbuf(noalias __stream: [*c]FILE, noalias __buf: [*c]u8) void; +pub extern fn setvbuf(noalias __stream: [*c]FILE, noalias __buf: [*c]u8, __modes: c_int, __n: usize) c_int; +pub extern fn setbuffer(noalias __stream: [*c]FILE, noalias __buf: [*c]u8, __size: usize) void; +pub extern fn setlinebuf(__stream: [*c]FILE) void; +pub extern fn fprintf(__stream: [*c]FILE, __format: [*c]const u8, ...) c_int; +pub extern fn printf(__format: [*c]const u8, ...) c_int; +pub extern fn sprintf(__s: [*c]u8, __format: [*c]const u8, ...) c_int; +pub extern fn vfprintf(__s: [*c]FILE, __format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn vprintf(__format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn vsprintf(__s: [*c]u8, __format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn snprintf(__s: [*c]u8, __maxlen: c_ulong, __format: [*c]const u8, ...) c_int; +pub extern fn vsnprintf(__s: [*c]u8, __maxlen: c_ulong, __format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn vasprintf(noalias __ptr: [*c][*c]u8, noalias __f: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn __asprintf(noalias __ptr: [*c][*c]u8, noalias __fmt: [*c]const u8, ...) c_int; +pub extern fn asprintf(noalias __ptr: [*c][*c]u8, noalias __fmt: [*c]const u8, ...) c_int; +pub extern fn vdprintf(__fd: c_int, noalias __fmt: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn dprintf(__fd: c_int, noalias __fmt: [*c]const u8, ...) c_int; +pub extern fn fscanf(noalias __stream: [*c]FILE, noalias __format: [*c]const u8, ...) c_int; +pub extern fn scanf(noalias __format: [*c]const u8, ...) c_int; +pub extern fn sscanf(noalias __s: [*c]const u8, noalias __format: [*c]const u8, ...) c_int; +pub extern fn vfscanf(noalias __s: [*c]FILE, noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn vscanf(noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn vsscanf(noalias __s: [*c]const u8, noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag_2) c_int; +pub extern fn fgetc(__stream: [*c]FILE) c_int; +pub extern fn getc(__stream: [*c]FILE) c_int; +pub extern fn getchar() c_int; +pub extern fn getc_unlocked(__stream: [*c]FILE) c_int; +pub extern fn getchar_unlocked() c_int; +pub extern fn fgetc_unlocked(__stream: [*c]FILE) c_int; +pub extern fn fputc(__c: c_int, __stream: [*c]FILE) c_int; +pub extern fn putc(__c: c_int, __stream: [*c]FILE) c_int; +pub extern fn putchar(__c: c_int) c_int; +pub extern fn fputc_unlocked(__c: c_int, __stream: [*c]FILE) c_int; +pub extern fn putc_unlocked(__c: c_int, __stream: [*c]FILE) c_int; +pub extern fn putchar_unlocked(__c: c_int) c_int; +pub extern fn getw(__stream: [*c]FILE) c_int; +pub extern fn putw(__w: c_int, __stream: [*c]FILE) c_int; +pub extern fn fgets(noalias __s: [*c]u8, __n: c_int, noalias __stream: [*c]FILE) [*c]u8; +pub extern fn __getdelim(noalias __lineptr: [*c][*c]u8, noalias __n: [*c]usize, __delimiter: c_int, noalias __stream: [*c]FILE) __ssize_t; +pub extern fn getdelim(noalias __lineptr: [*c][*c]u8, noalias __n: [*c]usize, __delimiter: c_int, noalias __stream: [*c]FILE) __ssize_t; +pub extern fn getline(noalias __lineptr: [*c][*c]u8, noalias __n: [*c]usize, noalias __stream: [*c]FILE) __ssize_t; +pub extern fn fputs(noalias __s: [*c]const u8, noalias __stream: [*c]FILE) c_int; +pub extern fn puts(__s: [*c]const u8) c_int; +pub extern fn ungetc(__c: c_int, __stream: [*c]FILE) c_int; +pub extern fn fread(__ptr: ?*anyopaque, __size: c_ulong, __n: c_ulong, __stream: [*c]FILE) c_ulong; +pub extern fn fwrite(__ptr: ?*const anyopaque, __size: c_ulong, __n: c_ulong, __s: [*c]FILE) c_ulong; +pub extern fn fread_unlocked(noalias __ptr: ?*anyopaque, __size: usize, __n: usize, noalias __stream: [*c]FILE) usize; +pub extern fn fwrite_unlocked(noalias __ptr: ?*const anyopaque, __size: usize, __n: usize, noalias __stream: [*c]FILE) usize; +pub extern fn fseek(__stream: [*c]FILE, __off: c_long, __whence: c_int) c_int; +pub extern fn ftell(__stream: [*c]FILE) c_long; +pub extern fn rewind(__stream: [*c]FILE) void; +pub extern fn fseeko(__stream: [*c]FILE, __off: __off_t, __whence: c_int) c_int; +pub extern fn ftello(__stream: [*c]FILE) __off_t; +pub extern fn fgetpos(noalias __stream: [*c]FILE, noalias __pos: [*c]fpos_t) c_int; +pub extern fn fsetpos(__stream: [*c]FILE, __pos: [*c]const fpos_t) c_int; +pub extern fn clearerr(__stream: [*c]FILE) void; +pub extern fn feof(__stream: [*c]FILE) c_int; +pub extern fn ferror(__stream: [*c]FILE) c_int; +pub extern fn clearerr_unlocked(__stream: [*c]FILE) void; +pub extern fn feof_unlocked(__stream: [*c]FILE) c_int; +pub extern fn ferror_unlocked(__stream: [*c]FILE) c_int; +pub extern fn perror(__s: [*c]const u8) void; +pub extern fn fileno(__stream: [*c]FILE) c_int; +pub extern fn fileno_unlocked(__stream: [*c]FILE) c_int; +pub extern fn pclose(__stream: [*c]FILE) c_int; +pub extern fn popen(__command: [*c]const u8, __modes: [*c]const u8) [*c]FILE; +pub extern fn ctermid(__s: [*c]u8) [*c]u8; +pub extern fn flockfile(__stream: [*c]FILE) void; +pub extern fn ftrylockfile(__stream: [*c]FILE) c_int; +pub extern fn funlockfile(__stream: [*c]FILE) void; +pub extern fn __uflow([*c]FILE) c_int; +pub extern fn __overflow([*c]FILE, c_int) c_int; +pub const METACALL_LOG_STDIO: c_int = 0; +pub const METACALL_LOG_FILE: c_int = 1; +pub const METACALL_LOG_SOCKET: c_int = 2; +pub const METACALL_LOG_SYSLOG: c_int = 3; +pub const METACALL_LOG_NGINX: c_int = 4; +pub const METACALL_LOG_CUSTOM: c_int = 5; +pub const enum_metacall_log_id = c_uint; +pub const struct_metacall_log_stdio_type = extern struct { + stream: [*c]FILE = @import("std").mem.zeroes([*c]FILE), +}; +pub const struct_metacall_log_file_type = extern struct { + file_name: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), + mode: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), +}; +pub const struct_metacall_log_socket_type = extern struct { + ip: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), + port: u16 = @import("std").mem.zeroes(u16), +}; +pub const struct_metacall_log_syslog_type = extern struct { + name: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), +}; +pub const struct_metacall_log_nginx_type = extern struct { + log: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), + log_error: ?*const fn () callconv(.C) void = @import("std").mem.zeroes(?*const fn () callconv(.C) void), + log_level: u16 = @import("std").mem.zeroes(u16), +}; +pub const struct_metacall_log_custom_va_list_type = extern struct { + va: va_list = @import("std").mem.zeroes(va_list), +}; +pub const metacall_log_custom_va_list = [*c]struct_metacall_log_custom_va_list_type; +pub const struct_metacall_log_custom_type = extern struct { + context: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), + format_size: ?*const fn (?*anyopaque, [*c]const u8, u64, usize, [*c]const u8, [*c]const u8, [*c]const u8, [*c]const u8, metacall_log_custom_va_list) callconv(.C) usize = @import("std").mem.zeroes(?*const fn (?*anyopaque, [*c]const u8, u64, usize, [*c]const u8, [*c]const u8, [*c]const u8, [*c]const u8, metacall_log_custom_va_list) callconv(.C) usize), + format_serialize: ?*const fn (?*anyopaque, ?*anyopaque, usize, [*c]const u8, u64, usize, [*c]const u8, [*c]const u8, [*c]const u8, [*c]const u8, metacall_log_custom_va_list) callconv(.C) usize = @import("std").mem.zeroes(?*const fn (?*anyopaque, ?*anyopaque, usize, [*c]const u8, u64, usize, [*c]const u8, [*c]const u8, [*c]const u8, [*c]const u8, metacall_log_custom_va_list) callconv(.C) usize), + format_deserialize: ?*const fn (?*anyopaque, ?*const anyopaque, usize, [*c]const u8, u64, usize, [*c]const u8, [*c]const u8, [*c]const u8, [*c]const u8, metacall_log_custom_va_list) callconv(.C) usize = @import("std").mem.zeroes(?*const fn (?*anyopaque, ?*const anyopaque, usize, [*c]const u8, u64, usize, [*c]const u8, [*c]const u8, [*c]const u8, [*c]const u8, metacall_log_custom_va_list) callconv(.C) usize), + stream_write: ?*const fn (?*anyopaque, [*c]const u8, usize) callconv(.C) c_int = @import("std").mem.zeroes(?*const fn (?*anyopaque, [*c]const u8, usize) callconv(.C) c_int), + stream_flush: ?*const fn (?*anyopaque) callconv(.C) c_int = @import("std").mem.zeroes(?*const fn (?*anyopaque) callconv(.C) c_int), +}; +pub const metacall_log_stdio = [*c]struct_metacall_log_stdio_type; +pub const metacall_log_file = [*c]struct_metacall_log_file_type; +pub const metacall_log_socket = [*c]struct_metacall_log_socket_type; +pub const metacall_log_syslog = [*c]struct_metacall_log_syslog_type; +pub const metacall_log_nginx = [*c]struct_metacall_log_nginx_type; +pub const metacall_log_custom = [*c]struct_metacall_log_custom_type; +pub extern fn metacall_log(log_id: enum_metacall_log_id, ctx: ?*anyopaque) c_int; +pub const METACALL_BOOL: c_int = 0; +pub const METACALL_CHAR: c_int = 1; +pub const METACALL_SHORT: c_int = 2; +pub const METACALL_INT: c_int = 3; +pub const METACALL_LONG: c_int = 4; +pub const METACALL_FLOAT: c_int = 5; +pub const METACALL_DOUBLE: c_int = 6; +pub const METACALL_STRING: c_int = 7; +pub const METACALL_BUFFER: c_int = 8; +pub const METACALL_ARRAY: c_int = 9; +pub const METACALL_MAP: c_int = 10; +pub const METACALL_PTR: c_int = 11; +pub const METACALL_FUTURE: c_int = 12; +pub const METACALL_FUNCTION: c_int = 13; +pub const METACALL_NULL: c_int = 14; +pub const METACALL_CLASS: c_int = 15; +pub const METACALL_OBJECT: c_int = 16; +pub const METACALL_EXCEPTION: c_int = 17; +pub const METACALL_THROWABLE: c_int = 18; +pub const METACALL_SIZE: c_int = 19; +pub const METACALL_INVALID: c_int = 20; +pub const enum_metacall_value_id = c_uint; +pub extern fn metacall_value_create_bool(b: u8) ?*anyopaque; +pub extern fn metacall_value_create_char(c: u8) ?*anyopaque; +pub extern fn metacall_value_create_short(s: c_short) ?*anyopaque; +pub extern fn metacall_value_create_int(i: c_int) ?*anyopaque; +pub extern fn metacall_value_create_long(l: c_long) ?*anyopaque; +pub extern fn metacall_value_create_float(f: f32) ?*anyopaque; +pub extern fn metacall_value_create_double(d: f64) ?*anyopaque; +pub extern fn metacall_value_create_string(str: [*c]const u8, length: usize) ?*anyopaque; +pub extern fn metacall_value_create_buffer(buffer: ?*const anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_value_create_array(values: [*c]?*const anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_value_create_map(tuples: [*c]?*const anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_value_create_ptr(ptr: ?*const anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_future(f: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_function(f: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_function_closure(f: ?*anyopaque, c: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_null() ?*anyopaque; +pub extern fn metacall_value_create_class(c: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_object(o: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_exception(ex: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_create_throwable(th: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_size(v: ?*anyopaque) usize; +pub extern fn metacall_value_count(v: ?*anyopaque) usize; +pub extern fn metacall_value_id(v: ?*anyopaque) enum_metacall_value_id; +pub extern fn metacall_value_id_name(id: enum_metacall_value_id) [*c]const u8; +pub extern fn metacall_value_type_name(v: ?*anyopaque) [*c]const u8; +pub extern fn metacall_value_copy(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_move(src: ?*anyopaque, dest: ?*anyopaque) void; +pub extern fn metacall_value_to_bool(v: ?*anyopaque) u8; +pub extern fn metacall_value_to_char(v: ?*anyopaque) u8; +pub extern fn metacall_value_to_short(v: ?*anyopaque) c_short; +pub extern fn metacall_value_to_int(v: ?*anyopaque) c_int; +pub extern fn metacall_value_to_long(v: ?*anyopaque) c_long; +pub extern fn metacall_value_to_float(v: ?*anyopaque) f32; +pub extern fn metacall_value_to_double(v: ?*anyopaque) f64; +pub extern fn metacall_value_to_string(v: ?*anyopaque) [*c]u8; +pub extern fn metacall_value_to_buffer(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_array(v: ?*anyopaque) [*c]?*anyopaque; +pub extern fn metacall_value_to_map(v: ?*anyopaque) [*c]?*anyopaque; +pub extern fn metacall_value_to_ptr(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_future(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_function(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_null(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_class(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_object(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_exception(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_to_throwable(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_bool(v: ?*anyopaque, b: u8) ?*anyopaque; +pub extern fn metacall_value_from_char(v: ?*anyopaque, c: u8) ?*anyopaque; +pub extern fn metacall_value_from_short(v: ?*anyopaque, s: c_short) ?*anyopaque; +pub extern fn metacall_value_from_int(v: ?*anyopaque, i: c_int) ?*anyopaque; +pub extern fn metacall_value_from_long(v: ?*anyopaque, l: c_long) ?*anyopaque; +pub extern fn metacall_value_from_float(v: ?*anyopaque, f: f32) ?*anyopaque; +pub extern fn metacall_value_from_double(v: ?*anyopaque, d: f64) ?*anyopaque; +pub extern fn metacall_value_from_string(v: ?*anyopaque, str: [*c]const u8, length: usize) ?*anyopaque; +pub extern fn metacall_value_from_buffer(v: ?*anyopaque, buffer: ?*const anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_value_from_array(v: ?*anyopaque, values: [*c]?*const anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_value_from_map(v: ?*anyopaque, tuples: [*c]?*const anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_value_from_ptr(v: ?*anyopaque, ptr: ?*const anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_future(v: ?*anyopaque, f: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_function(v: ?*anyopaque, f: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_null(v: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_class(v: ?*anyopaque, c: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_object(v: ?*anyopaque, o: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_exception(v: ?*anyopaque, ex: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_from_throwable(v: ?*anyopaque, th: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast(v: ?*anyopaque, id: enum_metacall_value_id) ?*anyopaque; +pub extern fn metacall_value_cast_bool(v: [*c]?*anyopaque) u8; +pub extern fn metacall_value_cast_char(v: [*c]?*anyopaque) u8; +pub extern fn metacall_value_cast_short(v: [*c]?*anyopaque) c_short; +pub extern fn metacall_value_cast_int(v: [*c]?*anyopaque) c_int; +pub extern fn metacall_value_cast_long(v: [*c]?*anyopaque) c_long; +pub extern fn metacall_value_cast_float(v: [*c]?*anyopaque) f32; +pub extern fn metacall_value_cast_double(v: [*c]?*anyopaque) f64; +pub extern fn metacall_value_cast_string(v: [*c]?*anyopaque) [*c]u8; +pub extern fn metacall_value_cast_buffer(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_array(v: [*c]?*anyopaque) [*c]?*anyopaque; +pub extern fn metacall_value_cast_map(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_ptr(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_future(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_function(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_null(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_class(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_object(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_exception(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_cast_throwable(v: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacall_value_destroy(v: ?*anyopaque) void; +pub const useconds_t = __useconds_t; +pub const socklen_t = __socklen_t; +pub extern fn access(__name: [*c]const u8, __type: c_int) c_int; +pub extern fn faccessat(__fd: c_int, __file: [*c]const u8, __type: c_int, __flag: c_int) c_int; +pub extern fn lseek(__fd: c_int, __offset: __off_t, __whence: c_int) __off_t; +pub extern fn close(__fd: c_int) c_int; +pub extern fn closefrom(__lowfd: c_int) void; +pub extern fn read(__fd: c_int, __buf: ?*anyopaque, __nbytes: usize) isize; +pub extern fn write(__fd: c_int, __buf: ?*const anyopaque, __n: usize) isize; +pub extern fn pread(__fd: c_int, __buf: ?*anyopaque, __nbytes: usize, __offset: __off_t) isize; +pub extern fn pwrite(__fd: c_int, __buf: ?*const anyopaque, __n: usize, __offset: __off_t) isize; +pub extern fn pipe(__pipedes: [*c]c_int) c_int; +pub extern fn alarm(__seconds: c_uint) c_uint; +pub extern fn sleep(__seconds: c_uint) c_uint; +pub extern fn ualarm(__value: __useconds_t, __interval: __useconds_t) __useconds_t; +pub extern fn usleep(__useconds: __useconds_t) c_int; +pub extern fn pause() c_int; +pub extern fn chown(__file: [*c]const u8, __owner: __uid_t, __group: __gid_t) c_int; +pub extern fn fchown(__fd: c_int, __owner: __uid_t, __group: __gid_t) c_int; +pub extern fn lchown(__file: [*c]const u8, __owner: __uid_t, __group: __gid_t) c_int; +pub extern fn fchownat(__fd: c_int, __file: [*c]const u8, __owner: __uid_t, __group: __gid_t, __flag: c_int) c_int; +pub extern fn chdir(__path: [*c]const u8) c_int; +pub extern fn fchdir(__fd: c_int) c_int; +pub extern fn getcwd(__buf: [*c]u8, __size: usize) [*c]u8; +pub extern fn getwd(__buf: [*c]u8) [*c]u8; +pub extern fn dup(__fd: c_int) c_int; +pub extern fn dup2(__fd: c_int, __fd2: c_int) c_int; +pub extern var __environ: [*c][*c]u8; +pub extern fn execve(__path: [*c]const u8, __argv: [*c]const [*c]u8, __envp: [*c]const [*c]u8) c_int; +pub extern fn fexecve(__fd: c_int, __argv: [*c]const [*c]u8, __envp: [*c]const [*c]u8) c_int; +pub extern fn execv(__path: [*c]const u8, __argv: [*c]const [*c]u8) c_int; +pub extern fn execle(__path: [*c]const u8, __arg: [*c]const u8, ...) c_int; +pub extern fn execl(__path: [*c]const u8, __arg: [*c]const u8, ...) c_int; +pub extern fn execvp(__file: [*c]const u8, __argv: [*c]const [*c]u8) c_int; +pub extern fn execlp(__file: [*c]const u8, __arg: [*c]const u8, ...) c_int; +pub extern fn nice(__inc: c_int) c_int; +pub extern fn _exit(__status: c_int) noreturn; +pub const _PC_LINK_MAX: c_int = 0; +pub const _PC_MAX_CANON: c_int = 1; +pub const _PC_MAX_INPUT: c_int = 2; +pub const _PC_NAME_MAX: c_int = 3; +pub const _PC_PATH_MAX: c_int = 4; +pub const _PC_PIPE_BUF: c_int = 5; +pub const _PC_CHOWN_RESTRICTED: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SOCK_MAXBUF: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_ALLOC_SIZE_MIN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_2_SYMLINKS: c_int = 20; +const enum_unnamed_4 = c_uint; +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; +pub const _SC_JOB_CONTROL: c_int = 7; +pub const _SC_SAVED_IDS: c_int = 8; +pub const _SC_REALTIME_SIGNALS: c_int = 9; +pub const _SC_PRIORITY_SCHEDULING: c_int = 10; +pub const _SC_TIMERS: c_int = 11; +pub const _SC_ASYNCHRONOUS_IO: c_int = 12; +pub const _SC_PRIORITIZED_IO: c_int = 13; +pub const _SC_SYNCHRONIZED_IO: c_int = 14; +pub const _SC_FSYNC: c_int = 15; +pub const _SC_MAPPED_FILES: c_int = 16; +pub const _SC_MEMLOCK: c_int = 17; +pub const _SC_MEMLOCK_RANGE: c_int = 18; +pub const _SC_MEMORY_PROTECTION: c_int = 19; +pub const _SC_MESSAGE_PASSING: c_int = 20; +pub const _SC_SEMAPHORES: c_int = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22; +pub const _SC_AIO_LISTIO_MAX: c_int = 23; +pub const _SC_AIO_MAX: c_int = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 25; +pub const _SC_DELAYTIMER_MAX: c_int = 26; +pub const _SC_MQ_OPEN_MAX: c_int = 27; +pub const _SC_MQ_PRIO_MAX: c_int = 28; +pub const _SC_VERSION: c_int = 29; +pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_RTSIG_MAX: c_int = 31; +pub const _SC_SEM_NSEMS_MAX: c_int = 32; +pub const _SC_SEM_VALUE_MAX: c_int = 33; +pub const _SC_SIGQUEUE_MAX: c_int = 34; +pub const _SC_TIMER_MAX: c_int = 35; +pub const _SC_BC_BASE_MAX: c_int = 36; +pub const _SC_BC_DIM_MAX: c_int = 37; +pub const _SC_BC_SCALE_MAX: c_int = 38; +pub const _SC_BC_STRING_MAX: c_int = 39; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 40; +pub const _SC_EQUIV_CLASS_MAX: c_int = 41; +pub const _SC_EXPR_NEST_MAX: c_int = 42; +pub const _SC_LINE_MAX: c_int = 43; +pub const _SC_RE_DUP_MAX: c_int = 44; +pub const _SC_CHARCLASS_NAME_MAX: c_int = 45; +pub const _SC_2_VERSION: c_int = 46; +pub const _SC_2_C_BIND: c_int = 47; +pub const _SC_2_C_DEV: c_int = 48; +pub const _SC_2_FORT_DEV: c_int = 49; +pub const _SC_2_FORT_RUN: c_int = 50; +pub const _SC_2_SW_DEV: c_int = 51; +pub const _SC_2_LOCALEDEF: c_int = 52; +pub const _SC_PII: c_int = 53; +pub const _SC_PII_XTI: c_int = 54; +pub const _SC_PII_SOCKET: c_int = 55; +pub const _SC_PII_INTERNET: c_int = 56; +pub const _SC_PII_OSI: c_int = 57; +pub const _SC_POLL: c_int = 58; +pub const _SC_SELECT: c_int = 59; +pub const _SC_UIO_MAXIOV: c_int = 60; +pub const _SC_IOV_MAX: c_int = 60; +pub const _SC_PII_INTERNET_STREAM: c_int = 61; +pub const _SC_PII_INTERNET_DGRAM: c_int = 62; +pub const _SC_PII_OSI_COTS: c_int = 63; +pub const _SC_PII_OSI_CLTS: c_int = 64; +pub const _SC_PII_OSI_M: c_int = 65; +pub const _SC_T_IOV_MAX: c_int = 66; +pub const _SC_THREADS: c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 68; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 69; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 70; +pub const _SC_LOGIN_NAME_MAX: c_int = 71; +pub const _SC_TTY_NAME_MAX: c_int = 72; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 73; +pub const _SC_THREAD_KEYS_MAX: c_int = 74; +pub const _SC_THREAD_STACK_MIN: c_int = 75; +pub const _SC_THREAD_THREADS_MAX: c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 80; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 81; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 82; +pub const _SC_NPROCESSORS_CONF: c_int = 83; +pub const _SC_NPROCESSORS_ONLN: c_int = 84; +pub const _SC_PHYS_PAGES: c_int = 85; +pub const _SC_AVPHYS_PAGES: c_int = 86; +pub const _SC_ATEXIT_MAX: c_int = 87; +pub const _SC_PASS_MAX: c_int = 88; +pub const _SC_XOPEN_VERSION: c_int = 89; +pub const _SC_XOPEN_XCU_VERSION: c_int = 90; +pub const _SC_XOPEN_UNIX: c_int = 91; +pub const _SC_XOPEN_CRYPT: c_int = 92; +pub const _SC_XOPEN_ENH_I18N: c_int = 93; +pub const _SC_XOPEN_SHM: c_int = 94; +pub const _SC_2_CHAR_TERM: c_int = 95; +pub const _SC_2_C_VERSION: c_int = 96; +pub const _SC_2_UPE: c_int = 97; +pub const _SC_XOPEN_XPG2: c_int = 98; +pub const _SC_XOPEN_XPG3: c_int = 99; +pub const _SC_XOPEN_XPG4: c_int = 100; +pub const _SC_CHAR_BIT: c_int = 101; +pub const _SC_CHAR_MAX: c_int = 102; +pub const _SC_CHAR_MIN: c_int = 103; +pub const _SC_INT_MAX: c_int = 104; +pub const _SC_INT_MIN: c_int = 105; +pub const _SC_LONG_BIT: c_int = 106; +pub const _SC_WORD_BIT: c_int = 107; +pub const _SC_MB_LEN_MAX: c_int = 108; +pub const _SC_NZERO: c_int = 109; +pub const _SC_SSIZE_MAX: c_int = 110; +pub const _SC_SCHAR_MAX: c_int = 111; +pub const _SC_SCHAR_MIN: c_int = 112; +pub const _SC_SHRT_MAX: c_int = 113; +pub const _SC_SHRT_MIN: c_int = 114; +pub const _SC_UCHAR_MAX: c_int = 115; +pub const _SC_UINT_MAX: c_int = 116; +pub const _SC_ULONG_MAX: c_int = 117; +pub const _SC_USHRT_MAX: c_int = 118; +pub const _SC_NL_ARGMAX: c_int = 119; +pub const _SC_NL_LANGMAX: c_int = 120; +pub const _SC_NL_MSGMAX: c_int = 121; +pub const _SC_NL_NMAX: c_int = 122; +pub const _SC_NL_SETMAX: c_int = 123; +pub const _SC_NL_TEXTMAX: c_int = 124; +pub const _SC_XBS5_ILP32_OFF32: c_int = 125; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 126; +pub const _SC_XBS5_LP64_OFF64: c_int = 127; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 128; +pub const _SC_XOPEN_LEGACY: c_int = 129; +pub const _SC_XOPEN_REALTIME: c_int = 130; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 131; +pub const _SC_ADVISORY_INFO: c_int = 132; +pub const _SC_BARRIERS: c_int = 133; +pub const _SC_BASE: c_int = 134; +pub const _SC_C_LANG_SUPPORT: c_int = 135; +pub const _SC_C_LANG_SUPPORT_R: c_int = 136; +pub const _SC_CLOCK_SELECTION: c_int = 137; +pub const _SC_CPUTIME: c_int = 138; +pub const _SC_THREAD_CPUTIME: c_int = 139; +pub const _SC_DEVICE_IO: c_int = 140; +pub const _SC_DEVICE_SPECIFIC: c_int = 141; +pub const _SC_DEVICE_SPECIFIC_R: c_int = 142; +pub const _SC_FD_MGMT: c_int = 143; +pub const _SC_FIFO: c_int = 144; +pub const _SC_PIPE: c_int = 145; +pub const _SC_FILE_ATTRIBUTES: c_int = 146; +pub const _SC_FILE_LOCKING: c_int = 147; +pub const _SC_FILE_SYSTEM: c_int = 148; +pub const _SC_MONOTONIC_CLOCK: c_int = 149; +pub const _SC_MULTI_PROCESS: c_int = 150; +pub const _SC_SINGLE_PROCESS: c_int = 151; +pub const _SC_NETWORKING: c_int = 152; +pub const _SC_READER_WRITER_LOCKS: c_int = 153; +pub const _SC_SPIN_LOCKS: c_int = 154; +pub const _SC_REGEXP: c_int = 155; +pub const _SC_REGEX_VERSION: c_int = 156; +pub const _SC_SHELL: c_int = 157; +pub const _SC_SIGNALS: c_int = 158; +pub const _SC_SPAWN: c_int = 159; +pub const _SC_SPORADIC_SERVER: c_int = 160; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 161; +pub const _SC_SYSTEM_DATABASE: c_int = 162; +pub const _SC_SYSTEM_DATABASE_R: c_int = 163; +pub const _SC_TIMEOUTS: c_int = 164; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 165; +pub const _SC_USER_GROUPS: c_int = 166; +pub const _SC_USER_GROUPS_R: c_int = 167; +pub const _SC_2_PBS: c_int = 168; +pub const _SC_2_PBS_ACCOUNTING: c_int = 169; +pub const _SC_2_PBS_LOCATE: c_int = 170; +pub const _SC_2_PBS_MESSAGE: c_int = 171; +pub const _SC_2_PBS_TRACK: c_int = 172; +pub const _SC_SYMLOOP_MAX: c_int = 173; +pub const _SC_STREAMS: c_int = 174; +pub const _SC_2_PBS_CHECKPOINT: c_int = 175; +pub const _SC_V6_ILP32_OFF32: c_int = 176; +pub const _SC_V6_ILP32_OFFBIG: c_int = 177; +pub const _SC_V6_LP64_OFF64: c_int = 178; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 179; +pub const _SC_HOST_NAME_MAX: c_int = 180; +pub const _SC_TRACE: c_int = 181; +pub const _SC_TRACE_EVENT_FILTER: c_int = 182; +pub const _SC_TRACE_INHERIT: c_int = 183; +pub const _SC_TRACE_LOG: c_int = 184; +pub const _SC_LEVEL1_ICACHE_SIZE: c_int = 185; +pub const _SC_LEVEL1_ICACHE_ASSOC: c_int = 186; +pub const _SC_LEVEL1_ICACHE_LINESIZE: c_int = 187; +pub const _SC_LEVEL1_DCACHE_SIZE: c_int = 188; +pub const _SC_LEVEL1_DCACHE_ASSOC: c_int = 189; +pub const _SC_LEVEL1_DCACHE_LINESIZE: c_int = 190; +pub const _SC_LEVEL2_CACHE_SIZE: c_int = 191; +pub const _SC_LEVEL2_CACHE_ASSOC: c_int = 192; +pub const _SC_LEVEL2_CACHE_LINESIZE: c_int = 193; +pub const _SC_LEVEL3_CACHE_SIZE: c_int = 194; +pub const _SC_LEVEL3_CACHE_ASSOC: c_int = 195; +pub const _SC_LEVEL3_CACHE_LINESIZE: c_int = 196; +pub const _SC_LEVEL4_CACHE_SIZE: c_int = 197; +pub const _SC_LEVEL4_CACHE_ASSOC: c_int = 198; +pub const _SC_LEVEL4_CACHE_LINESIZE: c_int = 199; +pub const _SC_IPV6: c_int = 235; +pub const _SC_RAW_SOCKETS: c_int = 236; +pub const _SC_V7_ILP32_OFF32: c_int = 237; +pub const _SC_V7_ILP32_OFFBIG: c_int = 238; +pub const _SC_V7_LP64_OFF64: c_int = 239; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 240; +pub const _SC_SS_REPL_MAX: c_int = 241; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 242; +pub const _SC_TRACE_NAME_MAX: c_int = 243; +pub const _SC_TRACE_SYS_MAX: c_int = 244; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 245; +pub const _SC_XOPEN_STREAMS: c_int = 246; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248; +pub const _SC_MINSIGSTKSZ: c_int = 249; +pub const _SC_SIGSTKSZ: c_int = 250; +const enum_unnamed_5 = c_uint; +pub const _CS_PATH: c_int = 0; +pub const _CS_V6_WIDTH_RESTRICTED_ENVS: c_int = 1; +pub const _CS_GNU_LIBC_VERSION: c_int = 2; +pub const _CS_GNU_LIBPTHREAD_VERSION: c_int = 3; +pub const _CS_V5_WIDTH_RESTRICTED_ENVS: c_int = 4; +pub const _CS_V7_WIDTH_RESTRICTED_ENVS: c_int = 5; +pub const _CS_LFS_CFLAGS: c_int = 1000; +pub const _CS_LFS_LDFLAGS: c_int = 1001; +pub const _CS_LFS_LIBS: c_int = 1002; +pub const _CS_LFS_LINTFLAGS: c_int = 1003; +pub const _CS_LFS64_CFLAGS: c_int = 1004; +pub const _CS_LFS64_LDFLAGS: c_int = 1005; +pub const _CS_LFS64_LIBS: c_int = 1006; +pub const _CS_LFS64_LINTFLAGS: c_int = 1007; +pub const _CS_XBS5_ILP32_OFF32_CFLAGS: c_int = 1100; +pub const _CS_XBS5_ILP32_OFF32_LDFLAGS: c_int = 1101; +pub const _CS_XBS5_ILP32_OFF32_LIBS: c_int = 1102; +pub const _CS_XBS5_ILP32_OFF32_LINTFLAGS: c_int = 1103; +pub const _CS_XBS5_ILP32_OFFBIG_CFLAGS: c_int = 1104; +pub const _CS_XBS5_ILP32_OFFBIG_LDFLAGS: c_int = 1105; +pub const _CS_XBS5_ILP32_OFFBIG_LIBS: c_int = 1106; +pub const _CS_XBS5_ILP32_OFFBIG_LINTFLAGS: c_int = 1107; +pub const _CS_XBS5_LP64_OFF64_CFLAGS: c_int = 1108; +pub const _CS_XBS5_LP64_OFF64_LDFLAGS: c_int = 1109; +pub const _CS_XBS5_LP64_OFF64_LIBS: c_int = 1110; +pub const _CS_XBS5_LP64_OFF64_LINTFLAGS: c_int = 1111; +pub const _CS_XBS5_LPBIG_OFFBIG_CFLAGS: c_int = 1112; +pub const _CS_XBS5_LPBIG_OFFBIG_LDFLAGS: c_int = 1113; +pub const _CS_XBS5_LPBIG_OFFBIG_LIBS: c_int = 1114; +pub const _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS: c_int = 1115; +pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: c_int = 1116; +pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: c_int = 1117; +pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: c_int = 1118; +pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: c_int = 1119; +pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: c_int = 1120; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: c_int = 1121; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: c_int = 1122; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: c_int = 1123; +pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: c_int = 1124; +pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: c_int = 1125; +pub const _CS_POSIX_V6_LP64_OFF64_LIBS: c_int = 1126; +pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: c_int = 1127; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: c_int = 1128; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: c_int = 1129; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: c_int = 1130; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: c_int = 1131; +pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: c_int = 1132; +pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: c_int = 1133; +pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: c_int = 1134; +pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: c_int = 1135; +pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: c_int = 1136; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: c_int = 1137; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: c_int = 1138; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: c_int = 1139; +pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: c_int = 1140; +pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: c_int = 1141; +pub const _CS_POSIX_V7_LP64_OFF64_LIBS: c_int = 1142; +pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: c_int = 1143; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: c_int = 1144; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: c_int = 1145; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: c_int = 1146; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: c_int = 1147; +pub const _CS_V6_ENV: c_int = 1148; +pub const _CS_V7_ENV: c_int = 1149; +const enum_unnamed_6 = c_uint; +pub extern fn pathconf(__path: [*c]const u8, __name: c_int) c_long; +pub extern fn fpathconf(__fd: c_int, __name: c_int) c_long; +pub extern fn sysconf(__name: c_int) c_long; +pub extern fn confstr(__name: c_int, __buf: [*c]u8, __len: usize) usize; +pub extern fn getpid() __pid_t; +pub extern fn getppid() __pid_t; +pub extern fn getpgrp() __pid_t; +pub extern fn __getpgid(__pid: __pid_t) __pid_t; +pub extern fn getpgid(__pid: __pid_t) __pid_t; +pub extern fn setpgid(__pid: __pid_t, __pgid: __pid_t) c_int; +pub extern fn setpgrp() c_int; +pub extern fn setsid() __pid_t; +pub extern fn getsid(__pid: __pid_t) __pid_t; +pub extern fn getuid() __uid_t; +pub extern fn geteuid() __uid_t; +pub extern fn getgid() __gid_t; +pub extern fn getegid() __gid_t; +pub extern fn getgroups(__size: c_int, __list: [*c]__gid_t) c_int; +pub extern fn setuid(__uid: __uid_t) c_int; +pub extern fn setreuid(__ruid: __uid_t, __euid: __uid_t) c_int; +pub extern fn seteuid(__uid: __uid_t) c_int; +pub extern fn setgid(__gid: __gid_t) c_int; +pub extern fn setregid(__rgid: __gid_t, __egid: __gid_t) c_int; +pub extern fn setegid(__gid: __gid_t) c_int; +pub extern fn fork() __pid_t; +pub extern fn vfork() c_int; +pub extern fn ttyname(__fd: c_int) [*c]u8; +pub extern fn ttyname_r(__fd: c_int, __buf: [*c]u8, __buflen: usize) c_int; +pub extern fn isatty(__fd: c_int) c_int; +pub extern fn ttyslot() c_int; +pub extern fn link(__from: [*c]const u8, __to: [*c]const u8) c_int; +pub extern fn linkat(__fromfd: c_int, __from: [*c]const u8, __tofd: c_int, __to: [*c]const u8, __flags: c_int) c_int; +pub extern fn symlink(__from: [*c]const u8, __to: [*c]const u8) c_int; +pub extern fn readlink(noalias __path: [*c]const u8, noalias __buf: [*c]u8, __len: usize) isize; +pub extern fn symlinkat(__from: [*c]const u8, __tofd: c_int, __to: [*c]const u8) c_int; +pub extern fn readlinkat(__fd: c_int, noalias __path: [*c]const u8, noalias __buf: [*c]u8, __len: usize) isize; +pub extern fn unlink(__name: [*c]const u8) c_int; +pub extern fn unlinkat(__fd: c_int, __name: [*c]const u8, __flag: c_int) c_int; +pub extern fn rmdir(__path: [*c]const u8) c_int; +pub extern fn tcgetpgrp(__fd: c_int) __pid_t; +pub extern fn tcsetpgrp(__fd: c_int, __pgrp_id: __pid_t) c_int; +pub extern fn getlogin() [*c]u8; +pub extern fn getlogin_r(__name: [*c]u8, __name_len: usize) c_int; +pub extern fn setlogin(__name: [*c]const u8) c_int; +pub extern var optarg: [*c]u8; +pub extern var optind: c_int; +pub extern var opterr: c_int; +pub extern var optopt: c_int; +pub extern fn getopt(___argc: c_int, ___argv: [*c]const [*c]u8, __shortopts: [*c]const u8) c_int; +pub extern fn gethostname(__name: [*c]u8, __len: usize) c_int; +pub extern fn sethostname(__name: [*c]const u8, __len: usize) c_int; +pub extern fn sethostid(__id: c_long) c_int; +pub extern fn getdomainname(__name: [*c]u8, __len: usize) c_int; +pub extern fn setdomainname(__name: [*c]const u8, __len: usize) c_int; +pub extern fn vhangup() c_int; +pub extern fn revoke(__file: [*c]const u8) c_int; +pub extern fn profil(__sample_buffer: [*c]c_ushort, __size: usize, __offset: usize, __scale: c_uint) c_int; +pub extern fn acct(__name: [*c]const u8) c_int; +pub extern fn getusershell() [*c]u8; +pub extern fn endusershell() void; +pub extern fn setusershell() void; +pub extern fn daemon(__nochdir: c_int, __noclose: c_int) c_int; +pub extern fn chroot(__path: [*c]const u8) c_int; +pub extern fn getpass(__prompt: [*c]const u8) [*c]u8; +pub extern fn fsync(__fd: c_int) c_int; +pub extern fn gethostid() c_long; +pub extern fn sync() void; +pub extern fn getpagesize() c_int; +pub extern fn getdtablesize() c_int; +pub extern fn truncate(__file: [*c]const u8, __length: __off_t) c_int; +pub extern fn ftruncate(__fd: c_int, __length: __off_t) c_int; +pub extern fn brk(__addr: ?*anyopaque) c_int; +pub extern fn sbrk(__delta: isize) ?*anyopaque; +pub extern fn syscall(__sysno: c_long, ...) c_long; +pub extern fn lockf(__fd: c_int, __cmd: c_int, __len: __off_t) c_int; +pub extern fn fdatasync(__fildes: c_int) c_int; +pub extern fn crypt(__key: [*c]const u8, __salt: [*c]const u8) [*c]u8; +pub extern fn getentropy(__buffer: ?*anyopaque, __length: usize) c_int; +pub const metacall_pid = pid_t; +pub const metacall_pre_fork_callback_ptr = ?*const fn (?*anyopaque) callconv(.C) c_int; +pub const metacall_post_fork_callback_ptr = ?*const fn (metacall_pid, ?*anyopaque) callconv(.C) c_int; +pub extern fn metacall_fork_initialize() c_int; +pub extern fn metacall_fork(pre_callback: metacall_pre_fork_callback_ptr, post_callback: metacall_post_fork_callback_ptr) void; +pub extern fn metacall_fork_destroy() c_int; +pub const struct_metacall_initialize_configuration_type = extern struct { + tag: [*c]u8 = @import("std").mem.zeroes([*c]u8), + options: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), +}; +pub const metacall_await_callback = ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque; +pub const struct_metacall_await_callbacks_type = extern struct { + resolve: metacall_await_callback = @import("std").mem.zeroes(metacall_await_callback), + reject: metacall_await_callback = @import("std").mem.zeroes(metacall_await_callback), +}; +pub const metacall_await_callbacks = struct_metacall_await_callbacks_type; +pub const struct_metacall_version_type = extern struct { + major: c_uint = @import("std").mem.zeroes(c_uint), + minor: c_uint = @import("std").mem.zeroes(c_uint), + patch: c_uint = @import("std").mem.zeroes(c_uint), + revision: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), + str: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), + name: [*c]const u8 = @import("std").mem.zeroes([*c]const u8), +}; +pub extern var metacall_null_args: [1]?*anyopaque; +pub extern fn metacall_serial() [*c]const u8; +pub extern fn metacall_log_null() void; +pub extern fn metacall_flags(flags: c_int) void; +pub extern fn metacall_initialize() c_int; +pub extern fn metacall_initialize_ex(initialize_config: [*c]struct_metacall_initialize_configuration_type) c_int; +pub extern fn metacall_initialize_args(argc: c_int, argv: [*c][*c]u8) void; +pub extern fn metacall_argc() c_int; +pub extern fn metacall_argv() [*c][*c]u8; +pub extern fn metacall_is_initialized(tag: [*c]const u8) c_int; +pub extern fn metacall_args_size() usize; +pub extern fn metacall_execution_path(tag: [*c]const u8, path: [*c]const u8) c_int; +pub extern fn metacall_execution_path_s(tag: [*c]const u8, tag_length: usize, path: [*c]const u8, path_length: usize) c_int; +pub extern fn metacall_load_from_file(tag: [*c]const u8, paths: [*c][*c]const u8, size: usize, handle: [*c]?*anyopaque) c_int; +pub extern fn metacall_load_from_memory(tag: [*c]const u8, buffer: [*c]const u8, size: usize, handle: [*c]?*anyopaque) c_int; +pub extern fn metacall_load_from_package(tag: [*c]const u8, path: [*c]const u8, handle: [*c]?*anyopaque) c_int; +pub extern fn metacall_load_from_configuration(path: [*c]const u8, handle: [*c]?*anyopaque, allocator: ?*anyopaque) c_int; +pub extern fn metacallv(name: [*c]const u8, args: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacallv_s(name: [*c]const u8, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacallhv(handle: ?*anyopaque, name: [*c]const u8, args: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacallhv_s(handle: ?*anyopaque, name: [*c]const u8, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall(name: [*c]const u8, ...) ?*anyopaque; +pub extern fn metacallt(name: [*c]const u8, ids: [*c]const enum_metacall_value_id, ...) ?*anyopaque; +pub extern fn metacallt_s(name: [*c]const u8, ids: [*c]const enum_metacall_value_id, size: usize, ...) ?*anyopaque; +pub extern fn metacallht_s(handle: ?*anyopaque, name: [*c]const u8, ids: [*c]const enum_metacall_value_id, size: usize, ...) ?*anyopaque; +pub extern fn metacall_function(name: [*c]const u8) ?*anyopaque; +pub extern fn metacall_handle_function(handle: ?*anyopaque, name: [*c]const u8) ?*anyopaque; +pub extern fn metacall_function_parameter_type(func: ?*anyopaque, parameter: usize, id: [*c]enum_metacall_value_id) c_int; +pub extern fn metacall_function_return_type(func: ?*anyopaque, id: [*c]enum_metacall_value_id) c_int; +pub extern fn metacall_function_size(func: ?*anyopaque) usize; +pub extern fn metacall_function_async(func: ?*anyopaque) c_int; +pub extern fn metacall_handle(tag: [*c]const u8, name: [*c]const u8) ?*anyopaque; +pub extern fn metacall_handle_id(handle: ?*anyopaque) [*c]const u8; +pub extern fn metacall_handle_export(handle: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfv(func: ?*anyopaque, args: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacallfv_s(func: ?*anyopaque, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacallf(func: ?*anyopaque, ...) ?*anyopaque; +pub extern fn metacallfs(func: ?*anyopaque, buffer: [*c]const u8, size: usize, allocator: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfmv(func: ?*anyopaque, keys: [*c]?*anyopaque, values: [*c]?*anyopaque) ?*anyopaque; +pub extern fn metacallfms(func: ?*anyopaque, buffer: [*c]const u8, size: usize, allocator: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_register(name: [*c]const u8, invoke: ?*const fn (usize, [*c]?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, func: [*c]?*anyopaque, return_type: enum_metacall_value_id, size: usize, ...) c_int; +pub extern fn metacall_registerv(name: [*c]const u8, invoke: ?*const fn (usize, [*c]?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, func: [*c]?*anyopaque, return_type: enum_metacall_value_id, size: usize, types: [*c]enum_metacall_value_id) c_int; +pub extern fn metacall_register_loaderv(loader: ?*anyopaque, context: ?*anyopaque, name: [*c]const u8, invoke: ?*const fn (usize, [*c]?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, return_type: enum_metacall_value_id, size: usize, types: [*c]enum_metacall_value_id) c_int; +pub extern fn metacall_await(name: [*c]const u8, args: [*c]?*anyopaque, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_await_future(f: ?*anyopaque, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_await_s(name: [*c]const u8, args: [*c]?*anyopaque, size: usize, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfv_await(func: ?*anyopaque, args: [*c]?*anyopaque, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfv_await_s(func: ?*anyopaque, args: [*c]?*anyopaque, size: usize, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfv_await_struct_s(func: ?*anyopaque, args: [*c]?*anyopaque, size: usize, cb: metacall_await_callbacks, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfmv_await(func: ?*anyopaque, keys: [*c]?*anyopaque, values: [*c]?*anyopaque, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfmv_await_s(func: ?*anyopaque, keys: [*c]?*anyopaque, values: [*c]?*anyopaque, size: usize, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfs_await(func: ?*anyopaque, buffer: [*c]const u8, size: usize, allocator: ?*anyopaque, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacallfms_await(func: ?*anyopaque, buffer: [*c]const u8, size: usize, allocator: ?*anyopaque, resolve_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, reject_callback: ?*const fn (?*anyopaque, ?*anyopaque) callconv(.C) ?*anyopaque, data: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_class(name: [*c]const u8) ?*anyopaque; +pub extern fn metacallv_class(cls: ?*anyopaque, name: [*c]const u8, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacallt_class(cls: ?*anyopaque, name: [*c]const u8, ret: enum_metacall_value_id, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_class_new(cls: ?*anyopaque, name: [*c]const u8, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_class_static_get(cls: ?*anyopaque, key: [*c]const u8) ?*anyopaque; +pub extern fn metacall_class_static_set(cls: ?*anyopaque, key: [*c]const u8, v: ?*anyopaque) c_int; +pub extern fn metacallv_object(obj: ?*anyopaque, name: [*c]const u8, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacallt_object(obj: ?*anyopaque, name: [*c]const u8, ret: enum_metacall_value_id, args: [*c]?*anyopaque, size: usize) ?*anyopaque; +pub extern fn metacall_object_get(obj: ?*anyopaque, key: [*c]const u8) ?*anyopaque; +pub extern fn metacall_object_set(obj: ?*anyopaque, key: [*c]const u8, v: ?*anyopaque) c_int; +pub extern fn metacall_throwable_value(th: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_inspect(size: [*c]usize, allocator: ?*anyopaque) [*c]u8; +pub extern fn metacall_inspect_value() ?*anyopaque; +pub extern fn metacall_serialize(name: [*c]const u8, v: ?*anyopaque, size: [*c]usize, allocator: ?*anyopaque) [*c]u8; +pub extern fn metacall_deserialize(name: [*c]const u8, buffer: [*c]const u8, size: usize, allocator: ?*anyopaque) ?*anyopaque; +pub extern fn metacall_clear(handle: ?*anyopaque) c_int; +pub extern fn metacall_plugin_extension() ?*anyopaque; +pub extern fn metacall_plugin_path() [*c]const u8; +pub extern fn metacall_destroy() c_int; +pub extern fn metacall_version() [*c]const struct_metacall_version_type; +pub extern fn metacall_version_hex_make(major: c_uint, minor: c_uint, patch: c_uint) u32; +pub extern fn metacall_version_hex() u32; +pub extern fn metacall_version_str() [*c]const u8; +pub extern fn metacall_version_revision() [*c]const u8; +pub extern fn metacall_version_name() [*c]const u8; +pub extern fn metacall_print_info() [*c]const u8; +pub const __INTMAX_C_SUFFIX__ = @compileError("unable to translate macro: undefined identifier `L`"); // (no file):90:9 +pub const __UINTMAX_C_SUFFIX__ = @compileError("unable to translate macro: undefined identifier `UL`"); // (no file):96:9 +pub const __INT64_C_SUFFIX__ = @compileError("unable to translate macro: undefined identifier `L`"); // (no file):193:9 +pub const __UINT32_C_SUFFIX__ = @compileError("unable to translate macro: undefined identifier `U`"); // (no file):215:9 +pub const __UINT64_C_SUFFIX__ = @compileError("unable to translate macro: undefined identifier `UL`"); // (no file):223:9 +pub const __seg_gs = @compileError("unable to translate macro: undefined identifier `address_space`"); // (no file):353:9 +pub const __seg_fs = @compileError("unable to translate macro: undefined identifier `address_space`"); // (no file):354:9 +pub const METACALL_API = @compileError("unable to translate macro: undefined identifier `visibility`"); // ../../../../build/source/metacall/include/metacall/metacall_api.h:15:15 +pub const METACALL_NO_EXPORT = @compileError("unable to translate macro: undefined identifier `visibility`"); // ../../../../build/source/metacall/include/metacall/metacall_api.h:20:13 +pub const METACALL_DEPRECATED = @compileError("unable to translate macro: undefined identifier `__deprecated__`"); // ../../../../build/source/metacall/include/metacall/metacall_api.h:25:11 +pub const __GLIBC_USE = @compileError("unable to translate macro: undefined identifier `__GLIBC_USE_`"); // /usr/include/features.h:188:9 +pub const __glibc_has_attribute = @compileError("unable to translate macro: undefined identifier `__has_attribute`"); // /usr/include/sys/cdefs.h:45:10 +pub const __glibc_has_extension = @compileError("unable to translate macro: undefined identifier `__has_extension`"); // /usr/include/sys/cdefs.h:55:10 +pub const __THROW = @compileError("unable to translate macro: undefined identifier `__nothrow__`"); // /usr/include/sys/cdefs.h:79:11 +pub const __THROWNL = @compileError("unable to translate macro: undefined identifier `__nothrow__`"); // /usr/include/sys/cdefs.h:80:11 +pub const __NTH = @compileError("unable to translate macro: undefined identifier `__nothrow__`"); // /usr/include/sys/cdefs.h:81:11 +pub const __NTHNL = @compileError("unable to translate macro: undefined identifier `__nothrow__`"); // /usr/include/sys/cdefs.h:82:11 +pub const __COLD = @compileError("unable to translate macro: undefined identifier `__cold__`"); // /usr/include/sys/cdefs.h:102:11 +pub const __CONCAT = @compileError("unable to translate C expr: unexpected token '##'"); // /usr/include/sys/cdefs.h:131:9 +pub const __STRING = @compileError("unable to translate C expr: unexpected token '#'"); // /usr/include/sys/cdefs.h:132:9 +pub const __warnattr = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:216:10 +pub const __errordecl = @compileError("unable to translate C expr: unexpected token 'extern'"); // /usr/include/sys/cdefs.h:217:10 +pub const __flexarr = @compileError("unable to translate C expr: unexpected token '['"); // /usr/include/sys/cdefs.h:225:10 +pub const __REDIRECT = @compileError("unable to translate C expr: unexpected token '__asm__'"); // /usr/include/sys/cdefs.h:256:10 +pub const __REDIRECT_NTH = @compileError("unable to translate C expr: unexpected token '__asm__'"); // /usr/include/sys/cdefs.h:263:11 +pub const __REDIRECT_NTHNL = @compileError("unable to translate C expr: unexpected token '__asm__'"); // /usr/include/sys/cdefs.h:265:11 +pub const __ASMNAME = @compileError("unable to translate C expr: unexpected token ','"); // /usr/include/sys/cdefs.h:268:10 +pub const __ASMNAME2 = @compileError("unable to translate C expr: unexpected token 'an identifier'"); // /usr/include/sys/cdefs.h:269:10 +pub const __attribute_malloc__ = @compileError("unable to translate macro: undefined identifier `__malloc__`"); // /usr/include/sys/cdefs.h:298:10 +pub const __attribute_alloc_size__ = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:309:10 +pub const __attribute_alloc_align__ = @compileError("unable to translate macro: undefined identifier `__alloc_align__`"); // /usr/include/sys/cdefs.h:315:10 +pub const __attribute_pure__ = @compileError("unable to translate macro: undefined identifier `__pure__`"); // /usr/include/sys/cdefs.h:325:10 +pub const __attribute_const__ = @compileError("unable to translate C expr: unexpected token '__attribute__'"); // /usr/include/sys/cdefs.h:332:10 +pub const __attribute_maybe_unused__ = @compileError("unable to translate macro: undefined identifier `__unused__`"); // /usr/include/sys/cdefs.h:338:10 +pub const __attribute_used__ = @compileError("unable to translate macro: undefined identifier `__used__`"); // /usr/include/sys/cdefs.h:347:10 +pub const __attribute_noinline__ = @compileError("unable to translate macro: undefined identifier `__noinline__`"); // /usr/include/sys/cdefs.h:348:10 +pub const __attribute_deprecated__ = @compileError("unable to translate macro: undefined identifier `__deprecated__`"); // /usr/include/sys/cdefs.h:356:10 +pub const __attribute_deprecated_msg__ = @compileError("unable to translate macro: undefined identifier `__deprecated__`"); // /usr/include/sys/cdefs.h:366:10 +pub const __attribute_format_arg__ = @compileError("unable to translate macro: undefined identifier `__format_arg__`"); // /usr/include/sys/cdefs.h:379:10 +pub const __attribute_format_strfmon__ = @compileError("unable to translate macro: undefined identifier `__format__`"); // /usr/include/sys/cdefs.h:389:10 +pub const __attribute_nonnull__ = @compileError("unable to translate macro: undefined identifier `__nonnull__`"); // /usr/include/sys/cdefs.h:401:11 +pub const __returns_nonnull = @compileError("unable to translate macro: undefined identifier `__returns_nonnull__`"); // /usr/include/sys/cdefs.h:414:10 +pub const __attribute_warn_unused_result__ = @compileError("unable to translate macro: undefined identifier `__warn_unused_result__`"); // /usr/include/sys/cdefs.h:423:10 +pub const __always_inline = @compileError("unable to translate macro: undefined identifier `__always_inline__`"); // /usr/include/sys/cdefs.h:441:10 +pub const __attribute_artificial__ = @compileError("unable to translate macro: undefined identifier `__artificial__`"); // /usr/include/sys/cdefs.h:450:10 +pub const __extern_inline = @compileError("unable to translate macro: undefined identifier `__gnu_inline__`"); // /usr/include/sys/cdefs.h:468:11 +pub const __extern_always_inline = @compileError("unable to translate macro: undefined identifier `__gnu_inline__`"); // /usr/include/sys/cdefs.h:469:11 +pub const __restrict_arr = @compileError("unable to translate C expr: unexpected token '__restrict'"); // /usr/include/sys/cdefs.h:512:10 +pub const __attribute_copy__ = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:561:10 +pub const __LDBL_REDIR2_DECL = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:638:10 +pub const __LDBL_REDIR_DECL = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:639:10 +pub const __glibc_macro_warning1 = @compileError("unable to translate macro: undefined identifier `_Pragma`"); // /usr/include/sys/cdefs.h:653:10 +pub const __glibc_macro_warning = @compileError("unable to translate macro: undefined identifier `GCC`"); // /usr/include/sys/cdefs.h:654:10 +pub const __fortified_attr_access = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:699:11 +pub const __attr_access = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:700:11 +pub const __attr_access_none = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:701:11 +pub const __attr_dealloc = @compileError("unable to translate C expr: unexpected token ''"); // /usr/include/sys/cdefs.h:711:10 +pub const __attribute_returns_twice__ = @compileError("unable to translate macro: undefined identifier `__returns_twice__`"); // /usr/include/sys/cdefs.h:718:10 +pub const __STD_TYPE = @compileError("unable to translate C expr: unexpected token 'typedef'"); // /usr/include/bits/types.h:137:10 +pub const __FSID_T_TYPE = @compileError("unable to translate macro: undefined identifier `__val`"); // /usr/include/bits/typesizes.h:73:9 +pub const __CFLOAT32 = @compileError("unable to translate: TODO _Complex"); // /usr/include/bits/floatn-common.h:149:12 +pub const __CFLOAT64 = @compileError("unable to translate: TODO _Complex"); // /usr/include/bits/floatn-common.h:160:13 +pub const __CFLOAT32X = @compileError("unable to translate: TODO _Complex"); // /usr/include/bits/floatn-common.h:169:12 +pub const __CFLOAT64X = @compileError("unable to translate: TODO _Complex"); // /usr/include/bits/floatn-common.h:178:13 +pub const __builtin_nansf32 = @compileError("unable to translate macro: undefined identifier `__builtin_nansf`"); // /usr/include/bits/floatn-common.h:221:12 +pub const __builtin_huge_valf64 = @compileError("unable to translate macro: undefined identifier `__builtin_huge_val`"); // /usr/include/bits/floatn-common.h:255:13 +pub const __builtin_inff64 = @compileError("unable to translate macro: undefined identifier `__builtin_inf`"); // /usr/include/bits/floatn-common.h:256:13 +pub const __builtin_nanf64 = @compileError("unable to translate macro: undefined identifier `__builtin_nan`"); // /usr/include/bits/floatn-common.h:257:13 +pub const __builtin_nansf64 = @compileError("unable to translate macro: undefined identifier `__builtin_nans`"); // /usr/include/bits/floatn-common.h:258:13 +pub const __builtin_huge_valf32x = @compileError("unable to translate macro: undefined identifier `__builtin_huge_val`"); // /usr/include/bits/floatn-common.h:272:12 +pub const __builtin_inff32x = @compileError("unable to translate macro: undefined identifier `__builtin_inf`"); // /usr/include/bits/floatn-common.h:273:12 +pub const __builtin_nanf32x = @compileError("unable to translate macro: undefined identifier `__builtin_nan`"); // /usr/include/bits/floatn-common.h:274:12 +pub const __builtin_nansf32x = @compileError("unable to translate macro: undefined identifier `__builtin_nans`"); // /usr/include/bits/floatn-common.h:275:12 +pub const __builtin_huge_valf64x = @compileError("unable to translate macro: undefined identifier `__builtin_huge_vall`"); // /usr/include/bits/floatn-common.h:289:13 +pub const __builtin_inff64x = @compileError("unable to translate macro: undefined identifier `__builtin_infl`"); // /usr/include/bits/floatn-common.h:290:13 +pub const __builtin_nanf64x = @compileError("unable to translate macro: undefined identifier `__builtin_nanl`"); // /usr/include/bits/floatn-common.h:291:13 +pub const __builtin_nansf64x = @compileError("unable to translate macro: undefined identifier `__builtin_nansl`"); // /usr/include/bits/floatn-common.h:292:13 +pub const __FD_ZERO = @compileError("unable to translate macro: undefined identifier `__i`"); // /usr/include/bits/select.h:25:9 +pub const __FD_SET = @compileError("unable to translate C expr: expected ')' instead got '|='"); // /usr/include/bits/select.h:32:9 +pub const __FD_CLR = @compileError("unable to translate C expr: expected ')' instead got '&='"); // /usr/include/bits/select.h:34:9 +pub const __PTHREAD_MUTEX_INITIALIZER = @compileError("unable to translate C expr: unexpected token '{'"); // /usr/include/bits/struct_mutex.h:56:10 +pub const __PTHREAD_RWLOCK_ELISION_EXTRA = @compileError("unable to translate C expr: unexpected token '{'"); // /usr/include/bits/struct_rwlock.h:40:11 +pub const __ONCE_FLAG_INIT = @compileError("unable to translate C expr: unexpected token '{'"); // /usr/include/bits/thread-shared-types.h:113:9 +pub const va_start = @compileError("unable to translate macro: undefined identifier `__builtin_va_start`"); // /home/raymond/.zvm/master/lib/include/stdarg.h:33:9 +pub const va_end = @compileError("unable to translate macro: undefined identifier `__builtin_va_end`"); // /home/raymond/.zvm/master/lib/include/stdarg.h:35:9 +pub const va_arg = @compileError("unable to translate C expr: unexpected token 'an identifier'"); // /home/raymond/.zvm/master/lib/include/stdarg.h:36:9 +pub const __va_copy = @compileError("unable to translate macro: undefined identifier `__builtin_va_copy`"); // /home/raymond/.zvm/master/lib/include/stdarg.h:41:9 +pub const va_copy = @compileError("unable to translate macro: undefined identifier `__builtin_va_copy`"); // /home/raymond/.zvm/master/lib/include/stdarg.h:46:9 +pub const __getc_unlocked_body = @compileError("TODO postfix inc/dec expr"); // /usr/include/bits/types/struct_FILE.h:102:9 +pub const __putc_unlocked_body = @compileError("TODO postfix inc/dec expr"); // /usr/include/bits/types/struct_FILE.h:106:9 +pub const __llvm__ = @as(c_int, 1); +pub const __clang__ = @as(c_int, 1); +pub const __clang_major__ = @as(c_int, 17); +pub const __clang_minor__ = @as(c_int, 0); +pub const __clang_patchlevel__ = @as(c_int, 6); +pub const __clang_version__ = "17.0.6 (https://github.com/ziglang/zig-bootstrap fb6231bb12648dc4a54a8afcd16eeebd6657ff4a)"; +pub const __GNUC__ = @as(c_int, 4); +pub const __GNUC_MINOR__ = @as(c_int, 2); +pub const __GNUC_PATCHLEVEL__ = @as(c_int, 1); +pub const __GXX_ABI_VERSION = @as(c_int, 1002); +pub const __ATOMIC_RELAXED = @as(c_int, 0); +pub const __ATOMIC_CONSUME = @as(c_int, 1); +pub const __ATOMIC_ACQUIRE = @as(c_int, 2); +pub const __ATOMIC_RELEASE = @as(c_int, 3); +pub const __ATOMIC_ACQ_REL = @as(c_int, 4); +pub const __ATOMIC_SEQ_CST = @as(c_int, 5); +pub const __OPENCL_MEMORY_SCOPE_WORK_ITEM = @as(c_int, 0); +pub const __OPENCL_MEMORY_SCOPE_WORK_GROUP = @as(c_int, 1); +pub const __OPENCL_MEMORY_SCOPE_DEVICE = @as(c_int, 2); +pub const __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES = @as(c_int, 3); +pub const __OPENCL_MEMORY_SCOPE_SUB_GROUP = @as(c_int, 4); +pub const __FPCLASS_SNAN = @as(c_int, 0x0001); +pub const __FPCLASS_QNAN = @as(c_int, 0x0002); +pub const __FPCLASS_NEGINF = @as(c_int, 0x0004); +pub const __FPCLASS_NEGNORMAL = @as(c_int, 0x0008); +pub const __FPCLASS_NEGSUBNORMAL = @as(c_int, 0x0010); +pub const __FPCLASS_NEGZERO = @as(c_int, 0x0020); +pub const __FPCLASS_POSZERO = @as(c_int, 0x0040); +pub const __FPCLASS_POSSUBNORMAL = @as(c_int, 0x0080); +pub const __FPCLASS_POSNORMAL = @as(c_int, 0x0100); +pub const __FPCLASS_POSINF = @as(c_int, 0x0200); +pub const __PRAGMA_REDEFINE_EXTNAME = @as(c_int, 1); +pub const __VERSION__ = "Clang 17.0.6 (https://github.com/ziglang/zig-bootstrap fb6231bb12648dc4a54a8afcd16eeebd6657ff4a)"; +pub const __OBJC_BOOL_IS_BOOL = @as(c_int, 0); +pub const __CONSTANT_CFSTRINGS__ = @as(c_int, 1); +pub const __clang_literal_encoding__ = "UTF-8"; +pub const __clang_wide_literal_encoding__ = "UTF-32"; +pub const __ORDER_LITTLE_ENDIAN__ = @as(c_int, 1234); +pub const __ORDER_BIG_ENDIAN__ = @as(c_int, 4321); +pub const __ORDER_PDP_ENDIAN__ = @as(c_int, 3412); +pub const __BYTE_ORDER__ = __ORDER_LITTLE_ENDIAN__; +pub const __LITTLE_ENDIAN__ = @as(c_int, 1); +pub const _LP64 = @as(c_int, 1); +pub const __LP64__ = @as(c_int, 1); +pub const __CHAR_BIT__ = @as(c_int, 8); +pub const __BOOL_WIDTH__ = @as(c_int, 8); +pub const __SHRT_WIDTH__ = @as(c_int, 16); +pub const __INT_WIDTH__ = @as(c_int, 32); +pub const __LONG_WIDTH__ = @as(c_int, 64); +pub const __LLONG_WIDTH__ = @as(c_int, 64); +pub const __BITINT_MAXWIDTH__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 8388608, .decimal); +pub const __SCHAR_MAX__ = @as(c_int, 127); +pub const __SHRT_MAX__ = @as(c_int, 32767); +pub const __INT_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const __LONG_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __LONG_LONG_MAX__ = @as(c_longlong, 9223372036854775807); +pub const __WCHAR_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const __WCHAR_WIDTH__ = @as(c_int, 32); +pub const __WINT_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub const __WINT_WIDTH__ = @as(c_int, 32); +pub const __INTMAX_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __INTMAX_WIDTH__ = @as(c_int, 64); +pub const __SIZE_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const __SIZE_WIDTH__ = @as(c_int, 64); +pub const __UINTMAX_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const __UINTMAX_WIDTH__ = @as(c_int, 64); +pub const __PTRDIFF_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __PTRDIFF_WIDTH__ = @as(c_int, 64); +pub const __INTPTR_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __INTPTR_WIDTH__ = @as(c_int, 64); +pub const __UINTPTR_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const __UINTPTR_WIDTH__ = @as(c_int, 64); +pub const __SIZEOF_DOUBLE__ = @as(c_int, 8); +pub const __SIZEOF_FLOAT__ = @as(c_int, 4); +pub const __SIZEOF_INT__ = @as(c_int, 4); +pub const __SIZEOF_LONG__ = @as(c_int, 8); +pub const __SIZEOF_LONG_DOUBLE__ = @as(c_int, 16); +pub const __SIZEOF_LONG_LONG__ = @as(c_int, 8); +pub const __SIZEOF_POINTER__ = @as(c_int, 8); +pub const __SIZEOF_SHORT__ = @as(c_int, 2); +pub const __SIZEOF_PTRDIFF_T__ = @as(c_int, 8); +pub const __SIZEOF_SIZE_T__ = @as(c_int, 8); +pub const __SIZEOF_WCHAR_T__ = @as(c_int, 4); +pub const __SIZEOF_WINT_T__ = @as(c_int, 4); +pub const __SIZEOF_INT128__ = @as(c_int, 16); +pub const __INTMAX_TYPE__ = c_long; +pub const __INTMAX_FMTd__ = "ld"; +pub const __INTMAX_FMTi__ = "li"; +pub const __UINTMAX_TYPE__ = c_ulong; +pub const __UINTMAX_FMTo__ = "lo"; +pub const __UINTMAX_FMTu__ = "lu"; +pub const __UINTMAX_FMTx__ = "lx"; +pub const __UINTMAX_FMTX__ = "lX"; +pub const __PTRDIFF_TYPE__ = c_long; +pub const __PTRDIFF_FMTd__ = "ld"; +pub const __PTRDIFF_FMTi__ = "li"; +pub const __INTPTR_TYPE__ = c_long; +pub const __INTPTR_FMTd__ = "ld"; +pub const __INTPTR_FMTi__ = "li"; +pub const __SIZE_TYPE__ = c_ulong; +pub const __SIZE_FMTo__ = "lo"; +pub const __SIZE_FMTu__ = "lu"; +pub const __SIZE_FMTx__ = "lx"; +pub const __SIZE_FMTX__ = "lX"; +pub const __WCHAR_TYPE__ = c_int; +pub const __WINT_TYPE__ = c_uint; +pub const __SIG_ATOMIC_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const __SIG_ATOMIC_WIDTH__ = @as(c_int, 32); +pub const __CHAR16_TYPE__ = c_ushort; +pub const __CHAR32_TYPE__ = c_uint; +pub const __UINTPTR_TYPE__ = c_ulong; +pub const __UINTPTR_FMTo__ = "lo"; +pub const __UINTPTR_FMTu__ = "lu"; +pub const __UINTPTR_FMTx__ = "lx"; +pub const __UINTPTR_FMTX__ = "lX"; +pub const __FLT16_DENORM_MIN__ = @as(f16, 5.9604644775390625e-8); +pub const __FLT16_HAS_DENORM__ = @as(c_int, 1); +pub const __FLT16_DIG__ = @as(c_int, 3); +pub const __FLT16_DECIMAL_DIG__ = @as(c_int, 5); +pub const __FLT16_EPSILON__ = @as(f16, 9.765625e-4); +pub const __FLT16_HAS_INFINITY__ = @as(c_int, 1); +pub const __FLT16_HAS_QUIET_NAN__ = @as(c_int, 1); +pub const __FLT16_MANT_DIG__ = @as(c_int, 11); +pub const __FLT16_MAX_10_EXP__ = @as(c_int, 4); +pub const __FLT16_MAX_EXP__ = @as(c_int, 16); +pub const __FLT16_MAX__ = @as(f16, 6.5504e+4); +pub const __FLT16_MIN_10_EXP__ = -@as(c_int, 4); +pub const __FLT16_MIN_EXP__ = -@as(c_int, 13); +pub const __FLT16_MIN__ = @as(f16, 6.103515625e-5); +pub const __FLT_DENORM_MIN__ = @as(f32, 1.40129846e-45); +pub const __FLT_HAS_DENORM__ = @as(c_int, 1); +pub const __FLT_DIG__ = @as(c_int, 6); +pub const __FLT_DECIMAL_DIG__ = @as(c_int, 9); +pub const __FLT_EPSILON__ = @as(f32, 1.19209290e-7); +pub const __FLT_HAS_INFINITY__ = @as(c_int, 1); +pub const __FLT_HAS_QUIET_NAN__ = @as(c_int, 1); +pub const __FLT_MANT_DIG__ = @as(c_int, 24); +pub const __FLT_MAX_10_EXP__ = @as(c_int, 38); +pub const __FLT_MAX_EXP__ = @as(c_int, 128); +pub const __FLT_MAX__ = @as(f32, 3.40282347e+38); +pub const __FLT_MIN_10_EXP__ = -@as(c_int, 37); +pub const __FLT_MIN_EXP__ = -@as(c_int, 125); +pub const __FLT_MIN__ = @as(f32, 1.17549435e-38); +pub const __DBL_DENORM_MIN__ = @as(f64, 4.9406564584124654e-324); +pub const __DBL_HAS_DENORM__ = @as(c_int, 1); +pub const __DBL_DIG__ = @as(c_int, 15); +pub const __DBL_DECIMAL_DIG__ = @as(c_int, 17); +pub const __DBL_EPSILON__ = @as(f64, 2.2204460492503131e-16); +pub const __DBL_HAS_INFINITY__ = @as(c_int, 1); +pub const __DBL_HAS_QUIET_NAN__ = @as(c_int, 1); +pub const __DBL_MANT_DIG__ = @as(c_int, 53); +pub const __DBL_MAX_10_EXP__ = @as(c_int, 308); +pub const __DBL_MAX_EXP__ = @as(c_int, 1024); +pub const __DBL_MAX__ = @as(f64, 1.7976931348623157e+308); +pub const __DBL_MIN_10_EXP__ = -@as(c_int, 307); +pub const __DBL_MIN_EXP__ = -@as(c_int, 1021); +pub const __DBL_MIN__ = @as(f64, 2.2250738585072014e-308); +pub const __LDBL_DENORM_MIN__ = @as(c_longdouble, 3.64519953188247460253e-4951); +pub const __LDBL_HAS_DENORM__ = @as(c_int, 1); +pub const __LDBL_DIG__ = @as(c_int, 18); +pub const __LDBL_DECIMAL_DIG__ = @as(c_int, 21); +pub const __LDBL_EPSILON__ = @as(c_longdouble, 1.08420217248550443401e-19); +pub const __LDBL_HAS_INFINITY__ = @as(c_int, 1); +pub const __LDBL_HAS_QUIET_NAN__ = @as(c_int, 1); +pub const __LDBL_MANT_DIG__ = @as(c_int, 64); +pub const __LDBL_MAX_10_EXP__ = @as(c_int, 4932); +pub const __LDBL_MAX_EXP__ = @as(c_int, 16384); +pub const __LDBL_MAX__ = @as(c_longdouble, 1.18973149535723176502e+4932); +pub const __LDBL_MIN_10_EXP__ = -@as(c_int, 4931); +pub const __LDBL_MIN_EXP__ = -@as(c_int, 16381); +pub const __LDBL_MIN__ = @as(c_longdouble, 3.36210314311209350626e-4932); +pub const __POINTER_WIDTH__ = @as(c_int, 64); +pub const __BIGGEST_ALIGNMENT__ = @as(c_int, 16); +pub const __WINT_UNSIGNED__ = @as(c_int, 1); +pub const __INT8_TYPE__ = i8; +pub const __INT8_FMTd__ = "hhd"; +pub const __INT8_FMTi__ = "hhi"; +pub const __INT8_C_SUFFIX__ = ""; +pub const __INT16_TYPE__ = c_short; +pub const __INT16_FMTd__ = "hd"; +pub const __INT16_FMTi__ = "hi"; +pub const __INT16_C_SUFFIX__ = ""; +pub const __INT32_TYPE__ = c_int; +pub const __INT32_FMTd__ = "d"; +pub const __INT32_FMTi__ = "i"; +pub const __INT32_C_SUFFIX__ = ""; +pub const __INT64_TYPE__ = c_long; +pub const __INT64_FMTd__ = "ld"; +pub const __INT64_FMTi__ = "li"; +pub const __UINT8_TYPE__ = u8; +pub const __UINT8_FMTo__ = "hho"; +pub const __UINT8_FMTu__ = "hhu"; +pub const __UINT8_FMTx__ = "hhx"; +pub const __UINT8_FMTX__ = "hhX"; +pub const __UINT8_C_SUFFIX__ = ""; +pub const __UINT8_MAX__ = @as(c_int, 255); +pub const __INT8_MAX__ = @as(c_int, 127); +pub const __UINT16_TYPE__ = c_ushort; +pub const __UINT16_FMTo__ = "ho"; +pub const __UINT16_FMTu__ = "hu"; +pub const __UINT16_FMTx__ = "hx"; +pub const __UINT16_FMTX__ = "hX"; +pub const __UINT16_C_SUFFIX__ = ""; +pub const __UINT16_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal); +pub const __INT16_MAX__ = @as(c_int, 32767); +pub const __UINT32_TYPE__ = c_uint; +pub const __UINT32_FMTo__ = "o"; +pub const __UINT32_FMTu__ = "u"; +pub const __UINT32_FMTx__ = "x"; +pub const __UINT32_FMTX__ = "X"; +pub const __UINT32_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub const __INT32_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const __UINT64_TYPE__ = c_ulong; +pub const __UINT64_FMTo__ = "lo"; +pub const __UINT64_FMTu__ = "lu"; +pub const __UINT64_FMTx__ = "lx"; +pub const __UINT64_FMTX__ = "lX"; +pub const __UINT64_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const __INT64_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __INT_LEAST8_TYPE__ = i8; +pub const __INT_LEAST8_MAX__ = @as(c_int, 127); +pub const __INT_LEAST8_WIDTH__ = @as(c_int, 8); +pub const __INT_LEAST8_FMTd__ = "hhd"; +pub const __INT_LEAST8_FMTi__ = "hhi"; +pub const __UINT_LEAST8_TYPE__ = u8; +pub const __UINT_LEAST8_MAX__ = @as(c_int, 255); +pub const __UINT_LEAST8_FMTo__ = "hho"; +pub const __UINT_LEAST8_FMTu__ = "hhu"; +pub const __UINT_LEAST8_FMTx__ = "hhx"; +pub const __UINT_LEAST8_FMTX__ = "hhX"; +pub const __INT_LEAST16_TYPE__ = c_short; +pub const __INT_LEAST16_MAX__ = @as(c_int, 32767); +pub const __INT_LEAST16_WIDTH__ = @as(c_int, 16); +pub const __INT_LEAST16_FMTd__ = "hd"; +pub const __INT_LEAST16_FMTi__ = "hi"; +pub const __UINT_LEAST16_TYPE__ = c_ushort; +pub const __UINT_LEAST16_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal); +pub const __UINT_LEAST16_FMTo__ = "ho"; +pub const __UINT_LEAST16_FMTu__ = "hu"; +pub const __UINT_LEAST16_FMTx__ = "hx"; +pub const __UINT_LEAST16_FMTX__ = "hX"; +pub const __INT_LEAST32_TYPE__ = c_int; +pub const __INT_LEAST32_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const __INT_LEAST32_WIDTH__ = @as(c_int, 32); +pub const __INT_LEAST32_FMTd__ = "d"; +pub const __INT_LEAST32_FMTi__ = "i"; +pub const __UINT_LEAST32_TYPE__ = c_uint; +pub const __UINT_LEAST32_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub const __UINT_LEAST32_FMTo__ = "o"; +pub const __UINT_LEAST32_FMTu__ = "u"; +pub const __UINT_LEAST32_FMTx__ = "x"; +pub const __UINT_LEAST32_FMTX__ = "X"; +pub const __INT_LEAST64_TYPE__ = c_long; +pub const __INT_LEAST64_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __INT_LEAST64_WIDTH__ = @as(c_int, 64); +pub const __INT_LEAST64_FMTd__ = "ld"; +pub const __INT_LEAST64_FMTi__ = "li"; +pub const __UINT_LEAST64_TYPE__ = c_ulong; +pub const __UINT_LEAST64_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const __UINT_LEAST64_FMTo__ = "lo"; +pub const __UINT_LEAST64_FMTu__ = "lu"; +pub const __UINT_LEAST64_FMTx__ = "lx"; +pub const __UINT_LEAST64_FMTX__ = "lX"; +pub const __INT_FAST8_TYPE__ = i8; +pub const __INT_FAST8_MAX__ = @as(c_int, 127); +pub const __INT_FAST8_WIDTH__ = @as(c_int, 8); +pub const __INT_FAST8_FMTd__ = "hhd"; +pub const __INT_FAST8_FMTi__ = "hhi"; +pub const __UINT_FAST8_TYPE__ = u8; +pub const __UINT_FAST8_MAX__ = @as(c_int, 255); +pub const __UINT_FAST8_FMTo__ = "hho"; +pub const __UINT_FAST8_FMTu__ = "hhu"; +pub const __UINT_FAST8_FMTx__ = "hhx"; +pub const __UINT_FAST8_FMTX__ = "hhX"; +pub const __INT_FAST16_TYPE__ = c_short; +pub const __INT_FAST16_MAX__ = @as(c_int, 32767); +pub const __INT_FAST16_WIDTH__ = @as(c_int, 16); +pub const __INT_FAST16_FMTd__ = "hd"; +pub const __INT_FAST16_FMTi__ = "hi"; +pub const __UINT_FAST16_TYPE__ = c_ushort; +pub const __UINT_FAST16_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal); +pub const __UINT_FAST16_FMTo__ = "ho"; +pub const __UINT_FAST16_FMTu__ = "hu"; +pub const __UINT_FAST16_FMTx__ = "hx"; +pub const __UINT_FAST16_FMTX__ = "hX"; +pub const __INT_FAST32_TYPE__ = c_int; +pub const __INT_FAST32_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const __INT_FAST32_WIDTH__ = @as(c_int, 32); +pub const __INT_FAST32_FMTd__ = "d"; +pub const __INT_FAST32_FMTi__ = "i"; +pub const __UINT_FAST32_TYPE__ = c_uint; +pub const __UINT_FAST32_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub const __UINT_FAST32_FMTo__ = "o"; +pub const __UINT_FAST32_FMTu__ = "u"; +pub const __UINT_FAST32_FMTx__ = "x"; +pub const __UINT_FAST32_FMTX__ = "X"; +pub const __INT_FAST64_TYPE__ = c_long; +pub const __INT_FAST64_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const __INT_FAST64_WIDTH__ = @as(c_int, 64); +pub const __INT_FAST64_FMTd__ = "ld"; +pub const __INT_FAST64_FMTi__ = "li"; +pub const __UINT_FAST64_TYPE__ = c_ulong; +pub const __UINT_FAST64_MAX__ = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const __UINT_FAST64_FMTo__ = "lo"; +pub const __UINT_FAST64_FMTu__ = "lu"; +pub const __UINT_FAST64_FMTx__ = "lx"; +pub const __UINT_FAST64_FMTX__ = "lX"; +pub const __USER_LABEL_PREFIX__ = ""; +pub const __FINITE_MATH_ONLY__ = @as(c_int, 0); +pub const __GNUC_STDC_INLINE__ = @as(c_int, 1); +pub const __GCC_ATOMIC_TEST_AND_SET_TRUEVAL = @as(c_int, 1); +pub const __CLANG_ATOMIC_BOOL_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_CHAR_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_CHAR16_T_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_CHAR32_T_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_WCHAR_T_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_SHORT_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_INT_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_LONG_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_LLONG_LOCK_FREE = @as(c_int, 2); +pub const __CLANG_ATOMIC_POINTER_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_BOOL_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_CHAR_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_CHAR16_T_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_CHAR32_T_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_WCHAR_T_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_SHORT_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_INT_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_LONG_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_LLONG_LOCK_FREE = @as(c_int, 2); +pub const __GCC_ATOMIC_POINTER_LOCK_FREE = @as(c_int, 2); +pub const __NO_INLINE__ = @as(c_int, 1); +pub const __PIC__ = @as(c_int, 2); +pub const __pic__ = @as(c_int, 2); +pub const __FLT_RADIX__ = @as(c_int, 2); +pub const __DECIMAL_DIG__ = __LDBL_DECIMAL_DIG__; +pub const __SSP_STRONG__ = @as(c_int, 2); +pub const __ELF__ = @as(c_int, 1); +pub const __GCC_ASM_FLAG_OUTPUTS__ = @as(c_int, 1); +pub const __code_model_small__ = @as(c_int, 1); +pub const __amd64__ = @as(c_int, 1); +pub const __amd64 = @as(c_int, 1); +pub const __x86_64 = @as(c_int, 1); +pub const __x86_64__ = @as(c_int, 1); +pub const __SEG_GS = @as(c_int, 1); +pub const __SEG_FS = @as(c_int, 1); +pub const __k8 = @as(c_int, 1); +pub const __k8__ = @as(c_int, 1); +pub const __tune_k8__ = @as(c_int, 1); +pub const __REGISTER_PREFIX__ = ""; +pub const __NO_MATH_INLINES = @as(c_int, 1); +pub const __AES__ = @as(c_int, 1); +pub const __VAES__ = @as(c_int, 1); +pub const __PCLMUL__ = @as(c_int, 1); +pub const __VPCLMULQDQ__ = @as(c_int, 1); +pub const __LAHF_SAHF__ = @as(c_int, 1); +pub const __LZCNT__ = @as(c_int, 1); +pub const __RDRND__ = @as(c_int, 1); +pub const __FSGSBASE__ = @as(c_int, 1); +pub const __BMI__ = @as(c_int, 1); +pub const __BMI2__ = @as(c_int, 1); +pub const __POPCNT__ = @as(c_int, 1); +pub const __PRFCHW__ = @as(c_int, 1); +pub const __RDSEED__ = @as(c_int, 1); +pub const __ADX__ = @as(c_int, 1); +pub const __MOVBE__ = @as(c_int, 1); +pub const __FMA__ = @as(c_int, 1); +pub const __F16C__ = @as(c_int, 1); +pub const __GFNI__ = @as(c_int, 1); +pub const __SHA__ = @as(c_int, 1); +pub const __FXSR__ = @as(c_int, 1); +pub const __XSAVE__ = @as(c_int, 1); +pub const __XSAVEOPT__ = @as(c_int, 1); +pub const __XSAVEC__ = @as(c_int, 1); +pub const __XSAVES__ = @as(c_int, 1); +pub const __PKU__ = @as(c_int, 1); +pub const __CLFLUSHOPT__ = @as(c_int, 1); +pub const __CLWB__ = @as(c_int, 1); +pub const __SHSTK__ = @as(c_int, 1); +pub const __RDPID__ = @as(c_int, 1); +pub const __WAITPKG__ = @as(c_int, 1); +pub const __MOVDIRI__ = @as(c_int, 1); +pub const __MOVDIR64B__ = @as(c_int, 1); +pub const __PTWRITE__ = @as(c_int, 1); +pub const __INVPCID__ = @as(c_int, 1); +pub const __AVX2__ = @as(c_int, 1); +pub const __AVX__ = @as(c_int, 1); +pub const __SSE4_2__ = @as(c_int, 1); +pub const __SSE4_1__ = @as(c_int, 1); +pub const __SSSE3__ = @as(c_int, 1); +pub const __SSE3__ = @as(c_int, 1); +pub const __SSE2__ = @as(c_int, 1); +pub const __SSE2_MATH__ = @as(c_int, 1); +pub const __SSE__ = @as(c_int, 1); +pub const __SSE_MATH__ = @as(c_int, 1); +pub const __MMX__ = @as(c_int, 1); +pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = @as(c_int, 1); +pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = @as(c_int, 1); +pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = @as(c_int, 1); +pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = @as(c_int, 1); +pub const __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 = @as(c_int, 1); +pub const __SIZEOF_FLOAT128__ = @as(c_int, 16); +pub const unix = @as(c_int, 1); +pub const __unix = @as(c_int, 1); +pub const __unix__ = @as(c_int, 1); +pub const linux = @as(c_int, 1); +pub const __linux = @as(c_int, 1); +pub const __linux__ = @as(c_int, 1); +pub const __gnu_linux__ = @as(c_int, 1); +pub const __FLOAT128__ = @as(c_int, 1); +pub const __STDC__ = @as(c_int, 1); +pub const __STDC_HOSTED__ = @as(c_int, 1); +pub const __STDC_VERSION__ = @as(c_long, 201710); +pub const __STDC_UTF_16__ = @as(c_int, 1); +pub const __STDC_UTF_32__ = @as(c_int, 1); +pub const __GLIBC_MINOR__ = @as(c_int, 38); +pub const _DEBUG = @as(c_int, 1); +pub const __GCC_HAVE_DWARF2_CFI_ASM = @as(c_int, 1); +pub const METACALL_H = @as(c_int, 1); +pub const METACALL_API_H = ""; +pub const METACALL_DEPRECATED_EXPORT = METACALL_API ++ METACALL_DEPRECATED; +pub const METACALL_DEPRECATED_NO_EXPORT = METACALL_NO_EXPORT ++ METACALL_DEPRECATED; +pub const METACALL_ALLOCATOR_H = @as(c_int, 1); +pub const __CLANG_STDINT_H = ""; +pub const _STDINT_H = @as(c_int, 1); +pub const __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION = ""; +pub const _FEATURES_H = @as(c_int, 1); +pub const __KERNEL_STRICT_NAMES = ""; +pub inline fn __GNUC_PREREQ(maj: anytype, min: anytype) @TypeOf(((__GNUC__ << @as(c_int, 16)) + __GNUC_MINOR__) >= ((maj << @as(c_int, 16)) + min)) { + _ = &maj; + _ = &min; + return ((__GNUC__ << @as(c_int, 16)) + __GNUC_MINOR__) >= ((maj << @as(c_int, 16)) + min); +} +pub inline fn __glibc_clang_prereq(maj: anytype, min: anytype) @TypeOf(((__clang_major__ << @as(c_int, 16)) + __clang_minor__) >= ((maj << @as(c_int, 16)) + min)) { + _ = &maj; + _ = &min; + return ((__clang_major__ << @as(c_int, 16)) + __clang_minor__) >= ((maj << @as(c_int, 16)) + min); +} +pub const _DEFAULT_SOURCE = @as(c_int, 1); +pub const __GLIBC_USE_ISOC2X = @as(c_int, 0); +pub const __USE_ISOC11 = @as(c_int, 1); +pub const __USE_ISOC99 = @as(c_int, 1); +pub const __USE_ISOC95 = @as(c_int, 1); +pub const __USE_POSIX_IMPLICITLY = @as(c_int, 1); +pub const _POSIX_SOURCE = @as(c_int, 1); +pub const _POSIX_C_SOURCE = @as(c_long, 200809); +pub const __USE_POSIX = @as(c_int, 1); +pub const __USE_POSIX2 = @as(c_int, 1); +pub const __USE_POSIX199309 = @as(c_int, 1); +pub const __USE_POSIX199506 = @as(c_int, 1); +pub const __USE_XOPEN2K = @as(c_int, 1); +pub const __USE_XOPEN2K8 = @as(c_int, 1); +pub const _ATFILE_SOURCE = @as(c_int, 1); +pub const __WORDSIZE = @as(c_int, 64); +pub const __WORDSIZE_TIME64_COMPAT32 = @as(c_int, 1); +pub const __SYSCALL_WORDSIZE = @as(c_int, 64); +pub const __TIMESIZE = __WORDSIZE; +pub const __USE_MISC = @as(c_int, 1); +pub const __USE_ATFILE = @as(c_int, 1); +pub const __USE_FORTIFY_LEVEL = @as(c_int, 0); +pub const __GLIBC_USE_DEPRECATED_GETS = @as(c_int, 0); +pub const __GLIBC_USE_DEPRECATED_SCANF = @as(c_int, 0); +pub const __GLIBC_USE_C2X_STRTOL = @as(c_int, 0); +pub const _STDC_PREDEF_H = @as(c_int, 1); +pub const __STDC_IEC_559__ = @as(c_int, 1); +pub const __STDC_IEC_60559_BFP__ = @as(c_long, 201404); +pub const __STDC_IEC_559_COMPLEX__ = @as(c_int, 1); +pub const __STDC_IEC_60559_COMPLEX__ = @as(c_long, 201404); +pub const __STDC_ISO_10646__ = @as(c_long, 201706); +pub const __GNU_LIBRARY__ = @as(c_int, 6); +pub const __GLIBC__ = @as(c_int, 2); +pub inline fn __GLIBC_PREREQ(maj: anytype, min: anytype) @TypeOf(((__GLIBC__ << @as(c_int, 16)) + __GLIBC_MINOR__) >= ((maj << @as(c_int, 16)) + min)) { + _ = &maj; + _ = &min; + return ((__GLIBC__ << @as(c_int, 16)) + __GLIBC_MINOR__) >= ((maj << @as(c_int, 16)) + min); +} +pub const _SYS_CDEFS_H = @as(c_int, 1); +pub inline fn __glibc_has_builtin(name: anytype) @TypeOf(__has_builtin(name)) { + _ = &name; + return __has_builtin(name); +} +pub const __LEAF = ""; +pub const __LEAF_ATTR = ""; +pub inline fn __P(args: anytype) @TypeOf(args) { + _ = &args; + return args; +} +pub inline fn __PMT(args: anytype) @TypeOf(args) { + _ = &args; + return args; +} +pub const __ptr_t = ?*anyopaque; +pub const __BEGIN_DECLS = ""; +pub const __END_DECLS = ""; +pub inline fn __bos(ptr: anytype) @TypeOf(__builtin_object_size(ptr, __USE_FORTIFY_LEVEL > @as(c_int, 1))) { + _ = &ptr; + return __builtin_object_size(ptr, __USE_FORTIFY_LEVEL > @as(c_int, 1)); +} +pub inline fn __bos0(ptr: anytype) @TypeOf(__builtin_object_size(ptr, @as(c_int, 0))) { + _ = &ptr; + return __builtin_object_size(ptr, @as(c_int, 0)); +} +pub inline fn __glibc_objsize0(__o: anytype) @TypeOf(__bos0(__o)) { + _ = &__o; + return __bos0(__o); +} +pub inline fn __glibc_objsize(__o: anytype) @TypeOf(__bos(__o)) { + _ = &__o; + return __bos(__o); +} +pub const __glibc_c99_flexarr_available = @as(c_int, 1); +pub const __REDIRECT_FORTIFY = __REDIRECT; +pub const __REDIRECT_FORTIFY_NTH = __REDIRECT_NTH; +pub inline fn __nonnull(params: anytype) @TypeOf(__attribute_nonnull__(params)) { + _ = ¶ms; + return __attribute_nonnull__(params); +} +pub const __wur = ""; +pub const __fortify_function = __extern_always_inline ++ __attribute_artificial__; +pub inline fn __glibc_unlikely(cond: anytype) @TypeOf(__builtin_expect(cond, @as(c_int, 0))) { + _ = &cond; + return __builtin_expect(cond, @as(c_int, 0)); +} +pub inline fn __glibc_likely(cond: anytype) @TypeOf(__builtin_expect(cond, @as(c_int, 1))) { + _ = &cond; + return __builtin_expect(cond, @as(c_int, 1)); +} +pub const __attribute_nonstring__ = ""; +pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI = @as(c_int, 0); +pub inline fn __LDBL_REDIR1(name: anytype, proto: anytype, alias: anytype) @TypeOf(name ++ proto) { + _ = &name; + _ = &proto; + _ = &alias; + return name ++ proto; +} +pub inline fn __LDBL_REDIR(name: anytype, proto: anytype) @TypeOf(name ++ proto) { + _ = &name; + _ = &proto; + return name ++ proto; +} +pub inline fn __LDBL_REDIR1_NTH(name: anytype, proto: anytype, alias: anytype) @TypeOf(name ++ proto ++ __THROW) { + _ = &name; + _ = &proto; + _ = &alias; + return name ++ proto ++ __THROW; +} +pub inline fn __LDBL_REDIR_NTH(name: anytype, proto: anytype) @TypeOf(name ++ proto ++ __THROW) { + _ = &name; + _ = &proto; + return name ++ proto ++ __THROW; +} +pub inline fn __REDIRECT_LDBL(name: anytype, proto: anytype, alias: anytype) @TypeOf(__REDIRECT(name, proto, alias)) { + _ = &name; + _ = &proto; + _ = &alias; + return __REDIRECT(name, proto, alias); +} +pub inline fn __REDIRECT_NTH_LDBL(name: anytype, proto: anytype, alias: anytype) @TypeOf(__REDIRECT_NTH(name, proto, alias)) { + _ = &name; + _ = &proto; + _ = &alias; + return __REDIRECT_NTH(name, proto, alias); +} +pub const __HAVE_GENERIC_SELECTION = @as(c_int, 1); +pub const __attr_dealloc_free = ""; +pub const __stub___compat_bdflush = ""; +pub const __stub_chflags = ""; +pub const __stub_fchflags = ""; +pub const __stub_gtty = ""; +pub const __stub_revoke = ""; +pub const __stub_setlogin = ""; +pub const __stub_sigreturn = ""; +pub const __stub_stty = ""; +pub const __GLIBC_USE_LIB_EXT2 = @as(c_int, 0); +pub const __GLIBC_USE_IEC_60559_BFP_EXT = @as(c_int, 0); +pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X = @as(c_int, 0); +pub const __GLIBC_USE_IEC_60559_EXT = @as(c_int, 0); +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT = @as(c_int, 0); +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X = @as(c_int, 0); +pub const __GLIBC_USE_IEC_60559_TYPES_EXT = @as(c_int, 0); +pub const _BITS_TYPES_H = @as(c_int, 1); +pub const __S16_TYPE = c_short; +pub const __U16_TYPE = c_ushort; +pub const __S32_TYPE = c_int; +pub const __U32_TYPE = c_uint; +pub const __SLONGWORD_TYPE = c_long; +pub const __ULONGWORD_TYPE = c_ulong; +pub const __SQUAD_TYPE = c_long; +pub const __UQUAD_TYPE = c_ulong; +pub const __SWORD_TYPE = c_long; +pub const __UWORD_TYPE = c_ulong; +pub const __SLONG32_TYPE = c_int; +pub const __ULONG32_TYPE = c_uint; +pub const __S64_TYPE = c_long; +pub const __U64_TYPE = c_ulong; +pub const _BITS_TYPESIZES_H = @as(c_int, 1); +pub const __SYSCALL_SLONG_TYPE = __SLONGWORD_TYPE; +pub const __SYSCALL_ULONG_TYPE = __ULONGWORD_TYPE; +pub const __DEV_T_TYPE = __UQUAD_TYPE; +pub const __UID_T_TYPE = __U32_TYPE; +pub const __GID_T_TYPE = __U32_TYPE; +pub const __INO_T_TYPE = __SYSCALL_ULONG_TYPE; +pub const __INO64_T_TYPE = __UQUAD_TYPE; +pub const __MODE_T_TYPE = __U32_TYPE; +pub const __NLINK_T_TYPE = __SYSCALL_ULONG_TYPE; +pub const __FSWORD_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __OFF_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __OFF64_T_TYPE = __SQUAD_TYPE; +pub const __PID_T_TYPE = __S32_TYPE; +pub const __RLIM_T_TYPE = __SYSCALL_ULONG_TYPE; +pub const __RLIM64_T_TYPE = __UQUAD_TYPE; +pub const __BLKCNT_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __BLKCNT64_T_TYPE = __SQUAD_TYPE; +pub const __FSBLKCNT_T_TYPE = __SYSCALL_ULONG_TYPE; +pub const __FSBLKCNT64_T_TYPE = __UQUAD_TYPE; +pub const __FSFILCNT_T_TYPE = __SYSCALL_ULONG_TYPE; +pub const __FSFILCNT64_T_TYPE = __UQUAD_TYPE; +pub const __ID_T_TYPE = __U32_TYPE; +pub const __CLOCK_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __TIME_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __USECONDS_T_TYPE = __U32_TYPE; +pub const __SUSECONDS_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __SUSECONDS64_T_TYPE = __SQUAD_TYPE; +pub const __DADDR_T_TYPE = __S32_TYPE; +pub const __KEY_T_TYPE = __S32_TYPE; +pub const __CLOCKID_T_TYPE = __S32_TYPE; +pub const __TIMER_T_TYPE = ?*anyopaque; +pub const __BLKSIZE_T_TYPE = __SYSCALL_SLONG_TYPE; +pub const __SSIZE_T_TYPE = __SWORD_TYPE; +pub const __CPU_MASK_TYPE = __SYSCALL_ULONG_TYPE; +pub const __OFF_T_MATCHES_OFF64_T = @as(c_int, 1); +pub const __INO_T_MATCHES_INO64_T = @as(c_int, 1); +pub const __RLIM_T_MATCHES_RLIM64_T = @as(c_int, 1); +pub const __STATFS_MATCHES_STATFS64 = @as(c_int, 1); +pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 = @as(c_int, 1); +pub const __FD_SETSIZE = @as(c_int, 1024); +pub const _BITS_TIME64_H = @as(c_int, 1); +pub const __TIME64_T_TYPE = __TIME_T_TYPE; +pub const _BITS_WCHAR_H = @as(c_int, 1); +pub const __WCHAR_MAX = __WCHAR_MAX__; +pub const __WCHAR_MIN = -__WCHAR_MAX - @as(c_int, 1); +pub const _BITS_STDINT_INTN_H = @as(c_int, 1); +pub const _BITS_STDINT_UINTN_H = @as(c_int, 1); +pub const __intptr_t_defined = ""; +pub const __INT64_C = @import("std").zig.c_translation.Macros.L_SUFFIX; +pub const __UINT64_C = @import("std").zig.c_translation.Macros.UL_SUFFIX; +pub const INT8_MIN = -@as(c_int, 128); +pub const INT16_MIN = -@as(c_int, 32767) - @as(c_int, 1); +pub const INT32_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal) - @as(c_int, 1); +pub const INT64_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1); +pub const INT8_MAX = @as(c_int, 127); +pub const INT16_MAX = @as(c_int, 32767); +pub const INT32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const INT64_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)); +pub const UINT8_MAX = @as(c_int, 255); +pub const UINT16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal); +pub const UINT32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub const UINT64_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal)); +pub const INT_LEAST8_MIN = -@as(c_int, 128); +pub const INT_LEAST16_MIN = -@as(c_int, 32767) - @as(c_int, 1); +pub const INT_LEAST32_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal) - @as(c_int, 1); +pub const INT_LEAST64_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1); +pub const INT_LEAST8_MAX = @as(c_int, 127); +pub const INT_LEAST16_MAX = @as(c_int, 32767); +pub const INT_LEAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const INT_LEAST64_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)); +pub const UINT_LEAST8_MAX = @as(c_int, 255); +pub const UINT_LEAST16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 65535, .decimal); +pub const UINT_LEAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub const UINT_LEAST64_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal)); +pub const INT_FAST8_MIN = -@as(c_int, 128); +pub const INT_FAST16_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1); +pub const INT_FAST32_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1); +pub const INT_FAST64_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1); +pub const INT_FAST8_MAX = @as(c_int, 127); +pub const INT_FAST16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const INT_FAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const INT_FAST64_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)); +pub const UINT_FAST8_MAX = @as(c_int, 255); +pub const UINT_FAST16_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const UINT_FAST32_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const UINT_FAST64_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal)); +pub const INTPTR_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1); +pub const INTPTR_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const UINTPTR_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const INTMAX_MIN = -__INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)) - @as(c_int, 1); +pub const INTMAX_MAX = __INT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 9223372036854775807, .decimal)); +pub const UINTMAX_MAX = __UINT64_C(@import("std").zig.c_translation.promoteIntLiteral(c_int, 18446744073709551615, .decimal)); +pub const PTRDIFF_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal) - @as(c_int, 1); +pub const PTRDIFF_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_long, 9223372036854775807, .decimal); +pub const SIG_ATOMIC_MIN = -@import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal) - @as(c_int, 1); +pub const SIG_ATOMIC_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const SIZE_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_ulong, 18446744073709551615, .decimal); +pub const WCHAR_MIN = __WCHAR_MIN; +pub const WCHAR_MAX = __WCHAR_MAX; +pub const WINT_MIN = @as(c_uint, 0); +pub const WINT_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_uint, 4294967295, .decimal); +pub inline fn INT8_C(c: anytype) @TypeOf(c) { + _ = &c; + return c; +} +pub inline fn INT16_C(c: anytype) @TypeOf(c) { + _ = &c; + return c; +} +pub inline fn INT32_C(c: anytype) @TypeOf(c) { + _ = &c; + return c; +} +pub const INT64_C = @import("std").zig.c_translation.Macros.L_SUFFIX; +pub inline fn UINT8_C(c: anytype) @TypeOf(c) { + _ = &c; + return c; +} +pub inline fn UINT16_C(c: anytype) @TypeOf(c) { + _ = &c; + return c; +} +pub const UINT32_C = @import("std").zig.c_translation.Macros.U_SUFFIX; +pub const UINT64_C = @import("std").zig.c_translation.Macros.UL_SUFFIX; +pub const INTMAX_C = @import("std").zig.c_translation.Macros.L_SUFFIX; +pub const UINTMAX_C = @import("std").zig.c_translation.Macros.UL_SUFFIX; +pub const __need_size_t = ""; +pub const __need_wchar_t = ""; +pub const __need_NULL = ""; +pub const _SIZE_T = ""; +pub const _WCHAR_T = ""; +pub const NULL = @import("std").zig.c_translation.cast(?*anyopaque, @as(c_int, 0)); +pub const _STDLIB_H = @as(c_int, 1); +pub const WNOHANG = @as(c_int, 1); +pub const WUNTRACED = @as(c_int, 2); +pub const WSTOPPED = @as(c_int, 2); +pub const WEXITED = @as(c_int, 4); +pub const WCONTINUED = @as(c_int, 8); +pub const WNOWAIT = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0x01000000, .hex); +pub const __WNOTHREAD = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0x20000000, .hex); +pub const __WALL = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0x40000000, .hex); +pub const __WCLONE = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0x80000000, .hex); +pub inline fn __WEXITSTATUS(status: anytype) @TypeOf((status & @import("std").zig.c_translation.promoteIntLiteral(c_int, 0xff00, .hex)) >> @as(c_int, 8)) { + _ = &status; + return (status & @import("std").zig.c_translation.promoteIntLiteral(c_int, 0xff00, .hex)) >> @as(c_int, 8); +} +pub inline fn __WTERMSIG(status: anytype) @TypeOf(status & @as(c_int, 0x7f)) { + _ = &status; + return status & @as(c_int, 0x7f); +} +pub inline fn __WSTOPSIG(status: anytype) @TypeOf(__WEXITSTATUS(status)) { + _ = &status; + return __WEXITSTATUS(status); +} +pub inline fn __WIFEXITED(status: anytype) @TypeOf(__WTERMSIG(status) == @as(c_int, 0)) { + _ = &status; + return __WTERMSIG(status) == @as(c_int, 0); +} +pub inline fn __WIFSIGNALED(status: anytype) @TypeOf((@import("std").zig.c_translation.cast(i8, (status & @as(c_int, 0x7f)) + @as(c_int, 1)) >> @as(c_int, 1)) > @as(c_int, 0)) { + _ = &status; + return (@import("std").zig.c_translation.cast(i8, (status & @as(c_int, 0x7f)) + @as(c_int, 1)) >> @as(c_int, 1)) > @as(c_int, 0); +} +pub inline fn __WIFSTOPPED(status: anytype) @TypeOf((status & @as(c_int, 0xff)) == @as(c_int, 0x7f)) { + _ = &status; + return (status & @as(c_int, 0xff)) == @as(c_int, 0x7f); +} +pub inline fn __WIFCONTINUED(status: anytype) @TypeOf(status == __W_CONTINUED) { + _ = &status; + return status == __W_CONTINUED; +} +pub inline fn __WCOREDUMP(status: anytype) @TypeOf(status & __WCOREFLAG) { + _ = &status; + return status & __WCOREFLAG; +} +pub inline fn __W_EXITCODE(ret: anytype, sig: anytype) @TypeOf((ret << @as(c_int, 8)) | sig) { + _ = &ret; + _ = &sig; + return (ret << @as(c_int, 8)) | sig; +} +pub inline fn __W_STOPCODE(sig: anytype) @TypeOf((sig << @as(c_int, 8)) | @as(c_int, 0x7f)) { + _ = &sig; + return (sig << @as(c_int, 8)) | @as(c_int, 0x7f); +} +pub const __W_CONTINUED = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0xffff, .hex); +pub const __WCOREFLAG = @as(c_int, 0x80); +pub inline fn WEXITSTATUS(status: anytype) @TypeOf(__WEXITSTATUS(status)) { + _ = &status; + return __WEXITSTATUS(status); +} +pub inline fn WTERMSIG(status: anytype) @TypeOf(__WTERMSIG(status)) { + _ = &status; + return __WTERMSIG(status); +} +pub inline fn WSTOPSIG(status: anytype) @TypeOf(__WSTOPSIG(status)) { + _ = &status; + return __WSTOPSIG(status); +} +pub inline fn WIFEXITED(status: anytype) @TypeOf(__WIFEXITED(status)) { + _ = &status; + return __WIFEXITED(status); +} +pub inline fn WIFSIGNALED(status: anytype) @TypeOf(__WIFSIGNALED(status)) { + _ = &status; + return __WIFSIGNALED(status); +} +pub inline fn WIFSTOPPED(status: anytype) @TypeOf(__WIFSTOPPED(status)) { + _ = &status; + return __WIFSTOPPED(status); +} +pub inline fn WIFCONTINUED(status: anytype) @TypeOf(__WIFCONTINUED(status)) { + _ = &status; + return __WIFCONTINUED(status); +} +pub const _BITS_FLOATN_H = ""; +pub const __HAVE_FLOAT128 = @as(c_int, 0); +pub const __HAVE_DISTINCT_FLOAT128 = @as(c_int, 0); +pub const __HAVE_FLOAT64X = @as(c_int, 1); +pub const __HAVE_FLOAT64X_LONG_DOUBLE = @as(c_int, 1); +pub const _BITS_FLOATN_COMMON_H = ""; +pub const __HAVE_FLOAT16 = @as(c_int, 0); +pub const __HAVE_FLOAT32 = @as(c_int, 1); +pub const __HAVE_FLOAT64 = @as(c_int, 1); +pub const __HAVE_FLOAT32X = @as(c_int, 1); +pub const __HAVE_FLOAT128X = @as(c_int, 0); +pub const __HAVE_DISTINCT_FLOAT16 = __HAVE_FLOAT16; +pub const __HAVE_DISTINCT_FLOAT32 = @as(c_int, 0); +pub const __HAVE_DISTINCT_FLOAT64 = @as(c_int, 0); +pub const __HAVE_DISTINCT_FLOAT32X = @as(c_int, 0); +pub const __HAVE_DISTINCT_FLOAT64X = @as(c_int, 0); +pub const __HAVE_DISTINCT_FLOAT128X = __HAVE_FLOAT128X; +pub const __HAVE_FLOAT128_UNLIKE_LDBL = (__HAVE_DISTINCT_FLOAT128 != 0) and (__LDBL_MANT_DIG__ != @as(c_int, 113)); +pub const __HAVE_FLOATN_NOT_TYPEDEF = @as(c_int, 0); +pub const __f32 = @import("std").zig.c_translation.Macros.F_SUFFIX; +pub inline fn __f64(x: anytype) @TypeOf(x) { + _ = &x; + return x; +} +pub inline fn __f32x(x: anytype) @TypeOf(x) { + _ = &x; + return x; +} +pub const __f64x = @import("std").zig.c_translation.Macros.L_SUFFIX; +pub inline fn __builtin_huge_valf32() @TypeOf(__builtin_huge_valf()) { + return __builtin_huge_valf(); +} +pub inline fn __builtin_inff32() @TypeOf(__builtin_inff()) { + return __builtin_inff(); +} +pub inline fn __builtin_nanf32(x: anytype) @TypeOf(__builtin_nanf(x)) { + _ = &x; + return __builtin_nanf(x); +} +pub const __ldiv_t_defined = @as(c_int, 1); +pub const __lldiv_t_defined = @as(c_int, 1); +pub const RAND_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 2147483647, .decimal); +pub const EXIT_FAILURE = @as(c_int, 1); +pub const EXIT_SUCCESS = @as(c_int, 0); +pub const MB_CUR_MAX = __ctype_get_mb_cur_max(); +pub const _SYS_TYPES_H = @as(c_int, 1); +pub const __u_char_defined = ""; +pub const __ino_t_defined = ""; +pub const __dev_t_defined = ""; +pub const __gid_t_defined = ""; +pub const __mode_t_defined = ""; +pub const __nlink_t_defined = ""; +pub const __uid_t_defined = ""; +pub const __off_t_defined = ""; +pub const __pid_t_defined = ""; +pub const __id_t_defined = ""; +pub const __ssize_t_defined = ""; +pub const __daddr_t_defined = ""; +pub const __key_t_defined = ""; +pub const __clock_t_defined = @as(c_int, 1); +pub const __clockid_t_defined = @as(c_int, 1); +pub const __time_t_defined = @as(c_int, 1); +pub const __timer_t_defined = @as(c_int, 1); +pub const __BIT_TYPES_DEFINED__ = @as(c_int, 1); +pub const _ENDIAN_H = @as(c_int, 1); +pub const _BITS_ENDIAN_H = @as(c_int, 1); +pub const __LITTLE_ENDIAN = @as(c_int, 1234); +pub const __BIG_ENDIAN = @as(c_int, 4321); +pub const __PDP_ENDIAN = @as(c_int, 3412); +pub const _BITS_ENDIANNESS_H = @as(c_int, 1); +pub const __BYTE_ORDER = __LITTLE_ENDIAN; +pub const __FLOAT_WORD_ORDER = __BYTE_ORDER; +pub inline fn __LONG_LONG_PAIR(HI: anytype, LO: anytype) @TypeOf(HI) { + _ = &HI; + _ = &LO; + return blk: { + _ = &LO; + break :blk HI; + }; +} +pub const LITTLE_ENDIAN = __LITTLE_ENDIAN; +pub const BIG_ENDIAN = __BIG_ENDIAN; +pub const PDP_ENDIAN = __PDP_ENDIAN; +pub const BYTE_ORDER = __BYTE_ORDER; +pub const _BITS_BYTESWAP_H = @as(c_int, 1); +pub inline fn __bswap_constant_16(x: anytype) __uint16_t { + _ = &x; + return @import("std").zig.c_translation.cast(__uint16_t, ((x >> @as(c_int, 8)) & @as(c_int, 0xff)) | ((x & @as(c_int, 0xff)) << @as(c_int, 8))); +} +pub inline fn __bswap_constant_32(x: anytype) @TypeOf(((((x & @import("std").zig.c_translation.promoteIntLiteral(c_uint, 0xff000000, .hex)) >> @as(c_int, 24)) | ((x & @import("std").zig.c_translation.promoteIntLiteral(c_uint, 0x00ff0000, .hex)) >> @as(c_int, 8))) | ((x & @as(c_uint, 0x0000ff00)) << @as(c_int, 8))) | ((x & @as(c_uint, 0x000000ff)) << @as(c_int, 24))) { + _ = &x; + return ((((x & @import("std").zig.c_translation.promoteIntLiteral(c_uint, 0xff000000, .hex)) >> @as(c_int, 24)) | ((x & @import("std").zig.c_translation.promoteIntLiteral(c_uint, 0x00ff0000, .hex)) >> @as(c_int, 8))) | ((x & @as(c_uint, 0x0000ff00)) << @as(c_int, 8))) | ((x & @as(c_uint, 0x000000ff)) << @as(c_int, 24)); +} +pub inline fn __bswap_constant_64(x: anytype) @TypeOf(((((((((x & @as(c_ulonglong, 0xff00000000000000)) >> @as(c_int, 56)) | ((x & @as(c_ulonglong, 0x00ff000000000000)) >> @as(c_int, 40))) | ((x & @as(c_ulonglong, 0x0000ff0000000000)) >> @as(c_int, 24))) | ((x & @as(c_ulonglong, 0x000000ff00000000)) >> @as(c_int, 8))) | ((x & @as(c_ulonglong, 0x00000000ff000000)) << @as(c_int, 8))) | ((x & @as(c_ulonglong, 0x0000000000ff0000)) << @as(c_int, 24))) | ((x & @as(c_ulonglong, 0x000000000000ff00)) << @as(c_int, 40))) | ((x & @as(c_ulonglong, 0x00000000000000ff)) << @as(c_int, 56))) { + _ = &x; + return ((((((((x & @as(c_ulonglong, 0xff00000000000000)) >> @as(c_int, 56)) | ((x & @as(c_ulonglong, 0x00ff000000000000)) >> @as(c_int, 40))) | ((x & @as(c_ulonglong, 0x0000ff0000000000)) >> @as(c_int, 24))) | ((x & @as(c_ulonglong, 0x000000ff00000000)) >> @as(c_int, 8))) | ((x & @as(c_ulonglong, 0x00000000ff000000)) << @as(c_int, 8))) | ((x & @as(c_ulonglong, 0x0000000000ff0000)) << @as(c_int, 24))) | ((x & @as(c_ulonglong, 0x000000000000ff00)) << @as(c_int, 40))) | ((x & @as(c_ulonglong, 0x00000000000000ff)) << @as(c_int, 56)); +} +pub const _BITS_UINTN_IDENTITY_H = @as(c_int, 1); +pub inline fn htobe16(x: anytype) @TypeOf(__bswap_16(x)) { + _ = &x; + return __bswap_16(x); +} +pub inline fn htole16(x: anytype) @TypeOf(__uint16_identity(x)) { + _ = &x; + return __uint16_identity(x); +} +pub inline fn be16toh(x: anytype) @TypeOf(__bswap_16(x)) { + _ = &x; + return __bswap_16(x); +} +pub inline fn le16toh(x: anytype) @TypeOf(__uint16_identity(x)) { + _ = &x; + return __uint16_identity(x); +} +pub inline fn htobe32(x: anytype) @TypeOf(__bswap_32(x)) { + _ = &x; + return __bswap_32(x); +} +pub inline fn htole32(x: anytype) @TypeOf(__uint32_identity(x)) { + _ = &x; + return __uint32_identity(x); +} +pub inline fn be32toh(x: anytype) @TypeOf(__bswap_32(x)) { + _ = &x; + return __bswap_32(x); +} +pub inline fn le32toh(x: anytype) @TypeOf(__uint32_identity(x)) { + _ = &x; + return __uint32_identity(x); +} +pub inline fn htobe64(x: anytype) @TypeOf(__bswap_64(x)) { + _ = &x; + return __bswap_64(x); +} +pub inline fn htole64(x: anytype) @TypeOf(__uint64_identity(x)) { + _ = &x; + return __uint64_identity(x); +} +pub inline fn be64toh(x: anytype) @TypeOf(__bswap_64(x)) { + _ = &x; + return __bswap_64(x); +} +pub inline fn le64toh(x: anytype) @TypeOf(__uint64_identity(x)) { + _ = &x; + return __uint64_identity(x); +} +pub const _SYS_SELECT_H = @as(c_int, 1); +pub inline fn __FD_ISSET(d: anytype, s: anytype) @TypeOf((__FDS_BITS(s)[@as(usize, @intCast(__FD_ELT(d)))] & __FD_MASK(d)) != @as(c_int, 0)) { + _ = &d; + _ = &s; + return (__FDS_BITS(s)[@as(usize, @intCast(__FD_ELT(d)))] & __FD_MASK(d)) != @as(c_int, 0); +} +pub const __sigset_t_defined = @as(c_int, 1); +pub const ____sigset_t_defined = ""; +pub const _SIGSET_NWORDS = @import("std").zig.c_translation.MacroArithmetic.div(@as(c_int, 1024), @as(c_int, 8) * @import("std").zig.c_translation.sizeof(c_ulong)); +pub const __timeval_defined = @as(c_int, 1); +pub const _STRUCT_TIMESPEC = @as(c_int, 1); +pub const __suseconds_t_defined = ""; +pub const __NFDBITS = @as(c_int, 8) * @import("std").zig.c_translation.cast(c_int, @import("std").zig.c_translation.sizeof(__fd_mask)); +pub inline fn __FD_ELT(d: anytype) @TypeOf(@import("std").zig.c_translation.MacroArithmetic.div(d, __NFDBITS)) { + _ = &d; + return @import("std").zig.c_translation.MacroArithmetic.div(d, __NFDBITS); +} +pub inline fn __FD_MASK(d: anytype) __fd_mask { + _ = &d; + return @import("std").zig.c_translation.cast(__fd_mask, @as(c_ulong, 1) << @import("std").zig.c_translation.MacroArithmetic.rem(d, __NFDBITS)); +} +pub inline fn __FDS_BITS(set: anytype) @TypeOf(set.*.__fds_bits) { + _ = &set; + return set.*.__fds_bits; +} +pub const FD_SETSIZE = __FD_SETSIZE; +pub const NFDBITS = __NFDBITS; +pub inline fn FD_SET(fd: anytype, fdsetp: anytype) @TypeOf(__FD_SET(fd, fdsetp)) { + _ = &fd; + _ = &fdsetp; + return __FD_SET(fd, fdsetp); +} +pub inline fn FD_CLR(fd: anytype, fdsetp: anytype) @TypeOf(__FD_CLR(fd, fdsetp)) { + _ = &fd; + _ = &fdsetp; + return __FD_CLR(fd, fdsetp); +} +pub inline fn FD_ISSET(fd: anytype, fdsetp: anytype) @TypeOf(__FD_ISSET(fd, fdsetp)) { + _ = &fd; + _ = &fdsetp; + return __FD_ISSET(fd, fdsetp); +} +pub inline fn FD_ZERO(fdsetp: anytype) @TypeOf(__FD_ZERO(fdsetp)) { + _ = &fdsetp; + return __FD_ZERO(fdsetp); +} +pub const __blksize_t_defined = ""; +pub const __blkcnt_t_defined = ""; +pub const __fsblkcnt_t_defined = ""; +pub const __fsfilcnt_t_defined = ""; +pub const _BITS_PTHREADTYPES_COMMON_H = @as(c_int, 1); +pub const _THREAD_SHARED_TYPES_H = @as(c_int, 1); +pub const _BITS_PTHREADTYPES_ARCH_H = @as(c_int, 1); +pub const __SIZEOF_PTHREAD_MUTEX_T = @as(c_int, 40); +pub const __SIZEOF_PTHREAD_ATTR_T = @as(c_int, 56); +pub const __SIZEOF_PTHREAD_RWLOCK_T = @as(c_int, 56); +pub const __SIZEOF_PTHREAD_BARRIER_T = @as(c_int, 32); +pub const __SIZEOF_PTHREAD_MUTEXATTR_T = @as(c_int, 4); +pub const __SIZEOF_PTHREAD_COND_T = @as(c_int, 48); +pub const __SIZEOF_PTHREAD_CONDATTR_T = @as(c_int, 4); +pub const __SIZEOF_PTHREAD_RWLOCKATTR_T = @as(c_int, 8); +pub const __SIZEOF_PTHREAD_BARRIERATTR_T = @as(c_int, 4); +pub const __LOCK_ALIGNMENT = ""; +pub const __ONCE_ALIGNMENT = ""; +pub const _BITS_ATOMIC_WIDE_COUNTER_H = ""; +pub const _THREAD_MUTEX_INTERNAL_H = @as(c_int, 1); +pub const __PTHREAD_MUTEX_HAVE_PREV = @as(c_int, 1); +pub const _RWLOCK_INTERNAL_H = ""; +pub inline fn __PTHREAD_RWLOCK_INITIALIZER(__flags: anytype) @TypeOf(__flags) { + _ = &__flags; + return blk: { + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = @as(c_int, 0); + _ = &__PTHREAD_RWLOCK_ELISION_EXTRA; + _ = @as(c_int, 0); + break :blk __flags; + }; +} +pub const __have_pthread_attr_t = @as(c_int, 1); +pub const _ALLOCA_H = @as(c_int, 1); +pub const __COMPAR_FN_T = ""; +pub const METACALL_DEF_H = @as(c_int, 1); +pub const METACALL_FORK_SAFE = @as(c_int, 1); +pub const METACALL_ERROR_H = @as(c_int, 1); +pub const METACALL_LOG_H = @as(c_int, 1); +pub const __GNUC_VA_LIST = ""; +pub const __STDARG_H = ""; +pub const _VA_LIST = ""; +pub const _STDIO_H = @as(c_int, 1); +pub const __need___va_list = ""; +pub const _____fpos_t_defined = @as(c_int, 1); +pub const ____mbstate_t_defined = @as(c_int, 1); +pub const _____fpos64_t_defined = @as(c_int, 1); +pub const ____FILE_defined = @as(c_int, 1); +pub const __FILE_defined = @as(c_int, 1); +pub const __struct_FILE_defined = @as(c_int, 1); +pub const _IO_EOF_SEEN = @as(c_int, 0x0010); +pub inline fn __feof_unlocked_body(_fp: anytype) @TypeOf((_fp.*._flags & _IO_EOF_SEEN) != @as(c_int, 0)) { + _ = &_fp; + return (_fp.*._flags & _IO_EOF_SEEN) != @as(c_int, 0); +} +pub const _IO_ERR_SEEN = @as(c_int, 0x0020); +pub inline fn __ferror_unlocked_body(_fp: anytype) @TypeOf((_fp.*._flags & _IO_ERR_SEEN) != @as(c_int, 0)) { + _ = &_fp; + return (_fp.*._flags & _IO_ERR_SEEN) != @as(c_int, 0); +} +pub const _IO_USER_LOCK = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0x8000, .hex); +pub const __cookie_io_functions_t_defined = @as(c_int, 1); +pub const _VA_LIST_DEFINED = ""; +pub const _IOFBF = @as(c_int, 0); +pub const _IOLBF = @as(c_int, 1); +pub const _IONBF = @as(c_int, 2); +pub const BUFSIZ = @as(c_int, 8192); +pub const EOF = -@as(c_int, 1); +pub const SEEK_SET = @as(c_int, 0); +pub const SEEK_CUR = @as(c_int, 1); +pub const SEEK_END = @as(c_int, 2); +pub const P_tmpdir = "/tmp"; +pub const L_tmpnam = @as(c_int, 20); +pub const TMP_MAX = @import("std").zig.c_translation.promoteIntLiteral(c_int, 238328, .decimal); +pub const _BITS_STDIO_LIM_H = @as(c_int, 1); +pub const FILENAME_MAX = @as(c_int, 4096); +pub const L_ctermid = @as(c_int, 9); +pub const FOPEN_MAX = @as(c_int, 16); +pub const __attr_dealloc_fclose = __attr_dealloc(fclose, @as(c_int, 1)); +pub const METACALL_VALUE_H = @as(c_int, 1); +pub const boolean = u8; +pub const METACALL_VERSION_H = @as(c_int, 1); +pub const METACALL_PROJECT_NAME = "MetaCall"; +pub const METACALL_PROJECT_DESCRIPTION = "A library for providing inter-language foreign function interface calls"; +pub const METACALL_AUTHOR_ORGANIZATION = "MetaCall Inc."; +pub const METACALL_AUTHOR_DOMAIN = "https://metacall.io/"; +pub const METACALL_AUTHOR_MAINTAINER = "vic798@gmail.com"; +pub const METACALL_VERSION_MAJOR = "0"; +pub const METACALL_VERSION_MAJOR_ID = @as(c_int, 0); +pub const METACALL_VERSION_MINOR = "7"; +pub const METACALL_VERSION_MINOR_ID = @as(c_int, 7); +pub const METACALL_VERSION_PATCH = "5"; +pub const METACALL_VERSION_PATCH_ID = @as(c_int, 5); +pub const METACALL_VERSION_REVISION = "34b28423138e"; +pub const METACALL_VERSION = "0.7.5"; +pub const METACALL_NAME_VERSION = "MetaCall v0.7.5 (34b28423138e)"; +pub const METACALL_FORK_H = @as(c_int, 1); +pub const _UNISTD_H = @as(c_int, 1); +pub const _POSIX_VERSION = @as(c_long, 200809); +pub const __POSIX2_THIS_VERSION = @as(c_long, 200809); +pub const _POSIX2_VERSION = __POSIX2_THIS_VERSION; +pub const _POSIX2_C_VERSION = __POSIX2_THIS_VERSION; +pub const _POSIX2_C_BIND = __POSIX2_THIS_VERSION; +pub const _POSIX2_C_DEV = __POSIX2_THIS_VERSION; +pub const _POSIX2_SW_DEV = __POSIX2_THIS_VERSION; +pub const _POSIX2_LOCALEDEF = __POSIX2_THIS_VERSION; +pub const _XOPEN_VERSION = @as(c_int, 700); +pub const _XOPEN_XCU_VERSION = @as(c_int, 4); +pub const _XOPEN_XPG2 = @as(c_int, 1); +pub const _XOPEN_XPG3 = @as(c_int, 1); +pub const _XOPEN_XPG4 = @as(c_int, 1); +pub const _XOPEN_UNIX = @as(c_int, 1); +pub const _XOPEN_ENH_I18N = @as(c_int, 1); +pub const _XOPEN_LEGACY = @as(c_int, 1); +pub const _BITS_POSIX_OPT_H = @as(c_int, 1); +pub const _POSIX_JOB_CONTROL = @as(c_int, 1); +pub const _POSIX_SAVED_IDS = @as(c_int, 1); +pub const _POSIX_PRIORITY_SCHEDULING = @as(c_long, 200809); +pub const _POSIX_SYNCHRONIZED_IO = @as(c_long, 200809); +pub const _POSIX_FSYNC = @as(c_long, 200809); +pub const _POSIX_MAPPED_FILES = @as(c_long, 200809); +pub const _POSIX_MEMLOCK = @as(c_long, 200809); +pub const _POSIX_MEMLOCK_RANGE = @as(c_long, 200809); +pub const _POSIX_MEMORY_PROTECTION = @as(c_long, 200809); +pub const _POSIX_CHOWN_RESTRICTED = @as(c_int, 0); +pub const _POSIX_VDISABLE = '\x00'; +pub const _POSIX_NO_TRUNC = @as(c_int, 1); +pub const _XOPEN_REALTIME = @as(c_int, 1); +pub const _XOPEN_REALTIME_THREADS = @as(c_int, 1); +pub const _XOPEN_SHM = @as(c_int, 1); +pub const _POSIX_THREADS = @as(c_long, 200809); +pub const _POSIX_REENTRANT_FUNCTIONS = @as(c_int, 1); +pub const _POSIX_THREAD_SAFE_FUNCTIONS = @as(c_long, 200809); +pub const _POSIX_THREAD_PRIORITY_SCHEDULING = @as(c_long, 200809); +pub const _POSIX_THREAD_ATTR_STACKSIZE = @as(c_long, 200809); +pub const _POSIX_THREAD_ATTR_STACKADDR = @as(c_long, 200809); +pub const _POSIX_THREAD_PRIO_INHERIT = @as(c_long, 200809); +pub const _POSIX_THREAD_PRIO_PROTECT = @as(c_long, 200809); +pub const _POSIX_THREAD_ROBUST_PRIO_INHERIT = @as(c_long, 200809); +pub const _POSIX_THREAD_ROBUST_PRIO_PROTECT = -@as(c_int, 1); +pub const _POSIX_SEMAPHORES = @as(c_long, 200809); +pub const _POSIX_REALTIME_SIGNALS = @as(c_long, 200809); +pub const _POSIX_ASYNCHRONOUS_IO = @as(c_long, 200809); +pub const _POSIX_ASYNC_IO = @as(c_int, 1); +pub const _LFS_ASYNCHRONOUS_IO = @as(c_int, 1); +pub const _POSIX_PRIORITIZED_IO = @as(c_long, 200809); +pub const _LFS64_ASYNCHRONOUS_IO = @as(c_int, 1); +pub const _LFS_LARGEFILE = @as(c_int, 1); +pub const _LFS64_LARGEFILE = @as(c_int, 1); +pub const _LFS64_STDIO = @as(c_int, 1); +pub const _POSIX_SHARED_MEMORY_OBJECTS = @as(c_long, 200809); +pub const _POSIX_CPUTIME = @as(c_int, 0); +pub const _POSIX_THREAD_CPUTIME = @as(c_int, 0); +pub const _POSIX_REGEXP = @as(c_int, 1); +pub const _POSIX_READER_WRITER_LOCKS = @as(c_long, 200809); +pub const _POSIX_SHELL = @as(c_int, 1); +pub const _POSIX_TIMEOUTS = @as(c_long, 200809); +pub const _POSIX_SPIN_LOCKS = @as(c_long, 200809); +pub const _POSIX_SPAWN = @as(c_long, 200809); +pub const _POSIX_TIMERS = @as(c_long, 200809); +pub const _POSIX_BARRIERS = @as(c_long, 200809); +pub const _POSIX_MESSAGE_PASSING = @as(c_long, 200809); +pub const _POSIX_THREAD_PROCESS_SHARED = @as(c_long, 200809); +pub const _POSIX_MONOTONIC_CLOCK = @as(c_int, 0); +pub const _POSIX_CLOCK_SELECTION = @as(c_long, 200809); +pub const _POSIX_ADVISORY_INFO = @as(c_long, 200809); +pub const _POSIX_IPV6 = @as(c_long, 200809); +pub const _POSIX_RAW_SOCKETS = @as(c_long, 200809); +pub const _POSIX2_CHAR_TERM = @as(c_long, 200809); +pub const _POSIX_SPORADIC_SERVER = -@as(c_int, 1); +pub const _POSIX_THREAD_SPORADIC_SERVER = -@as(c_int, 1); +pub const _POSIX_TRACE = -@as(c_int, 1); +pub const _POSIX_TRACE_EVENT_FILTER = -@as(c_int, 1); +pub const _POSIX_TRACE_INHERIT = -@as(c_int, 1); +pub const _POSIX_TRACE_LOG = -@as(c_int, 1); +pub const _POSIX_TYPED_MEMORY_OBJECTS = -@as(c_int, 1); +pub const _POSIX_V7_LPBIG_OFFBIG = -@as(c_int, 1); +pub const _POSIX_V6_LPBIG_OFFBIG = -@as(c_int, 1); +pub const _XBS5_LPBIG_OFFBIG = -@as(c_int, 1); +pub const _POSIX_V7_LP64_OFF64 = @as(c_int, 1); +pub const _POSIX_V6_LP64_OFF64 = @as(c_int, 1); +pub const _XBS5_LP64_OFF64 = @as(c_int, 1); +pub const __ILP32_OFF32_CFLAGS = "-m32"; +pub const __ILP32_OFF32_LDFLAGS = "-m32"; +pub const __ILP32_OFFBIG_CFLAGS = "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"; +pub const __ILP32_OFFBIG_LDFLAGS = "-m32"; +pub const __LP64_OFF64_CFLAGS = "-m64"; +pub const __LP64_OFF64_LDFLAGS = "-m64"; +pub const STDIN_FILENO = @as(c_int, 0); +pub const STDOUT_FILENO = @as(c_int, 1); +pub const STDERR_FILENO = @as(c_int, 2); +pub const __useconds_t_defined = ""; +pub const __socklen_t_defined = ""; +pub const R_OK = @as(c_int, 4); +pub const W_OK = @as(c_int, 2); +pub const X_OK = @as(c_int, 1); +pub const F_OK = @as(c_int, 0); +pub const L_SET = SEEK_SET; +pub const L_INCR = SEEK_CUR; +pub const L_XTND = SEEK_END; +pub const _SC_PAGE_SIZE = _SC_PAGESIZE; +pub const _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = _CS_V6_WIDTH_RESTRICTED_ENVS; +pub const _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS = _CS_V5_WIDTH_RESTRICTED_ENVS; +pub const _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = _CS_V7_WIDTH_RESTRICTED_ENVS; +pub const _GETOPT_POSIX_H = @as(c_int, 1); +pub const _GETOPT_CORE_H = @as(c_int, 1); +pub const F_ULOCK = @as(c_int, 0); +pub const F_LOCK = @as(c_int, 1); +pub const F_TLOCK = @as(c_int, 2); +pub const F_TEST = @as(c_int, 3); +pub const METACALL_FLAGS_FORK_SAFE = @as(c_int, 0x01) << @as(c_int, 0x00); +pub const timeval = struct_timeval; +pub const timespec = struct_timespec; +pub const __pthread_internal_list = struct___pthread_internal_list; +pub const __pthread_internal_slist = struct___pthread_internal_slist; +pub const __pthread_mutex_s = struct___pthread_mutex_s; +pub const __pthread_rwlock_arch_t = struct___pthread_rwlock_arch_t; +pub const __pthread_cond_s = struct___pthread_cond_s; +pub const random_data = struct_random_data; +pub const drand48_data = struct_drand48_data; +pub const metacall_allocator_id = enum_metacall_allocator_id; +pub const ngx_pool_s = struct_ngx_pool_s; +pub const metacall_allocator_std_type = struct_metacall_allocator_std_type; +pub const metacall_allocator_nginx_type = struct_metacall_allocator_nginx_type; +pub const metacall_exception_type = struct_metacall_exception_type; +pub const _G_fpos_t = struct__G_fpos_t; +pub const _G_fpos64_t = struct__G_fpos64_t; +pub const _IO_marker = struct__IO_marker; +pub const _IO_codecvt = struct__IO_codecvt; +pub const _IO_wide_data = struct__IO_wide_data; +pub const _IO_FILE = struct__IO_FILE; +pub const _IO_cookie_io_functions_t = struct__IO_cookie_io_functions_t; +pub const metacall_log_id = enum_metacall_log_id; +pub const metacall_log_stdio_type = struct_metacall_log_stdio_type; +pub const metacall_log_file_type = struct_metacall_log_file_type; +pub const metacall_log_socket_type = struct_metacall_log_socket_type; +pub const metacall_log_syslog_type = struct_metacall_log_syslog_type; +pub const metacall_log_nginx_type = struct_metacall_log_nginx_type; +pub const metacall_log_custom_va_list_type = struct_metacall_log_custom_va_list_type; +pub const metacall_log_custom_type = struct_metacall_log_custom_type; +pub const metacall_initialize_configuration_type = struct_metacall_initialize_configuration_type; +pub const metacall_await_callbacks_type = struct_metacall_await_callbacks_type; +pub const metacall_version_type = struct_metacall_version_type; diff --git a/source/ports/zig_port/src/root.zig b/source/ports/zig_port/src/root.zig new file mode 100644 index 000000000..bb88c3da0 --- /dev/null +++ b/source/ports/zig_port/src/root.zig @@ -0,0 +1,117 @@ +const std = @import("std"); +const mb = @import("metacall-bindings.zig"); + +const Metacall = @This(); + +/// Initializes MetaCall. +pub fn init() !void { + if (mb.metacall_initialize() != 0) + return error.FailedToInitMetacall; +} +/// Deinitializes MetaCall and returns an error if didn't succeed. +pub fn destroy() !void { + if (mb.metacall_destroy() != 0) + return error.FailedToDeinitMetacall; +} +/// Deinitializes MetaCall. +pub fn deinit() void { + _ = destroy() catch {}; +} + +/// Loads files into MetaCall, strings should be null-terminated. +pub fn load_from_file(tag: [:0]const u8, paths: [][:0]const u8) !void { + if (mb.metacall_load_from_file(tag.ptr, @ptrCast(paths.ptr), paths.len, null) != 0) { + return error.FailedToLoadFromFile; + } +} +/// Loads a string into MetaCall, the `tag` should be null-terminated and the `buffer` should be a buffer. +pub fn load_from_memory(tag: [:0]const u8, buffer: []const u8) !void { + if (mb.metacall_load_from_memory(tag.ptr, buffer.ptr, buffer.len, null) != 0) { + return error.FailedToLoadFromMemory; + } +} +/// Loads a package into MetaCall, the `tag` should be null-terminated and the `path` should be a buffer. +pub fn load_from_package(tag: [:0]const u8, path: []const u8) !void { + if (mb.metacall_load_from_package(tag.ptr, path.ptr, path.len, null) != 0) { + return error.FailedToLoadFromPackage; + } +} + +fn parse_arg(value: anytype) ?*anyopaque { + return switch (@TypeOf(value)) { + bool => mb.metacall_value_create_bool(@intCast(@intFromBool(value))), + u8, i8 => mb.metacall_value_create_char(@intCast(value)), + u16, i16 => mb.metacall_value_create_short(@intCast(value)), + u32, i32 => mb.metacall_value_create_int(@intCast(value)), + u64, i64 => mb.metacall_value_create_long(@intCast(value)), + f32 => mb.metacall_value_create_float(@floatCast(value)), + f64 => mb.metacall_value_create_double(@floatCast(value)), + []const u8 => mb.metacall_value_create_string(@ptrCast(value.ptr), value.len), + [:0]const u8 => mb.metacall_value_create_buffer(@ptrCast(value.ptr), value.len), + else => mb.metacall_value_create_null(), + }; +} +fn parse_ret(comptime R: type, value: ?*anyopaque) ?R { + if (value == null) return null; + + const val_id = mb.metacall_value_id(value); + switch (R) { + bool => { + if (val_id == 0) + return mb.metacall_value_to_bool(value) != 0; + }, + u8, i8 => { + if (val_id == 1) + return mb.metacall_value_to_char(value); + }, + u16, i16 => { + if (val_id == 2) + return @intCast(mb.metacall_value_to_short(value)); + }, + u32, i32 => { + if (val_id == 3) + return @intCast(mb.metacall_value_to_int(value)); + }, + u64, i64 => { + if (val_id == 4) + return @intCast(mb.metacall_value_to_long(value)); + }, + f32 => { + if (val_id == 5) + return @floatCast(mb.metacall_value_to_float(value)); + }, + f64 => { + if (val_id == 6) + return @floatCast(mb.metacall_value_to_double(value)); + }, + [*:0]u8 => { + if (val_id == 7) + return @ptrCast(mb.metacall_value_to_string(value)); + }, + else => {}, + } + + return null; +} + +/// Calls a function with the return type of `R`. The `args` argument should be an array of any Metacall supported type. +pub fn metacall(comptime R: type, method: [:0]const u8, args: anytype) ?R { + const info = @typeInfo(@TypeOf(args)); + comptime { + if (info != .Array) + @compileError("Arguments should be an array!"); + } + var metacall_args: [args.len]?*anyopaque = undefined; + + for (args, 0..) |arg, idx| { + metacall_args[idx] = parse_arg(arg); + } + + const metacall_ret = mb.metacallv_s(method, &metacall_args, metacall_args.len); + defer { + for (metacall_args) |arg| mb.metacall_value_destroy(arg); + mb.metacall_value_destroy(metacall_ret); + } + + return parse_ret(R, metacall_ret); +} diff --git a/source/ports/zig_port/src/tests/integrated.zig b/source/ports/zig_port/src/tests/integrated.zig new file mode 100644 index 000000000..8ee7089f3 --- /dev/null +++ b/source/ports/zig_port/src/tests/integrated.zig @@ -0,0 +1,42 @@ +const std = @import("std"); +const metacall = @import("metacall"); + +const hi: []const u8 = "hi"; + +pub fn main() !void { + try metacall.init(); + + var paths: [1][:0]const u8 = .{"/home/raymond/Projects/metacall-core/source/ports/zig_port/src/tests/test.c"}; + try metacall.load_from_file("c", &paths); + + var paths_py: [1][:0]const u8 = .{"/home/raymond/Projects/metacall-core/source/ports/zig_port/src/tests/test.py"}; + try metacall.load_from_file("py", &paths_py); + + const ret_bool = metacall.metacall(bool, "ret_bool", [0]bool{}); + try std.testing.expect(ret_bool == true); + + const ret_char = metacall.metacall(u8, "sum_char", [2]u8{ 1, 1 }); + try std.testing.expect(ret_char == 2); + + const ret_short = metacall.metacall(u16, "sum_short", [2]u8{ 1, 1 }); + try std.testing.expect(ret_short == 2); + + const ret_int = metacall.metacall(u32, "sum_int", [2]u32{ 1, 1 }); + try std.testing.expect(ret_int == 2); + + const ret_long = metacall.metacall(u64, "sum_long", [2]u64{ 1, 1 }); + try std.testing.expect(ret_long == 2); + + const ret_float = metacall.metacall(f32, "sum_float", [2]f32{ 1.0, 1.0 }); + try std.testing.expect(ret_float == 2.0); + + const ret_double = metacall.metacall(f64, "sum_double", [2]f64{ 1.0, 1.0 }); + try std.testing.expect(ret_double == 2.0); + + const ret_string = metacall.metacall([*:0]u8, "ret_string", [1][]const u8{hi}); + try std.testing.expect(ret_string != null); + try std.testing.expect(ret_string.?[0] == 'h'); + try std.testing.expect(ret_string.?[1] == 'i'); + + defer metacall.deinit(); +} diff --git a/source/ports/zig_port/src/tests/test.c b/source/ports/zig_port/src/tests/test.c new file mode 100644 index 000000000..f86221501 --- /dev/null +++ b/source/ports/zig_port/src/tests/test.c @@ -0,0 +1,25 @@ +#include +#include + +bool ret_bool() { + return true; +} + +char sum_char(char a, char b) { + return a + b; +} +short sum_short(short a, short b) { + return a + b; +} +int sum_int(int a, int b) { + return a + b; +} +long sum_long(long a, long b) { + return a + b; +} +float sum_float(float a, float b) { + return a + b; +} +double sum_double(double a, double b) { + return a + b; +} \ No newline at end of file diff --git a/source/ports/zig_port/src/tests/test.py b/source/ports/zig_port/src/tests/test.py new file mode 100644 index 000000000..dd95ac9c2 --- /dev/null +++ b/source/ports/zig_port/src/tests/test.py @@ -0,0 +1,2 @@ +def ret_string(string): + return string \ No newline at end of file diff --git a/source/tests/metacall_rust_test/CMakeLists.txt b/source/tests/metacall_rust_test/CMakeLists.txt index c868f44c3..bbf51ae58 100644 --- a/source/tests/metacall_rust_test/CMakeLists.txt +++ b/source/tests/metacall_rust_test/CMakeLists.txt @@ -145,7 +145,7 @@ test_environment_variables(${target} "" ${TESTS_ENVIRONMENT_VARIABLES} - # Enable Rust backtrace and logs for better debugging + # Enable backtrace and logs for better debugging RUST_BACKTRACE=1 RUST_LOG=INFO ) diff --git a/tools/metacall-configure.ps1 b/tools/metacall-configure.ps1 index 825ac22dd..96ccb9ac3 100755 --- a/tools/metacall-configure.ps1 +++ b/tools/metacall-configure.ps1 @@ -297,6 +297,19 @@ function sub-configure { } } + # Zig + if ($BUILD_RUST -eq 1) { + # $Global:BUILD_STRING = "$BUILD_STRING -DOPTION_BUILD_LOADERS_ZIG=On" + + # if ($BUILD_SCRIPTS -eq 1) { + # $Global:BUILD_STRING = "$BUILD_STRING -DOPTION_BUILD_SCRIPTS_ZIG=On" + # } + + if ($BUILD_PORTS -eq 1) { + $Global:BUILD_STRING = "$BUILD_STRING -DOPTION_BUILD_PORTS_ZIG=On" + } + } + # File if ($BUILD_FILE -eq 1) { $Global:BUILD_STRING = "$BUILD_STRING -DOPTION_BUILD_LOADERS_FILE=On" diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 4eb96e8bc..213a618a7 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -437,6 +437,19 @@ sub_configure() { fi fi + # Zig + if [ $BUILD_ZIG = 1 ]; then + # BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_LOADERS_ZIG=On" + + # if [ $BUILD_SCRIPTS = 1 ]; then + # BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_ZIG=On" + # fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_ZIG=On" + fi + fi + # Examples if [ $BUILD_EXAMPLES = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_EXAMPLES=On" From 95f6e7e9f10245d7fad34ace357303a18ec0d9cf Mon Sep 17 00:00:00 2001 From: Mahdi Sharifi Date: Wed, 24 Jan 2024 12:39:36 +0330 Subject: [PATCH 2/7] Fix an accidental change in Rust tests --- source/tests/metacall_rust_test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/metacall_rust_test/CMakeLists.txt b/source/tests/metacall_rust_test/CMakeLists.txt index bbf51ae58..c868f44c3 100644 --- a/source/tests/metacall_rust_test/CMakeLists.txt +++ b/source/tests/metacall_rust_test/CMakeLists.txt @@ -145,7 +145,7 @@ test_environment_variables(${target} "" ${TESTS_ENVIRONMENT_VARIABLES} - # Enable backtrace and logs for better debugging + # Enable Rust backtrace and logs for better debugging RUST_BACKTRACE=1 RUST_LOG=INFO ) From 12f62d27d4a2e121d1d4ba2e27cb49d00368f421 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:41:52 -0500 Subject: [PATCH 3/7] Update FindZig.cmake --- cmake/FindZig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindZig.cmake b/cmake/FindZig.cmake index 28769f7b0..286ec5f53 100644 --- a/cmake/FindZig.cmake +++ b/cmake/FindZig.cmake @@ -2,7 +2,7 @@ # CMake Find Zig by Parra Studios # CMake script to find Zig compiler and tools. # -# Copyright (C) 2016 - 2022 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 1e142d8da8201a09f70bb706e96ac133a59a012f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:48:42 -0500 Subject: [PATCH 4/7] Update CMakeLists.txt --- source/ports/zig_port/CMakeLists.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/source/ports/zig_port/CMakeLists.txt b/source/ports/zig_port/CMakeLists.txt index 72f2ff33b..828590e22 100644 --- a/source/ports/zig_port/CMakeLists.txt +++ b/source/ports/zig_port/CMakeLists.txt @@ -20,13 +20,6 @@ set(target zig_port) # Exit here if required dependencies are not met message(STATUS "Port ${target}") -# Build Zig Port -if(CMAKE_BUILD_TYPE STREQUAL "Release") - set(TARGET_BUILD_TYPE "-Doptimize=ReleaseFast") -else() - set(TARGET_BUILD_TYPE) -endif() - # # Define test # @@ -41,16 +34,8 @@ set_property(TEST ${target} ) include(TestEnvironmentVariables) -include(Portability) - -project_library_path(TEST_LIB_PATH - ${PROJECT_OUTPUT_DIR} -) test_environment_variables(${target} "" ${TESTS_ENVIRONMENT_VARIABLES} - "${PROJECT_LIBRARY_PATH_NAME}=${TEST_LIB_PATH}" - "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" - "PROJECT_OUTPUT_DIR=${PROJECT_OUTPUT_DIR}" ) From ceeb1af07c576bf3ec14faee15b85af1d8031486 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:52:59 -0500 Subject: [PATCH 5/7] Update metacall-configure.ps1 --- tools/metacall-configure.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/metacall-configure.ps1 b/tools/metacall-configure.ps1 index 96ccb9ac3..8db8f9f38 100755 --- a/tools/metacall-configure.ps1 +++ b/tools/metacall-configure.ps1 @@ -29,6 +29,7 @@ $Global:BUILD_V8 = 0 $Global:BUILD_NODEJS = 0 $Global:BUILD_TYPESCRIPT = 0 $Global:BUILD_RUST = 0 +$Global:BUILD_ZIG = 0 $Global:BUILD_FILE = 0 $Global:BUILD_RPC = 0 $Global:BUILD_WASM = 0 @@ -99,6 +100,10 @@ function sub-options { echo "Build with rust support" $Global:BUILD_RUST = 1 } + if ("$option" -eq 'zig') { + echo "Build with zig support" + $Global:BUILD_ZIG = 1 + } if ("$option" -eq 'file') { echo "Build with file support" $Global:BUILD_FILE = 1 @@ -298,7 +303,8 @@ function sub-configure { } # Zig - if ($BUILD_RUST -eq 1) { + if ($BUILD_ZIG -eq 1) { + # TODO # $Global:BUILD_STRING = "$BUILD_STRING -DOPTION_BUILD_LOADERS_ZIG=On" # if ($BUILD_SCRIPTS -eq 1) { @@ -450,6 +456,8 @@ function sub-help { echo " v8: build with v8 support" echo " nodejs: build with nodejs support" echo " typescript: build with typescript support" + echo " rust: build with rust support" + echo " zig: build with zig support" echo " file: build with file support" echo " rpc: build with rpc support" echo " wasm: build with wasm support" From 4ebd351f40cf61475650193330219225d8f1aa87 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:55:36 -0500 Subject: [PATCH 6/7] Update metacall-configure.sh --- tools/metacall-configure.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 213a618a7..67d2456cc 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -4,7 +4,7 @@ # MetaCall Build Shell Script by Parra Studios # Build and install shell script utility for MetaCall. # -# Copyright (C) 2016 - 2022 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ BUILD_C=0 BUILD_COBOL=0 BUILD_GO=0 BUILD_RUST=0 +BUILD_ZIG=0 BUILD_SCRIPTS=0 BUILD_EXAMPLES=0 BUILD_TESTS=0 @@ -155,6 +156,10 @@ sub_options() { echo "Build with rust support" BUILD_RUST=1 fi + if [ "$option" = 'zig' ]; then + echo "Build with zig support" + BUILD_ZIG=1 + fi if [ "$option" = 'scripts' ]; then echo "Build all scripts" BUILD_SCRIPTS=1 @@ -439,6 +444,7 @@ sub_configure() { # Zig if [ $BUILD_ZIG = 1 ]; then + # TODO # BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_LOADERS_ZIG=On" # if [ $BUILD_SCRIPTS = 1 ]; then @@ -550,6 +556,7 @@ sub_help() { echo " cobol: build with cobol support" echo " go: build with go support" echo " rust: build with rust support" + echo " zig: build with zig support" echo " scripts: build all scripts" echo " examples: build all examples" echo " tests: build and run all tests" From bb0ed7d3defac2451acde7d1a815cf0002347a22 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:05:09 -0500 Subject: [PATCH 7/7] Update CMakeLists.txt --- source/ports/zig_port/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/ports/zig_port/CMakeLists.txt b/source/ports/zig_port/CMakeLists.txt index 828590e22..b764ee2f3 100644 --- a/source/ports/zig_port/CMakeLists.txt +++ b/source/ports/zig_port/CMakeLists.txt @@ -20,6 +20,12 @@ set(target zig_port) # Exit here if required dependencies are not met message(STATUS "Port ${target}") +# Generate bindings +add_custom_target(TARGET ${target} + COMMAND ${Zig_COMPILER_EXECUTABLE} translate-c metacall.h > metacall-bindings.zig -lc -I ${CMAKE_SOURCE_DIR}/source/metacall/include -I ${CMAKE_BINARY_DIR}/source/metacall/include -I ${CMAKE_BINARY_DIR}/source/include + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + # # Define test #