Commit Graph

54 Commits

Author SHA1 Message Date
Josh Megnauth 728fb55203 Add %m to printf & fix CI
%m is a format specifier that prints an error string for errno. The
specifier is technically only for syslog, but musl and glibc implement
it for printf itself. Parsing for a single specifier in a single
function is error prone, especially when syslog itself is variadic.
2025-08-06 02:38:47 -04:00
Josh Megnauth 292a4b18a9 Move syslog tests to correct location 2025-08-04 22:20:17 -04:00
Josh Megnauth e677ad55d5 Better priorities & LOG_UPTO for syslog.h
* Fix PERROR to match musl/glibc better
* More unit tests + enabled on Linux
* Pack priority and facility into one i32 and check the bits with
  bitflags
* Add LOG_UPTO (logic is straight from musl)

Not done:
* "%m" - this could just be added to printf
* LOG_CONS
2025-08-01 23:45:26 -04:00
Ron Williams 770dc71816 Fix CI, Add signal.h constants 2025-07-11 20:28:45 -06:00
Jeremy Soller a2e040ce4d Merge branch 'strto-detect-endptr' into 'master'
Fix strtol/ul endptr with detected base

See merge request redox-os/relibc!656
2025-05-02 10:36:05 -06:00
Arne de Bruijn de3dd54266 Fix strtol/ul endptr with detected base
The "0" or "0x" characters with base 0 were not accounted for in the
returned endptr value.
2025-05-02 12:18:34 +02:00
Josh Megnauth a4826bd48c Implement BSD's err.h 2025-04-18 12:34:45 +00:00
Darley Barreto 26573d02d1 Time improvements 2025-03-29 19:29:20 +00:00
Josh Megnauth e827b4f61f Add strptime tests 2025-03-29 14:01:29 +00:00
GrayJack c7d94ae4d7 feat(c23): Implement %b and %B format 2025-03-22 20:15:56 -03:00
Josh Megnauth ccc1b7f560 strftime: ISO-8601 leap weeks 2025-03-20 02:34:26 -04:00
Darley Barreto dda7142385 Few improvements to time.h 2025-02-26 23:58:57 +00:00
Peter Limkilde Svendsen b3f36faf87 Add pvalloc() 2025-02-11 21:13:51 +01:00
Jeremy Soller 25b0da4876 Merge branch 'sigsetjmp_x64_implementation' into 'master'
Implement sigsetjmp and siglongjmp for X64

See merge request redox-os/relibc!478
2025-01-04 00:29:19 +00:00
Bendeguz Pisch 35a3efd936 Implement sigsetjmp and siglongjmp for X64 2025-01-04 00:29:19 +00:00
Darley Barreto c14b2cee4c Adding tzset, timezone awareness, and some tweaks 2025-01-02 20:19:34 +00:00
Jeremy Soller f08952b1b0 Merge branch 'patch5' into 'master'
feat: rwlock

Closes #196

See merge request redox-os/relibc!594
2024-12-30 17:17:05 +00:00
Anhad Singh 4232858b89 misc(tests/ptrace): update expected
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-31 00:54:58 +11:00
Darley Barreto ae5a5256b4 Add missing functions to string.h 2024-12-28 22:46:45 +00:00
Ron Williams 9df3708a1a fix popen, improve tests 2024-12-26 17:14:15 -08:00
Peter Limkilde Svendsen 93b6374d1e Reimplement memcpy() using slices, fix unaligned read/write, add test 2024-12-23 19:14:44 +00:00
Jeremy Soller 2c73cc947c Merge branch 'memmem' into 'master'
Implement memmem()

See merge request redox-os/relibc!560
2024-11-17 16:18:15 +00:00
Peter Limkilde Svendsen 6a765ed88f Implement memmem() 2024-11-17 16:18:14 +00:00
Jeremy Soller 09bcfd0711 Merge branch 'errno-const-macros' into 'master'
Test errno constant macros, make ENOTSUP available in Rust

