X-Spam-Check-By: sourceware.org
Message-ID: <43C7BF14.6030503@byu.net>
Date: Fri, 13 Jan 2006 07:54:12 -0700
From: Eric Blake <ebb9@byu.net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Define _POSIX_SOURCE in cygwin's features.h?
References: <20060112185350.GG30108@trixie.casa.cgf.cx> <SERRANObC8wSA1XvpFV000000cb@SERRANO.CAM.ARTIMI.COM> <20060112192423.GI30108@trixie.casa.cgf.cx>
In-Reply-To: <20060112192423.GI30108@trixie.casa.cgf.cx>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Christopher Faylor on 1/12/2006 12:24 PM:
> This particular application was ircd.  It was testing _POSIX_SOURCE (and
> a few other defines) to determine whether it should use setsid or a
> two-argument version of setpgrp, e.g.:
> 
> #ifdef _POSIX_SOURCE
>     setsid ();
> #else
>     setpgr(..., ...);
> #endif

That is a bug in ircd.  It is ircd's responsibility to define
_POSIX_SOURCE itself if it wants strict POSIX compliance.  In other words,
if ircd wants to guarantee that it will compile on all POSIX-compliant
systems, it should have defined _POSIX_SOURCE and then it could blindly
use setsid() without any further heartburn.  But it is possible to be
portable to more systems than just those that are POSIX-compliant, so the
better approach for ircd would have been to do an autoconf test for the
existance of setsid, whether or not _POSIX_SOURCE was defined, and not a
test for the existance of _POSIX_SOURCE.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDx78U84KuGfSFAYARAqHtAKCPOxmuUCb1bWzkrNcHpUs7tJrNtACgrL9V
X1SSS7bGJHZhfKSNkz8+SSA=
=dXZ3
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

