[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conundrum: _C99_SOURCE vs. sigset
- To: Mikhail Teterin <mi+mx_(_at_)_aldan_(_dot_)_algebra_(_dot_)_com>
- Subject: Re: conundrum: _C99_SOURCE vs. sigset
- From: Stefan Farfeleder <stefan_(_at_)_fafoe_(_dot_)_narf_(_dot_)_at>
- Date: Thu, 3 Aug 2006 23:38:39 +0200
- Cc: standards_(_at_)_freebsd_(_dot_)_org, questions_(_at_)_freebsd_(_dot_)_org
- Mail-followup-to: Mikhail Teterin <mi+mx_(_at_)_aldan_(_dot_)_algebra_(_dot_)_com>, standards_(_at_)_freebsd_(_dot_)_org, questions_(_at_)_freebsd_(_dot_)_org
On Thu, Aug 03, 2006 at 03:47:34PM -0400, Mikhail Teterin wrote:
> Hello!
>
> I'm trying to compile a program, which uses threads and has its own daemon
> global variable.
>
> The variable's declaration results in an error:
>
> recsnap.C:50: error: `RTRString daemon' redeclared as different kind of symbol
> /usr/include/stdlib.h:252: error: previous declaration of `int daemon(int,
> int)'
>
> The daemon()'s declaration in stdlib.h can be turned off by declaring either
> _C99_SOURCE or _ANSI_SOURCE. Unfortunately, both of these defines also turn
> off the declaration of sigset_t and fd_set:
>
> /usr/include/pthread.h:233: error: expected `,' or `...' before '*' token
> .../include/rtr/selectni.h:129: error: `fd_set' does not name a type
>
> Can this be solved -- without modifying the vendor's code? Thanks!
Try -D_POSIX_C_SOURCE=200112.
The macro _C99_SOURCE is for pure C99 code and _ANSI_SOURCE for C90
code. Both don't include the <pthread.h> header.
Stefan
_______________________________________________
freebsd-standards_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards
To unsubscribe, send any mail to "freebsd-standards-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org