aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-30 22:53:21 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-30 22:53:21 +0000
commit511244bc355f7d8c00e90e81d8f999835ffb4d50 (patch)
treee8e15286c18b16c62400364f0cbd33307bd35c89
parent195649b511c5b2aa1c441af8254e41dad4c22123 (diff)
downloadruby-511244bc355f7d8c00e90e81d8f999835ffb4d50.tar.gz
missing/explicit_bzero.c: Fixup r52806
Maybe kosaki had a better version, but CI failure emails are annoying. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--missing/explicit_bzero.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b7adcb60e..f6c4ffd2df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Dec 1 07:50:33 2015 Eric Wong <e@80x24.org>
+
+ * missing/explicit_bzero.c: new file. define explicit_bzero.
+ Fixup r52806
+
Thu Oct 22 12:54:43 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread_pthread.c (register_ubf_list): renamed from
@@ -88,7 +93,6 @@ Wed Oct 21 08:23:36 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Sun Oct 18 17:26:53 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * missing/explicit_bzero.c: new file. define explicit_bzero.
* common.mk: add a rule for explicit.o.
* configure.in: detect explicit_bzero and memset_s.
* include/ruby/missing.h: add explicit_bzero.
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c
new file mode 100644
index 0000000000..cb11bd6da1
--- /dev/null
+++ b/missing/explicit_bzero.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+/* prevent the compiler from optimizing away memset or bzero */
+void
+explicit_bzero(void *p, size_t n)
+{
+ memset(p, 0, n);
+}