From: Mark Hubbart Date: 2004-05-24T06:12:47+09:00 Subject: compiling mmap? Hi, I'm having some trouble getting Guy's mmap to compile on my box. I was certain that I had compiled it once before; but now I can't get it to work. This is on MacOSX 10.3.3 (powerpc-darwin7.0). The initial failure was that MCL_CURRENT and MLC_FUTURE are not defined: mark@imac% make gcc -fno-common -g -O2 -fno-common -pipe -fno-common -DHAVE_RB_STR_LSTRIP -DHAVE_RB_STR_MATCH -DHAVE_RB_STR_INSERT -DHAVE_RB_STR_CASECMP -I. -I/usr/local/lib/ruby/1.9/powerpc-darwin -I/usr/local/lib/ruby/1.9/powerpc-darwin -I. -c mmap.c mmap.c:1:2: invalid preprocessing directive #def mmap.c: In function `Init_mmap': mmap.c:1726: error: `MCL_CURRENT' undeclared (first use in this function) mmap.c:1726: error: (Each undeclared identifier is reported only once mmap.c:1726: error: for each function it appears in.) mmap.c:1727: error: `MCL_FUTURE' undeclared (first use in this function) make: *** [mmap.o] Error 1 It appeared that they were supposed to be defined in 'mman.h', so I looked in there: --- #ifdef _P1003_1B_VISIBLE /* * Process memory locking */ #define MCL_CURRENT 0x0001 /* Lock only current memory */ #define MCL_FUTURE 0x0002 /* Lock all future memory as well */ #endif /* _P1003_1B_VISIBLE */ --- ...and a quick search suggests that _P1003_1B_VISIBLE is undefined. #defining _P1003_1B_VISIBLE at the top of mmap.c allows it to compile, but running 'make test' generates a bus error on the 13th test. Any help would be greatly appreciated. thanks, --Mark