Am 29.11.16 um 11:18 schrieb Gert Doering:
> Hi,
>
> On Tue, Nov 29, 2016 at 11:07:12AM +0100, Arne Schwabe wrote:
>> I think we should prefer memset_s if available since it is a C11 standard.
> Since we're currently compiling against C99, we can't rely on it being
> there (in my OS Zoo, only MacOS seems to have it, at least "have a manpage
> for it" - not even FreeBSD 11 or "gentoo current") - but then, configure 
> could check that for us...
I wouldn't add a configure test for that. According to
http://en.cppreference.com/w/c/string/byte/memset:

As all bounds-checked functions, |memset_s| is only guaranteed to be
available if __STDC_LIB_EXT1__ is defined by the implementation and if
the user defines __STDC_WANT_LIB_EXT1__ to the integer constant 1 before
including |string.h|.

so preprocessor magic can check that.
>
> Shall we merge the current patch anyway, as the memory barrier does the
> job on all current compilers, and add a memset_s() variant "whenever 
> one of us finds time to add and test this"?
>
Yes. Go ahead. I might
------------------------------------------------------------------------------
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to