Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion etc/c/zlib/gzguts.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@

#ifdef _MSC_VER
# include <io.h>
# define vsnprintf _vsnprintf
# if _MSC_VER < 1500
# define vsnprintf _vsnprintf
# endif
#endif

#ifndef local
Expand Down
7 changes: 6 additions & 1 deletion std/conv.d
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,12 @@ unittest
assert(s2.empty);
x = *cast(longdouble *)&ld;
version (Win64)
ld1 = 0x1.FFFFFFFFFFFFFFFEp-16382L; // strtold currently mapped to strtod
{
static if (real.mant_dig == 64)
ld1 = 0x1.FFFFFFFFFFFFFFFEp-16382L; // strtold currently mapped to strtod
else
ld1 = strtold(s.ptr, null);
}
else
ld1 = strtold(s.ptr, null);
x1 = *cast(longdouble *)&ld1;
Expand Down
9 changes: 6 additions & 3 deletions std/format.d
Original file line number Diff line number Diff line change
Expand Up @@ -3423,7 +3423,8 @@ unittest
}
else version (Win64)
{
assert(stream.data == "1.67 -0X1.47AE14P+0 nan",
assert(stream.data == "1.67 -0X1.47AE147AE147BP+0 nan" // MSVCRT 14+ (VS 2015)
|| stream.data == "1.67 -0X1.47AE14P+0 nan",
stream.data);
}
else
Expand Down Expand Up @@ -3453,7 +3454,8 @@ unittest
//formattedWrite(stream, "%x %X", 1.32);
version (MinGW) { /+ LDC_FIXME: GitHub #383 +/ } else
version (Win64)
assert(stream.data == "0x1.51eb85p+0 0X1.B1EB86P+2");
assert(stream.data == "0x1.51eb851eb851fp+0 0X1.B1EB860000000P+2" // MSVCRT 14+ (VS 2015)
|| stream.data == "0x1.51eb85p+0 0X1.B1EB86P+2");
else
assert(stream.data == "0x1.51eb851eb851fp+0 0X1.B1EB86P+2");
stream.clear();
Expand Down Expand Up @@ -5973,7 +5975,8 @@ unittest
version (MinGW)
assert(s == "1.67 -0XA.3D70A3D70A3D8P-3 nan", s);
else version (Win64)
assert(s == "1.67 -0X1.47AE14P+0 nan", s);
assert(s == "1.67 -0X1.47AE147AE147BP+0 nan" // MSVCRT 14+ (VS 2015)
|| s == "1.67 -0X1.47AE14P+0 nan", s);
else
assert(s == "1.67 -0X1.47AE147AE147BP+0 nan", s);

Expand Down
2 changes: 1 addition & 1 deletion std/outbuffer.d
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class OutBuffer
{
version(Windows)
{
count = _vsnprintf(p,psize,f,args);
count = vsnprintf(p,psize,f,args);
if (count != -1)
break;
psize *= 2;
Expand Down
2 changes: 1 addition & 1 deletion std/stream.d
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ class Stream : InputStream, OutputStream {
version (LDC_X86_64)
throw new Exception("unsupported platform");
else version (Windows) {
count = _vsnprintf(p, psize, f, args);
count = vsnprintf(p, psize, f, args);
if (count != -1)
break;
psize *= 2;
Expand Down