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

* vsnprintf (BSD_vfprintf): added VC++ compatible size specifications

(I, I32, I64).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2010-11-24 03:50:03 +00:00
parent 220d07d2fc
commit 7329f4e92c
2 changed files with 23 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Wed Nov 24 12:47:16 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* vsnprintf (BSD_vfprintf): added VC++ compatible size specifications
(I, I32, I64).
Wed Nov 24 11:19:13 2010 NARUSE, Yui <naruse@ruby-lang.org>
* string.c (rb_str_inspect): treat UTF-16 and UTF-32 as BE or LE.

View file

@ -758,6 +758,24 @@ reswitch: switch (ch) {
flags |= QUADINT;
goto rflag;
#endif /* _HAVE_SANE_QUAD_ */
#if _WIN32
case 'I':
if (*fmt == '3' && *(fmt + 1) == '2') {
fmt += 2;
flags |= LONGINT;
}
else if (*fmt == '6' && *(fmt + 1) == '4') {
fmt += 2;
flags |= QUADINT;
}
else
#if SIZEOF_SIZE_T == SIZEOF_LONG_LONG
flags |= QUADINT;
#else
flags |= LONGINT;
#endif
goto rflag;
#endif
case 'c':
cp = buf;
*buf = (char)va_arg(ap, int);