* 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
This commit is contained in:
usa 2011-06-03 11:58:11 +00:00
parent d1a7670baf
commit 799fafc03b
3 changed files with 10 additions and 2 deletions

View File

@ -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> 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 * io.c (io_fflush): windows -- call fsync() only when the FD is tied to

View File

@ -80,6 +80,10 @@ RUBY_EXTERN int dup2(int, int);
RUBY_EXTERN int eaccess(const char*, int); RUBY_EXTERN int eaccess(const char*, int);
#endif #endif
#ifndef HAVE_ROUND
RUBY_EXTERN double round(double); /* numeric.c */
#endif
#ifndef HAVE_FINITE #ifndef HAVE_FINITE
RUBY_EXTERN int finite(double); RUBY_EXTERN int finite(double);
#endif #endif

View File

@ -78,8 +78,6 @@ const unsigned char rb_nan[] = "\x00\x00\xc0\x7f";
const unsigned char rb_nan[] = "\x7f\xc0\x00\x00"; const unsigned char rb_nan[] = "\x7f\xc0\x00\x00";
#endif #endif
extern double round(double);
#ifndef HAVE_ROUND #ifndef HAVE_ROUND
double double
round(double x) round(double x)