← Back to context Comment by bitwize 8 days ago Should be using strcpy_s or strncpy_s. 5 comments bitwize Reply eqvinox 6 days ago Annex K (which is what that is) is sufficiently unpopular as to have been under discussion to be removed from the standard. Few implementations exist, and even fewer conform to the standard (e.g. Microsoft's doesn't).https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htmFurthermore, since the kernel uses no C library, it's the kernel developer's choices what to implement and use. rurban 3 days ago Unpopular because it came from Microsoft. But it works, and with my safeclib even usable in the kernel.The cited document is outdated. This is a better overview: https://rurban.github.io/safeclib/doc/safec-3.9/d6/d31/md_do... sidewndr46 6 days ago Isn't Microsoft the same group that still won't allow you to write "import <cstdint>" in C++ ? pjmlp 5 days ago VC++ has the only actually usable header units implementation across C++ compilers. wpollock 7 days ago > Should be using strcpy_s or strncpy_sThese functions are optional in the C standard and not always present. AFAIK, they are not included in glibc as of 2025.
eqvinox 6 days ago Annex K (which is what that is) is sufficiently unpopular as to have been under discussion to be removed from the standard. Few implementations exist, and even fewer conform to the standard (e.g. Microsoft's doesn't).https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htmFurthermore, since the kernel uses no C library, it's the kernel developer's choices what to implement and use. rurban 3 days ago Unpopular because it came from Microsoft. But it works, and with my safeclib even usable in the kernel.The cited document is outdated. This is a better overview: https://rurban.github.io/safeclib/doc/safec-3.9/d6/d31/md_do... sidewndr46 6 days ago Isn't Microsoft the same group that still won't allow you to write "import <cstdint>" in C++ ? pjmlp 5 days ago VC++ has the only actually usable header units implementation across C++ compilers.
rurban 3 days ago Unpopular because it came from Microsoft. But it works, and with my safeclib even usable in the kernel.The cited document is outdated. This is a better overview: https://rurban.github.io/safeclib/doc/safec-3.9/d6/d31/md_do...
sidewndr46 6 days ago Isn't Microsoft the same group that still won't allow you to write "import <cstdint>" in C++ ? pjmlp 5 days ago VC++ has the only actually usable header units implementation across C++ compilers.
wpollock 7 days ago > Should be using strcpy_s or strncpy_sThese functions are optional in the C standard and not always present. AFAIK, they are not included in glibc as of 2025.
Annex K (which is what that is) is sufficiently unpopular as to have been under discussion to be removed from the standard. Few implementations exist, and even fewer conform to the standard (e.g. Microsoft's doesn't).
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm
Furthermore, since the kernel uses no C library, it's the kernel developer's choices what to implement and use.
Unpopular because it came from Microsoft. But it works, and with my safeclib even usable in the kernel.
The cited document is outdated. This is a better overview: https://rurban.github.io/safeclib/doc/safec-3.9/d6/d31/md_do...
Isn't Microsoft the same group that still won't allow you to write "import <cstdint>" in C++ ?
VC++ has the only actually usable header units implementation across C++ compilers.
> Should be using strcpy_s or strncpy_s
These functions are optional in the C standard and not always present. AFAIK, they are not included in glibc as of 2025.