diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-03 01:21:20 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-03 01:21:20 +0000 |
commit | ce8d9b4a0d2c16ff2d634ce6c4b00a9156cc55f3 (patch) | |
tree | 72d1524d4893aab0378901ffde25e1e07d448c5c /win32/win32.c | |
parent | 378258bd0b5c98d9752fc2a3e259d7f5d6d7a653 (diff) |
* configure.in, {bcc32,win32,wince}/Makefile.sub (HAVE_SNPRINTF,
HAVE_VSNPRINTF): use win32/win32.c's implementation instead of
missing/vsnprintf.c's.
* win32/win32.[ch] (rb_w32_snprintf, rb_w32_vsnprintf): reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 02fbbdeb70..7345f3d2df 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3600,6 +3600,26 @@ rb_w32_utime(const char *path, struct utimbuf *times) } int +rb_w32_vsnprintf(char *buf, size_t size, const char *format, va_list va) +{ + int ret = _vsnprintf(buf, size, format, va); + if (size > 0) buf[size - 1] = 0; + return ret; +} + +int +rb_w32_snprintf(char *buf, size_t size, const char *format, ...) +{ + int ret; + va_list va; + + va_start(va, format); + ret = vsnprintf(buf, size, format, va); + va_end(va); + return ret; +} + +int rb_w32_mkdir(const char *path, int mode) { int ret = -1; |