1 /* Precomp.h -- precompilation file
2 2024-01-25 : Igor Pavlov : Public domain */
4 #ifndef ZIP7_INC_PRECOMP_H
5 #define ZIP7_INC_PRECOMP_H
8 this file must be included before another *.h files and before <windows.h>.
9 this file is included from the following files:
11 C\Util\*\Precomp.h <- C\Util\*\*.c
12 CPP\Common\Common.h <- *\StdAfx.h <- *\*.cpp
14 this file can set the following macros:
17 Z7_WIN32_WINNT_MIN 0x0500 (or higher) : we require at least win2000+ for 7-Zip
18 _WIN32_WINNT 0x0500 (or higher)
27 // #pragma warning(disable : 4206) // nonstandard extension used : translation unit is empty
29 // #pragma warning(disable : 5039) // pointer or reference to potentially throwing function passed to 'extern "C"' function under - EHc.Undefined behavior may occur if this function throws an exception.
37 #define _WIN32_WINNT 0x0500 // win2000
39 #define WINVER _WIN32_WINNT
45 this "Precomp.h" file must be included before <windows.h>,
46 if we want to define _WIN32_WINNT before <windows.h>.
49 #ifndef Z7_LARGE_PAGES
50 #ifndef Z7_NO_LARGE_PAGES
51 #define Z7_LARGE_PAGES 1
56 #ifndef Z7_NO_LONG_PATH
57 #define Z7_LONG_PATH 1
61 #ifndef Z7_DEVICE_FILE
62 #ifndef Z7_NO_DEVICE_FILE
63 // #define Z7_DEVICE_FILE 1
67 // we don't change macros if included after <windows.h>
70 #ifndef Z7_WIN32_WINNT_MIN
71 #if defined(_M_ARM64) || defined(__aarch64__)
72 // #define Z7_WIN32_WINNT_MIN 0x0a00 // win10
73 #define Z7_WIN32_WINNT_MIN 0x0600 // vista
74 #elif defined(_M_ARM) && defined(_M_ARMT) && defined(_M_ARM_NT)
75 // #define Z7_WIN32_WINNT_MIN 0x0602 // win8
76 #define Z7_WIN32_WINNT_MIN 0x0600 // vista
77 #elif defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) || defined(_M_IA64)
78 #define Z7_WIN32_WINNT_MIN 0x0503 // win2003
79 // #elif defined(_M_IX86) || defined(__i386__)
80 // #define Z7_WIN32_WINNT_MIN 0x0500 // win2000
81 #else // x86 and another(old) systems
82 #define Z7_WIN32_WINNT_MIN 0x0500 // win2000
83 // #define Z7_WIN32_WINNT_MIN 0x0502 // win2003 // for debug
85 #endif // Z7_WIN32_WINNT_MIN
88 #ifndef Z7_DO_NOT_DEFINE_WIN32_WINNT
90 // #error Stop_Compiling_Bad_WIN32_WINNT
92 #ifndef Z7_NO_DEFINE_WIN32_WINNT
93 Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER
94 #define _WIN32_WINNT Z7_WIN32_WINNT_MIN
95 Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER
97 #endif // _WIN32_WINNT
100 #define WINVER _WIN32_WINNT
102 #endif // Z7_DO_NOT_DEFINE_WIN32_WINNT
106 #ifndef Z7_NO_UNICODE
107 // UNICODE and _UNICODE are used by <windows.h> and by 7-zip code.
114 Z7_DIAGNOSTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER
116 Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER
119 #endif // Z7_NO_UNICODE
123 // #include "7zWindows.h"