From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6052 invoked by alias); 12 Apr 2011 13:10:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28990 Received: (qmail 12076 invoked from network); 12 Apr 2011 13:10:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at 0au.de does not designate permitted sender hosts) Date: Tue, 12 Apr 2011 15:09:32 +0200 From: Valentin Ochs To: zsh-workers@zsh.org Subject: [PATCH v2] define _GNU_SOURCE Message-ID: <20110412130929.GG5881@erwin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 and . Other dnl to be added. AC_CACHE_CHECK(for sigset_t, zsh_cv_type_sigset_t, [AC_TRY_COMPILE( -[#include +[#define _POSIX_C_SOURCE 200809L +#include #include ], [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 #endif --Valentin