X-Spam-Check-By: sourceware.org Message-ID: <43C7BF14.6030503@byu.net> Date: Fri, 13 Jan 2006 07:54:12 -0700 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Define _POSIX_SOURCE in cygwin's features.h? References: <20060112185350 DOT GG30108 AT trixie DOT casa DOT cgf DOT cx> <20060112192423 DOT GI30108 AT trixie DOT casa DOT cgf DOT 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 AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 AT byu DOT 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/