diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 00:35:59 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-01 00:35:59 +0000 |
commit | 586c174922fc3be5181a59585ec27a75f6b29a1c (patch) | |
tree | 9d7e706ce42dc0bc8a0b7039781acc68ce455d68 | |
parent | ed0858a8c5b193f91423c7043a0f34083db5724d (diff) |
* missing/explicit_bzero.c: add a few comment.
* missing/explicit_bzero.c: add disabling optimization on gcc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | missing/explicit_bzero.c | 9 |
2 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,11 @@ +Tue Dec 1 09:35:29 2015 KOSAKI Motohiro <[email protected]> + + * missing/explicit_bzero.c: add a few comment. + +Tue Dec 1 09:31:19 2015 KOSAKI Motohiro <[email protected]> + + * missing/explicit_bzero.c: add disabling optimization on gcc. + Tue Dec 1 07:50:33 2015 Eric Wong <[email protected]> * missing/explicit_bzero.c: new file. define explicit_bzero. diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c index f140acb374..c89bdbc0a8 100644 --- a/missing/explicit_bzero.c +++ b/missing/explicit_bzero.c @@ -7,6 +7,15 @@ Linux has none. *Sigh* */ +/* + * Following URL explain why memset_s is added to the standard. + * http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1381.pdf + */ + +#ifdef __GNUC__ +#pragma GCC optimize ("O0") +#endif + #ifndef HAVE_EXPLICIT_BZERO /* Similar to bzero(), but have a guarantee not to be eliminated from compiler optimization. */ |