Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jan 2000 19:36:11 -0500 (EST)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        current@FreeBSD.ORG, jasone@canonware.com
Subject:   Re:  __sigisempty() undefined if "cc -g" used.
Message-ID:  <200001080036.TAA05054@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> In an effort to chase down a libc_r bug, I compiled libc_r with CFLAGS=-g
> (and later CFLAGS=-g3), but ran into linker problems as a result.
> 
> blitz:~> gcc poll.c -pthread
> /usr/lib/libc_r.so: undefined reference to `__sigisempty'
> 
> Even the simplest of C programs will get this linker error if using the
> -pthread option.
> 
> So, __sigisempty is an inline function, defined in
> /usr/include/sys/signalvar.h:
> 
> extern __inline int
> __sigisempty(sigset_t *set)
> {
> 	int i;
> 
> 	for (i = 0; i < _SIG_WORDS; i++) {
> 	    if (set->__bits[i])
> 		return (0);
> 		}
> 		return (1);
> }
> 
It doesn't make much sense to have an "extern" inline function, gcc probably
was confused by this, change "extern" to "static" and try again.

-lq


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001080036.TAA05054>