scc, branch HEAD simple c99 compiler 52cf2e9986d52e8e812a30b94dc118dabb1aea1f 2026-01-05T21:22:18Z 2026-01-05T21:22:18Z libmach: Add findseg() Roberto E. Vargas Caballero k0ga@shike2.net commit 52cf2e9986d52e8e812a30b94dc118dabb1aea1f parent ece7fade7d459523af266428e95b4f587a2f0ba9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 22:22:18 +0100 libmach: Add findseg() This function returns the segment index in the map. This function is mainly designed to be used in elf where there is a difference between sections and segments. ece7fade7d459523af266428e95b4f587a2f0ba9 2026-01-05T20:33:03Z 2026-01-05T20:52:49Z tests/libc: Add 0067-wcwidth Roberto E. Vargas Caballero k0ga@shike2.net commit ece7fade7d459523af266428e95b4f587a2f0ba9 parent 361a63ace0c9cec71586b8c6f79397a981c32589 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 21:33:03 +0100 tests/libc: Add 0067-wcwidth 361a63ace0c9cec71586b8c6f79397a981c32589 2026-01-05T20:19:16Z 2026-01-05T20:51:16Z objdump: Fix format string in dumpscns() Roberto E. Vargas Caballero k0ga@shike2.net commit 361a63ace0c9cec71586b8c6f79397a981c32589 parent 0f88acf52504636f56b73132285c7355b1beb0af Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 21:19:16 +0100 objdump: Fix format string in dumpscns() 0f88acf52504636f56b73132285c7355b1beb0af 2026-01-05T19:24:01Z 2026-01-05T20:51:16Z libc: Include a mbstate_t in FILE Roberto E. Vargas Caballero k0ga@shike2.net commit 0f88acf52504636f56b73132285c7355b1beb0af parent 84128eaf37e33fed023f271018b157b7398ad91c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 5 Jan 2026 20:24:01 +0100 libc: Include a mbstate_t in FILE Several of the file operations related to wchar require a mbstate_t, and every stream should have its own mbstate_t and not using the hidden state of several of the conversion functions. 84128eaf37e33fed023f271018b157b7398ad91c 2026-01-04T20:18:49Z 2026-01-04T20:18:49Z libc/stdlib: Minor improvements to realloc() Roberto E. Vargas Caballero k0ga@shike2.net commit 84128eaf37e33fed023f271018b157b7398ad91c parent ae0058502d81d2742783b1d1800784319341ff12 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 21:18:49 +0100 libc/stdlib: Minor improvements to realloc() ae0058502d81d2742783b1d1800784319341ff12 2026-01-04T20:14:43Z 2026-01-04T20:14:43Z libc/wchar: Whitespace change Roberto E. Vargas Caballero k0ga@shike2.net commit ae0058502d81d2742783b1d1800784319341ff12 parent 117e2caee5ca7b1441e2e4c4135c2aaac7b5cc78 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 21:14:43 +0100 libc/wchar: Whitespace change 117e2caee5ca7b1441e2e4c4135c2aaac7b5cc78 2026-01-04T20:09:03Z 2026-01-04T20:09:03Z tests: Minor improvements Roberto E. Vargas Caballero k0ga@shike2.net commit 117e2caee5ca7b1441e2e4c4135c2aaac7b5cc78 parent 0f61a6528784b5add0eef1d64ea16eb5adf689f9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 21:09:03 +0100 tests: Minor improvements 0f61a6528784b5add0eef1d64ea16eb5adf689f9 2026-01-04T19:48:34Z 2026-01-04T20:06:08Z libc/string: Minor improvements Roberto E. Vargas Caballero k0ga@shike2.net commit 0f61a6528784b5add0eef1d64ea16eb5adf689f9 parent 9a60d2a80efcd85c85f90b1c0406c8fe3f324f5b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 20:48:34 +0100 libc/string: Minor improvements 9a60d2a80efcd85c85f90b1c0406c8fe3f324f5b 2026-01-04T19:29:39Z 2026-01-04T20:06:08Z libc/wchar: Add wctob() Roberto E. Vargas Caballero k0ga@shike2.net commit 9a60d2a80efcd85c85f90b1c0406c8fe3f324f5b parent c4b7399c26bf3040f33b4760e162495d74d85d73 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 20:29:39 +0100 libc/wchar: Add wctob() c4b7399c26bf3040f33b4760e162495d74d85d73 2026-01-04T19:17:51Z 2026-01-04T19:22:52Z libc/wchar: Add btowc() Roberto E. Vargas Caballero k0ga@shike2.net commit c4b7399c26bf3040f33b4760e162495d74d85d73 parent 534e0b91e27ad3cb37404d696cd1c0044a8ebe18 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 20:17:51 +0100 libc/wchar: Add btowc() 534e0b91e27ad3cb37404d696cd1c0044a8ebe18 2026-01-04T18:47:25Z 2026-01-04T18:47:25Z tests/libc: Add 0043-wcsrtombs Roberto E. Vargas Caballero k0ga@shike2.net commit 534e0b91e27ad3cb37404d696cd1c0044a8ebe18 parent 005f4c376c05bd22e21761cf063ea76fb9338dc1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 4 Jan 2026 19:47:25 +0100 tests/libc: Add 0043-wcsrtombs 005f4c376c05bd22e21761cf063ea76fb9338dc1 2026-01-03T17:55:53Z 2026-01-03T17:55:53Z libc: Add wcstok Roberto E. Vargas Caballero k0ga@shike2.net commit 005f4c376c05bd22e21761cf063ea76fb9338dc1 parent b2eb6e5269977992d88d388ff30a078aa9101a42 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 18:55:53 +0100 libc: Add wcstok b2eb6e5269977992d88d388ff30a078aa9101a42 2026-01-03T17:37:44Z 2026-01-03T17:37:44Z libc: Reorder common-objs.mk Roberto E. Vargas Caballero k0ga@shike2.net commit b2eb6e5269977992d88d388ff30a078aa9101a42 parent 836ed99e5aa87033470b3594597070cb0e00148b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 18:37:44 +0100 libc: Reorder common-objs.mk 836ed99e5aa87033470b3594597070cb0e00148b 2026-01-03T16:47:00Z 2026-01-03T16:47:00Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 836ed99e5aa87033470b3594597070cb0e00148b parent 452190b652a22d2d5ba1fbc2106bf7847944f582 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 17:47:00 +0100 Merge remote-tracking branch 'origin/master' 47361f9afa1e1b5b31f58052d3253e1067dcd773 2026-01-03T14:35:47Z 2026-01-03T14:35:47Z build: Build bootstrap make in scripts Roberto E. Vargas Caballero k0ga@shike2.net commit 47361f9afa1e1b5b31f58052d3253e1067dcd773 parent 5b69547863e7e3da563e26164c34f22585920377 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 15:35:47 +0100 build: Build bootstrap make in scripts Just to keep the top level directory cleaner. 5b69547863e7e3da563e26164c34f22585920377 2026-01-03T14:24:55Z 2026-01-03T14:24:55Z tests: Use $TEST in every scc invocation Roberto E. Vargas Caballero k0ga@shike2.net commit 5b69547863e7e3da563e26164c34f22585920377 parent 6d67d778d8a2bfe2093233d1fae81663f712aa2a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 15:24:55 +0100 tests: Use $TEST in every scc invocation using a variable before executing any of the commands allows to use emulators of checkers easilly just setting that variable. 6d67d778d8a2bfe2093233d1fae81663f712aa2a 2026-01-03T13:14:58Z 2026-01-03T14:23:30Z build: Fix use of trap Roberto E. Vargas Caballero k0ga@shike2.net commit 6d67d778d8a2bfe2093233d1fae81663f712aa2a parent c825c03e6f3b1e3a757a47c75d77ce57ebb1624d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 3 Jan 2026 14:14:58 +0100 build: Fix use of trap Using the same trap for EXIT and signals has the problem that signals don't finish the current execution. For that reason is better to use different traps and do the cleaning only in the EXIT trap while the signals just use exits that eventually will call the EXIT trap. 452190b652a22d2d5ba1fbc2106bf7847944f582 2025-11-18T15:47:52Z 2025-11-18T18:14:23Z include: Remove parameter names in prototypes Roberto E. Vargas Caballero k0ga@shike2.net commit 452190b652a22d2d5ba1fbc2106bf7847944f582 parent 87e4396fb51faf4eac6fbd0a853e8c9d93c88fa2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 16:47:52 +0100 include: Remove parameter names in prototypes Just be consistent and apply the same style in all the files. 87e4396fb51faf4eac6fbd0a853e8c9d93c88fa2 2025-11-18T14:26:53Z 2025-11-18T18:14:23Z include: Remove extern in function declarations Roberto E. Vargas Caballero k0ga@shike2.net commit 87e4396fb51faf4eac6fbd0a853e8c9d93c88fa2 parent ad5bd51963863fe5a3c3ad58a1ae42d578aa8980 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 15:26:53 +0100 include: Remove extern in function declarations This was introduced some time ago to follow some style but it does not help so much, and it only makes longer the declaration of the functions. ad5bd51963863fe5a3c3ad58a1ae42d578aa8980 2025-11-18T13:01:45Z 2025-11-18T18:12:31Z include: Remove T* types Roberto E. Vargas Caballero k0ga@shike2.net commit ad5bd51963863fe5a3c3ad58a1ae42d578aa8980 parent c825c03e6f3b1e3a757a47c75d77ce57ebb1624d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 14:01:45 +0100 include: Remove T* types These types didn't work very well, and at some point we stopped using them. Removing them makes the code more straigh forward and avoids some stupid casts in printf alike function calls. c825c03e6f3b1e3a757a47c75d77ce57ebb1624d 2025-11-18T10:46:36Z 2025-11-18T11:07:16Z doc: Remove outdated bug Roberto E. Vargas Caballero k0ga@shike2.net commit c825c03e6f3b1e3a757a47c75d77ce57ebb1624d parent 3d92a3b0d83de06ce99f320906711d2d21f9a0c4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 18 Nov 2025 11:46:36 +0100 doc: Remove outdated bug 3d92a3b0d83de06ce99f320906711d2d21f9a0c4 2025-10-31T17:19:56Z 2025-10-31T17:19:56Z tests/ar: Fix file name in 0039-update.sh Roberto E. Vargas Caballero k0ga@shike2.net commit 3d92a3b0d83de06ce99f320906711d2d21f9a0c4 parent 1ed0ff0000999561feee336c289252faf2502a7e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 31 Oct 2025 18:19:56 +0100 tests/ar: Fix file name in 0039-update.sh 1ed0ff0000999561feee336c289252faf2502a7e 2025-10-29T09:57:06Z 2025-10-29T09:57:06Z tests: Set error code Roberto E. Vargas Caballero k0ga@shike2.net commit 1ed0ff0000999561feee336c289252faf2502a7e parent 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 29 Oct 2025 10:57:06 +0100 tests: Set error code Having a correct error code when make tests is executed helps to detect when a test failed. 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a 2025-10-28T20:21:11Z 2025-10-28T20:21:11Z tests/make: Reduce the timeout for 0102-signal Roberto E. Vargas Caballero k0ga@shike2.net commit 00bae5c394c9b1d31586ffa1ee2f77a3edcc6f0a parent 65e5c373ca2fa947a604a1e0ea35843c8c104658 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 28 Oct 2025 21:21:11 +0100 tests/make: Reduce the timeout for 0102-signal This timeout never had to be changed, because changing it was only hiding the actual problem, which was a race condition due to the incorrect signal handling. 65e5c373ca2fa947a604a1e0ea35843c8c104658 2025-10-28T20:12:08Z 2025-10-28T20:12:08Z make: Use a local signal variable Roberto E. Vargas Caballero k0ga@shike2.net commit 65e5c373ca2fa947a604a1e0ea35843c8c104658 parent 93e07bb34a825734d760971f811ac43868fd8c48 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 28 Oct 2025 21:12:08 +0100 make: Use a local signal variable As the global stop variable is used in cleanup() we can be caught by one signal when we enter in cleanup but stop can be pointing to a different signal at the end of that function. 93e07bb34a825734d760971f811ac43868fd8c48 2025-10-28T20:10:31Z 2025-10-28T20:10:31Z scc-make: Avoid signal race conditions Roberto E. Vargas Caballero k0ga@shike2.net commit 93e07bb34a825734d760971f811ac43868fd8c48 parent e19109cd35b8d64480c74389b8faaedf5af9b0ed Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 28 Oct 2025 21:10:31 +0100 scc-make: Avoid signal race conditions Expecting ait to be interrupted by a signal is too risky and it is very easy to be caught by race conditions. The best option is to kill in the snal handler and lock signals until we are ready to deal with them. e19109cd35b8d64480c74389b8faaedf5af9b0ed 2025-10-17T07:40:03Z 2025-10-17T07:40:03Z tests/make: Increment timeout for 0102-signal Roberto E. Vargas Caballero k0ga@shike2.net commit e19109cd35b8d64480c74389b8faaedf5af9b0ed parent 6d9a517cf4c6b5133030b9744531340d22cef719 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 17 Oct 2025 09:40:03 +0200 tests/make: Increment timeout for 0102-signal This tests shows to be a bit flaky. Increment the time can help a bit. 6d9a517cf4c6b5133030b9744531340d22cef719 2025-10-16T11:22:18Z 2025-10-17T07:39:55Z build: Modify include path Roberto E. Vargas Caballero k0ga@shike2.net commit 6d9a517cf4c6b5133030b9744531340d22cef719 parent 6c3c992dc8f759f8c4052a4fb0d47d7681282664 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 16 Oct 2025 13:22:18 +0200 build: Modify include path 6c3c992dc8f759f8c4052a4fb0d47d7681282664 2025-08-05T12:00:25Z 2025-08-05T12:00:25Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 6c3c992dc8f759f8c4052a4fb0d47d7681282664 parent 23c081533234d616d3cc57e5794ee1b9f2a87b63 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 5 Aug 2025 14:00:25 +0200 Merge remote-tracking branch 'origin/master' 23c081533234d616d3cc57e5794ee1b9f2a87b63 2025-08-05T11:53:18Z 2025-08-05T11:53:18Z make: Make cleanup void Roberto E. Vargas Caballero k0ga@shike2.net commit 23c081533234d616d3cc57e5794ee1b9f2a87b63 parent 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 5 Aug 2025 13:53:18 +0200 make: Make cleanup void It does not return any value ever, so it does not make sense to have it like int, and it created problems porting it to plan9. 2a2e57ae043b6d78a5dbd50761971d6508540729 2025-06-17T18:16:23Z 2025-06-17T19:05:29Z libc/malloc: Unify malloc and realloc Roberto E. Vargas Caballero k0ga@shike2.net commit 2a2e57ae043b6d78a5dbd50761971d6508540729 parent 2b33af36beceaf67507ab881f113d68a371a4f13 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 17 Jun 2025 20:16:23 +0200 libc/malloc: Unify malloc and realloc realloc(p, 0) should behave like malloc(0), but we were not setting the same errno values, and we were returning NULL in both cases, that makes more difficult to differentiate the case when 0 is passed and the case when we don't have enough memory. Given that the traditional behaviour was always to return a pointer that could be freed (and even that was the original behaviour in scc) this commit restores that behaviour. 2b33af36beceaf67507ab881f113d68a371a4f13 2025-06-17T19:04:13Z 2025-06-17T19:05:29Z tests/make: Unset MAKEFLAGS Roberto E. Vargas Caballero k0ga@shike2.net commit 2b33af36beceaf67507ab881f113d68a371a4f13 parent ac449d18a971e3e452e3f47cbd2af90b6a55ea18 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 17 Jun 2025 21:04:13 +0200 tests/make: Unset MAKEFLAGS Some make implementations set MAKEFLAGS to non portable values creating some problems when running the tests when we move from the driven make to the make under test. ac449d18a971e3e452e3f47cbd2af90b6a55ea18 2025-06-13T20:31:14Z 2025-06-17T16:41:17Z scc-make: parseargv(): properly handle the -- argument, add test. Z. Gilboa writeonce@midipix.org commit ac449d18a971e3e452e3f47cbd2af90b6a55ea18 parent 30255fb57a7b5abf021e417aa34f380ae92bdbbe Author: Z. Gilboa <writeonce@midipix.org> Date: Fri, 13 Jun 2025 20:31:14 +0000 scc-make: parseargv(): properly handle the -- argument, add test. 30255fb57a7b5abf021e417aa34f380ae92bdbbe 2025-06-14T07:42:49Z 2025-06-17T07:48:14Z .gitignore: add missing entry for /src/cmd/scc-dump. Z. Gilboa writeonce@midipix.org commit 30255fb57a7b5abf021e417aa34f380ae92bdbbe parent 63c66208e583d8538351428cb2d5bdf0aabe3e26 Author: Z. Gilboa <writeonce@midipix.org> Date: Sat, 14 Jun 2025 07:42:49 +0000 .gitignore: add missing entry for /src/cmd/scc-dump. 63c66208e583d8538351428cb2d5bdf0aabe3e26 2025-06-04T14:36:22Z 2025-06-04T14:36:22Z driver/posix: Enable QBE for any arch/abi Roberto E. Vargas Caballero k0ga@shike2.net commit 63c66208e583d8538351428cb2d5bdf0aabe3e26 parent 1f8f494a8504aa99052554476d86bcd0d6a7a1ba Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:36:22 +0200 driver/posix: Enable QBE for any arch/abi The validation for the correct combination of QBE, arch and abi is done when the qbe target selection is done, so we don't have to care about it when we select the scc backend used to generate the QBE IL. 1f8f494a8504aa99052554476d86bcd0d6a7a1ba 2025-06-04T14:31:49Z 2025-06-04T14:31:49Z driver/posix: Adjust qbe command line based in the target Roberto E. Vargas Caballero k0ga@shike2.net commit 1f8f494a8504aa99052554476d86bcd0d6a7a1ba parent d853268357f02d13ca7377e2391b8ebb6290daad Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:31:49 +0200 driver/posix: Adjust qbe command line based in the target Qbe supports multiple ABIs and they are selected using the command line flag -t. d853268357f02d13ca7377e2391b8ebb6290daad 2025-06-04T14:08:26Z 2025-06-04T14:08:26Z cc2: Add support for qbe riscv64 Roberto E. Vargas Caballero k0ga@shike2.net commit d853268357f02d13ca7377e2391b8ebb6290daad parent faf643c9afc0a74b276f24a8fdb4ba8552e351b3 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:08:26 +0200 cc2: Add support for qbe riscv64 faf643c9afc0a74b276f24a8fdb4ba8552e351b3 2025-06-04T14:08:07Z 2025-06-04T14:08:07Z cc2/arm64: Removed unused peep.c Roberto E. Vargas Caballero k0ga@shike2.net commit faf643c9afc0a74b276f24a8fdb4ba8552e351b3 parent 06266207ce41e9fa1b7c2232b0a0243481287fd6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:08:07 +0200 cc2/arm64: Removed unused peep.c This file was only a placeholder for the times when we built a skeleton for arm64 without using qbe. As we don't build that skeleton anymore, it does not make sense to keep this placeholder anymore in the repository. 06266207ce41e9fa1b7c2232b0a0243481287fd6 2025-06-04T14:06:01Z 2025-06-04T14:06:01Z cc1: Add support for riscv64 Roberto E. Vargas Caballero k0ga@shike2.net commit 06266207ce41e9fa1b7c2232b0a0243481287fd6 parent 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 4 Jun 2025 16:06:01 +0200 cc1: Add support for riscv64 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f 2025-05-27T18:19:30Z 2025-05-27T18:19:30Z build: Remove redundant make build Roberto E. Vargas Caballero k0ga@shike2.net commit 7d92f9f22004c00fca2fe52a183b8d8e1a1bca6f parent 6182ec6e314de95182742064f5bb2d80abf11c8c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 27 May 2025 20:19:30 +0200 build: Remove redundant make build Scc-make was already built before this rule began its execution. 6182ec6e314de95182742064f5bb2d80abf11c8c 2025-05-24T04:54:25Z 2025-05-24T04:57:54Z libc/vfprintf: Adjust variable types Roberto E. Vargas Caballero k0ga@shike2.net commit 6182ec6e314de95182742064f5bb2d80abf11c8c parent 9c55c9b38fb53863c83f8d59ea6241682b2ea463 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 24 May 2025 06:54:25 +0200 libc/vfprintf: Adjust variable types 9c55c9b38fb53863c83f8d59ea6241682b2ea463 2025-05-13T08:14:24Z 2025-05-13T08:14:24Z doc: Clarify how to use musl Roberto E. Vargas Caballero k0ga@shike2.net commit 9c55c9b38fb53863c83f8d59ea6241682b2ea463 parent 5900420c8566844b1e379dc62adb0467142f56d6 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 13 May 2025 10:14:24 +0200 doc: Clarify how to use musl 5900420c8566844b1e379dc62adb0467142f56d6 2025-05-12T20:28:28Z 2025-05-12T20:28:28Z build: Use SCCMAKE instead of SMAKE Roberto E. Vargas Caballero k0ga@shike2.net commit 5900420c8566844b1e379dc62adb0467142f56d6 parent 1f6bfcd9114a69b495191dbc3d96c27e1468a8f9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 12 May 2025 22:28:28 +0200 build: Use SCCMAKE instead of SMAKE It makes more clear what the macro is intended and it makes easier to override it to use some other make in case of being needed (for example to get parallel builds). 1f6bfcd9114a69b495191dbc3d96c27e1468a8f9 2025-05-11T18:31:23Z 2025-05-12T10:01:57Z test/cc: Add 0231-init.c Roberto E. Vargas Caballero k0ga@shike2.net commit 1f6bfcd9114a69b495191dbc3d96c27e1468a8f9 parent dfbe125c3b0d001a9f0d671c6adfdb41e488e8cf Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sun, 11 May 2025 20:31:23 +0200 test/cc: Add 0231-init.c dfbe125c3b0d001a9f0d671c6adfdb41e488e8cf 2025-04-28T08:55:23Z 2025-04-28T08:55:23Z cc1: Allow struct assigments in initialization Roberto E. Vargas Caballero k0ga@shike2.net commit dfbe125c3b0d001a9f0d671c6adfdb41e488e8cf parent 11236c88e689f884619332bedbffd3501916f887 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 28 Apr 2025 10:55:23 +0200 cc1: Allow struct assigments in initialization Currently, the code was only supporting initializers for struct but it should support also arbitrary expressions emitting the correct assignment statement. 11236c88e689f884619332bedbffd3501916f887 2025-04-25T08:27:33Z 2025-04-25T08:27:33Z cc1: Initialize correctly unions Xavier Del Campo Romero xavi92@disroot.org commit 11236c88e689f884619332bedbffd3501916f887 parent 2c35688619f6c5804106dfe52ee199894eb6b056 Author: Xavier Del Campo Romero <xavi92@disroot.org> Date: Fri, 25 Apr 2025 10:27:33 +0200 cc1: Initialize correctly unions When an union has an initializer then it initializes the first member of the union unless a designated initializer is used. The code was not ready to initialize an union with an implicit value. 2c35688619f6c5804106dfe52ee199894eb6b056 2025-04-25T07:22:59Z 2025-04-25T07:22:59Z build: Bootstrap scc using scc-make Roberto E. Vargas Caballero k0ga@shike2.net commit 2c35688619f6c5804106dfe52ee199894eb6b056 parent d0ec99aaad5f303dfbd9fd0e094856f7f78c106d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 25 Apr 2025 09:22:59 +0200 build: Bootstrap scc using scc-make Some problems were found with some make implementations, and as scc includes its own make version, it is a problem that we can easily avoid just using the make from the repo. d0ec99aaad5f303dfbd9fd0e094856f7f78c106d 2025-04-21T20:08:39Z 2025-04-21T20:30:29Z libc: Add macro definition for setjmp Roberto E. Vargas Caballero k0ga@shike2.net commit d0ec99aaad5f303dfbd9fd0e094856f7f78c106d parent 26962956798171998310076e26dd086187ea5ba9 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 21 Apr 2025 22:08:39 +0200 libc: Add macro definition for setjmp The standard is contradictory about setjmp(), because it literally says that it can be a macro or a function, but it has several paragrapshs where it defines it as a macro, and even explicitely says that setjmp.h defines the setjmp macro. Given this situation, the saner decision is to define it as a recursive macro with one argument that expands to itself. 26962956798171998310076e26dd086187ea5ba9 2025-04-18T21:40:57Z 2025-04-19T07:11:18Z build: Remove lorder Roberto E. Vargas Caballero k0ga@shike2.net commit 26962956798171998310076e26dd086187ea5ba9 parent 027d5ed74d0e1195669b4f7d7a1531a82f3441e0 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 18 Apr 2025 23:40:57 +0200 build: Remove lorder It is not used anymore, and it required to include the caldera license. 027d5ed74d0e1195669b4f7d7a1531a82f3441e0 2025-04-18T20:55:07Z 2025-04-18T20:55:07Z Merge remote-tracking branch 'origin/master' Roberto E. Vargas Caballero k0ga@shike2.net commit 027d5ed74d0e1195669b4f7d7a1531a82f3441e0 parent 23beeedce6a5a56ce4a12dbb96178fc165e913b4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 18 Apr 2025 22:55:07 +0200 Merge remote-tracking branch 'origin/master' 23beeedce6a5a56ce4a12dbb96178fc165e913b4 2025-04-18T20:52:50Z 2025-04-18T20:52:50Z doc: Unify license information Roberto E. Vargas Caballero k0ga@shike2.net commit 23beeedce6a5a56ce4a12dbb96178fc165e913b4 parent 473b289e3176157e7674cf676ec1ef56a8c04e02 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 18 Apr 2025 22:52:50 +0200 doc: Unify license information 64470722a2a80a6b9144a79a162e11e8a0c2b7fb 2025-04-09T15:15:48Z 2025-04-12T09:58:24Z Fix double free in swtch.c remph lhr@disroot.org commit 64470722a2a80a6b9144a79a162e11e8a0c2b7fb parent d5d0d662f6a48cf922d524b0df11911bde263fac Author: remph <lhr@disroot.org> Date: Wed, 9 Apr 2025 16:15:48 +0100 Fix double free in swtch.c The `list' pointer should be reset to NULL after the memory it points to has been freed, otherwise the next time cleanswtch() is called it iterates over the list starting at freed memory. d5d0d662f6a48cf922d524b0df11911bde263fac 2025-04-09T15:10:00Z 2025-04-12T09:47:43Z tests/libc: Fix wchar tests lhr@disroot.org lhr@disroot.org commit d5d0d662f6a48cf922d524b0df11911bde263fac parent 473b289e3176157e7674cf676ec1ef56a8c04e02 Author: lhr@disroot.org <lhr@disroot.org> Date: Wed, 9 Apr 2025 16:10:00 +0100 tests/libc: Fix wchar tests 473b289e3176157e7674cf676ec1ef56a8c04e02 2025-04-07T13:17:39Z 2025-04-07T13:17:39Z libc/openbsd: fix int_fast64_t definition Lucas Gabriel Vuotto lucas@lgv5.net commit 473b289e3176157e7674cf676ec1ef56a8c04e02 parent 1127a487c737f972f98aeb54bd29e599e5c6af85 Author: Lucas Gabriel Vuotto <lucas@lgv5.net> Date: Mon, 7 Apr 2025 15:17:39 +0200 libc/openbsd: fix int_fast64_t definition 1127a487c737f972f98aeb54bd29e599e5c6af85 2025-04-02T07:42:19Z 2025-04-02T07:42:19Z tests/libc: Remove errno check Roberto E. Vargas Caballero k0ga@shike2.net commit 1127a487c737f972f98aeb54bd29e599e5c6af85 parent a6e12fcc40f07b3e465dba61249f86e1b2b25d38 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 2 Apr 2025 09:42:19 +0200 tests/libc: Remove errno check Mbstowcs() and Wctomb() are not supposed to set errno, or at least is not required by the specification. a6e12fcc40f07b3e465dba61249f86e1b2b25d38 2025-03-28T11:49:17Z 2025-03-28T11:49:17Z libc/wchar: Remove useless state in wc* Roberto E. Vargas Caballero k0ga@shike2.net commit a6e12fcc40f07b3e465dba61249f86e1b2b25d38 parent 68ad37c9bee5f12c0804f165a5176e4bbf4b4898 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 28 Mar 2025 12:49:17 +0100 libc/wchar: Remove useless state in wc* We don't use state in conversions from wchar to mb, so it is useless to have static variables that don't mean anything. 68ad37c9bee5f12c0804f165a5176e4bbf4b4898 2025-03-28T08:42:13Z 2025-03-28T08:42:13Z libc/wchar: Simplify mbsrtowc() and mbstowc() Roberto E. Vargas Caballero k0ga@shike2.net commit 68ad37c9bee5f12c0804f165a5176e4bbf4b4898 parent 29f51dd9ea6407ff5d6386d7dc82cd499185533e Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 28 Mar 2025 09:42:13 +0100 libc/wchar: Simplify mbsrtowc() and mbstowc() We only support UTF8, that is stateless, and as mbsrtowc() cannot return -2 then we do know that the internal state of mbsrtowc() will be always set to the initial state, so we can reuse it from mbstowcs(). Also, mbsrtowcs() had a bug and it was incrementing the number of wchar stored in the output buffer when mbrtowc() returned -2. Not a big issue because we try to read MB_LEN_MAX, and longer sequences will eventually return -1 and the value of n will not be used. 29f51dd9ea6407ff5d6386d7dc82cd499185533e 2025-03-27T21:11:35Z 2025-03-27T21:11:35Z libc/wchar: Remove state from mbtowc() Roberto E. Vargas Caballero k0ga@shike2.net commit 29f51dd9ea6407ff5d6386d7dc82cd499185533e parent 115f7694ce1502f57bb72b9e34d8816c5224e843 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 27 Mar 2025 22:11:35 +0100 libc/wchar: Remove state from mbtowc() As we only support utf8 it does not make sense to keep state in mbtowc() because as we cannot differentiate between an incorrect sequence and a non complete sequence then there is not actual use case for that state. We still keep the static variable because we don't want to use the internal state from mbrtowc(), and as this function is not safe thread anyway it is not a problem to have that variable, whose value will be always correct, except when mbrtowc() returns -2 and in that case we have to clear it. The C99 specification does not specify any errno value when mbtowc() fails, but it allows changes to errno even when it is not directly specified in the standard, so it is not a problem to implement mbtowc() using mbrtowc() which sets errno when it cannot translate a full multibyte sequence. 115f7694ce1502f57bb72b9e34d8816c5224e843 2025-03-27T12:09:21Z 2025-03-27T14:39:20Z tests/cc: Reuse 0193-incomplete Roberto E. Vargas Caballero k0ga@shike2.net commit 115f7694ce1502f57bb72b9e34d8816c5224e843 parent 0cc26f9abb8c7f8a5ad30563d63bda35a5345322 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 27 Mar 2025 13:09:21 +0100 tests/cc: Reuse 0193-incomplete This test was a copy of 0180-imcomplete, and the issue [i] stated that using an incomplete array type as parameter of a function is UB. In our case we accept it, but it makes more sense to give an error in that case. Rework in 0180 is expected. This test is reused to check that an extern struct can be declared with incomplete type. [i] https://www.open-std.org/jtc1/sc22/wg14/issues/c90/issue0047.html 0cc26f9abb8c7f8a5ad30563d63bda35a5345322 2025-03-26T13:46:30Z 2025-03-26T13:46:30Z libc/wchar: Add wcspbrk() Roberto E. Vargas Caballero k0ga@shike2.net commit 0cc26f9abb8c7f8a5ad30563d63bda35a5345322 parent 281fd80448d875367f4be096a00ebbc847a06c1b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 26 Mar 2025 14:46:30 +0100 libc/wchar: Add wcspbrk() 281fd80448d875367f4be096a00ebbc847a06c1b 2025-03-26T13:41:30Z 2025-03-26T13:41:30Z libc/string: Simplify strpbrk() Roberto E. Vargas Caballero k0ga@shike2.net commit 281fd80448d875367f4be096a00ebbc847a06c1b parent 5a4639f2e13052cfd4ff099cf1fcee020af58a55 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 26 Mar 2025 14:41:30 +0100 libc/string: Simplify strpbrk() Strpbrk() is trivial if strcspn() is used. 5a4639f2e13052cfd4ff099cf1fcee020af58a55 2025-03-26T13:34:58Z 2025-03-26T13:34:58Z libc/wchar: Add wcscspn() Roberto E. Vargas Caballero k0ga@shike2.net commit 5a4639f2e13052cfd4ff099cf1fcee020af58a55 parent d21aa5a5a185cacd7a63439788287ef6564ad5e2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 26 Mar 2025 14:34:58 +0100 libc/wchar: Add wcscspn() d21aa5a5a185cacd7a63439788287ef6564ad5e2 2025-03-26T13:26:21Z 2025-03-26T13:29:56Z libc/wchar: Add wcsspn() Roberto E. Vargas Caballero k0ga@shike2.net commit d21aa5a5a185cacd7a63439788287ef6564ad5e2 parent aef615310c0729e97e4ad5a2e4206266660679a2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 26 Mar 2025 14:26:21 +0100 libc/wchar: Add wcsspn() aef615310c0729e97e4ad5a2e4206266660679a2 2025-03-26T13:14:28Z 2025-03-26T13:14:28Z libc/wchar: Add wcsxfrm() Roberto E. Vargas Caballero k0ga@shike2.net commit aef615310c0729e97e4ad5a2e4206266660679a2 parent 09245abd272928c778c739e2402517a464b1a678 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Wed, 26 Mar 2025 14:14:28 +0100 libc/wchar: Add wcsxfrm() 09245abd272928c778c739e2402517a464b1a678 2025-03-25T20:44:30Z 2025-03-25T20:44:30Z libc/wchar: Add wcsstr() Roberto E. Vargas Caballero k0ga@shike2.net commit 09245abd272928c778c739e2402517a464b1a678 parent 1b9b9b8ada90d264546916bc65e2867ba3a0fca3 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 21:44:30 +0100 libc/wchar: Add wcsstr() 1b9b9b8ada90d264546916bc65e2867ba3a0fca3 2025-03-25T20:32:52Z 2025-03-25T20:39:12Z libc/wchar: Add wcsrchr() Roberto E. Vargas Caballero k0ga@shike2.net commit 1b9b9b8ada90d264546916bc65e2867ba3a0fca3 parent 8a6918d48bb8ecbc1c2af2c72b2e89a3df3a999b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 21:32:52 +0100 libc/wchar: Add wcsrchr() 8a6918d48bb8ecbc1c2af2c72b2e89a3df3a999b 2025-03-25T20:26:58Z 2025-03-25T20:26:58Z libc/wchar: Add wcschr() Roberto E. Vargas Caballero k0ga@shike2.net commit 8a6918d48bb8ecbc1c2af2c72b2e89a3df3a999b parent 4ac2c9373b1004d4176807d0b106c97cbdab8163 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 21:26:58 +0100 libc/wchar: Add wcschr() 4ac2c9373b1004d4176807d0b106c97cbdab8163 2025-03-25T19:56:32Z 2025-03-25T20:14:20Z libc/wchar: Add wcsncat() Roberto E. Vargas Caballero k0ga@shike2.net commit 4ac2c9373b1004d4176807d0b106c97cbdab8163 parent 949d7de20391cbcb0a6ce10cf2080abb7914b6b5 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 20:56:32 +0100 libc/wchar: Add wcsncat() 949d7de20391cbcb0a6ce10cf2080abb7914b6b5 2025-03-25T19:50:32Z 2025-03-25T19:55:37Z libc/wchar: Add wcscat() Roberto E. Vargas Caballero k0ga@shike2.net commit 949d7de20391cbcb0a6ce10cf2080abb7914b6b5 parent 7aa86bd1b38fb9ddd568ed8c13f534a274f50fbb Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 20:50:32 +0100 libc/wchar: Add wcscat() 7aa86bd1b38fb9ddd568ed8c13f534a274f50fbb 2025-03-25T19:34:38Z 2025-03-25T19:34:38Z libc/wchar: Add wcsncpy() Roberto E. Vargas Caballero k0ga@shike2.net commit 7aa86bd1b38fb9ddd568ed8c13f534a274f50fbb parent 7dcb0d9d9eee6306f01cf4788b8eef1fa9baa9c7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 20:34:38 +0100 libc/wchar: Add wcsncpy() 7dcb0d9d9eee6306f01cf4788b8eef1fa9baa9c7 2025-03-25T18:49:46Z 2025-03-25T18:49:46Z libc/wchar: Add wmemset() Roberto E. Vargas Caballero k0ga@shike2.net commit 7dcb0d9d9eee6306f01cf4788b8eef1fa9baa9c7 parent d7543e2d9e5bc064ac6f1b2469511aae17f0ad52 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 19:49:46 +0100 libc/wchar: Add wmemset() d7543e2d9e5bc064ac6f1b2469511aae17f0ad52 2025-03-25T18:35:22Z 2025-03-25T18:39:26Z tests/wchar: Add wmemmove() Roberto E. Vargas Caballero k0ga@shike2.net commit d7543e2d9e5bc064ac6f1b2469511aae17f0ad52 parent 32c148f21e31e4db0d6f05298c8f5b2d2ad7d9c1 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 19:35:22 +0100 tests/wchar: Add wmemmove() 32c148f21e31e4db0d6f05298c8f5b2d2ad7d9c1 2025-03-25T18:15:00Z 2025-03-25T18:39:26Z libc/wchar: Add wmemcmp() Roberto E. Vargas Caballero k0ga@shike2.net commit 32c148f21e31e4db0d6f05298c8f5b2d2ad7d9c1 parent f82bc6684d7c33065ce616b79528e7a0e439d1df Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 19:15:00 +0100 libc/wchar: Add wmemcmp() f82bc6684d7c33065ce616b79528e7a0e439d1df 2025-03-25T18:03:27Z 2025-03-25T18:39:26Z libc/wchar: Add wmemcpy() Roberto E. Vargas Caballero k0ga@shike2.net commit f82bc6684d7c33065ce616b79528e7a0e439d1df parent 391c2dacb748852e77bfe811556b145ecdda684b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 19:03:27 +0100 libc/wchar: Add wmemcpy() 391c2dacb748852e77bfe811556b145ecdda684b 2025-03-25T17:36:39Z 2025-03-25T17:36:39Z libc/string: Improve memchr() Roberto E. Vargas Caballero k0ga@shike2.net commit 391c2dacb748852e77bfe811556b145ecdda684b parent bbb33960d11eacc45a1ea00d60bf46a39ae9693b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 18:36:39 +0100 libc/string: Improve memchr() No need to increment something to decrement it later. bbb33960d11eacc45a1ea00d60bf46a39ae9693b 2025-03-25T17:30:34Z 2025-03-25T17:30:34Z libc/wchar: Add wmemchr() Roberto E. Vargas Caballero k0ga@shike2.net commit bbb33960d11eacc45a1ea00d60bf46a39ae9693b parent 3b42911841f616a37e3fa7bd5f4ad7177ce959cf Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 18:30:34 +0100 libc/wchar: Add wmemchr() 3b42911841f616a37e3fa7bd5f4ad7177ce959cf 2025-03-25T09:52:47Z 2025-03-25T09:52:47Z Merge remote-tracking branch 'origin/master' into wchar Roberto E. Vargas Caballero k0ga@shike2.com commit 3b42911841f616a37e3fa7bd5f4ad7177ce959cf parent b96ef460770e7d0bf335cbadbed7efd2db08199e Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Tue, 25 Mar 2025 10:52:47 +0100 Merge remote-tracking branch 'origin/master' into wchar b96ef460770e7d0bf335cbadbed7efd2db08199e 2025-03-25T09:50:48Z 2025-03-25T09:50:48Z libc/stdio: Remove unneeded initialization Roberto E. Vargas Caballero k0ga@shike2.com commit b96ef460770e7d0bf335cbadbed7efd2db08199e parent f507bae3a0e45b6f9eeadecb3065afaea1a6d6bc Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Tue, 25 Mar 2025 10:50:48 +0100 libc/stdio: Remove unneeded initialization The cnt variable is later initialized in the for loop. 8a18b4fd343760cf387e59ca9d27ffc2ef9b1ffa 2025-03-25T07:21:50Z 2025-03-25T07:21:50Z tests/libc: Add a new invalid utf-8 test case Roberto E. Vargas Caballero k0ga@shike2.net commit 8a18b4fd343760cf387e59ca9d27ffc2ef9b1ffa parent 94d009f0d25f0426186fe0f209abc1f229c47d12 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Tue, 25 Mar 2025 08:21:50 +0100 tests/libc: Add a new invalid utf-8 test case This test case test a overlong encoding for the character 'A'. While we were testing overlong encodings, we were using some special cases like the NUL character, and having a more normal ASCII case covers some additional paths in the code. 94d009f0d25f0426186fe0f209abc1f229c47d12 2025-03-24T08:54:26Z 2025-03-24T08:54:26Z libc/wchar: Add wcscpy() Roberto E. Vargas Caballero k0ga@shike2.net commit 94d009f0d25f0426186fe0f209abc1f229c47d12 parent c5af9fc33eda2506eebc629d07a09e637e3311f2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Mon, 24 Mar 2025 09:54:26 +0100 libc/wchar: Add wcscpy() c5af9fc33eda2506eebc629d07a09e637e3311f2 2025-03-22T09:32:25Z 2025-03-22T09:32:25Z libc/stdlib: Use state in mbstowcs and wcstombs Roberto E. Vargas Caballero k0ga@shike2.net commit c5af9fc33eda2506eebc629d07a09e637e3311f2 parent 32ebae08d603f27be737d19728d48f2a9859de50 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 22 Mar 2025 10:32:25 +0100 libc/stdlib: Use state in mbstowcs and wcstombs These functions should behave as if mbrstowcs() and wcsrtombs() were not called, and for that reason they need their own internal state instead of using the state from them. 32ebae08d603f27be737d19728d48f2a9859de50 2025-03-22T09:27:54Z 2025-03-22T09:30:39Z libc/wchar: Add wcscoll() Roberto E. Vargas Caballero k0ga@shike2.net commit 32ebae08d603f27be737d19728d48f2a9859de50 parent 36606c7df70f2465a4305395c529e7ea1add693f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Sat, 22 Mar 2025 10:27:54 +0100 libc/wchar: Add wcscoll() 36606c7df70f2465a4305395c529e7ea1add693f 2025-03-21T18:23:17Z 2025-03-21T18:23:17Z tests/libc: Add 0042-mbsrtowc Roberto E. Vargas Caballero k0ga@shike2.net commit 36606c7df70f2465a4305395c529e7ea1add693f parent 01921365fc084e3b592c00bdd090d0d457502904 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 19:23:17 +0100 tests/libc: Add 0042-mbsrtowc 01921365fc084e3b592c00bdd090d0d457502904 2025-03-21T18:21:44Z 2025-03-21T18:21:44Z libc/wchar: Add wcsncmp() Roberto E. Vargas Caballero k0ga@shike2.net commit 01921365fc084e3b592c00bdd090d0d457502904 parent e5399b363bcd8af06edc6bb4ba9edb034bcbe728 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 19:21:44 +0100 libc/wchar: Add wcsncmp() e5399b363bcd8af06edc6bb4ba9edb034bcbe728 2025-03-21T10:43:34Z 2025-03-21T10:43:34Z tests/libc: Add 0045-wcscmp Roberto E. Vargas Caballero k0ga@shike2.net commit e5399b363bcd8af06edc6bb4ba9edb034bcbe728 parent e74078b4eed9b2365e67d58f97d2964bec425aac Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 11:43:34 +0100 tests/libc: Add 0045-wcscmp e74078b4eed9b2365e67d58f97d2964bec425aac 2025-03-21T10:42:59Z 2025-03-21T10:42:59Z libc/wchar: Add wcscmp() Roberto E. Vargas Caballero k0ga@shike2.net commit e74078b4eed9b2365e67d58f97d2964bec425aac parent d55ef47946e20f9acb7601cb3c05247056c802e4 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 11:42:59 +0100 libc/wchar: Add wcscmp() d55ef47946e20f9acb7601cb3c05247056c802e4 2025-03-21T10:41:53Z 2025-03-21T10:41:53Z libc/string: Simplify strcmp Roberto E. Vargas Caballero k0ga@shike2.net commit d55ef47946e20f9acb7601cb3c05247056c802e4 parent 3f16edee3f63d37bcd7f41aec82daec377faf09f Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 11:41:53 +0100 libc/string: Simplify strcmp 3f16edee3f63d37bcd7f41aec82daec377faf09f 2025-03-21T10:21:51Z 2025-03-21T10:21:51Z libc/wchar: Group mem and str functions Roberto E. Vargas Caballero k0ga@shike2.net commit 3f16edee3f63d37bcd7f41aec82daec377faf09f parent e9db6f680a03e9d71d1b4091560599c84448cd39 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 11:21:51 +0100 libc/wchar: Group mem and str functions This separation makes easier to know what functions are implemented and what functions are not implemented. e9db6f680a03e9d71d1b4091560599c84448cd39 2025-03-21T10:20:42Z 2025-03-21T10:20:42Z tests/libc: Add 0044-wcslen test Roberto E. Vargas Caballero k0ga@shike2.net commit e9db6f680a03e9d71d1b4091560599c84448cd39 parent 0827b4938a966940d42e0382c4fd16d325110c8d Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 11:20:42 +0100 tests/libc: Add 0044-wcslen test 0827b4938a966940d42e0382c4fd16d325110c8d 2025-03-21T08:14:06Z 2025-03-21T08:14:06Z libc/wchar: Group single wchar I/O functions Roberto E. Vargas Caballero k0ga@shike2.net commit 0827b4938a966940d42e0382c4fd16d325110c8d parent e7d90888786b65dee9fec9deb9c880857d6e4d8c Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 09:14:06 +0100 libc/wchar: Group single wchar I/O functions This makes easier to know the functions that still has to be implemented and makes easier to know the not implemented functions. It also adds the macro definition for getwc(). The macro definitions for getwchar() and for putwchar() were considered, but as they required a definition of the stdin or stdout macros (or the full defition of FILE to have access to the __iob array) it was considered worthless and they will just have the function library definition. e7d90888786b65dee9fec9deb9c880857d6e4d8c 2025-03-21T07:51:48Z 2025-03-21T07:51:48Z tests/libc: Add 0041-mbrlen to .gitignore Roberto E. Vargas Caballero k0ga@shike2.net commit e7d90888786b65dee9fec9deb9c880857d6e4d8c parent 8b488b39369013d53b7fea4419f213e7b04a6604 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 21 Mar 2025 08:51:48 +0100 tests/libc: Add 0041-mbrlen to .gitignore 8b488b39369013d53b7fea4419f213e7b04a6604 2025-03-20T21:29:25Z 2025-03-20T21:29:25Z libc/wchar: Remove macros for mblen and mbrlen Roberto E. Vargas Caballero k0ga@shike2.net commit 8b488b39369013d53b7fea4419f213e7b04a6604 parent a378af318684a868015e1efa73b14ab525d3ac27 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 22:29:25 +0100 libc/wchar: Remove macros for mblen and mbrlen These macros were using the hidden state from mbrtowc() that violates the constraint of the standard that specifies that the libc should behave as mbrtowc() is not called internally by the own libc. a378af318684a868015e1efa73b14ab525d3ac27 2025-03-20T19:28:37Z 2025-03-20T19:35:12Z tests/libc: Add 0041-mbrlen() Roberto E. Vargas Caballero k0ga@shike2.net commit a378af318684a868015e1efa73b14ab525d3ac27 parent c675740de75457783b309d357f586a768cf31fed Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 20:28:37 +0100 tests/libc: Add 0041-mbrlen() c675740de75457783b309d357f586a768cf31fed 2025-03-20T19:23:33Z 2025-03-20T19:35:12Z libc/stdlib: Use internal state in wctomb() Roberto E. Vargas Caballero k0ga@shike2.net commit c675740de75457783b309d357f586a768cf31fed parent 6f13ed360e15b5daa1df2c2de39dc93422db4255 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 20:23:33 +0100 libc/stdlib: Use internal state in wctomb() Wctomb() must behave as if the function wcrtomb() is not called (in other words, it should not use the internal hidden state of wcrtomb()) and for that reason its own static mbstate_t variable. 6f13ed360e15b5daa1df2c2de39dc93422db4255 2025-03-20T19:07:17Z 2025-03-20T19:35:12Z libc/wchar: Use hidden state in mblen and mbrlen Roberto E. Vargas Caballero k0ga@shike2.net commit 6f13ed360e15b5daa1df2c2de39dc93422db4255 parent abc7bb9f69d648be0457170d1f491594cbb2f7e7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 20:07:17 +0100 libc/wchar: Use hidden state in mblen and mbrlen These functions have a hidden state and they should behave as if they don't call mbrtowc (not using the internal hidden state of mbrtowc) and the return value of mblen() has to be adjusted because it cannot return -2 in the same way that mbrtowc() does. abc7bb9f69d648be0457170d1f491594cbb2f7e7 2025-03-20T16:05:17Z 2025-03-20T16:05:17Z tests/libc: Add 0040-wcrtomb Roberto E. Vargas Caballero k0ga@shike2.net commit abc7bb9f69d648be0457170d1f491594cbb2f7e7 parent 94afd0b6e12799c59effe955f41b3aaf53003ed7 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 17:05:17 +0100 tests/libc: Add 0040-wcrtomb 94afd0b6e12799c59effe955f41b3aaf53003ed7 2025-03-20T16:01:44Z 2025-03-20T16:01:44Z libc/wchar: Fix unicode range Roberto E. Vargas Caballero k0ga@shike2.net commit 94afd0b6e12799c59effe955f41b3aaf53003ed7 parent d0c96fd6db74dca3d53aca43116de9597c43944b Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 17:01:44 +0100 libc/wchar: Fix unicode range Unicode codepoints are defined to be smaller than 0x110000, but the table missed a 0, defining wrongly the last invalid range. d0c96fd6db74dca3d53aca43116de9597c43944b 2025-03-20T09:58:51Z 2025-03-20T09:58:51Z make: Add more debug output Roberto E. Vargas Caballero k0ga@shike2.net commit d0c96fd6db74dca3d53aca43116de9597c43944b parent d66da367d6d4052bdcea205b600c84fa30de2bd2 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Thu, 20 Mar 2025 10:58:51 +0100 make: Add more debug output d66da367d6d4052bdcea205b600c84fa30de2bd2 2025-03-17T16:26:12Z 2025-03-17T16:26:12Z tests/make: Add 0107-inference Roberto E. Vargas Caballero k0ga@shike2.com commit d66da367d6d4052bdcea205b600c84fa30de2bd2 parent 61c6638246049b2085f1ef70e5b478c088d1f7da Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Mon, 17 Mar 2025 17:26:12 +0100 tests/make: Add 0107-inference 61c6638246049b2085f1ef70e5b478c088d1f7da 2025-03-17T15:58:03Z 2025-03-17T15:58:03Z make: Check target name in dependencies Roberto E. Vargas Caballero k0ga@shike2.com commit 61c6638246049b2085f1ef70e5b478c088d1f7da parent 5bc57804faae91164edcd9f3aec054da4825b423 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Mon, 17 Mar 2025 16:58:03 +0100 make: Check target name in dependencies A target can have (and usually they have) dependencies with other files, so we cannot assume that if we have a dependency with build actions then we have a rule that is able to build the target, because the build actions can be for other target.