Commit Graph

64 Commits

Author SHA1 Message Date
Laytan Laats
cf0f73e0cf fix typo for freebsd arm64 MINSIGSTKSZ
Fixes #4878
2025-03-21 23:52:52 +01:00
Laytan Laats
55302280d8 fix addrinfo struct def
Fixes #4816
2025-02-12 19:24:27 +01:00
gingerBill
539a74c2a9 Fix bindings for sys/linux and posix/unistd.odin 2025-01-31 08:37:43 +00:00
avanspector
5d3a069e7a Haiku: more posix 2025-01-10 06:40:29 +01:00
avanspector
5376d2a20b fix haiku 2024-12-20 17:19:04 +01:00
Laytan Laats
20f4f378b2 sys/posix: add MAP_ANONYMOUS 2024-11-17 13:52:08 +01:00
Laytan Laats
ce74325673 sys/posix: fix dirfd on netbsd 2024-11-15 21:22:23 +01:00
A1029384756
5be7ac4039 added unlinking section to posix socket binding documentation 2024-11-06 20:36:29 -05:00
Laytan Laats
8b5492dd4d fix tabs 2024-11-01 18:10:20 +01:00
Laytan Laats
cc3c9bd871 fix thread_unix for Darwin after pthread corrections in posix package
afed3ce removed the sys/unix package and moved over to sys/posix, it has
new bindings for the pthread APIs but should have been equivalent (not).

8fb7182 used `CANCEL_ENABLE :: 0`, `CANCEL_DISABLE :: 1`, `CANCEL_DEFERRED :: 0`, `CANCEL_ASYNCHRONOUS :: 1` for Darwin, while the
correct values are `1`, `0`, `2` and `0` respectively (same mistake was made for
FreeBSD in that commit).

What this meant is that the
`pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS)` was not actually
successful, but because the error wasn't checked it was assumed it was.
It also meant `pthread_setcancelstate(PTHREAD_CANCEL_ENABLE)` would
actually be setting `PTHREAD_CANCEL_DISABLE`.

The code in this PR restores the behaviour by now actually deliberately
setting `PTHREAD_CANCEL_DISABLE` and not setting
`PTHREAD_CANCEL_ASYNCHRONOUS` which was the previous behaviour that does
actually seem to work for some reason.

