diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/qml/cpp/mmemwin.cpp')
-rw-r--r-- | Godeps/_workspace/src/github.com/obscuren/qml/cpp/mmemwin.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cpp/mmemwin.cpp b/Godeps/_workspace/src/github.com/obscuren/qml/cpp/mmemwin.cpp deleted file mode 100644 index 7aa3bff2b..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cpp/mmemwin.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include <windows.h> - -#define protREAD 1 -#define protWRITE 2 -#define protEXEC 4 - -extern "C" { - -int mprotect(void *addr, size_t len, int prot) -{ - DWORD wprot = 0; - if (prot & protWRITE) { - wprot = PAGE_READWRITE; - } else if (prot & protREAD) { - wprot = PAGE_READONLY; - } - if (prot & protEXEC) { - wprot <<= 4; - } - DWORD oldwprot; - if (!VirtualProtect(addr, len, wprot, &oldwprot)) { - return -1; - } - return 0; -} - -} // extern "C" |