aboutsummaryrefslogtreecommitdiff
path: root/C/7zWindows.h
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2023-06-21 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2023-12-17 14:59:19 +0500
commit5b39dc76f1bc82f941d5c800ab9f34407a06b53a (patch)
treefe5e17420300b715021a76328444088d32047963 /C/7zWindows.h
parent93be7d4abfd4233228f58ee1fbbcd76d91be66a4 (diff)
download7zip-23.01.tar.gz
7zip-23.01.tar.bz2
7zip-23.01.zip
23.0123.01
Diffstat (limited to 'C/7zWindows.h')
-rw-r--r--C/7zWindows.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/C/7zWindows.h b/C/7zWindows.h
new file mode 100644
index 0000000..42c6db8
--- /dev/null
+++ b/C/7zWindows.h
@@ -0,0 +1,101 @@
1/* 7zWindows.h -- StdAfx
22023-04-02 : Igor Pavlov : Public domain */
3
4#ifndef ZIP7_INC_7Z_WINDOWS_H
5#define ZIP7_INC_7Z_WINDOWS_H
6
7#ifdef _WIN32
8
9#if defined(__clang__)
10# pragma clang diagnostic push
11#endif
12
13#if defined(_MSC_VER)
14
15#pragma warning(push)
16#pragma warning(disable : 4668) // '_WIN32_WINNT' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
17
18#if _MSC_VER == 1900
19// for old kit10 versions
20// #pragma warning(disable : 4255) // winuser.h(13979): warning C4255: 'GetThreadDpiAwarenessContext':
21#endif
22// win10 Windows Kit:
23#endif // _MSC_VER
24
25#if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
26// for msvc6 without sdk2003
27#define RPC_NO_WINDOWS_H
28#endif
29
30#if defined(__MINGW32__) || defined(__MINGW64__)
31// #if defined(__GNUC__) && !defined(__clang__)
32#include <windows.h>
33#else
34#include <Windows.h>
35#endif
36// #include <basetsd.h>
37// #include <wtypes.h>
38
39// but if precompiled with clang-cl then we need
40// #include <windows.h>
41#if defined(_MSC_VER)
42#pragma warning(pop)
43#endif
44
45#if defined(__clang__)
46# pragma clang diagnostic pop
47#endif
48
49#if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
50#ifndef _W64
51
52typedef long LONG_PTR, *PLONG_PTR;
53typedef unsigned long ULONG_PTR, *PULONG_PTR;
54typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
55
56#define Z7_OLD_WIN_SDK
57#endif // _W64
58#endif // _MSC_VER == 1200
59
60#ifdef Z7_OLD_WIN_SDK
61
62#ifndef INVALID_FILE_ATTRIBUTES
63#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
64#endif
65#ifndef INVALID_SET_FILE_POINTER
66#define INVALID_SET_FILE_POINTER ((DWORD)-1)
67#endif
68#ifndef FILE_SPECIAL_ACCESS
69#define FILE_SPECIAL_ACCESS (FILE_ANY_ACCESS)
70#endif
71
72// ShlObj.h:
73// #define BIF_NEWDIALOGSTYLE 0x0040
74
75#pragma warning(disable : 4201)
76// #pragma warning(disable : 4115)
77
78#undef VARIANT_TRUE
79#define VARIANT_TRUE ((VARIANT_BOOL)-1)
80#endif
81
82#endif // Z7_OLD_WIN_SDK
83
84#ifdef UNDER_CE
85#undef VARIANT_TRUE
86#define VARIANT_TRUE ((VARIANT_BOOL)-1)
87#endif
88
89
90#if defined(_MSC_VER)
91#if _MSC_VER >= 1400 && _MSC_VER <= 1600
92 // BaseTsd.h(148) : 'HandleToULong' : unreferenced inline function has been removed
93 // string.h
94 // #pragma warning(disable : 4514)
95#endif
96#endif
97
98
99/* #include "7zTypes.h" */
100
101#endif