4 ms·
> similar to the Annex K Bounds Checked Interface functions strcpy_s and strcat_s but not quite as good IMHO. Err... I thought Annex K is deprecated and dead?
by teleonorax 7y ago
> similar to the Annex K Bounds Checked Interface functions strcpy_s and strcat_s but not quite as good IMHO.
Err... I thought Annex K is deprecated and dead? Whereas strl* seem very much alive, some compilers even give a "strcpy/strncpy is unsafe, use strlcpy instead" warning.
- AaronBallman 7y agoFWIW, Annex K is not currently deprecated.
- eqvinox 7y agoIt's not commonly available though, e.g. on Linux/BSD systems...
- AaronBallman 7y agoCorrect -- it would be nice if the glibc maintainers would reconsider their opinion of supporting the optional Annex K functionality. There is definitely user demand for the feature.
- beefhash 7y agoAnd every BSD out there. And whatever it is that macOS does. Microsoft looks to be the outlier to me.
- loeg 7y agoMicrosoft does not even implement Annex K. > Microsoft Visual Studio implements an early version of the APIs. However, the implementation is incomplete and conforms neither to C11 nor to the original TR 24731-1. > As a result of the numerous deviations from the specification the Microsoft implementation cannot be considered conforming or portable. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm
- saagarjha 7y agomacOS is POSIX compliant.
- eqvinox 7y ago> rseacord 22 minutes ago [-] > The C Committee has taken two votes on this, and in each case, the committee has been equally divided. Without a consensus to change the standard, the status quo wins. The fact that it has only survived on status quo is a pretty crass hint that things aren't well with Annex K.
- loeg 7y agoIt should be.