Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH} define _GNU_SOURCE on Cygwin



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



Messages sorted by: Reverse Date, Date, Thread, Author