X-Spam-Check-By: sourceware.org Date: Fri, 13 Jan 2006 11:13:40 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Define _POSIX_SOURCE in cygwin's features.h? Message-ID: <20060113161340.GB17052@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <20060112173104 DOT GA30011 AT trixie DOT casa DOT cgf DOT cx> <43C7BD94 DOT 7090704 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43C7BD94.7090704@byu.net> User-Agent: Mutt/1.5.11 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 On Fri, Jan 13, 2006 at 07:47:48AM -0700, Eric Blake wrote: >Now what does this all mean to cygwin? Most apps don't care about strict >compliance - they are more than willing to use extensions if it makes it >easier to get the job done, so most apps don't define _POSIX_SOURCE or >_POSIX_C_SOURCE before including headers. I agree with Samuel's >conclusion - we can use the Linux trick of having a default configuration >of gcc that turns on _GNU_SOURCE (itself a feature test, that turns on all >other extensions), provided that gcc can also be told to be strictly >compliant to a given standard (gcc's -ansi flag, among others). Thank you for your feedback. I was just going to silently digest this but I can't let this particular one slide. I don't see how you credit *Samuel* with any conclusions other than the one that anyone who used _POSIX_SOURCE in source code was stupid and that I needed to read a book on posix. After making those observations for a couple of paragraphs he quoted a snippet of a header file that *I* included and said "Well, that's ok then". I'm glad to have his permission on this, though. So, let me state a few things: 0) It is cygwin's goal to emulate linux (as per the cygwin web page). 1) linux defines _POSIX_SOURCE by default unless specific gcc command line options are specified (as per the code snippet that I posted). 2) I want cygwin to be *more* like linux (as per my repeated assertions in this thread and elsewhere). 3) The fact that the cygwin header files are currently inconsistent, and probably wrong, wrt _POSIX_SOURCE does not preclude fixing them to make them more like linux. Conclusion: newlib's headers are not close enough to glibc headers and that is what is causing people problems. Task for 1.5.20: Make cygwin's header files more like the linux header files. I'm sorry that my goals here were not clearer from my original message. I don't need anymore feedback about this. cgf -- 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/