Mac support. default tip
authorNicholas Hastings <skamonkey@gmail.com>
Mon Nov 12 08:36:42 2012 -0500 (2012-11-12)
changeset 1abd35d097176
parent 0 4c53fd0b014e
Mac support.
CDetour/detourhelpers.h
     1.1 --- a/CDetour/detourhelpers.h	Fri Feb 20 15:24:04 2009 +1300
     1.2 +++ b/CDetour/detourhelpers.h	Mon Nov 12 08:36:42 2012 -0500
     1.3 @@ -32,7 +32,7 @@
     1.4  #ifndef _INCLUDE_SOURCEMOD_DETOURHELPERS_H_
     1.5  #define _INCLUDE_SOURCEMOD_DETOURHELPERS_H_
     1.6  
     1.7 -#if defined PLATFORM_LINUX
     1.8 +#if defined PLATFORM_POSIX
     1.9  #include <sys/mman.h>
    1.10  #define	PAGE_SIZE	4096
    1.11  #define ALIGN(ar) ((long)ar & ~(PAGE_SIZE-1))
    1.12 @@ -52,7 +52,7 @@
    1.13  
    1.14  inline void ProtectMemory(void *addr, int length, int prot)
    1.15  {
    1.16 -#if defined PLATFORM_LINUX
    1.17 +#if defined PLATFORM_POSIX
    1.18  	void *addr2 = (void *)ALIGN(addr);
    1.19  	mprotect(addr2, sysconf(_SC_PAGESIZE), prot);
    1.20  #elif defined PLATFORM_WINDOWS