summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:24:23 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:24:23 (GMT)
commit10bb9e6faba749c3e9656b9088da77b3f1146937 (patch)
tree75c147df0d9fd813cfb7dace70739c2b2b6dcccc /missing
parentff113d52f799d433b6d5d96f86944d2d761e3530 (diff)
missing.h: explicit_bzero by memset_s
* include/ruby/missing.h (explicit_bzero_by_memset_s): call memset_s directly if available. * missing/explicit_bzero.c: optimization is not a matter if memset_s is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/explicit_bzero.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c
index e7bb11e..c1933bf 100644
--- a/missing/explicit_bzero.c
+++ b/missing/explicit_bzero.c
@@ -19,7 +19,11 @@
#ifndef HAVE_EXPLICIT_BZERO
/* Similar to bzero(), but have a guarantee not to be eliminated from compiler
optimization. */
+
+#ifndef HAVE_MEMSET_S
FUNC_UNOPTIMIZED(void explicit_bzero(void *b, size_t len));
+#endif
+#undef explicit_bzero
void
explicit_bzero(void *b, size_t len)