X-Spam-Check-By: sourceware.org X-T2-Posting-ID: dCnToGxhL58ot4EWY8b+QGwMembwLoz1X2yB7MdtIiA= X-Cloudmark-Score: 0.000000 [] Date: Thu, 12 Jan 2006 19:08:32 +0100 From: Samuel Thibault To: cygwin AT cygwin DOT com Subject: Re: Define _POSIX_SOURCE in cygwin's features.h? Message-ID: <20060112180832.GA4855@bouh.residence.ens-lyon.fr> Mail-Followup-To: cygwin AT cygwin DOT com References: <20060112173104 DOT GA30011 AT trixie DOT casa DOT cgf DOT cx> <20060112175908 DOT GB30108 AT trixie DOT casa DOT cgf DOT cx> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20060112175908.GB30108@trixie.casa.cgf.cx> User-Agent: Mutt/1.5.9i-nntp X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 Hi, Christopher Faylor, le Thu 12 Jan 2006 12:59:08 -0500, a écrit : > >>Someone on the cygwin irc channel had a problem building a package > >>which would have been solved if Cygwin defined _POSIX_SOURCE. If the package doesn't define _POSIX_SOURCE itself then it needs be fixed, not cygwin. > _POSIX_SOURCE is defined in features.h on linux under control of the > _GNU_SOURCE macro. Indeed. > /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ > #ifdef _GNU_SOURCE ... > # define _POSIX_SOURCE 1 ... > #endif > > So, let me clarify. Should we define _POSIX_SOURCE similarly to the way > that linux does it? This may mean that we have to define _GNU_SOURCE > also and maybe that's not a good idea but, again, it might solve more > problems than it causes. No. It can create a lot of other problems. Maybe cygwin could #define _POSIX_SOURCE to 1 if the user _already_ defined _GNU_SOURCE. But a portable program should _not_ assume that #defining _GNU_SOURCE implies that _POSIX_SOURCE. If a program not only needs posix stuff but also some GNU extras, it should #define _GNU_SOURCE _and_ _POSIX_SOURCE itself. Regards, Samuel -- 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/