zsh-workers
 help / color / mirror / code / Atom feed
From: Valentin Ochs <a@0au.de>
To: zsh-workers@zsh.org
Subject: [PATCH v2] define _GNU_SOURCE
Date: Tue, 12 Apr 2011 15:09:32 +0200	[thread overview]
Message-ID: <20110412130929.GG5881@erwin> (raw)

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


             reply	other threads:[~2011-04-12 13:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 13:09 Valentin Ochs [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110412130929.GG5881@erwin \
    --to=a@0au.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).