diff options
author | thegeorg <thegeorg@yandex-team.com> | 2024-05-18 00:46:52 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2024-05-18 00:57:03 +0300 |
commit | 144a9c52e58b6386dd6929c1d95a11d04bc8eaa5 (patch) | |
tree | b633d50f211b16604dc3aed9ad4fc7f563ebc7b2 /contrib/tools/bison/lib/win_sdk10.h | |
parent | 6bb04f40e291c6fc3ac8e556d561d59eed0a49b9 (diff) | |
download | ydb-144a9c52e58b6386dd6929c1d95a11d04bc8eaa5.tar.gz |
Flatten bison/gnulib/src to bison/lib to match upstream layout
2f47b5eab59c8031971bd995b703c854fd6f106d
Diffstat (limited to 'contrib/tools/bison/lib/win_sdk10.h')
-rw-r--r-- | contrib/tools/bison/lib/win_sdk10.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/contrib/tools/bison/lib/win_sdk10.h b/contrib/tools/bison/lib/win_sdk10.h new file mode 100644 index 0000000000..76e5c86ccd --- /dev/null +++ b/contrib/tools/bison/lib/win_sdk10.h @@ -0,0 +1,55 @@ +#pragma once + +#if defined(_MSC_VER) + +#include <ntverp.h> + +// Check for Windows SDK 10+ +#if defined(VER_PRODUCTBUILD) && VER_PRODUCTBUILD >= 9600 +#define WIN_SDK10 1 +#else +#define WIN_SDK10 0 +#endif + +// Since Windows SDK 10 FILE is an internal opaque structure with no backward compatibility. +// This code has been transplanted from Windows SDK +// corecrt_internal_stdio.h + +// __crt_stdio_stream_data +#if WIN_SDK10 +typedef struct { + union { + void* _public_file; + char* _ptr; + }; + + char* _base; + int _cnt; + long _flags; + long _file; + int _charbuf; + int _bufsiz; + char* _tmpfname; + //CRITICAL_SECTION _lock; +} TWinSdk10File; + +enum EWinSdk10ModeBits { + WIN_SDK10_IOREAD = 0x0001, + WIN_SDK10_IOWRITE = 0x0002, + WIN_SDK10_IOUPDATE = 0x0004, + WIN_SDK10_IOEOF = 0x0008, + WIN_SDK10_IOERROR = 0x0010, + WIN_SDK10_IOCTRLZ = 0x0020, + WIN_SDK10_IOBUFFER_CRT = 0x0040, + WIN_SDK10_IOBUFFER_USER = 0x0080, + WIN_SDK10_IOBUFFER_SETVBUF = 0x0100, + WIN_SDK10_IOBUFFER_STBUF = 0x0200, + WIN_SDK10_IOBUFFER_NONE = 0x0400, + WIN_SDK10_IOCOMMIT = 0x0800, + WIN_SDK10_IOSTRING = 0x1000, + WIN_SDK10_IOALLOCATED = 0x2000, +}; +#endif + +#endif + |