[libc-commits] [libc] [libc][c11] implement ctime (PR #107285)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Sep 4 16:06:58 PDT 2024
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=,
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/107285 at github.com>
https://github.com/michaelrj-google commented:
This is a good start, but I think we can simplify the code a bit. You'll also need to update the build system in a few places:
- [ ] add `ctime` and `ctime_r` to [`libc/config/linux/x86_64`](https://github.com/llvm/llvm-project/blob/main/libc/config/linux/x86_64/entrypoints.txt#L1004) as well as any other targets you want to enable these on.
- [ ] add `ctime` and `ctime_r` to the headergen files
- [ ] for newheadergen you can run the "add_function" command described here: https://libc.llvm.org/dev/header_generation.html (the standard is `stdc` and the guard and attribute should each be `null`).
- [ ] for old headergen you'll still have to add them manually in [`libc/spec/stdc.td`](https://github.com/llvm/llvm-project/blob/main/libc/spec/stdc.td#L1590)
Feel free to reach out if you have questions on how to do any of this, and thank you for the contribution!
https://github.com/llvm/llvm-project/pull/107285
More information about the libc-commits
mailing list