-
Kirill Smelkov authored
mmap returns void* and indicates failure via MAP_FAILED that is defined to be ((void *)-1). Every mmap call has to be checked for failure and thus posix.mman with mmap, but without MAP_FAILED is not very useful. We cannot declare MAP_FAILED as enum, because enum assumes int. However Cython documentation says 4. If the header file uses macros to define constants, translate them into a normal external variable declaration. ... (https://cython.readthedocs.io/en/latest/src/userguide/external_C_code.html#referencing-c-header-files) So add proper declaration for MAP_FAILED to make posix.mman.mmap usable. (cherry picked from commit 67253049)
7047d62c