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

Re: [PATCH} define _GNU_SOURCE on Cygwin

On Wed, 26 Oct 2016, Jun T. wrote:

Date: Wed, 26 Oct 2016 21:30:26 +0900
From: Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx>
To: zsh-workers@xxxxxxx
Subject: Re: [PATCH} define _GNU_SOURCE on Cygwin

2016/10/26 19:56, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:

The patch causes _XOPEN_SOURCE to no longer be defined, ever.

_GNU_SOURCE is a superset of _XOPEN_SOURCE; it is virtually
equivalent to defining both _BSD_SOURCE and _XOPEN_SOURCE.

Is this okay for both old and new cygwin?  I.e., does this patch work
for people compiling new zsh on old cygwin?

Sorry, I can't test on older cygwin.
I guess installing older cygwin is not trivial.

It is fairly trivial, actually. You just need to know where to get it. :-)

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.

--=> 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