NetBSD has MAP_ANON, and MAP_ANONYMOUS looks odd to me. I tried to find what POSIX says, and it seems MAP_ANON* is not part of the required definition of mmap:
http://www.opengroup.org/onlinepubs/009695399/functions/mmap.html I am pretty sure mmap originated around 4.2BSD, so would think that 4.4BSD-derived systems would have the historically correct definition for MAP_ANON. On my mac (10.5.7) sys/mman.h has MAP_ANON and not MAP_ANONYMOUS. Does MAP_ANON work on linux? Any reason not to just use MAP_ANON? Index: src/main.c =================================================================== --- src/main.c (revision 1796) +++ src/main.c (working copy) @@ -703,7 +703,7 @@ { unsigned long pagesize = sysconf(_SC_PAGE_SIZE); DEBUG_1("SIGBUS %p", info->si_addr); - mmap((void *)(((unsigned long)info->si_addr / pagesize) * pagesize), pagesize, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + mmap((void *)(((unsigned long)info->si_addr / pagesize) * pagesize), pagesize, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANON, -1, 0); } #endif
pgpE2ZIjspgsV.pgp
Description: PGP signature
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel