zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH v2] define _GNU_SOURCE
@ 2011-04-12 13:09 Valentin Ochs
  2011-04-13 16:10 ` build on os x 10.6.7, xcode 3.2.6 S. Cowles
  2011-04-14  8:35 ` [PATCH v2] define _GNU_SOURCE Peter Stephenson
  0 siblings, 2 replies; 7+ messages in thread
From: Valentin Ochs @ 2011-04-12 13:09 UTC (permalink / raw)
  To: zsh-workers

Sorry, haven't had my caffeine injection yet :)

The test for struct timezone needs _GNU_SOURCE as well, and it's
probably better to just use _POSIX_C_SOURCE for sigset_t.

Best regards,
Valentin

---
diff -upr -x configure -x config.h.in zsh-4.3.11/Src/system.h zsh/Src/system.h
--- zsh-4.3.11/Src/system.h     2010-02-22 11:12:31.000000000 +0100
+++ zsh/Src/system.h    2011-04-12 14:20:37.106000061 +0200
@@ -37,13 +37,12 @@
 #endif
 #endif

-#if defined(__linux) || defined(__GNU__) || defined(__GLIBC__)
 /*
  * Turn on numerous extensions.
  * This is in order to get the functions for manipulating /dev/ptmx.
  */
 #define _GNU_SOURCE 1
-#endif
+#define _POSIX_C_SOURCE 200809L

 /* NeXT has half-implemented POSIX support *
  * which currently fools configure         */
diff -upr -x configure -x config.h.in zsh-4.3.11/configure.ac zsh/configure.ac
--- zsh-4.3.11/configure.ac     2010-09-23 11:42:05.000000000 +0200
+++ zsh/configure.ac    2011-04-12 14:20:13.407000063 +0200
@@ -983,7 +983,8 @@ dnl <sys/types.h> and <signal.h>.  Other
 dnl to be added.
 AC_CACHE_CHECK(for sigset_t, zsh_cv_type_sigset_t,
 [AC_TRY_COMPILE(
-[#include <sys/types.h>
+[#define _POSIX_C_SOURCE 200809L
+#include <sys/types.h>
 #include <signal.h>], [sigset_t tempsigset;],
   zsh_cv_type_sigset_t=yes, zsh_cv_type_sigset_t=no)])
 AH_TEMPLATE([sigset_t],
@@ -1005,6 +1006,7 @@ AC_CHECK_MEMBERS([struct stat.st_atim.tv

 dnl Check for struct timezone since some old SCO versions do not define it
 zsh_TYPE_EXISTS([
+#define _GNU_SOURCE 1
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
--Valentin


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

end of thread, other threads:[~2011-04-14  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-12 13:09 [PATCH v2] define _GNU_SOURCE Valentin Ochs
2011-04-13 16:10 ` build on os x 10.6.7, xcode 3.2.6 S. Cowles
2011-04-13 16:26   ` Peter Stephenson
2011-04-13 19:32     ` S. Cowles
2011-04-13 19:56     ` Bart Schaefer
2011-04-14  8:35 ` [PATCH v2] define _GNU_SOURCE Peter Stephenson
2011-04-14  9:03   ` Peter Stephenson

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).