Skip to content

Commit 5c7ae18

Browse files
authored
apply code review
1 parent dbd486c commit 5c7ae18

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Modules/mmapmodule.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ my_getallocationgranularity (void)
6060

6161
#endif
6262

63+
#if !defined(DONT_USE_SEH) && !(defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM))
64+
// Only the WINDOWS_DESKTOP and WINDOWS_SYSTEM API partitions support lsa handling we want to
65+
// perform in there
66+
#define DONT_USE_SEH
67+
#endif
68+
6369
#ifdef UNIX
6470
#include <sys/mman.h>
6571
#include <sys/stat.h>
@@ -292,7 +298,7 @@ filter_page_exception_method(mmap_object *self, EXCEPTION_POINTERS *ptrs,
292298
}
293299
#endif
294300

295-
#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) && !defined(DONT_USE_SEH)
301+
#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH)
296302
#define HANDLE_INVALID_MEM(sourcecode) \
297303
do { \
298304
EXCEPTION_RECORD record; \
@@ -320,7 +326,7 @@ do { \
320326
} while (0)
321327
#endif
322328

323-
#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) && !defined(DONT_USE_SEH)
329+
#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH)
324330
#define HANDLE_INVALID_MEM_METHOD(self, sourcecode) \
325331
do { \
326332
EXCEPTION_RECORD record; \

0 commit comments

Comments
 (0)