summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-03 11:58:11 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-03 11:58:11 +0000
commit799fafc03b2a654de82d4bd0375dce5537edb88c (patch)
tree2990220479ede0e4afd78ecb148a9aa06e2e37ec
parentd1a7670bafb97ea31e16c2055ca846425d2bad69 (diff)
* include/ruby/missing.h, numeric.c (round): moved prototype of round()
from numeric.c to missing.h. (note: round() is C99 feature, so ruby provides it if not exists in C runtime.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--include/ruby/missing.h4
-rw-r--r--numeric.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c166c11062..22b4a3177e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jun 3 20:56:40 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * include/ruby/missing.h, numeric.c (round): moved prototype of round()
+ from numeric.c to missing.h. (note: round() is C99 feature, so ruby
+ provides it if not exists in C runtime.)
+
Fri Jun 3 19:58:14 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* io.c (io_fflush): windows -- call fsync() only when the FD is tied to
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index 7cb2d9233c4..1a1aa958ac4 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -80,6 +80,10 @@ RUBY_EXTERN int dup2(int, int);
RUBY_EXTERN int eaccess(const char*, int);
#endif
+#ifndef HAVE_ROUND
+RUBY_EXTERN double round(double); /* numeric.c */
+#endif
+
#ifndef HAVE_FINITE
RUBY_EXTERN int finite(double);
#endif
diff --git a/numeric.c b/numeric.c
index 0c419e1be7f..95dc7bbab46 100644
--- a/numeric.c
+++ b/numeric.c
@@ -78,8 +78,6 @@ const unsigned char rb_nan[] = "\x00\x00\xc0\x7f";
const unsigned char rb_nan[] = "\x7f\xc0\x00\x00";
#endif
-extern double round(double);
-
#ifndef HAVE_ROUND
double
round(double x)