Skip to content

Commit

Permalink
gcc build fix, more precise compiler version check
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Oct 19, 2017
1 parent 9562347 commit 62056e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions far/changelog
@@ -1,3 +1,11 @@
drkns 19.10.2017 20:23:16 +0100

1. Исправлена сборка в gcc.

2. Поскольку я уже три недели как сломал поддержку gcc 5 и никто не жаловался - минимальная версия теперь 6.0.

3. Для VS2015 проверяется наличие Update 3.

drkns 19.10.2017 01:07:23 +0100 - build 5068

1. Для внутреннего представления времени по возможности используются стандартные time_point и duration вместо FILETIME и голых чисел. Изменения масштабные, возможны баги.
Expand Down
8 changes: 4 additions & 4 deletions far/headers.hpp
Expand Up @@ -94,8 +94,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#undef _W32API_OLD

#ifdef _MSC_VER
# if _MSC_VER < 1900
# error Visual C++ 2015 (or higher) required
# if _MSC_FULL_VER < 190024215
# error Visual C++ 2015 Update 3 (or higher) required
# endif
# include <sdkddkver.h>
# if _WIN32_WINNT < 0x0603
Expand All @@ -107,8 +107,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define GCC_VER_(gcc_major,gcc_minor,gcc_patch) (100*(gcc_major) + 10*(gcc_minor) + (gcc_patch))
# define _GCC_VER GCC_VER_(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)

# if _GCC_VER < GCC_VER_(5,0,0)
# error gcc 5.0.0 (or higher) required
# if _GCC_VER < GCC_VER_(6,0,0)
# error gcc 6.0.0 (or higher) required
# endif

# include <w32api.h>
Expand Down
6 changes: 3 additions & 3 deletions far/hook_wow64.cpp
Expand Up @@ -158,10 +158,10 @@ union
} ur;

if ((ur.h = GetModuleHandleW(k32_w)) == nullptr
|| (IsWow = static_cast<ISWOW>(static_cast<void*>(GetProcAddress(ur.h, wow_c)))) == nullptr
|| (IsWow = reinterpret_cast<ISWOW>(reinterpret_cast<void*>(GetProcAddress(ur.h, wow_c)))) == nullptr
|| !(IsWow(GetCurrentProcess(), &b) && b)
|| (rwow.disable = static_cast<DISABLE>(static_cast<void*>(GetProcAddress(ur.h, dis_c)))) == nullptr
|| (rwow.revert = static_cast<REVERT>(static_cast<void*>(GetProcAddress(ur.h, rev_c)))) == nullptr
|| (rwow.disable = reinterpret_cast<DISABLE>(reinterpret_cast<void*>(GetProcAddress(ur.h, dis_c)))) == nullptr
|| (rwow.revert = reinterpret_cast<REVERT>(reinterpret_cast<void*>(GetProcAddress(ur.h, rev_c)))) == nullptr
|| (ur.h = GetModuleHandleW(ntd_w)) == nullptr
|| (ur.f = GetProcAddress(ur.h, ldr_c)) == nullptr) return;

Expand Down

0 comments on commit 62056e5

Please sign in to comment.