(I also fixed an issue in fmt where `x` would use uppercase if it was a
pointer.)
2024-10-30 15:51:56 +01:00
Laytan
7e12e37df9 fix test 2024-10-28 19:58:39 +01:00
Laytan
b7140875cf port pthread_mutex_t and pthread_cond_t from sys/unix cause miniaudio wants it 2024-10-28 19:42:27 +01:00
Laytan Laats
1cebc025b0 sys/posix: impl rest of linux, impl some of Windows 2024-10-28 18:59:06 +01:00
Laytan
0157ff1541 Merge pull request #4118 from andradei/posix-linux
Linux POSIX support
2024-10-13 20:05:03 +02:00
Laytan Laats
5d556fe277 fix idtype definition 2024-10-03 15:25:51 +02:00
Laytan Laats
ab54ad3a75 sys/posix: use '#max_field_align' 2024-09-30 16:39:14 +02:00
Laytan
5cd1784d41 review/correct/cleanup posix linux PR 2024-09-30 16:00:46 +02:00
Isaac Andrade
c1a67f37e6 Fix O_Flag_Bits.EXEC for non Linux platforms on posix/fcntl. 2024-09-21 21:37:41 -06:00
Isaac Andrade
cc60725eda Move bit set creation to compiler guard. Fix indentation on posix/sys_sem. 2024-09-21 21:28:18 -06:00
Isaac Andrade
04c08c2e2d Resolve bit set differences between linux and other platforms in posix/fcntl 2024-09-21 21:24:18 -06:00
Isaac Andrade
c68d847fb3 Satisfy the compiler. 2024-09-21 20:59:54 -06:00
Isaac Andrade
5162c6c506 Rename sigaction duplicate type to sigaction_t on linux, following other platforms. 2024-09-21 20:56:52 -06:00
Isaac Andrade
10702f1134 Implement POSIX pthread, signal, sys/resource, unistd for Linux. 2024-09-21 20:44:33 -06:00
Isaac Andrade
97e06cb98e Fix bit flags on fcntl linux POSIX implemention. Add sys/sem linux implementation. 2024-09-15 18:43:51 -06:00
Isaac Andrade
8616842ec6 Implement Linux POSIX compliance for poll, sched, sys/select. Fix enum in fcntl. 2024-09-14 20:23:42 -06:00
Isaac Andrade
aa91479870 Fix O_NOFOLLOW typo. Add Linux support for POSIX fcntl. 2024-09-14 17:01:15 -06:00
Isaac Andrade
af94c4ab32 Add initial POSIX support for Linux for wordexp. 2024-09-14 10:06:25 -06:00
Isaac Andrade
55a9ba1fc0 Finish sys/socket POSIX support for Linux. 2024-09-11 22:25:38 -06:00
Isaac Andrade
1632f19826 In-progress support for POSIX on Linux for sys/socket. 2024-09-10 18:43:09 -06:00
Isaac Andrade
ff82396e7c Add Linux support for POSIX sys ipc, mman, time, utsname. 2024-09-10 07:32:58 -06:00
Isaac Andrade
92ff04629e Fix some compilation errors on POSIX linux. 2024-09-09 22:17:42 -06:00
Laytan Laats
288312a812 core: improve package doc comments for the documentation generator 2024-09-03 19:59:04 +02:00
Isaac Andrade
9e4b45f0f0 Add linux to OS check. 2024-09-02 22:58:54 -06:00
Isaac Andrade
d93f55c5d4 Reuse POSIX netinet_in constants for linux. 2024-09-02 22:32:52 -06:00
Isaac Andrade
f072136c04 Implement POSIX linux support for poll and netinet_tcp. Incomplete support for netinet/in. 2024-09-02 21:59:03 -06:00
Isaac Andrade
35f961d80f Add POSIX Linux support for net_if and netdb. 2024-09-02 14:25:32 -06:00
Isaac Andrade
a248d49f34 Add Linux support for POSIX limits. 2024-09-02 14:04:05 -06:00
Laytan Laats
195259e88b fix some doc comments 2024-09-02 20:10:11 +02:00
Isaac Andrade
186565b0c1 Simplify the implementation of POSIX langinfo for Linux:
No need for the enum runtime checks. Constant values were set manually
and comments were added to help locate their origin.
2024-08-30 20:34:12 -06:00
Isaac Andrade
575aedc3bf Implement POSIX support for Linux for the following facilities:
- fnmatch
- grp
- langinfo
- locale
2024-08-30 19:45:56 -06:00
Isaac Andrade
3557955f53 Align the dirent struct for linux 2024-08-29 20:17:39 -06:00
Isaac Andrade
4577d541ec Add contants RTLD contants on os_linux and posix (dlfcn). 2024-08-28 22:15:11 -06:00
Isaac Andrade
f0e631cfa3 Use native types on linux POSIX structs. 2024-08-28 19:08:48 -06:00
Isaac Andrade
7d94810d01 Fix ino_t and ino_t32 types for POSIX linux. 2024-08-26 22:12:05 -06:00
Isaac Andrade
e0b78476c5 Fix else when clause. 2024-08-23 20:18:26 -06:00
Isaac Andrade
2794eb31d9 On Linux POSIX, ENOTSUP and EOPNOTSUPP have the same value. 2024-08-23 20:08:59 -06:00
Isaac Andrade
d8e4a1b93f Fix comment typo on POSIX ENOTSUP constant.
Co-authored-by: Feoramund <161657516+Feoramund@users.noreply.github.com>
2024-08-23 20:02:44 -06:00
Isaac Andrade
9c06898303 Add comma to last dirent struct member. 2024-08-23 20:01:15 -06:00
Isaac Andrade
90aa7dff04 Add POSIX dirent struct for Linux. 2024-08-23 19:56:45 -06:00
Isaac Andrade
ef06cd93cc Initial implementation of linux-specifig dirent struct. 2024-08-20 20:35:56 -06:00