From owner-freebsd-questions@FreeBSD.ORG Fri Aug 4 06:38:34 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72C6816A4DA; Fri, 4 Aug 2006 06:38:34 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep13-int.chello.at (viefep13-int.chello.at [213.46.255.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA88F43D46; Fri, 4 Aug 2006 06:38:32 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep13-int.chello.at (InterMail vM.6.01.05.04 201-2131-123-105-20051025) with ESMTP id <20060804063830.EYGM6897.viefep13-int.chello.at@wombat.fafoe.narf.at>; Fri, 4 Aug 2006 08:38:30 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id DD063BC7E; Thu, 3 Aug 2006 23:38:39 +0200 (CEST) Date: Thu, 3 Aug 2006 23:38:39 +0200 From: Stefan Farfeleder To: Mikhail Teterin Message-ID: <20060803213839.GH33267@wombat.fafoe.narf.at> Mail-Followup-To: Mikhail Teterin , standards@freebsd.org, questions@freebsd.org References: <200608031547.34386.mi+mx@aldan.algebra.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608031547.34386.mi+mx@aldan.algebra.com> User-Agent: Mutt/1.5.12-2006-07-14 Cc: standards@freebsd.org, questions@freebsd.org Subject: Re: conundrum: _C99_SOURCE vs. sigset X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 06:38:34 -0000 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 header. Stefan