| My guess is that this means you're not including <signal.h>. The prototype of
sigwait(), unfortunately, changed between POSIX draft 4 and the final
standard. Because we were already using "sigwait" as the name, and we had to
retain binary compatibility (a real pain), the POSIX sigwait is called
__sigwaitd10. This is transparent if you build correctly, because <signal.h>
fixes up your reference to the proper name when you're building for POSIX
threads.
When you build -threads, you link against libpthreads.so, the "legacy"
library, which has a sigwait entry point. But libpthread.so has only
__sigwaitd10, so when you build -pthread, your reference to sigwait goes
unresolved.
First, you should always include <signal.h>. Second, make sure that you're
using the right prototype for sigwait. The draft 4 version returned the
signal number as the function value, and accepted a single argument (the
signal mask). The POSIX version returns an error code, and takes two
arguments (the signal mask and a pointer to an int that receives the signal
number that occurred).
Of course, if you ARE including <signal.h> in every source file that calls
sigwait(), then something else is wrong. Perhaps you've confused the
<signal.h> conditionals with some "unusual" combination of -D definitions,
for example. In this case, please post the complete build command so we can
try to figure out what may be happening.
/dave
|