Manu Linares
d2f59c5b3f
Linux: implement signal stacktrace using SA_SIGINFO + sigaltstack ( #2653 )
...
* Linux: implement signal stacktrace using SA_SIGINFO + sigaltstack
Adds proper signal handlers for SIGSEGV/SIGBUS/SIGILL on Linux,
enables backtraces from signal context, and exits with correct POSIX
signal codes (128+signal). Fixes missing "signal stacktrace" support
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com >
* defer libc::dlclose(handle);
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com >
* fix double backtrace on panic
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com >
* add guards for Linux X86_64
- remove comments
- uncomment MContext_t for Linux AARCH64
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com >
* fix guards, missed in two places
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com >
---------
Signed-off-by: Manuel Barrio Linares <mbarriolinares@gmail.com >
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-12-20 03:07:23 +01:00
limit-ordinal
85166bc706
Add NetBSD Support ( #2661 )
...
* Add NetBSD Support
Includes:
- Hints to find non-compatibility libc functions
- Struct and constant definitions for sockets, polling, etc.
- Changes to the linker code to work around some quirks in the NetBSD dynamic linker
- A target triple for netbsd aarch64 so llvm builds/links the compiler properly on this platform
* Updated releasenotes and some compacting
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-12-19 19:23:06 +01:00
Savino Pio Liguori
85657c9200
Added "implement-libc" feature. ( #2564 )
...
This feature adds an option from project.json and build options to disable libc unreachable statements in order to be able to implement one for yourself. Useful feature for bare metal developing.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-12-07 00:07:54 +01:00
Christoffer Lerno
8aaf54e8b1
- Rename @extern to @cname, deprecating the old name #2493 .
2025-10-25 15:55:25 +02:00
Book-reader
a6d33ec4af
Update stdlib to use struct member docs from #2427 and other small changes ( #2473 )
...
* Doc comment improvements
* update `compression/qoi.c3` to use const enums
* revert sweeping doc comment changes that impacted readability for now
* Some tweaks.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-09-19 18:41:32 +02:00
Christoffer Lerno
e605a21fd3
Revert "Revert 0.7.6 code for 0.7.5 re-release"
...
This reverts commit d1349c9cfb .
2025-09-05 23:30:35 +02:00
Christoffer Lerno
d1349c9cfb
Revert 0.7.6 code for 0.7.5 re-release
2025-09-05 18:42:54 +02:00
Book-reader
3c1f692d49
Make enum Cc inline so it can index Termios.c_cc ( #2448 )
2025-09-04 11:41:06 +02:00
niedlich
cf14787552
Typo fixes ( #2457 )
...
* fix typos in comments and strings
* fix typos in symbols (and some comments/strings)
* fix typos in releasenotes.md
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-09-04 01:07:07 +02:00
Book-reader
076ef187cb
improve & fix libc termios bindings ( #2372 )
...
* improve & fix libc termios bindings
2025-08-13 17:24:41 +02:00
Christoffer Lerno
82a58e1c66
Update libc memcpy.
2025-08-13 13:29:56 +02:00
Zack Puhl
b73a44ec7d
Add/Fix OpenBSD native_cpus ( #2387 )
...
* Add OpenBSD `native_cpus`
* update release notes
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-08-11 23:10:09 +02:00
Christoffer Lerno
e8b3c44de3
Add a "wchar" type.
2025-07-23 15:09:55 +02:00
Kiana
38bc11b7b8
Add libc::readlink() ( #2316 )
...
* Add libc::readlink()
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-07-22 15:46:23 +02:00
LowByteFox
5c82747970
Improved OpenBSD support ( #2317 )
...
* add openbsd support, compiles and passses all tests
* fix backtrace
* gh actions should include openbsd artifacts
2025-07-22 15:15:20 +02:00
Christian Buttner
2053f2767b
Add ConditionVariable.wait_until and ConditionVariable.wait_for ( #2302 )
...
* Add `ConditionVariable.wait_until` and `ConditionVariable.wait_for`
* Add "@structlike" for typedefs.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-07-19 13:12:14 +02:00
Zack Puhl
adabae2a24
add 'strdup' reference to libc
2025-06-23 15:37:25 +02:00
Christoffer Lerno
becda6ea1d
Improve Android linking
2025-06-08 15:06:19 +02:00
Christoffer Lerno
c7b3ae0cf9
Fix Android errno
2025-06-08 11:33:28 +02:00
Awang
d7a11903c7
Add external __errno() function for env::ANDROID ( #2182 )
2025-06-06 14:47:16 +02:00
BWindey
d143ec227c
Libc ioctl extern function ( #2162 )
...
* Add barebones extern ioctl() binding in libc
* Update release notes
2025-05-29 23:00:35 +02:00
Boris Barbulovski
b5d0739de0
Add env::ANDROID to std.*
2025-04-16 17:47:49 +02:00
Christoffer Lerno
207bcfea02
os::exit and os::fastexit added.
2025-03-20 13:36:59 +01:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d
Rename def to alias.
2025-03-13 11:22:27 +01:00
Boris Barbulovski
f21cc02320
Initial Android support. ( #2024 )
...
* Initial Android support.
* Add Android x86_64
* - Typo api_verion
- Typo in DEFAULT_TARGETS
- Removed unnecessary snprintf
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 23:38:52 +01:00
BWindey
1461414128
[TEST] Add unit tests for libc ( #1974 )
...
Some tests for libc + fixes
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-03-08 22:25:21 +01:00
Erik Bäckman
83bc24f58c
Fix libc::stat on FreeBSD (x86_64)
2025-03-04 10:20:13 +01:00
Christoffer Lerno
222bfb158b
Remove deprecated functions.
2025-03-03 00:32:20 +01:00
rexim
122179980c
Introduce Socket.shutdown()
2025-02-07 20:52:36 +01:00
Christoffer Lerno
3c50376175
New test runner
2025-01-30 01:09:48 +01:00
Bram Windey
bbef5656a5
Fix 'strtul' to 'strtoul'
2025-01-20 21:45:15 +01:00
Thomas Adam
61badb6af7
libc: add isatty()
2025-01-04 15:41:51 +01:00
vssukharev
55cdcbb39b
Fix typo in libc: SIGABTR -> SIGABRT
2025-01-01 21:36:33 +01:00
Christoffer Lerno
a1a6511e26
Remove "Timespec"
2024-11-22 16:50:29 +01:00
Tomas Kallup
bdd6ed0e83
Fix: Unify termios types for actions & flags
...
The type for `Tcflags` was used instead of the CInt (now `Tcactions`)
and vice versa.
2024-11-04 17:15:40 +01:00
Christoffer Lerno
31cd839063
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
2024-10-14 02:14:34 +02:00
PavelBlinnikov
6a2957faf7
fix: segfault in panic when statically compiled
...
Co-authored-by: RoadToLP <ilya.titoff2013@yandex.ru >
2024-10-12 22:18:38 +02:00
Christoffer Lerno
a665978b64
Fixing some whitespace issues.
2024-10-08 19:38:31 +02:00
wilsonk
4c7d61ae82
Bsd family fixes ( #1435 )
...
Some small fixes for the BSD's
Try fcntl for NetBSD
Fixes for stdin, etc. and setjmp/longjmp
2024-09-13 14:49:51 +02:00
wilsonk
1b54a99f6a
Add initial FreeBSD support ( #1430 )
...
Add initial FreeBSD support
2024-09-11 22:38:53 +02:00
Christoffer Lerno
6d93ce9d33
Update to libc::setjmp on Win32, to do no stack unwinding.
2024-08-11 18:22:14 +02:00
Christoffer Lerno
800f7970a7
Fixes to the socket functions. Improved output when pointer is out of range. Better error when casting to a distinct fails.
2024-08-06 17:08:03 +02:00
Christoffer Lerno
2748cf99b3
- Fix issue where a compile time parameter is followed by "...".
...
- Fix issue with some conversions to untyped list.
- Experimental change: add `+++` `&&&` `|||` as replacement for `$concat`, `$and` and `$or`.
2024-08-04 23:16:25 +02:00
PalsFreniers
b0e104bfd0
Adding Termios library as std::libc::termios (posix libc functions) ( #1272 )
...
Adding libc's termios to lib/std/libc
2024-07-31 14:45:04 +02:00
Christoffer Lerno
bc0d52142a
Added pull request #1189 : Fix os::native_is_{file,dir} bug. Add tests.
2024-07-15 03:02:54 +02:00
Christian Buttner
83fe94d497
Fix posix NativeConditionVariable.wait_timeout. ( #1211 )
...
Fix posix NativeConditionVariable.wait_timeout. TimeSpec::ns may not exceed one second.
2024-06-24 11:52:21 +02:00
Christoffer Lerno
1d61ace302
Do not link with debug libc on win32 when using cross compile libs. Add delete methods to dstring. Fixes to macOS aarch64 codegen. Use glibc backtrace when available. Add load_* methods to file. The cast (int[8])int_slice[:8] now works.
2023-12-08 18:59:57 +01:00
Christoffer Lerno
87fdb5956e
Improved backtrace on platforms without glibc. Added $$frameaddress and $$returnaddress properly.
2023-11-18 20:13:11 +01:00
Christoffer Lerno
99cfaa1583
Refactor protocols.
2023-10-06 22:31:41 +02:00