roken: Add memset_s implementation

Add an implementation of memset_s to roken.

Some optimising compilers may remove the memset() instruction when it
is used immediately before a free, which defeats its purpose if the
intention is to zero memory before returning it to the heap or stack.

C11 added memset_s, provide a fallback in roken so that memset_s can
be used on all platforms.
This commit is contained in:
Simon Wilkinson
2015-03-05 10:34:09 +00:00
parent 745eeb1252
commit 8485250989
5 changed files with 61 additions and 0 deletions

View File

@@ -80,6 +80,7 @@ HEIMDAL_ROKEN_1.0 {
rk_inet_ntop;
rk_inet_pton;
rk_localtime_r;
rk_memset_s;
rk_mkdir;
rk_mkstemp;
rk_pid_file_delete;