Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/ext/lzma-sdk/7zWindows.h
10522 views
1
/* 7zWindows.h -- Windows.h and related code
2
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(_MSC_VER) && _MSC_VER >= 1950 && !defined(__clang__) // VS2026
10
// <Windows.h> and some another windows files need that option
11
// VS2026: wtypesbase.h: warning C4865: 'tagCLSCTX': the underlying type will change from 'int' to 'unsigned int' when '/Zc:enumTypes' is specified on the command line
12
#pragma warning(disable : 4865)
13
#endif
14
15
#if defined(__clang__)
16
# pragma clang diagnostic push
17
#endif
18
19
#if defined(_MSC_VER)
20
21
#pragma warning(push)
22
#pragma warning(disable : 4668) // '_WIN32_WINNT' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
23
24
#if _MSC_VER == 1900
25
// for old kit10 versions
26
// #pragma warning(disable : 4255) // winuser.h(13979): warning C4255: 'GetThreadDpiAwarenessContext':
27
#endif
28
// win10 Windows Kit:
29
#endif // _MSC_VER
30
31
#if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
32
// for msvc6 without sdk2003
33
#define RPC_NO_WINDOWS_H
34
#endif
35
36
#if defined(__MINGW32__) || defined(__MINGW64__)
37
// #if defined(__GNUC__) && !defined(__clang__)
38
#include <windows.h>
39
#else
40
#include <Windows.h>
41
#endif
42
// #include <basetsd.h>
43
// #include <wtypes.h>
44
45
// but if precompiled with clang-cl then we need
46
// #include <windows.h>
47
#if defined(_MSC_VER)
48
#pragma warning(pop)
49
#endif
50
51
#if defined(__clang__)
52
# pragma clang diagnostic pop
53
#endif
54
55
#if defined(_MSC_VER) && _MSC_VER <= 1200 && !defined(_WIN64)
56
#ifndef _W64
57
58
typedef long LONG_PTR, *PLONG_PTR;
59
typedef unsigned long ULONG_PTR, *PULONG_PTR;
60
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
61
62
#define Z7_OLD_WIN_SDK
63
#endif // _W64
64
#endif // _MSC_VER == 1200
65
66
#ifdef Z7_OLD_WIN_SDK
67
68
#ifndef INVALID_FILE_ATTRIBUTES
69
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
70
#endif
71
#ifndef INVALID_SET_FILE_POINTER
72
#define INVALID_SET_FILE_POINTER ((DWORD)-1)
73
#endif
74
#ifndef FILE_SPECIAL_ACCESS
75
#define FILE_SPECIAL_ACCESS (FILE_ANY_ACCESS)
76
#endif
77
78
// ShlObj.h:
79
// #define BIF_NEWDIALOGSTYLE 0x0040
80
81
#pragma warning(disable : 4201)
82
// #pragma warning(disable : 4115)
83
84
#undef VARIANT_TRUE
85
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
86
#endif
87
88
#endif // Z7_OLD_WIN_SDK
89
90
#ifdef UNDER_CE
91
#undef VARIANT_TRUE
92
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
93
#endif
94
95
96
#if defined(_MSC_VER)
97
#if _MSC_VER >= 1400 && _MSC_VER <= 1600
98
// BaseTsd.h(148) : 'HandleToULong' : unreferenced inline function has been removed
99
// string.h
100
// #pragma warning(disable : 4514)
101
#endif
102
#endif
103
104
105
/* #include "7zTypes.h" */
106
107
#endif
108
109