You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we switch to C11, the availability of the memset_s function under Macos is
detected by autoconf. The explicit_bzero.c module will use it to implement
explicit_bzero(3) on that system.
According to N1570, Annex K, in order for the string.h header to declare
memset_s(), we need to define __STDC_WANT_LIB_EXT1__ as 1 before including the
header file. The libc implementation is in turn supposed to define
__STDC_LIB_EXT1__ in the header, to claim that the interfaces of Annex K are
implemented as dictated by the standard.
In theory, we should be using memset_s() only if __STDC_LIB_EXT1__ is defined,
but we know that memset_s() exists thanks to autoconf. Since the Macos libc
does not define __STDC_LIB_EXT1__, we can not be 100% sure that the memset_s()
function is implemented in a standard way.
0 commit comments