diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-22 03:05:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-22 03:05:20 +0000 |
commit | 9f3b77e43571744e04f2853e5e37671db2a7ddd7 (patch) | |
tree | edd09e0e5530a5ad7300a96b8344dbcd3a7079cd /include/ruby/missing.h | |
parent | 0f6e6c8bbc4dd37868336019669582059edfda3f (diff) | |
download | ruby-9f3b77e43571744e04f2853e5e37671db2a7ddd7.tar.gz |
* 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/trunk@20909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/missing.h')
-rw-r--r-- | include/ruby/missing.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/ruby/missing.h b/include/ruby/missing.h index 16d5a6f02b..ea40f62a52 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -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 |