xref: /third_party/lzma/C/7zWindows.h (revision 370b324c)
1370b324cSopenharmony_ci/* 7zWindows.h -- StdAfx
2370b324cSopenharmony_ci2023-04-02 : Igor Pavlov : Public domain */
3370b324cSopenharmony_ci
4370b324cSopenharmony_ci#ifndef ZIP7_INC_7Z_WINDOWS_H
5370b324cSopenharmony_ci#define ZIP7_INC_7Z_WINDOWS_H
6370b324cSopenharmony_ci
7370b324cSopenharmony_ci#ifdef _WIN32
8370b324cSopenharmony_ci
9370b324cSopenharmony_ci#if defined(__clang__)
10370b324cSopenharmony_ci# pragma clang diagnostic push
11370b324cSopenharmony_ci#endif
12370b324cSopenharmony_ci
13370b324cSopenharmony_ci#if defined(_MSC_VER)
14370b324cSopenharmony_ci
15370b324cSopenharmony_ci#pragma warning(push)
16370b324cSopenharmony_ci#pragma warning(disable : 4668) // '_WIN32_WINNT' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
17370b324cSopenharmony_ci
18370b324cSopenharmony_ci#if _MSC_VER == 1900
19370b324cSopenharmony_ci// for old kit10 versions
20370b324cSopenharmony_ci// #pragma warning(disable : 4255) // winuser.h(13979): warning C4255: 'GetThreadDpiAwarenessContext':
21370b324cSopenharmony_ci#endif
22370b324cSopenharmony_ci// win10 Windows Kit:
23370b324cSopenharmony_ci#endif // _MSC_VER
24370b324cSopenharmony_ci
25370b324cSopenharmony_ci#if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
26370b324cSopenharmony_ci// for msvc6 without sdk2003
27370b324cSopenharmony_ci#define RPC_NO_WINDOWS_H
28370b324cSopenharmony_ci#endif
29370b324cSopenharmony_ci
30370b324cSopenharmony_ci#if defined(__MINGW32__) || defined(__MINGW64__)
31370b324cSopenharmony_ci// #if defined(__GNUC__) && !defined(__clang__)
32370b324cSopenharmony_ci#include <windows.h>
33370b324cSopenharmony_ci#else
34370b324cSopenharmony_ci#include <Windows.h>
35370b324cSopenharmony_ci#endif
36370b324cSopenharmony_ci// #include <basetsd.h>
37370b324cSopenharmony_ci// #include <wtypes.h>
38370b324cSopenharmony_ci
39370b324cSopenharmony_ci// but if precompiled with clang-cl then we need
40370b324cSopenharmony_ci// #include <windows.h>
41370b324cSopenharmony_ci#if defined(_MSC_VER)
42370b324cSopenharmony_ci#pragma warning(pop)
43370b324cSopenharmony_ci#endif
44370b324cSopenharmony_ci
45370b324cSopenharmony_ci#if defined(__clang__)
46370b324cSopenharmony_ci# pragma clang diagnostic pop
47370b324cSopenharmony_ci#endif
48370b324cSopenharmony_ci
49370b324cSopenharmony_ci#if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
50370b324cSopenharmony_ci#ifndef _W64
51370b324cSopenharmony_ci
52370b324cSopenharmony_citypedef long LONG_PTR, *PLONG_PTR;
53370b324cSopenharmony_citypedef unsigned long ULONG_PTR, *PULONG_PTR;
54370b324cSopenharmony_citypedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
55370b324cSopenharmony_ci
56370b324cSopenharmony_ci#define Z7_OLD_WIN_SDK
57370b324cSopenharmony_ci#endif // _W64
58370b324cSopenharmony_ci#endif // _MSC_VER == 1200
59370b324cSopenharmony_ci
60370b324cSopenharmony_ci#ifdef Z7_OLD_WIN_SDK
61370b324cSopenharmony_ci
62370b324cSopenharmony_ci#ifndef INVALID_FILE_ATTRIBUTES
63370b324cSopenharmony_ci#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
64370b324cSopenharmony_ci#endif
65370b324cSopenharmony_ci#ifndef INVALID_SET_FILE_POINTER
66370b324cSopenharmony_ci#define INVALID_SET_FILE_POINTER ((DWORD)-1)
67370b324cSopenharmony_ci#endif
68370b324cSopenharmony_ci#ifndef FILE_SPECIAL_ACCESS
69370b324cSopenharmony_ci#define FILE_SPECIAL_ACCESS    (FILE_ANY_ACCESS)
70370b324cSopenharmony_ci#endif
71370b324cSopenharmony_ci
72370b324cSopenharmony_ci// ShlObj.h:
73370b324cSopenharmony_ci// #define BIF_NEWDIALOGSTYLE     0x0040
74370b324cSopenharmony_ci
75370b324cSopenharmony_ci#pragma warning(disable : 4201)
76370b324cSopenharmony_ci// #pragma warning(disable : 4115)
77370b324cSopenharmony_ci
78370b324cSopenharmony_ci#undef  VARIANT_TRUE
79370b324cSopenharmony_ci#define VARIANT_TRUE ((VARIANT_BOOL)-1)
80370b324cSopenharmony_ci#endif
81370b324cSopenharmony_ci
82370b324cSopenharmony_ci#endif // Z7_OLD_WIN_SDK
83370b324cSopenharmony_ci
84370b324cSopenharmony_ci#ifdef UNDER_CE
85370b324cSopenharmony_ci#undef  VARIANT_TRUE
86370b324cSopenharmony_ci#define VARIANT_TRUE ((VARIANT_BOOL)-1)
87370b324cSopenharmony_ci#endif
88370b324cSopenharmony_ci
89370b324cSopenharmony_ci
90370b324cSopenharmony_ci#if defined(_MSC_VER)
91370b324cSopenharmony_ci#if _MSC_VER >= 1400 && _MSC_VER <= 1600
92370b324cSopenharmony_ci  // BaseTsd.h(148) : 'HandleToULong' : unreferenced inline function has been removed
93370b324cSopenharmony_ci  // string.h
94370b324cSopenharmony_ci  // #pragma warning(disable : 4514)
95370b324cSopenharmony_ci#endif
96370b324cSopenharmony_ci#endif
97370b324cSopenharmony_ci
98370b324cSopenharmony_ci
99370b324cSopenharmony_ci/* #include "7zTypes.h" */
100370b324cSopenharmony_ci
101370b324cSopenharmony_ci#endif
102