From 745c2e2352967d78e9ca906de74d49af71986356 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 7 Jul 2012 22:17:00 +1000 Subject: [PATCH] Fix other non-win32 compilation for libzpaq. --- libzpaq/libzpaq.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libzpaq/libzpaq.cpp b/libzpaq/libzpaq.cpp index 4efe1a1..50bc59b 100644 --- a/libzpaq/libzpaq.cpp +++ b/libzpaq/libzpaq.cpp @@ -21,7 +21,7 @@ conforming to the ZPAQ level 2 standard. See http://mattmahoney.net/zpaq/ #include #ifndef NOJIT -#ifdef unix +#ifndef _WIN32 #include #else #include @@ -85,7 +85,7 @@ void allocx(U8* &p, int &n, int newsize) { n=0; } if (newsize>0) { -#ifdef unix +#ifndef _WIN32 p=(U8*)mmap(0, newsize, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0); if ((void*)p==MAP_FAILED) p=0; @@ -1844,7 +1844,7 @@ int ZPAQL::assemble() { put5(0x48897424,8); // mov [rsp+8], rsi put5(0x48895424,16); // mov [rsp+16], rdx put5(0x48894c24,24); // mov [rsp+24], rcx -#ifdef unix +#ifndef _WIN32 put2l(0x48bf, this); // mov rdi, this #else // Windows put2l(0x48b9, this); // mov rcx, this @@ -2385,7 +2385,7 @@ int Predictor::assemble_p() { if (S==4) put4(0x8b7c2414); // mov edi,[esp+0x14] ; pr else { -#ifndef unix +#ifdef _WIN32 put3(0x4889cf); // mov rdi, rcx (1st arg in Win64) #endif } @@ -2775,7 +2775,7 @@ int Predictor::assemble_p() { put4(0x8b6c2418); // mov ebp,[esp+0x18] ; (2nd arg = y) } else { -#ifdef unix // (1st arg already in rdi) +#ifndef _WIN32 put3(0x4889f5); // mov rbp, rsi (2nd arg in Linux-64) #else put3(0x4889cf); // mov rdi, rcx (1st arg in Win64)