From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26660 invoked by alias); 31 Oct 2016 06:17:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39789 Received: (qmail 7568 invoked from network); 31 Oct 2016 06:17:36 -0000 X-Qmail-Scanner-Diagnostics: from 173-228-5-241.dsl.static.fusionbroadband.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(173.228.5.241):SA:0(0.0/5.0):. Processed in 0.445943 secs); 31 Oct 2016 06:17:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_PASS,TVD_RCVD_IP autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: doctor@fruitbat.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at fruitbat.org designates 173.228.5.241 as permitted sender) Date: Sun, 30 Oct 2016 23:15:31 -0700 (PDT) From: "Peter A. Castro" To: Daniel Shahaf cc: "Jun T." , zsh-workers@zsh.org Subject: Re: [PATCH} define _GNU_SOURCE on Cygwin In-Reply-To: <20161027013438.GB15799@fujitsu.shahaf.local2> Message-ID: References: <9E7FD5B2-061D-4ABE-84A8-A54C844E34BE@kba.biglobe.ne.jp> <20161026105652.GA14865@fujitsu.shahaf.local2> <20161027013438.GB15799@fujitsu.shahaf.local2> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII On Thu, 27 Oct 2016, Daniel Shahaf wrote: Greetings, Daniel and Jun, > Peter A. Castro wrote on Wed, Oct 26, 2016 at 12:55:36 -0700: >> On Wed, 26 Oct 2016, Jun T. wrote: >>> Unless someone still has older cygwin can test the patch, what we >>> can do would be to either go with _GNU_SOURCE (and to see whether >>> incompatibility with older cygwin comes out or not), or just >>> continue using the current code, which generates some warnings >>> but still seems to work fine (the return value of wcwidth() is int, >>> which is what compiler assumes when no prototype is available). >> >> I'll see if I can give it a quick build and let you know. > > Thanks, Peter. > > I wasn't meaning to cause the two of you extra work; I had assumed > defining both _XOPEN_SOURCE and _GNU_SOURCE would work on both old and > new cygwin. I.e., just adding _GNU_SOURCE without removing > _XOPEN_SOURCE. I keep an "older" Cygwin build environment for just such an occasion. :) Now, I have some questions and a report. First, the report: I built with Cygwin 1.7.35, which is before the major change to 2.0, but after the "legacy" release (v1.5). I could try building with the "legacy" release, but there is almost no reason to do so as the version of Windows supported by "legacy" is quickly dropping off the map of active Windows hosts (as well as being desupported by MS), and there is a version of zsh already built for it. With the proposed patch from Jun, zsh compiles, links and runs the check tests "adequately". I say "adequately" because there were 2 test failures, 5 skipped and 40 successful. But that has always been the case for the check tests for me on Cygwin, so at the very least there are no new failures. :) Can you perhaps suggest some other tests that this change might influence? I haven't look at all the possibly dependencies involed, but if _GNU_SOURCE is really a superset, then there really should be no effective difference. Now, about the patch itself: Jun's patch changes two files: datetime.c and zsh_system.h. However, I did my build testing with the stock zsh-5.2 source and the datetime.c change doesn't apply because the lines indicated are not present in the source. I'm presuming Jun was working from latest git source. As a result, I only applied the change to zsh_system.h, which was successful. So, in lue of other testing, I'd call it a success. If there are other tests you'd like me to perform, please let me know. I'll keep this build of a while longer. > Cheers, > Daniel -- --=> Peter A. Castro Email: doctor at fruitbat dot org / Peter dot Castro at oracle dot com "Cats are just autistic Dogs" -- Dr. Tony Attwood