See merge request redox-os/relibc!556
2024-11-17 16:16:47 +00:00
Peter Limkilde Svendsen 42011f28d8 Test errno constant macros, make ENOTSUP available in Rust 2024-11-17 16:16:47 +00:00
Peter Limkilde Svendsen 56d05e2cdc Add iso646.h and corresponding tests 2024-11-10 16:19:15 +01:00
Peter Limkilde Svendsen 41264dc8b1 Add NulTerminatedInclusive iterator, rewrite/fix strchr/wcschr 2024-10-22 22:12:24 +00:00
4lDO2 07af4e49f7 Add sigaltstack test. 2024-09-28 16:51:17 +02:00
Jeremy Soller 455d7323e9 Merge branch 'swscanf_works' into 'master'
swscanf and vswscanf implementation proposal

See merge request redox-os/relibc!472
2024-08-01 18:41:14 +00:00
Nicolás Antinori 198c5502b7 swscanf and vswscanf implementation proposal 2024-08-01 18:41:14 +00:00
Agoston Szepessy bb1e8fe8d7 Implement dprintf and vdprintf 2024-07-23 22:15:53 +02:00
Peter Limkilde Svendsen a91a4082c4 Add tests for unistd.h constants 2024-03-27 12:21:14 +00:00
Darley Barreto 55dc2019f2 Add Crypt functions 2024-03-01 00:23:42 +00:00
Darley Barreto 9d8094baee Add forkpty, ptsname and posix_openpt 2024-01-17 03:05:50 +00:00
Abdullah Emad 0caf011122 Implement mknod and mknodat 2024-01-03 16:43:28 +00:00
Jeremy Soller b0624b4178 Merge branch 'tests/getline' into 'master'
getline, getdelim: fix issues, extend tests

See merge request redox-os/relibc!418
2023-10-20 14:34:06 +00:00
Florian Meißner b65cd4e511 getline, getdelim: fix issues, extend tests 2023-10-20 14:34:06 +00:00
Darley Barreto 05992b8451 Add wcpcpy, wcpncpy, wcsdup, wcsnlen, wcsnrtombs 2023-10-19 14:58:37 +00:00
Darley Barreto db9bbaeb48 Make fgetwc real multibyte 2023-10-14 00:29:42 +00:00
Florian Meißner b66df46f33 strtof(), strtod(): handle NaN and Infinity 2023-06-05 23:04:25 +00:00
Jeremy Soller 3023dbb3c0 Add qsort test 2023-06-01 08:11:27 -06:00
Florian Meißner 14709b3d5c system(): on command == NULL, return nonzero if shell exists 2023-05-29 20:54:34 +02:00
Darley Barreto 9642d2ab02 Adding some wcst* functions 2023-05-22 16:01:04 +00:00
Darley Barreto 511d99aa21 Fix tests 2023-05-11 15:57:27 +00:00
Jeremy Soller 848fde933b Merge branch 'remove_pthreads_emb' into 'master'
Replace pthreads-emb with a native implementation

See merge request redox-os/relibc!380
2023-05-11 13:56:11 +00:00
Jeremy Soller 3473088510 Add expected wprintf output 2023-05-11 07:48:52 -06:00
4lDO2 fc01985410 WIP: fix errno and args output 2023-05-06 17:02:54 +02:00
Ron Williams c3f3da6958 fix tzset cbindgen declarations 2023-05-06 02:55:36 -07:00
David Carlier 3fe37e36fa reallocarray introduction available on glibc 2.26. allocates an array of m*n elements but checking for overflow. 2023-03-26 08:35:44 +01:00
David Carlier 34f2fff983 strlcpy/strlcat api for portability's sake.
those functions differently than the strn* ones as
they do not pad with zero to remaining bytes but guarantees
a null terminator.
2023-03-24 09:44:33 +00:00