aboutsummaryrefslogtreecommitdiffstats
path: root/missing
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:05:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-01 01:05:48 +0000
commitecbe5be43968de534a6587499ef370a169c36c94 (patch)
treee578c9cded5ee54d954d5bfa28f6517633b7ddd4 /missing
parent0594c8a04bcd7a9afc1dc658459ce5da83bcf0f3 (diff)
downloadruby-ecbe5be43968de534a6587499ef370a169c36c94.tar.gz
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 c89bdbc0a8..e7bb11e69f 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)
{