diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 01:24:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 01:24:23 +0000 |
commit | 4c0b4704bb3859c7888524087e1e7d740f4d3682 (patch) | |
tree | 75c147df0d9fd813cfb7dace70739c2b2b6dcccc /missing | |
parent | ecbe5be43968de534a6587499ef370a169c36c94 (diff) | |
download | ruby-4c0b4704bb3859c7888524087e1e7d740f4d3682.tar.gz |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c index e7bb11e69f..c1933bf1ff 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) |