1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merges r20909 and r20910 from trunk into ruby_1_9_1.

* configure.in (mingw): no longer uses snprintf and vsnprintf of
  msvcrt.

* win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): removed.

* win32/Makefile.sub (config.h): vsnprintf exists in VC7 or later.

* win32/mkexports.rb (Exports#initialize): aliases
  rb_w32_vsnprintf and rb_w32_snprintf for binary compatibility.

* sprintf.c (rb_str_format): uses snprintf instead of sprintf.

* numeric.c (flo_to_s, rb_num2long, rb_num2ll): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2008-12-25 09:51:10 +00:00
parent 4e541c9dab
commit d9f4570bdd
9 changed files with 49 additions and 43 deletions

View file

@ -144,9 +144,13 @@ RUBY_EXTERN long strtol(const char *, char **, int);
#endif
*/
#ifndef HAVE_VSNPRINTF
#if defined HAVE_VSNPRINTF || defined HAVE_SNPRINTF
# include <stdarg.h>
#endif
#ifndef HAVE_SNPRINTF
RUBY_EXTERN int snprintf(char *, size_t n, char const *, ...);
#endif
#ifndef HAVE_VSNPRINTF
RUBY_EXTERN int vsnprintf(char *, size_t n, char const *, va_list);
#endif