Subversion Repositories eduke32

Rev

Rev 5001 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5001 Rev 5037
Line 154... Line 154...
154
}
154
}
155
155
156
#if defined _WIN32
156
#if defined _WIN32
157
# define WIN32_LEAN_AND_MEAN
157
# define WIN32_LEAN_AND_MEAN
158
# include <windows.h>
158
# include <windows.h>
159
#elif defined __linux || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __APPLE__
159
#elif defined __linux || defined EDUKE32_BSD || defined __APPLE__
160
# include <sys/mman.h>
160
# include <sys/mman.h>
161
#endif
161
#endif
162
162
163
#if !defined(NOASM) && !defined(GEKKO) && !defined(__ANDROID__)
163
#if !defined(NOASM) && !defined(GEKKO) && !defined(__ANDROID__)
164
#ifdef __cplusplus
164
#ifdef __cplusplus
Line 179... Line 179...
179
    if (!VirtualProtect((LPVOID) beg, (SIZE_T)end - (SIZE_T)beg, PAGE_EXECUTE_READWRITE, &oldprot))
179
    if (!VirtualProtect((LPVOID) beg, (SIZE_T)end - (SIZE_T)beg, PAGE_EXECUTE_READWRITE, &oldprot))
180
    {
180
    {
181
        initprintf("VirtualProtect() error! Crashing in 3... 2... 1...\n");
181
        initprintf("VirtualProtect() error! Crashing in 3... 2... 1...\n");
182
        return 1;
182
        return 1;
183
    }
183
    }
184
# elif defined __linux || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __APPLE__
184
# elif defined __linux || defined EDUKE32_BSD || defined __APPLE__
185
    int32_t pagesize;
185
    int32_t pagesize;
186
    size_t dep_begin_page;
186
    size_t dep_begin_page;
187
    pagesize = sysconf(_SC_PAGE_SIZE);
187
    pagesize = sysconf(_SC_PAGE_SIZE);
188
    if (pagesize == -1)
188
    if (pagesize == -1)
189
    {
189
    {