zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH} define _GNU_SOURCE on Cygwin
@ 2016-10-26 10:04 Jun T.
  2016-10-26 10:56 ` Daniel Shahaf
  0 siblings, 1 reply; 8+ messages in thread
From: Jun T. @ 2016-10-26 10:04 UTC (permalink / raw)
  To: zsh-workers

Cygwin now started to require _XOPEN_SOURCE also for
wcwidth() (in addition to strptime(); cf. worker/38862).

Since wcwidth() is used in may files, I think it would be
better to define _GNU_SOURCE in zsh_system.h.

(defining _XOPEN_SOURCE alone hides may other function)


diff --git a/Src/Modules/datetime.c b/Src/Modules/datetime.c
index b924392..bb82c54 100644
--- a/Src/Modules/datetime.c
+++ b/Src/Modules/datetime.c
@@ -27,9 +27,6 @@
  *
  */
 
-#ifdef __CYGWIN__
-#define _XOPEN_SOURCE
-#endif
 #include "datetime.mdh"
 #include "datetime.pro"
 #include <time.h>
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index a9cbf02..5339b49 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -37,7 +37,7 @@
 #endif
 #endif
 
-#if defined(__linux) || defined(__GNU__) || defined(__GLIBC__) || defined(LIBC_MUSL)
+#if defined(__linux) || defined(__GNU__) || defined(__GLIBC__) || defined(LIBC_MUSL) || defined(__CYGWIN__)
 /*
  * Turn on numerous extensions.
  * This is in order to get the functions for manipulating /dev/ptmx.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-01 16:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 10:04 [PATCH} define _GNU_SOURCE on Cygwin Jun T.
2016-10-26 10:56 ` Daniel Shahaf
2016-10-26 12:30   ` Jun T.
2016-10-26 19:55     ` Peter A. Castro
2016-10-27  1:34       ` Daniel Shahaf
2016-10-31  6:15         ` Peter A. Castro
2016-11-01 12:11           ` Jun T.
2016-11-01 16:31             ` Peter A. Castro

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).