Subject: | Missing size_t when using ucontext.h on OS X |
For giggles, I tried using ucontext on OS X. The compilation failed
because size_t is undefined. You probably simply need to include
stddef.h when compiling for ucontext, it was probably getting loaded by
coincidence on other platforms. Its a pretty common OS X thing.
0 windhund /private/var/local/cpan_shell/build/Coro-2.0$ make
cp Coro/State.pm blib/lib/Coro/State.pm
cp Coro/Signal.pm blib/lib/Coro/Signal.pm
cp Coro/SemaphoreSet.pm blib/lib/Coro/SemaphoreSet.pm
cp Coro/RWLock.pm blib/lib/Coro/RWLock.pm
cp Coro/AIO.pm blib/lib/Coro/AIO.pm
cp Coro/Specific.pm blib/lib/Coro/Specific.pm
cp Coro/Semaphore.pm blib/lib/Coro/Semaphore.pm
cp Coro/Timer.pm blib/lib/Coro/Timer.pm
cp Coro/Channel.pm blib/lib/Coro/Channel.pm
cp Coro/CoroAPI.h blib/lib/Coro/CoroAPI.h
cp Coro/MakeMaker.pm blib/lib/Coro/MakeMaker.pm
cp Coro/Cont.pm blib/lib/Coro/Cont.pm
cp Coro.pm blib/lib/Coro.pm
Skip ../blib/lib/Coro/Cont.pm (unchanged)
Skip ../blib/lib/Coro/SemaphoreSet.pm (unchanged)
Skip ../blib/lib/Coro/MakeMaker.pm (unchanged)
Skip ../blib/lib/Coro/Semaphore.pm (unchanged)
Skip ../blib/lib/Coro/AIO.pm (unchanged)
Skip ../blib/lib/Coro/Timer.pm (unchanged)
Skip ../blib/lib/Coro/State.pm (unchanged)
Skip ../blib/lib/Coro/RWLock.pm (unchanged)
Skip ../blib/lib/Coro/Signal.pm (unchanged)
Skip ../blib/lib/Coro/Channel.pm (unchanged)
Skip ../blib/lib/Coro/Specific.pm (unchanged)
/usr/local/bin/perl /usr/local/perl/5.8.8/lib/ExtUtils/xsubpp -typemap
/usr/local/perl/5.8.8/lib/ExtUtils/typemap -typemap typemap State.xs >
State.xsc && mv State.xsc State.c
cc -c -I/sw/include -fno-common -DPERL_DARWIN -no-cpp-precomp
-fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/opt/local/include -O3 -DVERSION=\"1.9\" -DXS_VERSION=\"1.9\"
"-I/usr/local/perl/5.8.8/lib/darwin-thread-multi-2level/CORE"
-DHAVE_MMAP -DCORO_LAZY_STACK -DCORO_UCONTEXT -DSTACKSIZE=16384 State.c
State.xs:857:1: warning: "PRIO_MAX" redefined
In file included from /usr/include/sys/wait.h:111,
from /usr/include/stdlib.h:64,
from
/usr/local/perl/5.8.8/lib/darwin-thread-multi-2level/CORE/perl.h:491,
from State.xs:6:
/usr/include/sys/resource.h:110:1: warning: this is the location of the
previous definition
State.xs:862:1: warning: "PRIO_MIN" redefined
/usr/include/sys/resource.h:109:1: warning: this is the location of the
previous definition
In file included from State.xs:4:
libcoro/coro.c: In function 'coro_create':
libcoro/coro.c:109: error: 'size_t' undeclared (first use in this function)
libcoro/coro.c:109: error: (Each undeclared identifier is reported only once
libcoro/coro.c:109: error: for each function it appears in.)
make[1]: *** [State.o] Error 1
make: *** [subdirs] Error 2