Skip to content

Commit ad0f307

Browse files
committed
Fixed Win32 x86 build
1 parent 8f3ae23 commit ad0f307

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/isql/isql.epp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,15 @@ enum literal_string_type
9999

100100
#if defined(WIN_NT)
101101
#include <windows.h>
102+
103+
// Check if Windows SDK version is above v7
104+
#include <sdkddkver.h>
105+
#ifdef _WIN32_WINNT_WIN8
102106
#include <VersionHelpers.h>
103107
#endif
108+
109+
#endif
110+
104111
#include "ibase.h"
105112
#include "../isql/isql.h"
106113
#include "../yvalve/perf.h"
@@ -352,7 +359,12 @@ static int win32ReadConsole(FILE* file, CharBuffer& mbBuffer)
352359
// buffers and set ERROR_NOT_ENOUGH_MEMORY error. Thus, use initial buffer size
353360
// twice less than for Windows 10 and handle error by reducing the buffer size.
354361

362+
#ifdef _WIN32_WINNT_WIN8
355363
static size_t maxLineLength = IsWindows10OrGreater() ? MAX_USHORT : MAX_SSHORT;
364+
#else
365+
static size_t maxLineLength = MAX_SSHORT;
366+
#endif
367+
356368
WCHAR* wideBuf = wideBuffer->getBuffer(maxLineLength, false);
357369

358370
DWORD charsRead;

0 commit comments

Comments
 (0)