summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:05:48 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:05:48 (GMT)
commitff113d52f799d433b6d5d96f86944d2d761e3530 (patch)
treee578c9cded5ee54d954d5bfa28f6517633b7ddd4 /missing
parent586c174922fc3be5181a59585ec27a75f6b29a1c (diff)
configure.in: FUNC_UNOPTIMIZED
* configure.in: check if optimize pragma is supported. * include/ruby/defines.h (FUNC_UNOPTIMIZED): fallback definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/explicit_bzero.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/missing/explicit_bzero.c b/missing/explicit_bzero.c
index c89bdbc..e7bb11e 100644
--- a/missing/explicit_bzero.c
+++ b/missing/explicit_bzero.c
@@ -12,13 +12,15 @@
* http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1381.pdf
*/
-#ifdef __GNUC__
-#pragma GCC optimize ("O0")
+#ifndef FUNC_UNOPTIMIZED
+# define FUNC_UNOPTIMIZED(x) x
#endif
#ifndef HAVE_EXPLICIT_BZERO
/* Similar to bzero(), but have a guarantee not to be eliminated from compiler
optimization. */
+FUNC_UNOPTIMIZED(void explicit_bzero(void *b, size_t len));
+
void
explicit_bzero(void *b, size_t len)
{