file io
This commit is contained in:
+120
@@ -0,0 +1,120 @@
|
|||||||
|
# generated by brolang translate-c from errno.h
|
||||||
|
|
||||||
|
errno_t :: alias c_int
|
||||||
|
|
||||||
|
EPERM c_int :: 1
|
||||||
|
ENOENT c_int :: 2
|
||||||
|
ESRCH c_int :: 3
|
||||||
|
EINTR c_int :: 4
|
||||||
|
EIO c_int :: 5
|
||||||
|
ENXIO c_int :: 6
|
||||||
|
E2BIG c_int :: 7
|
||||||
|
ENOEXEC c_int :: 8
|
||||||
|
EBADF c_int :: 9
|
||||||
|
ECHILD c_int :: 10
|
||||||
|
EDEADLK c_int :: 11
|
||||||
|
ENOMEM c_int :: 12
|
||||||
|
EACCES c_int :: 13
|
||||||
|
EFAULT c_int :: 14
|
||||||
|
ENOTBLK c_int :: 15
|
||||||
|
EBUSY c_int :: 16
|
||||||
|
EEXIST c_int :: 17
|
||||||
|
EXDEV c_int :: 18
|
||||||
|
ENODEV c_int :: 19
|
||||||
|
ENOTDIR c_int :: 20
|
||||||
|
EISDIR c_int :: 21
|
||||||
|
EINVAL c_int :: 22
|
||||||
|
ENFILE c_int :: 23
|
||||||
|
EMFILE c_int :: 24
|
||||||
|
ENOTTY c_int :: 25
|
||||||
|
ETXTBSY c_int :: 26
|
||||||
|
EFBIG c_int :: 27
|
||||||
|
ENOSPC c_int :: 28
|
||||||
|
ESPIPE c_int :: 29
|
||||||
|
EROFS c_int :: 30
|
||||||
|
EMLINK c_int :: 31
|
||||||
|
EPIPE c_int :: 32
|
||||||
|
EDOM c_int :: 33
|
||||||
|
ERANGE c_int :: 34
|
||||||
|
EAGAIN c_int :: 35
|
||||||
|
EINPROGRESS c_int :: 36
|
||||||
|
EALREADY c_int :: 37
|
||||||
|
ENOTSOCK c_int :: 38
|
||||||
|
EDESTADDRREQ c_int :: 39
|
||||||
|
EMSGSIZE c_int :: 40
|
||||||
|
EPROTOTYPE c_int :: 41
|
||||||
|
ENOPROTOOPT c_int :: 42
|
||||||
|
EPROTONOSUPPORT c_int :: 43
|
||||||
|
ESOCKTNOSUPPORT c_int :: 44
|
||||||
|
ENOTSUP c_int :: 45
|
||||||
|
EPFNOSUPPORT c_int :: 46
|
||||||
|
EAFNOSUPPORT c_int :: 47
|
||||||
|
EADDRINUSE c_int :: 48
|
||||||
|
EADDRNOTAVAIL c_int :: 49
|
||||||
|
ENETDOWN c_int :: 50
|
||||||
|
ENETUNREACH c_int :: 51
|
||||||
|
ENETRESET c_int :: 52
|
||||||
|
ECONNABORTED c_int :: 53
|
||||||
|
ECONNRESET c_int :: 54
|
||||||
|
ENOBUFS c_int :: 55
|
||||||
|
EISCONN c_int :: 56
|
||||||
|
ENOTCONN c_int :: 57
|
||||||
|
ESHUTDOWN c_int :: 58
|
||||||
|
ETOOMANYREFS c_int :: 59
|
||||||
|
ETIMEDOUT c_int :: 60
|
||||||
|
ECONNREFUSED c_int :: 61
|
||||||
|
ELOOP c_int :: 62
|
||||||
|
ENAMETOOLONG c_int :: 63
|
||||||
|
EHOSTDOWN c_int :: 64
|
||||||
|
EHOSTUNREACH c_int :: 65
|
||||||
|
ENOTEMPTY c_int :: 66
|
||||||
|
EPROCLIM c_int :: 67
|
||||||
|
EUSERS c_int :: 68
|
||||||
|
EDQUOT c_int :: 69
|
||||||
|
ESTALE c_int :: 70
|
||||||
|
EREMOTE c_int :: 71
|
||||||
|
EBADRPC c_int :: 72
|
||||||
|
ERPCMISMATCH c_int :: 73
|
||||||
|
EPROGUNAVAIL c_int :: 74
|
||||||
|
EPROGMISMATCH c_int :: 75
|
||||||
|
EPROCUNAVAIL c_int :: 76
|
||||||
|
ENOLCK c_int :: 77
|
||||||
|
ENOSYS c_int :: 78
|
||||||
|
EFTYPE c_int :: 79
|
||||||
|
EAUTH c_int :: 80
|
||||||
|
ENEEDAUTH c_int :: 81
|
||||||
|
EPWROFF c_int :: 82
|
||||||
|
EDEVERR c_int :: 83
|
||||||
|
EOVERFLOW c_int :: 84
|
||||||
|
EBADEXEC c_int :: 85
|
||||||
|
EBADARCH c_int :: 86
|
||||||
|
ESHLIBVERS c_int :: 87
|
||||||
|
EBADMACHO c_int :: 88
|
||||||
|
ECANCELED c_int :: 89
|
||||||
|
EIDRM c_int :: 90
|
||||||
|
ENOMSG c_int :: 91
|
||||||
|
EILSEQ c_int :: 92
|
||||||
|
ENOATTR c_int :: 93
|
||||||
|
EBADMSG c_int :: 94
|
||||||
|
EMULTIHOP c_int :: 95
|
||||||
|
ENODATA c_int :: 96
|
||||||
|
ENOLINK c_int :: 97
|
||||||
|
ENOSR c_int :: 98
|
||||||
|
ENOSTR c_int :: 99
|
||||||
|
EPROTO c_int :: 100
|
||||||
|
ETIME c_int :: 101
|
||||||
|
EOPNOTSUPP c_int :: 102
|
||||||
|
ENOPOLICY c_int :: 103
|
||||||
|
ENOTRECOVERABLE c_int :: 104
|
||||||
|
EOWNERDEAD c_int :: 105
|
||||||
|
EQFULL c_int :: 106
|
||||||
|
ENOTCAPABLE c_int :: 107
|
||||||
|
ELAST c_int :: 107
|
||||||
|
|
||||||
|
__error c_func() ?*mut c_int
|
||||||
|
|
||||||
|
# unsupported in bindings: _SYS_ERRNO_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _CDEFS_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _ERRNO_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: errno — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: EWOULDBLOCK — C macro is not a supported constant
|
||||||
+393
@@ -0,0 +1,393 @@
|
|||||||
|
# generated by brolang translate-c from fcntl.h
|
||||||
|
|
||||||
|
# unsupported in bindings: C union '__mbstate_t' has no native spelling
|
||||||
|
__c_fcntl_bro_flock_record :: c_struct {
|
||||||
|
l_start c_longlong
|
||||||
|
l_len c_longlong
|
||||||
|
l_pid c_int
|
||||||
|
l_type c_short
|
||||||
|
l_whence c_short
|
||||||
|
}
|
||||||
|
flocktimeout :: c_struct {
|
||||||
|
fl __c_fcntl_bro_flock_record
|
||||||
|
timeout timespec
|
||||||
|
}
|
||||||
|
radvisory :: c_struct {
|
||||||
|
ra_offset c_longlong
|
||||||
|
ra_count c_int
|
||||||
|
}
|
||||||
|
fsignatures :: c_struct {
|
||||||
|
fs_file_start c_longlong
|
||||||
|
fs_blob_start ?*mut anyopaque
|
||||||
|
fs_blob_size c_ulong
|
||||||
|
fs_fsignatures_size c_ulong
|
||||||
|
fs_cdhash [20]c_char
|
||||||
|
fs_hash_type c_int
|
||||||
|
}
|
||||||
|
fsupplement :: c_struct {
|
||||||
|
fs_file_start c_longlong
|
||||||
|
fs_blob_start c_longlong
|
||||||
|
fs_blob_size c_ulong
|
||||||
|
fs_orig_fd c_int
|
||||||
|
}
|
||||||
|
fchecklv :: c_struct {
|
||||||
|
lv_file_start c_longlong
|
||||||
|
lv_error_message_size c_ulong
|
||||||
|
lv_error_message ?*mut anyopaque
|
||||||
|
}
|
||||||
|
fgetsigsinfo :: c_struct {
|
||||||
|
fg_file_start c_longlong
|
||||||
|
fg_info_request c_int
|
||||||
|
fg_sig_is_platform c_int
|
||||||
|
}
|
||||||
|
fstore :: c_struct {
|
||||||
|
fst_flags c_uint
|
||||||
|
fst_posmode c_int
|
||||||
|
fst_offset c_longlong
|
||||||
|
fst_length c_longlong
|
||||||
|
fst_bytesalloc c_longlong
|
||||||
|
}
|
||||||
|
fpunchhole :: c_struct {
|
||||||
|
fp_flags c_uint
|
||||||
|
reserved c_uint
|
||||||
|
fp_offset c_longlong
|
||||||
|
fp_length c_longlong
|
||||||
|
}
|
||||||
|
ftrimactivefile :: c_struct {
|
||||||
|
fta_offset c_longlong
|
||||||
|
fta_length c_longlong
|
||||||
|
}
|
||||||
|
fspecread :: c_struct {
|
||||||
|
fsr_flags c_uint
|
||||||
|
reserved c_uint
|
||||||
|
fsr_offset c_longlong
|
||||||
|
fsr_length c_longlong
|
||||||
|
}
|
||||||
|
fattributiontag :: c_struct {
|
||||||
|
ft_flags c_uint
|
||||||
|
ft_hash c_ulonglong
|
||||||
|
ft_attribution_name [255]c_char
|
||||||
|
}
|
||||||
|
log2phys :: c_struct {
|
||||||
|
l2p_flags c_uint
|
||||||
|
l2p_contigbytes c_longlong
|
||||||
|
l2p_devoffset c_longlong
|
||||||
|
}
|
||||||
|
_filesec :: opaque
|
||||||
|
|
||||||
|
# unsupported in bindings: typedef '__mbstate_t' — underlying type has no native spelling
|
||||||
|
# unsupported in bindings: typedef '__darwin_mbstate_t' — underlying type has no native spelling
|
||||||
|
fsignatures_t :: alias fsignatures
|
||||||
|
fsupplement_t :: alias fsupplement
|
||||||
|
fchecklv_t :: alias fchecklv
|
||||||
|
fgetsigsinfo_t :: alias fgetsigsinfo
|
||||||
|
fstore_t :: alias fstore
|
||||||
|
fpunchhole_t :: alias fpunchhole
|
||||||
|
ftrimactivefile_t :: alias ftrimactivefile
|
||||||
|
fspecread_t :: alias fspecread
|
||||||
|
fattributiontag_t :: alias fattributiontag
|
||||||
|
# unsupported in bindings: typedef '_filesec' — underlying type has no native spelling
|
||||||
|
filesec_t :: alias ?*mut _filesec
|
||||||
|
filesec_property_t :: alias c_uint
|
||||||
|
|
||||||
|
O_RDONLY c_int :: 0
|
||||||
|
O_WRONLY c_int :: 1
|
||||||
|
O_RDWR c_int :: 2
|
||||||
|
O_ACCMODE c_int :: 3
|
||||||
|
FREAD c_int :: 1
|
||||||
|
FWRITE c_int :: 2
|
||||||
|
O_NONBLOCK c_int :: 4
|
||||||
|
O_APPEND c_int :: 8
|
||||||
|
O_SYNC c_int :: 128
|
||||||
|
O_SHLOCK c_int :: 16
|
||||||
|
O_EXLOCK c_int :: 32
|
||||||
|
O_ASYNC c_int :: 64
|
||||||
|
O_NOFOLLOW c_int :: 256
|
||||||
|
O_CREAT c_int :: 512
|
||||||
|
O_TRUNC c_int :: 1024
|
||||||
|
O_EXCL c_int :: 2048
|
||||||
|
O_RESOLVE_BENEATH c_int :: 4096
|
||||||
|
O_UNIQUE c_int :: 8192
|
||||||
|
O_EVTONLY c_int :: 32768
|
||||||
|
O_NOCTTY c_int :: 131072
|
||||||
|
O_DIRECTORY c_int :: 1048576
|
||||||
|
O_SYMLINK c_int :: 2097152
|
||||||
|
O_DSYNC c_int :: 4194304
|
||||||
|
O_CLOEXEC c_int :: 16777216
|
||||||
|
O_NOFOLLOW_ANY c_int :: 536870912
|
||||||
|
O_EXEC c_int :: 1073741824
|
||||||
|
AT_FDCWD c_int :: -2
|
||||||
|
AT_EACCESS c_int :: 16
|
||||||
|
AT_SYMLINK_NOFOLLOW c_int :: 32
|
||||||
|
AT_SYMLINK_FOLLOW c_int :: 64
|
||||||
|
AT_REMOVEDIR c_int :: 128
|
||||||
|
AT_REALDEV c_int :: 512
|
||||||
|
AT_FDONLY c_int :: 1024
|
||||||
|
AT_SYMLINK_NOFOLLOW_ANY c_int :: 2048
|
||||||
|
AT_RESOLVE_BENEATH c_int :: 8192
|
||||||
|
AT_NODELETEBUSY c_int :: 16384
|
||||||
|
AT_UNIQUE c_int :: 32768
|
||||||
|
O_DP_GETRAWENCRYPTED c_int :: 1
|
||||||
|
O_DP_GETRAWUNENCRYPTED c_int :: 2
|
||||||
|
O_DP_AUTHENTICATE c_int :: 4
|
||||||
|
AUTH_OPEN_NOAUTHFD c_int :: -1
|
||||||
|
CPF_OVERWRITE c_int :: 1
|
||||||
|
CPF_IGNORE_MODE c_int :: 2
|
||||||
|
F_DUPFD c_int :: 0
|
||||||
|
F_GETFD c_int :: 1
|
||||||
|
F_SETFD c_int :: 2
|
||||||
|
F_GETFL c_int :: 3
|
||||||
|
F_SETFL c_int :: 4
|
||||||
|
F_GETOWN c_int :: 5
|
||||||
|
F_SETOWN c_int :: 6
|
||||||
|
F_GETLK c_int :: 7
|
||||||
|
F_SETLK c_int :: 8
|
||||||
|
F_SETLKW c_int :: 9
|
||||||
|
F_SETLKWTIMEOUT c_int :: 10
|
||||||
|
F_FLUSH_DATA c_int :: 40
|
||||||
|
F_CHKCLEAN c_int :: 41
|
||||||
|
F_PREALLOCATE c_int :: 42
|
||||||
|
F_SETSIZE c_int :: 43
|
||||||
|
F_RDADVISE c_int :: 44
|
||||||
|
F_RDAHEAD c_int :: 45
|
||||||
|
F_NOCACHE c_int :: 48
|
||||||
|
F_LOG2PHYS c_int :: 49
|
||||||
|
F_GETPATH c_int :: 50
|
||||||
|
F_FULLFSYNC c_int :: 51
|
||||||
|
F_PATHPKG_CHECK c_int :: 52
|
||||||
|
F_FREEZE_FS c_int :: 53
|
||||||
|
F_THAW_FS c_int :: 54
|
||||||
|
F_GLOBAL_NOCACHE c_int :: 55
|
||||||
|
F_ADDSIGS c_int :: 59
|
||||||
|
F_ADDFILESIGS c_int :: 61
|
||||||
|
F_NODIRECT c_int :: 62
|
||||||
|
F_GETPROTECTIONCLASS c_int :: 63
|
||||||
|
F_SETPROTECTIONCLASS c_int :: 64
|
||||||
|
F_LOG2PHYS_EXT c_int :: 65
|
||||||
|
F_GETLKPID c_int :: 66
|
||||||
|
F_SETBACKINGSTORE c_int :: 70
|
||||||
|
F_GETPATH_MTMINFO c_int :: 71
|
||||||
|
F_GETCODEDIR c_int :: 72
|
||||||
|
F_SETNOSIGPIPE c_int :: 73
|
||||||
|
F_GETNOSIGPIPE c_int :: 74
|
||||||
|
F_TRANSCODEKEY c_int :: 75
|
||||||
|
F_SINGLE_WRITER c_int :: 76
|
||||||
|
F_GETPROTECTIONLEVEL c_int :: 77
|
||||||
|
F_FINDSIGS c_int :: 78
|
||||||
|
F_ADDFILESIGS_FOR_DYLD_SIM c_int :: 83
|
||||||
|
F_BARRIERFSYNC c_int :: 85
|
||||||
|
F_OFD_SETLK c_int :: 90
|
||||||
|
F_OFD_SETLKW c_int :: 91
|
||||||
|
F_OFD_GETLK c_int :: 92
|
||||||
|
F_OFD_SETLKWTIMEOUT c_int :: 93
|
||||||
|
F_ADDFILESIGS_RETURN c_int :: 97
|
||||||
|
F_CHECK_LV c_int :: 98
|
||||||
|
F_PUNCHHOLE c_int :: 99
|
||||||
|
F_TRIM_ACTIVE_FILE c_int :: 100
|
||||||
|
F_SPECULATIVE_READ c_int :: 101
|
||||||
|
F_GETPATH_NOFIRMLINK c_int :: 102
|
||||||
|
F_ADDFILESIGS_INFO c_int :: 103
|
||||||
|
F_ADDFILESUPPL c_int :: 104
|
||||||
|
F_GETSIGSINFO c_int :: 105
|
||||||
|
F_SETLEASE c_int :: 106
|
||||||
|
F_GETLEASE c_int :: 107
|
||||||
|
F_TRANSFEREXTENTS c_int :: 110
|
||||||
|
F_ATTRIBUTION_TAG c_int :: 111
|
||||||
|
F_NOCACHE_EXT c_int :: 112
|
||||||
|
F_ADDSIGS_MAIN_BINARY c_int :: 113
|
||||||
|
FCNTL_FS_SPECIFIC_BASE c_int :: 65536
|
||||||
|
F_DUPFD_CLOEXEC c_int :: 67
|
||||||
|
FD_CLOEXEC c_int :: 1
|
||||||
|
F_RDLCK c_int :: 1
|
||||||
|
F_UNLCK c_int :: 2
|
||||||
|
F_WRLCK c_int :: 3
|
||||||
|
S_IFMT c_int :: 61440
|
||||||
|
S_IFIFO c_int :: 4096
|
||||||
|
S_IFCHR c_int :: 8192
|
||||||
|
S_IFDIR c_int :: 16384
|
||||||
|
S_IFBLK c_int :: 24576
|
||||||
|
S_IFREG c_int :: 32768
|
||||||
|
S_IFLNK c_int :: 40960
|
||||||
|
S_IFSOCK c_int :: 49152
|
||||||
|
S_IFWHT c_int :: 57344
|
||||||
|
S_IRWXU c_int :: 448
|
||||||
|
S_IRUSR c_int :: 256
|
||||||
|
S_IWUSR c_int :: 128
|
||||||
|
S_IXUSR c_int :: 64
|
||||||
|
S_IRWXG c_int :: 56
|
||||||
|
S_IRGRP c_int :: 32
|
||||||
|
S_IWGRP c_int :: 16
|
||||||
|
S_IXGRP c_int :: 8
|
||||||
|
S_IRWXO c_int :: 7
|
||||||
|
S_IROTH c_int :: 4
|
||||||
|
S_IWOTH c_int :: 2
|
||||||
|
S_IXOTH c_int :: 1
|
||||||
|
S_ISUID c_int :: 2048
|
||||||
|
S_ISGID c_int :: 1024
|
||||||
|
S_ISVTX c_int :: 512
|
||||||
|
F_ALLOCATECONTIG c_int :: 2
|
||||||
|
F_ALLOCATEALL c_int :: 4
|
||||||
|
F_ALLOCATEPERSIST c_int :: 8
|
||||||
|
F_PEOFPOSMODE c_int :: 3
|
||||||
|
F_VOLPOSMODE c_int :: 4
|
||||||
|
USER_FSIGNATURES_CDHASH_LEN c_int :: 20
|
||||||
|
GETSIGSINFO_PLATFORM_BINARY c_int :: 1
|
||||||
|
LOCK_SH c_int :: 1
|
||||||
|
LOCK_EX c_int :: 2
|
||||||
|
LOCK_NB c_int :: 4
|
||||||
|
LOCK_UN c_int :: 8
|
||||||
|
ATTRIBUTION_NAME_MAX c_int :: 255
|
||||||
|
F_CREATE_TAG c_int :: 1
|
||||||
|
F_DELETE_TAG c_int :: 2
|
||||||
|
F_QUERY_TAG c_int :: 4
|
||||||
|
O_POPUP c_uint :: 2147483648
|
||||||
|
O_ALERT c_int :: 536870912
|
||||||
|
FILESEC_OWNER c_uint :: 1
|
||||||
|
FILESEC_GROUP c_uint :: 2
|
||||||
|
FILESEC_UUID c_uint :: 3
|
||||||
|
FILESEC_MODE c_uint :: 4
|
||||||
|
FILESEC_ACL c_uint :: 5
|
||||||
|
FILESEC_GRPUUID c_uint :: 6
|
||||||
|
FILESEC_ACL_RAW c_uint :: 100
|
||||||
|
FILESEC_ACL_ALLOCSIZE c_uint :: 101
|
||||||
|
|
||||||
|
open c_func(_ ?*c_char, _ c_int, ...) c_int
|
||||||
|
openat c_func(_ c_int, _ ?*c_char, _ c_int, ...) c_int
|
||||||
|
creat c_func(_ ?*c_char, _ c_ushort) c_int
|
||||||
|
fcntl c_func(_ c_int, _ c_int, ...) c_int
|
||||||
|
openx_np c_func(_ ?*c_char, _ c_int, _ ?*mut _filesec) c_int
|
||||||
|
open_dprotected_np c_func(_ ?*c_char, _ c_int, _ c_int, _ c_int, ...) c_int
|
||||||
|
openat_dprotected_np c_func(_ c_int, _ ?*c_char, _ c_int, _ c_int, _ c_int, ...) c_int
|
||||||
|
openat_authenticated_np c_func(_ c_int, _ ?*c_char, _ c_int, _ c_int) c_int
|
||||||
|
flock c_func(_ c_int, _ c_int) c_int
|
||||||
|
filesec_init c_func() ?*mut _filesec
|
||||||
|
filesec_dup c_func(_ ?*mut _filesec) ?*mut _filesec
|
||||||
|
filesec_free c_func(_ ?*mut _filesec) void
|
||||||
|
filesec_get_property c_func(_ ?*mut _filesec, _ c_uint, _ ?*mut anyopaque) c_int
|
||||||
|
filesec_query_property c_func(_ ?*mut _filesec, _ c_uint, _ ?*mut c_int) c_int
|
||||||
|
filesec_set_property c_func(_ ?*mut _filesec, _ c_uint, _ ?*anyopaque) c_int
|
||||||
|
filesec_unset_property c_func(_ ?*mut _filesec, _ c_uint) c_int
|
||||||
|
|
||||||
|
# unsupported in bindings: _SYS_FCNTL_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SYS__TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _CDEFS_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _BSD_MACHINE__TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _BSD_ARM__TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SYS__PTHREAD_TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_8 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_9 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_10 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_10_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_10_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_15 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_15_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_15_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_16 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_16_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _SIZE_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _MODE_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _OFF_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _PID_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: O_FSYNC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: O_SEARCH — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FAPPEND — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FASYNC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FFSYNC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FFDSYNC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FNONBLOCK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FNDELAY — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: O_NDELAY — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: CPF_MASK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: F_SETLEASE_ARG — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _SEEK_SET_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: S_ISTXT — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: S_IREAD — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: S_IWRITE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: S_IEXEC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _STRUCT_TIMESPEC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _BSD_MACHINE_TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _ARM_MACHTYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _MACHTYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT8_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT16_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT32_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT64_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT8_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT16_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT32_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT64_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INTPTR_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _UINTPTR_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: USER_ADDR_NULL — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: CAST_USER_ADDR_T — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _FILESEC_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: FILESEC_GUID — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _FILESEC_UNSET_PROPERTY — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _FILESEC_REMOVE_ACL — C macro is not a supported constant
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
read c_func(_ c_int, _ ?*mut anyopaque, _ c_ulong) c_long
|
|
||||||
write c_func(_ c_int, _ ?*anyopaque, _ c_ulong) c_long
|
|
||||||
__error c_func() *mut c_int
|
|
||||||
+4
-1
@@ -1,6 +1,7 @@
|
|||||||
# generated by brolang translate-c from stdio.h
|
# generated by brolang translate-c from stdio.h
|
||||||
|
|
||||||
# unsupported in bindings: C union '__mbstate_t' has no native spelling
|
# unsupported in bindings: C union '__mbstate_t' has no native spelling
|
||||||
|
__mbstate_t :: opaque
|
||||||
__darwin_pthread_handler_rec :: c_struct {
|
__darwin_pthread_handler_rec :: c_struct {
|
||||||
__routine ?*c_func(_ ?*mut anyopaque) void
|
__routine ?*c_func(_ ?*mut anyopaque) void
|
||||||
__arg ?*mut anyopaque
|
__arg ?*mut anyopaque
|
||||||
@@ -82,7 +83,8 @@ __uint64_t :: alias c_ulonglong
|
|||||||
__darwin_intptr_t :: alias c_long
|
__darwin_intptr_t :: alias c_long
|
||||||
__darwin_natural_t :: alias c_uint
|
__darwin_natural_t :: alias c_uint
|
||||||
__darwin_ct_rune_t :: alias c_int
|
__darwin_ct_rune_t :: alias c_int
|
||||||
__darwin_mbstate_t :: alias __mbstate_t
|
# unsupported in bindings: typedef '__mbstate_t' — underlying type has no native spelling
|
||||||
|
# unsupported in bindings: typedef '__darwin_mbstate_t' — underlying type has no native spelling
|
||||||
__darwin_ptrdiff_t :: alias c_long
|
__darwin_ptrdiff_t :: alias c_long
|
||||||
__darwin_size_t :: alias c_ulong
|
__darwin_size_t :: alias c_ulong
|
||||||
__darwin_va_list :: alias ?*mut c_char
|
__darwin_va_list :: alias ?*mut c_char
|
||||||
@@ -148,6 +150,7 @@ syscall_arg_t :: alias c_ulonglong
|
|||||||
va_list :: alias ?*mut c_char
|
va_list :: alias ?*mut c_char
|
||||||
size_t :: alias c_ulong
|
size_t :: alias c_ulong
|
||||||
fpos_t :: alias c_longlong
|
fpos_t :: alias c_longlong
|
||||||
|
# unsupported in bindings: typedef '__sFILEX' — underlying type has no native spelling
|
||||||
FILE :: alias __sFILE
|
FILE :: alias __sFILE
|
||||||
off_t :: alias c_longlong
|
off_t :: alias c_longlong
|
||||||
ssize_t :: alias c_long
|
ssize_t :: alias c_long
|
||||||
|
|||||||
+1091
-1
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,661 @@
|
|||||||
|
# generated by brolang translate-c from unistd.h
|
||||||
|
|
||||||
|
# unsupported in bindings: C union '__mbstate_t' has no native spelling
|
||||||
|
accessx_descriptor :: c_struct {
|
||||||
|
ad_name_offset c_uint
|
||||||
|
ad_flags c_int
|
||||||
|
ad_pad [2]c_int
|
||||||
|
}
|
||||||
|
fd_set :: c_struct {
|
||||||
|
fds_bits [32]c_int
|
||||||
|
}
|
||||||
|
timespec :: c_struct {
|
||||||
|
tv_sec c_long
|
||||||
|
tv_nsec c_long
|
||||||
|
}
|
||||||
|
fssearchblock :: opaque
|
||||||
|
searchstate :: opaque
|
||||||
|
|
||||||
|
# unsupported in bindings: typedef '__mbstate_t' — underlying type has no native spelling
|
||||||
|
# unsupported in bindings: typedef '__darwin_mbstate_t' — underlying type has no native spelling
|
||||||
|
gid_t :: alias c_uint
|
||||||
|
useconds_t :: alias c_uint
|
||||||
|
time_t :: alias c_long
|
||||||
|
suseconds_t :: alias c_int
|
||||||
|
uuid_t :: alias [16]c_uchar
|
||||||
|
# unsupported in bindings: typedef 'fssearchblock' — underlying type has no native spelling
|
||||||
|
# unsupported in bindings: typedef 'searchstate' — underlying type has no native spelling
|
||||||
|
|
||||||
|
_POSIX_VERSION c_long :: 200112
|
||||||
|
_POSIX2_VERSION c_long :: 200112
|
||||||
|
_POSIX_THREAD_KEYS_MAX c_int :: 128
|
||||||
|
F_OK c_int :: 0
|
||||||
|
ACCESSX_MAX_DESCRIPTORS c_int :: 100
|
||||||
|
_PC_LINK_MAX c_int :: 1
|
||||||
|
_PC_MAX_CANON c_int :: 2
|
||||||
|
_PC_MAX_INPUT c_int :: 3
|
||||||
|
_PC_NAME_MAX c_int :: 4
|
||||||
|
_PC_PATH_MAX c_int :: 5
|
||||||
|
_PC_PIPE_BUF c_int :: 6
|
||||||
|
_PC_CHOWN_RESTRICTED c_int :: 7
|
||||||
|
_PC_NO_TRUNC c_int :: 8
|
||||||
|
_PC_VDISABLE c_int :: 9
|
||||||
|
_PC_NAME_CHARS_MAX c_int :: 10
|
||||||
|
_PC_CASE_SENSITIVE c_int :: 11
|
||||||
|
_PC_CASE_PRESERVING c_int :: 12
|
||||||
|
_PC_EXTENDED_SECURITY_NP c_int :: 13
|
||||||
|
_PC_AUTH_OPAQUE_NP c_int :: 14
|
||||||
|
_PC_2_SYMLINKS c_int :: 15
|
||||||
|
_PC_ALLOC_SIZE_MIN c_int :: 16
|
||||||
|
_PC_ASYNC_IO c_int :: 17
|
||||||
|
_PC_FILESIZEBITS c_int :: 18
|
||||||
|
_PC_PRIO_IO c_int :: 19
|
||||||
|
_PC_REC_INCR_XFER_SIZE c_int :: 20
|
||||||
|
_PC_REC_MAX_XFER_SIZE c_int :: 21
|
||||||
|
_PC_REC_MIN_XFER_SIZE c_int :: 22
|
||||||
|
_PC_REC_XFER_ALIGN c_int :: 23
|
||||||
|
_PC_SYMLINK_MAX c_int :: 24
|
||||||
|
_PC_SYNC_IO c_int :: 25
|
||||||
|
_PC_XATTR_SIZE_BITS c_int :: 26
|
||||||
|
_PC_MIN_HOLE_SIZE c_int :: 27
|
||||||
|
_CS_PATH c_int :: 1
|
||||||
|
STDIN_FILENO c_int :: 0
|
||||||
|
STDOUT_FILENO c_int :: 1
|
||||||
|
STDERR_FILENO c_int :: 2
|
||||||
|
_XOPEN_VERSION c_int :: 600
|
||||||
|
_XOPEN_XCU_VERSION c_int :: 4
|
||||||
|
_POSIX_CHOWN_RESTRICTED c_long :: 200112
|
||||||
|
_POSIX_FSYNC c_long :: 200112
|
||||||
|
_POSIX_IPV6 c_long :: 200112
|
||||||
|
_POSIX_JOB_CONTROL c_long :: 200112
|
||||||
|
_POSIX_MAPPED_FILES c_long :: 200112
|
||||||
|
_POSIX_MEMORY_PROTECTION c_long :: 200112
|
||||||
|
_POSIX_NO_TRUNC c_long :: 200112
|
||||||
|
_POSIX_READER_WRITER_LOCKS c_long :: 200112
|
||||||
|
_POSIX_REGEXP c_long :: 200112
|
||||||
|
_POSIX_SAVED_IDS c_long :: 200112
|
||||||
|
_POSIX_SHELL c_long :: 200112
|
||||||
|
_POSIX_SPAWN c_long :: 200112
|
||||||
|
_POSIX_THREAD_ATTR_STACKADDR c_long :: 200112
|
||||||
|
_POSIX_THREAD_ATTR_STACKSIZE c_long :: 200112
|
||||||
|
_POSIX_THREAD_PROCESS_SHARED c_long :: 200112
|
||||||
|
_POSIX_THREAD_SAFE_FUNCTIONS c_long :: 200112
|
||||||
|
_POSIX_THREADS c_long :: 200112
|
||||||
|
_POSIX2_C_BIND c_long :: 200112
|
||||||
|
_POSIX2_C_DEV c_long :: 200112
|
||||||
|
_POSIX2_CHAR_TERM c_long :: 200112
|
||||||
|
_POSIX2_FORT_RUN c_long :: 200112
|
||||||
|
_POSIX2_LOCALEDEF c_long :: 200112
|
||||||
|
_POSIX2_SW_DEV c_long :: 200112
|
||||||
|
_POSIX2_UPE c_long :: 200112
|
||||||
|
_SC_ARG_MAX c_int :: 1
|
||||||
|
_SC_CHILD_MAX c_int :: 2
|
||||||
|
_SC_CLK_TCK c_int :: 3
|
||||||
|
_SC_NGROUPS_MAX c_int :: 4
|
||||||
|
_SC_OPEN_MAX c_int :: 5
|
||||||
|
_SC_JOB_CONTROL c_int :: 6
|
||||||
|
_SC_SAVED_IDS c_int :: 7
|
||||||
|
_SC_VERSION c_int :: 8
|
||||||
|
_SC_BC_BASE_MAX c_int :: 9
|
||||||
|
_SC_BC_DIM_MAX c_int :: 10
|
||||||
|
_SC_BC_SCALE_MAX c_int :: 11
|
||||||
|
_SC_BC_STRING_MAX c_int :: 12
|
||||||
|
_SC_COLL_WEIGHTS_MAX c_int :: 13
|
||||||
|
_SC_EXPR_NEST_MAX c_int :: 14
|
||||||
|
_SC_LINE_MAX c_int :: 15
|
||||||
|
_SC_RE_DUP_MAX c_int :: 16
|
||||||
|
_SC_2_VERSION c_int :: 17
|
||||||
|
_SC_2_C_BIND c_int :: 18
|
||||||
|
_SC_2_C_DEV c_int :: 19
|
||||||
|
_SC_2_CHAR_TERM c_int :: 20
|
||||||
|
_SC_2_FORT_DEV c_int :: 21
|
||||||
|
_SC_2_FORT_RUN c_int :: 22
|
||||||
|
_SC_2_LOCALEDEF c_int :: 23
|
||||||
|
_SC_2_SW_DEV c_int :: 24
|
||||||
|
_SC_2_UPE c_int :: 25
|
||||||
|
_SC_STREAM_MAX c_int :: 26
|
||||||
|
_SC_TZNAME_MAX c_int :: 27
|
||||||
|
_SC_ASYNCHRONOUS_IO c_int :: 28
|
||||||
|
_SC_PAGESIZE c_int :: 29
|
||||||
|
_SC_MEMLOCK c_int :: 30
|
||||||
|
_SC_MEMLOCK_RANGE c_int :: 31
|
||||||
|
_SC_MEMORY_PROTECTION c_int :: 32
|
||||||
|
_SC_MESSAGE_PASSING c_int :: 33
|
||||||
|
_SC_PRIORITIZED_IO c_int :: 34
|
||||||
|
_SC_PRIORITY_SCHEDULING c_int :: 35
|
||||||
|
_SC_REALTIME_SIGNALS c_int :: 36
|
||||||
|
_SC_SEMAPHORES c_int :: 37
|
||||||
|
_SC_FSYNC c_int :: 38
|
||||||
|
_SC_SHARED_MEMORY_OBJECTS c_int :: 39
|
||||||
|
_SC_SYNCHRONIZED_IO c_int :: 40
|
||||||
|
_SC_TIMERS c_int :: 41
|
||||||
|
_SC_AIO_LISTIO_MAX c_int :: 42
|
||||||
|
_SC_AIO_MAX c_int :: 43
|
||||||
|
_SC_AIO_PRIO_DELTA_MAX c_int :: 44
|
||||||
|
_SC_DELAYTIMER_MAX c_int :: 45
|
||||||
|
_SC_MQ_OPEN_MAX c_int :: 46
|
||||||
|
_SC_MAPPED_FILES c_int :: 47
|
||||||
|
_SC_RTSIG_MAX c_int :: 48
|
||||||
|
_SC_SEM_NSEMS_MAX c_int :: 49
|
||||||
|
_SC_SEM_VALUE_MAX c_int :: 50
|
||||||
|
_SC_SIGQUEUE_MAX c_int :: 51
|
||||||
|
_SC_TIMER_MAX c_int :: 52
|
||||||
|
_SC_NPROCESSORS_CONF c_int :: 57
|
||||||
|
_SC_NPROCESSORS_ONLN c_int :: 58
|
||||||
|
_SC_2_PBS c_int :: 59
|
||||||
|
_SC_2_PBS_ACCOUNTING c_int :: 60
|
||||||
|
_SC_2_PBS_CHECKPOINT c_int :: 61
|
||||||
|
_SC_2_PBS_LOCATE c_int :: 62
|
||||||
|
_SC_2_PBS_MESSAGE c_int :: 63
|
||||||
|
_SC_2_PBS_TRACK c_int :: 64
|
||||||
|
_SC_ADVISORY_INFO c_int :: 65
|
||||||
|
_SC_BARRIERS c_int :: 66
|
||||||
|
_SC_CLOCK_SELECTION c_int :: 67
|
||||||
|
_SC_CPUTIME c_int :: 68
|
||||||
|
_SC_FILE_LOCKING c_int :: 69
|
||||||
|
_SC_GETGR_R_SIZE_MAX c_int :: 70
|
||||||
|
_SC_GETPW_R_SIZE_MAX c_int :: 71
|
||||||
|
_SC_HOST_NAME_MAX c_int :: 72
|
||||||
|
_SC_LOGIN_NAME_MAX c_int :: 73
|
||||||
|
_SC_MONOTONIC_CLOCK c_int :: 74
|
||||||
|
_SC_MQ_PRIO_MAX c_int :: 75
|
||||||
|
_SC_READER_WRITER_LOCKS c_int :: 76
|
||||||
|
_SC_REGEXP c_int :: 77
|
||||||
|
_SC_SHELL c_int :: 78
|
||||||
|
_SC_SPAWN c_int :: 79
|
||||||
|
_SC_SPIN_LOCKS c_int :: 80
|
||||||
|
_SC_SPORADIC_SERVER c_int :: 81
|
||||||
|
_SC_THREAD_ATTR_STACKADDR c_int :: 82
|
||||||
|
_SC_THREAD_ATTR_STACKSIZE c_int :: 83
|
||||||
|
_SC_THREAD_CPUTIME c_int :: 84
|
||||||
|
_SC_THREAD_DESTRUCTOR_ITERATIONS c_int :: 85
|
||||||
|
_SC_THREAD_KEYS_MAX c_int :: 86
|
||||||
|
_SC_THREAD_PRIO_INHERIT c_int :: 87
|
||||||
|
_SC_THREAD_PRIO_PROTECT c_int :: 88
|
||||||
|
_SC_THREAD_PRIORITY_SCHEDULING c_int :: 89
|
||||||
|
_SC_THREAD_PROCESS_SHARED c_int :: 90
|
||||||
|
_SC_THREAD_SAFE_FUNCTIONS c_int :: 91
|
||||||
|
_SC_THREAD_SPORADIC_SERVER c_int :: 92
|
||||||
|
_SC_THREAD_STACK_MIN c_int :: 93
|
||||||
|
_SC_THREAD_THREADS_MAX c_int :: 94
|
||||||
|
_SC_TIMEOUTS c_int :: 95
|
||||||
|
_SC_THREADS c_int :: 96
|
||||||
|
_SC_TRACE c_int :: 97
|
||||||
|
_SC_TRACE_EVENT_FILTER c_int :: 98
|
||||||
|
_SC_TRACE_INHERIT c_int :: 99
|
||||||
|
_SC_TRACE_LOG c_int :: 100
|
||||||
|
_SC_TTY_NAME_MAX c_int :: 101
|
||||||
|
_SC_TYPED_MEMORY_OBJECTS c_int :: 102
|
||||||
|
_SC_V6_ILP32_OFF32 c_int :: 103
|
||||||
|
_SC_V6_ILP32_OFFBIG c_int :: 104
|
||||||
|
_SC_V6_LP64_OFF64 c_int :: 105
|
||||||
|
_SC_V6_LPBIG_OFFBIG c_int :: 106
|
||||||
|
_SC_IPV6 c_int :: 118
|
||||||
|
_SC_RAW_SOCKETS c_int :: 119
|
||||||
|
_SC_SYMLOOP_MAX c_int :: 120
|
||||||
|
_SC_ATEXIT_MAX c_int :: 107
|
||||||
|
_SC_IOV_MAX c_int :: 56
|
||||||
|
_SC_XOPEN_CRYPT c_int :: 108
|
||||||
|
_SC_XOPEN_ENH_I18N c_int :: 109
|
||||||
|
_SC_XOPEN_LEGACY c_int :: 110
|
||||||
|
_SC_XOPEN_REALTIME c_int :: 111
|
||||||
|
_SC_XOPEN_REALTIME_THREADS c_int :: 112
|
||||||
|
_SC_XOPEN_SHM c_int :: 113
|
||||||
|
_SC_XOPEN_STREAMS c_int :: 114
|
||||||
|
_SC_XOPEN_UNIX c_int :: 115
|
||||||
|
_SC_XOPEN_VERSION c_int :: 116
|
||||||
|
_SC_XOPEN_XCU_VERSION c_int :: 121
|
||||||
|
_SC_XBS5_ILP32_OFF32 c_int :: 122
|
||||||
|
_SC_XBS5_ILP32_OFFBIG c_int :: 123
|
||||||
|
_SC_XBS5_LP64_OFF64 c_int :: 124
|
||||||
|
_SC_XBS5_LPBIG_OFFBIG c_int :: 125
|
||||||
|
_SC_SS_REPL_MAX c_int :: 126
|
||||||
|
_SC_TRACE_EVENT_NAME_MAX c_int :: 127
|
||||||
|
_SC_TRACE_NAME_MAX c_int :: 128
|
||||||
|
_SC_TRACE_SYS_MAX c_int :: 129
|
||||||
|
_SC_TRACE_USER_EVENT_MAX c_int :: 130
|
||||||
|
_SC_PASS_MAX c_int :: 131
|
||||||
|
_SC_PHYS_PAGES c_int :: 200
|
||||||
|
_CS_POSIX_V6_ILP32_OFF32_CFLAGS c_int :: 2
|
||||||
|
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS c_int :: 3
|
||||||
|
_CS_POSIX_V6_ILP32_OFF32_LIBS c_int :: 4
|
||||||
|
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS c_int :: 5
|
||||||
|
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS c_int :: 6
|
||||||
|
_CS_POSIX_V6_ILP32_OFFBIG_LIBS c_int :: 7
|
||||||
|
_CS_POSIX_V6_LP64_OFF64_CFLAGS c_int :: 8
|
||||||
|
_CS_POSIX_V6_LP64_OFF64_LDFLAGS c_int :: 9
|
||||||
|
_CS_POSIX_V6_LP64_OFF64_LIBS c_int :: 10
|
||||||
|
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS c_int :: 11
|
||||||
|
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS c_int :: 12
|
||||||
|
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS c_int :: 13
|
||||||
|
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS c_int :: 14
|
||||||
|
_CS_XBS5_ILP32_OFF32_CFLAGS c_int :: 20
|
||||||
|
_CS_XBS5_ILP32_OFF32_LDFLAGS c_int :: 21
|
||||||
|
_CS_XBS5_ILP32_OFF32_LIBS c_int :: 22
|
||||||
|
_CS_XBS5_ILP32_OFF32_LINTFLAGS c_int :: 23
|
||||||
|
_CS_XBS5_ILP32_OFFBIG_CFLAGS c_int :: 24
|
||||||
|
_CS_XBS5_ILP32_OFFBIG_LDFLAGS c_int :: 25
|
||||||
|
_CS_XBS5_ILP32_OFFBIG_LIBS c_int :: 26
|
||||||
|
_CS_XBS5_ILP32_OFFBIG_LINTFLAGS c_int :: 27
|
||||||
|
_CS_XBS5_LP64_OFF64_CFLAGS c_int :: 28
|
||||||
|
_CS_XBS5_LP64_OFF64_LDFLAGS c_int :: 29
|
||||||
|
_CS_XBS5_LP64_OFF64_LIBS c_int :: 30
|
||||||
|
_CS_XBS5_LP64_OFF64_LINTFLAGS c_int :: 31
|
||||||
|
_CS_XBS5_LPBIG_OFFBIG_CFLAGS c_int :: 32
|
||||||
|
_CS_XBS5_LPBIG_OFFBIG_LDFLAGS c_int :: 33
|
||||||
|
_CS_XBS5_LPBIG_OFFBIG_LIBS c_int :: 34
|
||||||
|
_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS c_int :: 35
|
||||||
|
_CS_DARWIN_USER_DIR c_int :: 65536
|
||||||
|
_CS_DARWIN_USER_TEMP_DIR c_int :: 65537
|
||||||
|
_CS_DARWIN_USER_CACHE_DIR c_int :: 65538
|
||||||
|
F_ULOCK c_int :: 0
|
||||||
|
F_LOCK c_int :: 1
|
||||||
|
F_TLOCK c_int :: 2
|
||||||
|
F_TEST c_int :: 3
|
||||||
|
SYNC_VOLUME_FULLSYNC c_int :: 1
|
||||||
|
SYNC_VOLUME_WAIT c_int :: 2
|
||||||
|
|
||||||
|
getattrlistbulk c_func(_ c_int, _ ?*mut anyopaque, _ ?*mut anyopaque, _ c_ulong, _ c_ulonglong) c_int
|
||||||
|
getattrlistat c_func(_ c_int, _ ?*c_char, _ ?*mut anyopaque, _ ?*mut anyopaque, _ c_ulong, _ c_ulong) c_int
|
||||||
|
setattrlistat c_func(_ c_int, _ ?*c_char, _ ?*mut anyopaque, _ ?*mut anyopaque, _ c_ulong, _ c_uint) c_int
|
||||||
|
freadlink c_func(_ c_int, _ ?*mut c_char, _ c_ulong) c_long
|
||||||
|
faccessat c_func(_ c_int, _ ?*c_char, _ c_int, _ c_int) c_int
|
||||||
|
fchownat c_func(_ c_int, _ ?*c_char, _ c_uint, _ c_uint, _ c_int) c_int
|
||||||
|
linkat c_func(_ c_int, _ ?*c_char, _ c_int, _ ?*c_char, _ c_int) c_int
|
||||||
|
readlinkat c_func(_ c_int, _ ?*c_char, _ ?*mut c_char, _ c_ulong) c_long
|
||||||
|
symlinkat c_func(_ ?*c_char, _ c_int, _ ?*c_char) c_int
|
||||||
|
unlinkat c_func(_ c_int, _ ?*c_char, _ c_int) c_int
|
||||||
|
_exit c_func(_ c_int) void
|
||||||
|
access c_func(_ ?*c_char, _ c_int) c_int
|
||||||
|
alarm c_func(_ c_uint) c_uint
|
||||||
|
chdir c_func(_ ?*c_char) c_int
|
||||||
|
chown c_func(_ ?*c_char, _ c_uint, _ c_uint) c_int
|
||||||
|
close c_func(_ c_int) c_int
|
||||||
|
dup c_func(_ c_int) c_int
|
||||||
|
dup2 c_func(_ c_int, _ c_int) c_int
|
||||||
|
execl c_func(__path ?*c_char, __arg0 ?*c_char, ...) c_int
|
||||||
|
execle c_func(__path ?*c_char, __arg0 ?*c_char, ...) c_int
|
||||||
|
execlp c_func(__file ?*c_char, __arg0 ?*c_char, ...) c_int
|
||||||
|
execv c_func(__path ?*c_char, __argv ?*?*mut c_char) c_int
|
||||||
|
execve c_func(__file ?*c_char, __argv ?*?*mut c_char, __envp ?*?*mut c_char) c_int
|
||||||
|
execvp c_func(__file ?*c_char, __argv ?*?*mut c_char) c_int
|
||||||
|
fork c_func() c_int
|
||||||
|
fpathconf c_func(_ c_int, _ c_int) c_long
|
||||||
|
getcwd c_func(_ ?*mut c_char, __size c_ulong) ?*mut c_char
|
||||||
|
getegid c_func() c_uint
|
||||||
|
geteuid c_func() c_uint
|
||||||
|
getgid c_func() c_uint
|
||||||
|
getgroups c_func(__gidsetsize c_int, _ ?*mut c_uint) c_int
|
||||||
|
getlogin c_func() ?*mut c_char
|
||||||
|
getpgrp c_func() c_int
|
||||||
|
getpid c_func() c_int
|
||||||
|
getppid c_func() c_int
|
||||||
|
getuid c_func() c_uint
|
||||||
|
isatty c_func(_ c_int) c_int
|
||||||
|
link c_func(_ ?*c_char, _ ?*c_char) c_int
|
||||||
|
lseek c_func(_ c_int, _ c_longlong, _ c_int) c_longlong
|
||||||
|
pathconf c_func(_ ?*c_char, _ c_int) c_long
|
||||||
|
pause c_func() c_int
|
||||||
|
pipe c_func(_ ?*mut c_int) c_int
|
||||||
|
read c_func(_ c_int, _ ?*mut anyopaque, __nbyte c_ulong) c_long
|
||||||
|
rmdir c_func(_ ?*c_char) c_int
|
||||||
|
setgid c_func(_ c_uint) c_int
|
||||||
|
setpgid c_func(_ c_int, _ c_int) c_int
|
||||||
|
setsid c_func() c_int
|
||||||
|
setuid c_func(_ c_uint) c_int
|
||||||
|
sleep c_func(_ c_uint) c_uint
|
||||||
|
sysconf c_func(_ c_int) c_long
|
||||||
|
tcgetpgrp c_func(_ c_int) c_int
|
||||||
|
tcsetpgrp c_func(_ c_int, _ c_int) c_int
|
||||||
|
ttyname c_func(_ c_int) ?*mut c_char
|
||||||
|
ttyname_r c_func(_ c_int, _ ?*mut c_char, __len c_ulong) c_int
|
||||||
|
unlink c_func(_ ?*c_char) c_int
|
||||||
|
write c_func(__fd c_int, __buf ?*anyopaque, __nbyte c_ulong) c_long
|
||||||
|
confstr c_func(_ c_int, _ ?*mut c_char, __len c_ulong) c_ulong
|
||||||
|
getopt c_func(__argc c_int, _ ?*?*mut c_char, _ ?*c_char) c_int
|
||||||
|
brk c_func(_ ?*anyopaque) ?*mut anyopaque
|
||||||
|
chroot c_func(_ ?*c_char) c_int
|
||||||
|
crypt c_func(_ ?*c_char, _ ?*c_char) ?*mut c_char
|
||||||
|
encrypt c_func(_ ?*mut c_char, _ c_int) void
|
||||||
|
fchdir c_func(_ c_int) c_int
|
||||||
|
gethostid c_func() c_long
|
||||||
|
getpgid c_func(_ c_int) c_int
|
||||||
|
getsid c_func(_ c_int) c_int
|
||||||
|
getdtablesize c_func() c_int
|
||||||
|
getpagesize c_func() c_int
|
||||||
|
getpass c_func(_ ?*c_char) ?*mut c_char
|
||||||
|
getwd c_func(_ ?*mut c_char) ?*mut c_char
|
||||||
|
lchown c_func(_ ?*c_char, _ c_uint, _ c_uint) c_int
|
||||||
|
lockf c_func(_ c_int, _ c_int, _ c_longlong) c_int
|
||||||
|
nice c_func(_ c_int) c_int
|
||||||
|
pread c_func(__fd c_int, __buf ?*mut anyopaque, __nbyte c_ulong, __offset c_longlong) c_long
|
||||||
|
pwrite c_func(__fd c_int, __buf ?*anyopaque, __nbyte c_ulong, __offset c_longlong) c_long
|
||||||
|
sbrk c_func(_ c_int) ?*mut anyopaque
|
||||||
|
setpgrp c_func() c_int
|
||||||
|
setregid c_func(_ c_uint, _ c_uint) c_int
|
||||||
|
setreuid c_func(_ c_uint, _ c_uint) c_int
|
||||||
|
swab c_func(_ ?*anyopaque, _ ?*mut anyopaque, __nbytes c_long) void
|
||||||
|
sync c_func() void
|
||||||
|
truncate c_func(_ ?*c_char, _ c_longlong) c_int
|
||||||
|
ualarm c_func(_ c_uint, _ c_uint) c_uint
|
||||||
|
usleep c_func(_ c_uint) c_int
|
||||||
|
vfork c_func() c_int
|
||||||
|
fsync c_func(_ c_int) c_int
|
||||||
|
ftruncate c_func(_ c_int, _ c_longlong) c_int
|
||||||
|
getlogin_r c_func(_ ?*mut c_char, __namelen c_ulong) c_int
|
||||||
|
fchown c_func(_ c_int, _ c_uint, _ c_uint) c_int
|
||||||
|
gethostname c_func(_ ?*mut c_char, __namelen c_ulong) c_int
|
||||||
|
readlink c_func(_ ?*c_char, _ ?*mut c_char, __bufsize c_ulong) c_long
|
||||||
|
setegid c_func(_ c_uint) c_int
|
||||||
|
seteuid c_func(_ c_uint) c_int
|
||||||
|
symlink c_func(_ ?*c_char, _ ?*c_char) c_int
|
||||||
|
__darwin_check_fd_set_overflow c_func(_ c_int, _ ?*anyopaque, _ c_int) c_int
|
||||||
|
__darwin_check_fd_set c_func(_a c_int, _b ?*anyopaque) c_int
|
||||||
|
__darwin_fd_isset c_func(_fd c_int, _p ?*fd_set) c_int
|
||||||
|
__darwin_fd_set c_func(_fd c_int, _p ?*mut fd_set) void
|
||||||
|
__darwin_fd_clr c_func(_fd c_int, _p ?*mut fd_set) void
|
||||||
|
pselect c_func(_ c_int, _ ?*mut fd_set, _ ?*mut fd_set, _ ?*mut fd_set, _ ?*timespec, _ ?*c_uint) c_int
|
||||||
|
select c_func(_ c_int, _ ?*mut fd_set, _ ?*mut fd_set, _ ?*mut fd_set, _ ?*mut timeval) c_int
|
||||||
|
accessx_np c_func(_ ?*accessx_descriptor, __sz c_ulong, _ ?*mut c_int, _ c_uint) c_int
|
||||||
|
acct c_func(_ ?*c_char) c_int
|
||||||
|
add_profil c_func(_ ?*mut c_char, __bufsiz c_ulong, _ c_ulong, _ c_uint) c_int
|
||||||
|
endusershell c_func() void
|
||||||
|
execvP c_func(__file ?*c_char, __searchpath ?*c_char, __argv ?*?*mut c_char) c_int
|
||||||
|
fflagstostr c_func(_ c_ulong) ?*mut c_char
|
||||||
|
getdomainname c_func(_ ?*mut c_char, __namelen c_int) c_int
|
||||||
|
getgrouplist c_func(_ ?*c_char, _ c_int, _ ?*mut c_int, __ngroups ?*mut c_int) c_int
|
||||||
|
gethostuuid c_func(_ ?*mut c_uchar, _ ?*timespec) c_int
|
||||||
|
getmode c_func(_ ?*anyopaque, _ c_ushort) c_ushort
|
||||||
|
getpeereid c_func(_ c_int, _ ?*mut c_uint, _ ?*mut c_uint) c_int
|
||||||
|
getsgroups_np c_func(_ ?*mut c_int, _ ?*mut c_uchar) c_int
|
||||||
|
getusershell c_func() ?*mut c_char
|
||||||
|
getwgroups_np c_func(_ ?*mut c_int, _ ?*mut c_uchar) c_int
|
||||||
|
initgroups c_func(_ ?*c_char, _ c_int) c_int
|
||||||
|
issetugid c_func() c_int
|
||||||
|
mkdtemp c_func(_ ?*mut c_char) ?*mut c_char
|
||||||
|
mknod c_func(_ ?*c_char, _ c_ushort, _ c_int) c_int
|
||||||
|
mkpath_np c_func(path ?*c_char, omode c_ushort) c_int
|
||||||
|
mkpathat_np c_func(dfd c_int, path ?*c_char, omode c_ushort) c_int
|
||||||
|
mkstemps c_func(_ ?*mut c_char, _ c_int) c_int
|
||||||
|
mkostemp c_func(path ?*mut c_char, oflags c_int) c_int
|
||||||
|
mkostemps c_func(path ?*mut c_char, slen c_int, oflags c_int) c_int
|
||||||
|
mkstemp_dprotected_np c_func(path ?*mut c_char, dpclass c_int, dpflags c_int) c_int
|
||||||
|
mkdtempat_np c_func(dfd c_int, path ?*mut c_char) ?*mut c_char
|
||||||
|
mkstempsat_np c_func(dfd c_int, path ?*mut c_char, slen c_int) c_int
|
||||||
|
mkostempsat_np c_func(dfd c_int, path ?*mut c_char, slen c_int, oflags c_int) c_int
|
||||||
|
nfssvc c_func(_ c_int, _ ?*mut anyopaque) c_int
|
||||||
|
profil c_func(_ ?*mut c_char, __bufsiz c_ulong, _ c_ulong, _ c_uint) c_int
|
||||||
|
pthread_setugid_np c_func(_ c_uint, _ c_uint) c_int
|
||||||
|
pthread_getugid_np c_func(_ ?*mut c_uint, _ ?*mut c_uint) c_int
|
||||||
|
reboot c_func(_ c_int) c_int
|
||||||
|
revoke c_func(_ ?*c_char) c_int
|
||||||
|
rcmd c_func(_ ?*mut ?*mut c_char, _ c_int, _ ?*c_char, _ ?*c_char, _ ?*c_char, _ ?*mut c_int) c_int
|
||||||
|
rcmd_af c_func(_ ?*mut ?*mut c_char, _ c_int, _ ?*c_char, _ ?*c_char, _ ?*c_char, _ ?*mut c_int, _ c_int) c_int
|
||||||
|
rresvport c_func(_ ?*mut c_int) c_int
|
||||||
|
rresvport_af c_func(_ ?*mut c_int, _ c_int) c_int
|
||||||
|
iruserok c_func(_ c_ulong, _ c_int, _ ?*c_char, _ ?*c_char) c_int
|
||||||
|
iruserok_sa c_func(_ ?*anyopaque, _ c_int, _ c_int, _ ?*c_char, _ ?*c_char) c_int
|
||||||
|
ruserok c_func(_ ?*c_char, _ c_int, _ ?*c_char, _ ?*c_char) c_int
|
||||||
|
setdomainname c_func(_ ?*c_char, __namelen c_int) c_int
|
||||||
|
setgroups c_func(_ c_int, _ ?*c_uint) c_int
|
||||||
|
sethostid c_func(_ c_long) void
|
||||||
|
sethostname c_func(_ ?*c_char, __namelen c_int) c_int
|
||||||
|
setlogin c_func(_ ?*c_char) c_int
|
||||||
|
setmode c_func(_ ?*c_char) ?*mut anyopaque
|
||||||
|
setrgid c_func(_ c_uint) c_int
|
||||||
|
setruid c_func(_ c_uint) c_int
|
||||||
|
setsgroups_np c_func(_ c_int, _ ?*mut c_uchar) c_int
|
||||||
|
setusershell c_func() void
|
||||||
|
setwgroups_np c_func(_ c_int, _ ?*mut c_uchar) c_int
|
||||||
|
strtofflags c_func(_ ?*mut ?*mut c_char, _ ?*mut c_ulong, _ ?*mut c_ulong) c_int
|
||||||
|
swapon c_func(_ ?*c_char) c_int
|
||||||
|
ttyslot c_func() c_int
|
||||||
|
undelete c_func(_ ?*c_char) c_int
|
||||||
|
unwhiteout c_func(_ ?*c_char) c_int
|
||||||
|
syscall c_func(_ c_int, ...) c_int
|
||||||
|
fgetattrlist c_func(_ c_int, _ ?*mut anyopaque, _ ?*mut anyopaque, __attrBufSize c_ulong, _ c_uint) c_int
|
||||||
|
fsetattrlist c_func(_ c_int, _ ?*mut anyopaque, _ ?*mut anyopaque, __attrBufSize c_ulong, _ c_uint) c_int
|
||||||
|
getattrlist c_func(_ ?*c_char, _ ?*mut anyopaque, _ ?*mut anyopaque, __attrBufSize c_ulong, _ c_uint) c_int
|
||||||
|
setattrlist c_func(_ ?*c_char, _ ?*mut anyopaque, _ ?*mut anyopaque, __attrBufSize c_ulong, _ c_uint) c_int
|
||||||
|
exchangedata c_func(_ ?*c_char, _ ?*c_char, _ c_uint) c_int
|
||||||
|
getdirentriesattr c_func(_ c_int, _ ?*mut anyopaque, _ ?*mut anyopaque, __attrBufSize c_ulong, _ ?*mut c_uint, _ ?*mut c_uint, _ ?*mut c_uint, _ c_uint) c_int
|
||||||
|
searchfs c_func(_ ?*c_char, _ ?*mut fssearchblock, _ ?*mut c_ulong, _ c_uint, _ c_uint, _ ?*mut searchstate) c_int
|
||||||
|
fsctl c_func(_ ?*c_char, _ c_ulong, _ ?*mut anyopaque, _ c_uint) c_int
|
||||||
|
ffsctl c_func(_ c_int, _ c_ulong, _ ?*mut anyopaque, _ c_uint) c_int
|
||||||
|
fsync_volume_np c_func(_ c_int, _ c_int) c_int
|
||||||
|
sync_volume_np c_func(_ ?*c_char, _ c_int) c_int
|
||||||
|
|
||||||
|
# unsupported in bindings: external variable 'optarg' has no native spelling
|
||||||
|
# unsupported in bindings: external variable 'optind' has no native spelling
|
||||||
|
# unsupported in bindings: external variable 'opterr' has no native spelling
|
||||||
|
# unsupported in bindings: external variable 'optopt' has no native spelling
|
||||||
|
# unsupported in bindings: external variable 'suboptarg' has no native spelling
|
||||||
|
# unsupported in bindings: external variable 'optreset' has no native spelling
|
||||||
|
# unsupported in bindings: _UNISTD_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_BOUNDS_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _CDEFS_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_COUNT — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_COUNT_OR_NULL — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_SIZE — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_SIZE_OR_NULL — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_ENDED_BY — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_SINGLE — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_UNSAFE_INDEXABLE — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_CSTR — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_NULL_TERMINATED — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_FLEX_COUNT — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_SINGLE_BY_DEFAULT — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_PTRCHECK_REPLACED — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _LIBC_FORGE_PTR — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _SYS__TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _BSD_MACHINE__TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _BSD_ARM__TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SYS__PTHREAD_TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SYS_UNISTD_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _POSIX_VDISABLE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: X_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: W_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: R_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _READ_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _WRITE_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _EXECUTE_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _DELETE_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _APPEND_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _RMFILE_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _RATTR_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _WATTR_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _REXT_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _WEXT_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _RPERM_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _WPERM_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _CHOWN_OK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _ACCESS_EXTENDED_MASK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _SEEK_SET_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: L_SET — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: L_INCR — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: L_XTND — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: ACCESSX_MAX_TABLESIZE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _SIZE_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SSIZE_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _BSD_MACHINE_TYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _ARM_MACHTYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _MACHTYPES_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT8_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT16_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT32_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INT64_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT8_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT16_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT32_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _U_INT64_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _INTPTR_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _UINTPTR_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: USER_ADDR_NULL — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: CAST_USER_ADDR_T — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _UINT64_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _UINT32_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_8 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_9 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_10 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_10_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_10_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_11_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_12_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_13_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_14_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_15 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_15_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_15_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_X_VERSION_10_16 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_11_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_12_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_13_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_14_7 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_5 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_15_6 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_16_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_0 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_1 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_2 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_3 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: MAC_OS_VERSION_26_4 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _UID_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _GID_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_COUNT__PATH_MAX — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _OFF_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _PID_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _USECONDS_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: NULL — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_ADVISORY_INFO — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_ASYNCHRONOUS_IO — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_BARRIERS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_CLOCK_SELECTION — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_CPUTIME — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_MEMLOCK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_MEMLOCK_RANGE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_MESSAGE_PASSING — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_MONOTONIC_CLOCK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_PRIORITIZED_IO — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_PRIORITY_SCHEDULING — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_RAW_SOCKETS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_REALTIME_SIGNALS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_SEMAPHORES — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_SHARED_MEMORY_OBJECTS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_SPIN_LOCKS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_SPORADIC_SERVER — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_SYNCHRONIZED_IO — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_THREAD_CPUTIME — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_THREAD_PRIO_INHERIT — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_THREAD_PRIO_PROTECT — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_THREAD_PRIORITY_SCHEDULING — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_THREAD_SPORADIC_SERVER — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TIMEOUTS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TIMERS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TRACE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TRACE_EVENT_FILTER — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TRACE_INHERIT — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TRACE_LOG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_TYPED_MEMORY_OBJECTS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_FORT_DEV — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_PBS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_PBS_ACCOUNTING — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_PBS_CHECKPOINT — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_PBS_LOCATE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_PBS_MESSAGE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX2_PBS_TRACK — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V6_ILP32_OFF32 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V6_ILP32_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V6_LP64_OFF64 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V6_LPBIG_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V7_ILP32_OFF32 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V7_ILP32_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V7_LP64_OFF64 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _POSIX_V7_LPBIG_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _V6_ILP32_OFF32 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _V6_ILP32_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _V6_LP64_OFF64 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _V6_LPBIG_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XBS5_ILP32_OFF32 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XBS5_ILP32_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XBS5_LP64_OFF64 — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XBS5_LPBIG_OFFBIG — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_CRYPT — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_ENH_I18N — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_LEGACY — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_REALTIME — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_REALTIME_THREADS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_SHM — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_STREAMS — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _XOPEN_UNIX — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _SC_PAGE_SIZE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _CTERMID_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _LIBC_COUNT__L_CTERMID — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _SYS_SELECT_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _FD_SET — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _STRUCT_TIMESPEC — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _STRUCT_TIMEVAL — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: _TIME_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SUSECONDS_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _SIGSET_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: FD_SETSIZE — C macro is not a supported constant
|
||||||
|
# unsupported in bindings: FD_SET — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: FD_CLR — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: FD_ISSET — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: FD_ZERO — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: FD_COPY — C function-like macros are not supported
|
||||||
|
# unsupported in bindings: _SYS__SELECT_H_ — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _DEV_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _MODE_T — C macro has no replacement value
|
||||||
|
# unsupported in bindings: _UUID_T — C macro has no replacement value
|
||||||
+12
-20
@@ -1,36 +1,28 @@
|
|||||||
import "@ffi/c"
|
import "@ffi/c"
|
||||||
import "@std/io"
|
import "@std/io"
|
||||||
|
|
||||||
hide write func(_ ?*mut anyopaque, _ io.WriteStream, bytes []u8) usize ! io.WriteError {
|
print func($format []u8, $Args type, args Args) void {
|
||||||
|
writer io.Writer :: io.Writer{
|
||||||
|
context = none,
|
||||||
|
handle = io.Handle{ file_desc = c_int(io.Stream.stderr) },
|
||||||
|
write = write,
|
||||||
|
}
|
||||||
|
io.print(writer, format, Args, args) catch |_| {}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide write func(_ ?@mut anyopaque, handle io.Handle, bytes []u8) usize ! io.WriteError {
|
||||||
request usize = bytes.len
|
request usize = bytes.len
|
||||||
maximum usize :: usize(maxval!(c_long))
|
maximum usize :: usize(maxval!(c_long))
|
||||||
if request > maximum {
|
if request > maximum {
|
||||||
request = maximum
|
request = maximum
|
||||||
}
|
}
|
||||||
while true {
|
while true {
|
||||||
count c_long :: c.write(2, bytes.ptr, c_ulong(request))
|
count c_long :: c.write(handle.file_desc, bytes.ptr, c_ulong(request))
|
||||||
if count >= 0 {
|
if count >= 0 {
|
||||||
return usize(count)
|
return usize(count)
|
||||||
}
|
}
|
||||||
if c.__error()^ != 4 {
|
if c.__error()?^ != c.EINTR {
|
||||||
return .write_failed
|
return .write_failed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hide read func(_ ?*mut anyopaque, _ io.ReadStream, _ []mut u8) usize ! io.ReadError {
|
|
||||||
return .read_failed
|
|
||||||
}
|
|
||||||
|
|
||||||
hide vtable io.IoVTable :: io.IoVTable {
|
|
||||||
read = read,
|
|
||||||
write = write,
|
|
||||||
}
|
|
||||||
|
|
||||||
print func($format []u8, $Args type, args Args) void {
|
|
||||||
writer io.Writer :: io.Writer {
|
|
||||||
impl = io.Io {context = none, vtable = &vtable},
|
|
||||||
stream = .stderr,
|
|
||||||
}
|
|
||||||
io.print(writer, format, Args, args) catch |_| {}
|
|
||||||
}
|
|
||||||
|
|||||||
+144
@@ -0,0 +1,144 @@
|
|||||||
|
import "@ffi/c"
|
||||||
|
|
||||||
|
File :: struct {
|
||||||
|
io Io
|
||||||
|
handle Handle
|
||||||
|
}
|
||||||
|
|
||||||
|
FileMode :: enum {
|
||||||
|
read_only
|
||||||
|
write_only
|
||||||
|
read_write
|
||||||
|
}
|
||||||
|
|
||||||
|
OpenError :: enum {
|
||||||
|
open_failed
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseError :: enum {
|
||||||
|
close_failed
|
||||||
|
}
|
||||||
|
|
||||||
|
open func(io Io, path [;0]u8, mode FileMode) File ! OpenError {
|
||||||
|
handle Handle :: io.vtable.open(io.context, path, mode) catch |err| {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return File {io = io, handle = handle}
|
||||||
|
}
|
||||||
|
|
||||||
|
close func(file File) void ! CloseError {
|
||||||
|
try file.io.vtable.close(file.io.context, file.handle)
|
||||||
|
}
|
||||||
|
|
||||||
|
reader func(file File) Reader {
|
||||||
|
return Reader {
|
||||||
|
context = file.io.context,
|
||||||
|
handle = file.handle,
|
||||||
|
read = file.io.vtable.read,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
writer func(file File) Writer {
|
||||||
|
return Writer {
|
||||||
|
context = file.io.context,
|
||||||
|
handle = file.handle,
|
||||||
|
write = file.io.vtable.write,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_read func(_ ?@mut anyopaque, handle Handle, buffer []mut u8) usize ! ReadError {
|
||||||
|
request usize = buffer.len
|
||||||
|
maximum usize :: usize(maxval!(c_long))
|
||||||
|
if request > maximum {
|
||||||
|
request = maximum
|
||||||
|
}
|
||||||
|
while true {
|
||||||
|
count c_long :: c.read(handle.file_desc, buffer.ptr, c_ulong(request))
|
||||||
|
if count >= 0 {
|
||||||
|
return usize(count)
|
||||||
|
}
|
||||||
|
errno c_int :: c.__error()?^
|
||||||
|
if errno == c.EINTR {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if errno == c.EBADF {
|
||||||
|
return .not_open_for_reading
|
||||||
|
}
|
||||||
|
return .read_failed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_write func(_ ?@mut anyopaque, handle Handle, bytes []u8) usize ! WriteError {
|
||||||
|
request usize = bytes.len
|
||||||
|
maximum usize :: usize(maxval!(c_long))
|
||||||
|
if request > maximum {
|
||||||
|
request = maximum
|
||||||
|
}
|
||||||
|
while true {
|
||||||
|
count c_long :: c.write(handle.file_desc, bytes.ptr, c_ulong(request))
|
||||||
|
if count >= 0 {
|
||||||
|
return usize(count)
|
||||||
|
}
|
||||||
|
errno c_int :: c.__error()?^
|
||||||
|
if errno == c.EINTR {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if errno == c.EBADF {
|
||||||
|
return .not_open_for_writing
|
||||||
|
}
|
||||||
|
return .write_failed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_open func(_ ?@mut anyopaque, path [;0]u8, mode FileMode) Handle ! OpenError {
|
||||||
|
flags c_int = c.O_RDONLY
|
||||||
|
match mode {
|
||||||
|
.read_only: flags = c.O_RDONLY
|
||||||
|
.write_only: flags = c.O_WRONLY
|
||||||
|
.read_write: flags = c.O_RDWR
|
||||||
|
}
|
||||||
|
while true {
|
||||||
|
fd c_int :: c.open(ptrcast!(c_char, path.ptr), flags)
|
||||||
|
if fd >= 0 {
|
||||||
|
return Handle {file_desc = fd}
|
||||||
|
}
|
||||||
|
if c.__error()?^ != c.EINTR {
|
||||||
|
return .open_failed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_close func(_ ?@mut anyopaque, handle Handle) void ! CloseError {
|
||||||
|
if c.close(handle.file_desc) != 0 {
|
||||||
|
return .close_failed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_stdin func(_ ?@mut anyopaque) Handle {
|
||||||
|
return Handle {file_desc = c_int(Stream.stdin)}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_stdout func(_ ?@mut anyopaque) Handle {
|
||||||
|
return Handle {file_desc = c_int(Stream.stdout)}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_stderr func(_ ?@mut anyopaque) Handle {
|
||||||
|
return Handle {file_desc = c_int(Stream.stderr)}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system_vtable IoVTable :: IoVTable {
|
||||||
|
read = system_read,
|
||||||
|
write = system_write,
|
||||||
|
open = system_open,
|
||||||
|
close = system_close,
|
||||||
|
stdin = system_stdin,
|
||||||
|
stdout = system_stdout,
|
||||||
|
stderr = system_stderr,
|
||||||
|
}
|
||||||
|
|
||||||
|
hide system func() Io {
|
||||||
|
return Io {
|
||||||
|
context = none,
|
||||||
|
vtable = &system_vtable,
|
||||||
|
}
|
||||||
|
}
|
||||||
+100
-112
@@ -2,69 +2,80 @@ import "@ffi/c"
|
|||||||
import "@std/meta"
|
import "@std/meta"
|
||||||
|
|
||||||
ReadError :: enum {
|
ReadError :: enum {
|
||||||
|
not_open_for_reading
|
||||||
read_failed
|
read_failed
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteError :: enum {
|
WriteError :: enum {
|
||||||
|
not_open_for_writing
|
||||||
write_failed
|
write_failed
|
||||||
no_progress
|
no_progress
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Handle :: union {
|
||||||
|
file_desc c_int
|
||||||
|
ptr @mut anyopaque
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream :: enum(c_int) {
|
||||||
|
stdin = c.STDIN_FILENO
|
||||||
|
stdout = c.STDOUT_FILENO
|
||||||
|
stderr = c.STDERR_FILENO
|
||||||
|
}
|
||||||
|
|
||||||
Io :: struct {
|
Io :: struct {
|
||||||
context ?*mut anyopaque
|
context ?@mut anyopaque
|
||||||
vtable @IoVTable
|
vtable @IoVTable
|
||||||
}
|
}
|
||||||
|
|
||||||
IoVTable :: struct {
|
IoVTable :: struct {
|
||||||
read @func(context ?*mut anyopaque, stream ReadStream, buffer []mut u8) usize ! ReadError
|
read @func(context ?@mut anyopaque, handle Handle, buffer []mut u8) usize ! ReadError
|
||||||
write @func(context ?*mut anyopaque, stream WriteStream, bytes []u8) usize ! WriteError
|
write @func(context ?@mut anyopaque, handle Handle, bytes []u8) usize ! WriteError
|
||||||
}
|
open @func(context ?@mut anyopaque, path [;0]u8, mode FileMode) Handle ! OpenError
|
||||||
|
close @func(context ?@mut anyopaque, handle Handle) void ! CloseError
|
||||||
ReadStream :: enum(c_int) {
|
stdin @func(context ?@mut anyopaque) Handle
|
||||||
stdin = 0
|
stdout @func(context ?@mut anyopaque) Handle
|
||||||
}
|
stderr @func(context ?@mut anyopaque) Handle
|
||||||
|
|
||||||
WriteStream :: enum(c_int) {
|
|
||||||
stdout = 1
|
|
||||||
stderr = 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Reader :: struct {
|
Reader :: struct {
|
||||||
impl Io
|
context ?@mut anyopaque
|
||||||
stream ReadStream
|
handle Handle
|
||||||
|
read @func(context ?@mut anyopaque, handle Handle, buffer []mut u8) usize ! ReadError
|
||||||
}
|
}
|
||||||
|
|
||||||
Writer :: struct {
|
Writer :: struct {
|
||||||
impl Io
|
context ?@mut anyopaque
|
||||||
stream WriteStream
|
handle Handle
|
||||||
|
write @func(context ?@mut anyopaque, handle Handle, bytes []u8) usize ! WriteError
|
||||||
}
|
}
|
||||||
|
|
||||||
read func(reader Reader, buffer []mut u8) usize ! ReadError {
|
read func(input Reader, buffer []mut u8) usize ! ReadError {
|
||||||
if buffer.len == 0 {
|
if buffer.len == 0 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
count usize :: try reader.impl.vtable.read(reader.impl.context, reader.stream, buffer)
|
count usize :: try input.read(input.context, input.handle, buffer)
|
||||||
if count > buffer.len {
|
if count > buffer.len {
|
||||||
return .read_failed
|
return .read_failed
|
||||||
}
|
}
|
||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|
||||||
write func(writer Writer, bytes []u8) usize ! WriteError {
|
write func(output Writer, bytes []u8) usize ! WriteError {
|
||||||
if bytes.len == 0 {
|
if bytes.len == 0 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
count usize :: try writer.impl.vtable.write(writer.impl.context, writer.stream, bytes)
|
count usize :: try output.write(output.context, output.handle, bytes)
|
||||||
if count > bytes.len {
|
if count > bytes.len {
|
||||||
return .write_failed
|
return .write_failed
|
||||||
}
|
}
|
||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|
||||||
write_all func(writer Writer, bytes []u8) void ! WriteError {
|
write_all func(output Writer, bytes []u8) void ! WriteError {
|
||||||
offset usize = 0
|
offset usize = 0
|
||||||
while offset < bytes.len {
|
while offset < bytes.len {
|
||||||
count usize :: write(writer, bytes[offset..]) catch |err| {
|
count usize :: write(output, bytes[offset..]) catch |err| {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if count == 0 {
|
if count == 0 {
|
||||||
@@ -75,7 +86,49 @@ write_all func(writer Writer, bytes []u8) void ! WriteError {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hide write_integer_signed func(writer Writer, value i64, base u64, uppercase bool) void ! WriteError {
|
stdin func(io Io) Reader {
|
||||||
|
return Reader {
|
||||||
|
context = io.context,
|
||||||
|
handle = io.vtable.stdin(io.context),
|
||||||
|
read = io.vtable.read,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stdout func(io Io) Writer {
|
||||||
|
return Writer {
|
||||||
|
context = io.context,
|
||||||
|
handle = io.vtable.stdout(io.context),
|
||||||
|
write = io.vtable.write,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stderr func(io Io) Writer {
|
||||||
|
return Writer {
|
||||||
|
context = io.context,
|
||||||
|
handle = io.vtable.stderr(io.context),
|
||||||
|
write = io.vtable.write,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
print func(output Writer, $format []u8, $Args type, args Args) void ! WriteError {
|
||||||
|
expand for parse_format(format.len, format, Args) |token| {
|
||||||
|
match token.kind {
|
||||||
|
.unused: break
|
||||||
|
.literal: try write_all(output, format[token.start..token.end])
|
||||||
|
.string: try write_all(output, field!(args, token.field))
|
||||||
|
.default: try write_default(output, field!(args, token.field))
|
||||||
|
.decimal: try write_decimal(output, field!(args, token.field))
|
||||||
|
.binary: try write_integer(output, field!(args, token.field), 2, false)
|
||||||
|
.octal: try write_integer(output, field!(args, token.field), 8, false)
|
||||||
|
.hex_lower: try write_integer(output, field!(args, token.field), 16, false)
|
||||||
|
.hex_upper: try write_integer(output, field!(args, token.field), 16, true)
|
||||||
|
.character: try write_character(output, field!(args, token.field))
|
||||||
|
else: try write_float(output, field!(args, token.field), true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hide write_integer_signed func(output Writer, value i64, base u64, uppercase bool) void ! WriteError {
|
||||||
buffer [65]mut u8 = undefined
|
buffer [65]mut u8 = undefined
|
||||||
end usize = buffer.len
|
end usize = buffer.len
|
||||||
current i64 = value
|
current i64 = value
|
||||||
@@ -104,11 +157,11 @@ hide write_integer_signed func(writer Writer, value i64, base u64, uppercase boo
|
|||||||
end -= 1
|
end -= 1
|
||||||
buffer[end] = '-'
|
buffer[end] = '-'
|
||||||
}
|
}
|
||||||
try write_all(writer, buffer[end..])
|
try write_all(output, buffer[end..])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hide write_integer_unsigned func(writer Writer, value u64, base u64, uppercase bool) void ! WriteError {
|
hide write_integer_unsigned func(output Writer, value u64, base u64, uppercase bool) void ! WriteError {
|
||||||
buffer [65]mut u8 = undefined
|
buffer [65]mut u8 = undefined
|
||||||
end usize = buffer.len
|
end usize = buffer.len
|
||||||
current u64 = value
|
current u64 = value
|
||||||
@@ -127,7 +180,7 @@ hide write_integer_unsigned func(writer Writer, value u64, base u64, uppercase b
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try write_all(writer, buffer[end..])
|
try write_all(output, buffer[end..])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,12 +317,12 @@ hide format_field_name func($T type, index usize) []u8 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hide write_integer func(writer Writer, $T type, value T, base u64, uppercase bool) void ! WriteError {
|
hide write_integer func(output Writer, $T type, value T, base u64, uppercase bool) void ! WriteError {
|
||||||
match typeinfo!(T) {
|
match typeinfo!(T) {
|
||||||
.integer: if minval!(T) < 0 {
|
.integer: if minval!(T) < 0 {
|
||||||
try write_integer_signed(writer, i64(value), base, uppercase)
|
try write_integer_signed(output, i64(value), base, uppercase)
|
||||||
} else {
|
} else {
|
||||||
try write_integer_unsigned(writer, u64(value), base, uppercase)
|
try write_integer_unsigned(output, u64(value), base, uppercase)
|
||||||
}
|
}
|
||||||
else: compile_error!("io.print integer format requires an integer argument")
|
else: compile_error!("io.print integer format requires an integer argument")
|
||||||
}
|
}
|
||||||
@@ -277,7 +330,7 @@ hide write_integer func(writer Writer, $T type, value T, base u64, uppercase boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
# note: libc keeps float formatting small; replace it with a native shortest-roundtrip writer if locale independence matters.
|
# note: libc keeps float formatting small; replace it with a native shortest-roundtrip writer if locale independence matters.
|
||||||
hide write_float func(writer Writer, $T type, value T, scientific bool) void ! WriteError {
|
hide write_float func(output Writer, $T type, value T, scientific bool) void ! WriteError {
|
||||||
match typeinfo!(T) {
|
match typeinfo!(T) {
|
||||||
.float: {
|
.float: {
|
||||||
buffer [64]mut u8 = undefined
|
buffer [64]mut u8 = undefined
|
||||||
@@ -296,53 +349,53 @@ hide write_float func(writer Writer, $T type, value T, scientific bool) void ! W
|
|||||||
if count < 0 or usize(count) >= buffer.len {
|
if count < 0 or usize(count) >= buffer.len {
|
||||||
return .write_failed
|
return .write_failed
|
||||||
}
|
}
|
||||||
try write_all(writer, buffer[0..usize(count)])
|
try write_all(output, buffer[0..usize(count)])
|
||||||
}
|
}
|
||||||
else: compile_error!("io.print float format requires a float argument")
|
else: compile_error!("io.print float format requires a float argument")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hide write_decimal func(writer Writer, $T type, value T) void ! WriteError {
|
hide write_decimal func(output Writer, $T type, value T) void ! WriteError {
|
||||||
match typeinfo!(T) {
|
match typeinfo!(T) {
|
||||||
.integer: try write_integer(writer, value, 10, false)
|
.integer: try write_integer(output, value, 10, false)
|
||||||
.float: try write_float(writer, value, false)
|
.float: try write_float(output, value, false)
|
||||||
else: compile_error!("io.print '{d}' requires an integer or float argument")
|
else: compile_error!("io.print '{d}' requires an integer or float argument")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hide write_character func(writer Writer, $T type, value T) void ! WriteError {
|
hide write_character func(output Writer, $T type, value T) void ! WriteError {
|
||||||
match typeinfo!(T) {
|
match typeinfo!(T) {
|
||||||
.integer: {
|
.integer: {
|
||||||
if minval!(T) < 0 or maxval!(T) > 255 {
|
if minval!(T) < 0 or maxval!(T) > 255 {
|
||||||
compile_error!("io.print '{c}' requires an unsigned integer that fits in u8")
|
compile_error!("io.print '{c}' requires an unsigned integer that fits in u8")
|
||||||
}
|
}
|
||||||
buffer [1]u8 = [u8(value)]
|
buffer [1]u8 = [u8(value)]
|
||||||
try write_all(writer, buffer[..])
|
try write_all(output, buffer[..])
|
||||||
}
|
}
|
||||||
else: compile_error!("io.print '{c}' requires an unsigned integer that fits in u8")
|
else: compile_error!("io.print '{c}' requires an unsigned integer that fits in u8")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hide write_default func(writer Writer, $T type, value T) void ! WriteError {
|
hide write_default func(output Writer, $T type, value T) void ! WriteError {
|
||||||
match typeinfo!(T) {
|
match typeinfo!(T) {
|
||||||
.bool: if value {
|
.bool: if value {
|
||||||
try write_all(writer, "true")
|
try write_all(output, "true")
|
||||||
} else {
|
} else {
|
||||||
try write_all(writer, "false")
|
try write_all(output, "false")
|
||||||
}
|
}
|
||||||
.integer: try write_integer(writer, value, 10, false)
|
.integer: try write_integer(output, value, 10, false)
|
||||||
.float: try write_float(writer, value, false)
|
.float: try write_float(output, value, false)
|
||||||
.array: try write_all(writer, value)
|
.array: try write_all(output, value)
|
||||||
.pointer: try write_all(writer, value)
|
.pointer: try write_all(output, value)
|
||||||
.slice: try write_all(writer, value)
|
.slice: try write_all(output, value)
|
||||||
.enum |enum_info|: {
|
.enum |enum_info|: {
|
||||||
inline for enum_info.fields |field| {
|
expand for enum_info.fields |field| {
|
||||||
if value == field!(T, field.name) {
|
if value == field!(T, field.name) {
|
||||||
try write_all(writer, ".")
|
try write_all(output, ".")
|
||||||
try write_all(writer, field.name)
|
try write_all(output, field.name)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -352,68 +405,3 @@ hide write_default func(writer Writer, $T type, value T) void ! WriteError {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
print func(writer Writer, $format []u8, $Args type, args Args) void ! WriteError {
|
|
||||||
inline for parse_format(format.len, format, Args) |token| {
|
|
||||||
match token.kind {
|
|
||||||
.unused: break
|
|
||||||
.literal: try write_all(writer, format[token.start..token.end])
|
|
||||||
.string: try write_all(writer, field!(args, token.field))
|
|
||||||
.default: try write_default(writer, field!(args, token.field))
|
|
||||||
.decimal: try write_decimal(writer, field!(args, token.field))
|
|
||||||
.binary: try write_integer(writer, field!(args, token.field), 2, false)
|
|
||||||
.octal: try write_integer(writer, field!(args, token.field), 8, false)
|
|
||||||
.hex_lower: try write_integer(writer, field!(args, token.field), 16, false)
|
|
||||||
.hex_upper: try write_integer(writer, field!(args, token.field), 16, true)
|
|
||||||
.character: try write_character(writer, field!(args, token.field))
|
|
||||||
else: try write_float(writer, field!(args, token.field), true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hide system_read func(_ ?*mut anyopaque, stream ReadStream, buffer []mut u8) usize ! ReadError {
|
|
||||||
request usize = buffer.len
|
|
||||||
maximum usize :: usize(maxval!(c_long))
|
|
||||||
if request > maximum {
|
|
||||||
request = maximum
|
|
||||||
}
|
|
||||||
while true {
|
|
||||||
count c_long :: c.read(c_int(stream), buffer.ptr, c_ulong(request))
|
|
||||||
if count >= 0 {
|
|
||||||
return usize(count)
|
|
||||||
}
|
|
||||||
if c.__error()^ != 4 {
|
|
||||||
return .read_failed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hide system_write func(_ ?*mut anyopaque, stream WriteStream, bytes []u8) usize ! WriteError {
|
|
||||||
fd c_int :: c_int(stream)
|
|
||||||
request usize = bytes.len
|
|
||||||
maximum usize :: usize(maxval!(c_long))
|
|
||||||
if request > maximum {
|
|
||||||
request = maximum
|
|
||||||
}
|
|
||||||
while true {
|
|
||||||
count c_long :: c.write(fd, bytes.ptr, c_ulong(request))
|
|
||||||
if count >= 0 {
|
|
||||||
return usize(count)
|
|
||||||
}
|
|
||||||
if c.__error()^ != 4 {
|
|
||||||
return .write_failed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hide system_vtable IoVTable :: IoVTable {
|
|
||||||
read = system_read,
|
|
||||||
write = system_write,
|
|
||||||
}
|
|
||||||
|
|
||||||
hide system func() Io {
|
|
||||||
return Io {
|
|
||||||
context = none,
|
|
||||||
vtable = &system_vtable,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+7
-7
@@ -5,14 +5,14 @@ AllocError :: enum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Allocator :: struct {
|
Allocator :: struct {
|
||||||
context ?*mut anyopaque
|
context ?@mut anyopaque
|
||||||
vtable @AllocatorVTable
|
vtable @AllocatorVTable
|
||||||
}
|
}
|
||||||
|
|
||||||
AllocatorVTable :: struct {
|
AllocatorVTable :: struct {
|
||||||
alloc @func(context ?*mut anyopaque, size usize, alignment usize) ?*mut u8
|
alloc @func(context ?@mut anyopaque, size usize, alignment usize) ?*mut u8
|
||||||
realloc @func(context ?*mut anyopaque, memory ?*mut u8, old_size usize, new_size usize, alignment usize) ?*mut u8
|
realloc @func(context ?@mut anyopaque, memory ?*mut u8, old_size usize, new_size usize, alignment usize) ?*mut u8
|
||||||
free @func(context ?*mut anyopaque, memory ?*mut u8, size usize, alignment usize) void
|
free @func(context ?@mut anyopaque, memory ?*mut u8, size usize, alignment usize) void
|
||||||
}
|
}
|
||||||
|
|
||||||
raw_alloc func(allocator Allocator, size usize, alignment usize) ?*mut u8 {
|
raw_alloc func(allocator Allocator, size usize, alignment usize) ?*mut u8 {
|
||||||
@@ -135,7 +135,7 @@ hide power_of_two func(value usize) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
hide c_alloc func(_ ?*mut anyopaque, size usize, alignment usize) ?*mut u8 {
|
hide c_alloc func(_ ?@mut anyopaque, size usize, alignment usize) ?*mut u8 {
|
||||||
if power_of_two(alignment) == false {
|
if power_of_two(alignment) == false {
|
||||||
return none
|
return none
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ hide c_alloc func(_ ?*mut anyopaque, size usize, alignment usize) ?*mut u8 {
|
|||||||
return ptrcast!(u8, memory[0])
|
return ptrcast!(u8, memory[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
hide c_realloc func(_ ?*mut anyopaque, memory ?*mut u8, old_size usize, new_size usize, alignment usize) ?*mut u8 {
|
hide c_realloc func(_ ?@mut anyopaque, memory ?*mut u8, old_size usize, new_size usize, alignment usize) ?*mut u8 {
|
||||||
if power_of_two(alignment) == false {
|
if power_of_two(alignment) == false {
|
||||||
return none
|
return none
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ hide c_realloc func(_ ?*mut anyopaque, memory ?*mut u8, old_size usize, new_size
|
|||||||
return c_alloc(none, new_size, alignment)
|
return c_alloc(none, new_size, alignment)
|
||||||
}
|
}
|
||||||
|
|
||||||
hide c_free func(_ ?*mut anyopaque, memory ?*mut u8, _ usize, _ usize) void {
|
hide c_free func(_ ?@mut anyopaque, memory ?*mut u8, _ usize, _ usize) void {
|
||||||
c.free(memory)
|
c.free(memory)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user