From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20823 invoked from network); 7 Dec 2021 18:21:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Dec 2021 18:21:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date: Content-Transfer-Encoding:Content-ID:Content-Type:MIME-Version:Subject:To: References:From:In-reply-to:cc:Reply-To:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=fQpHe8gUDp/vy6DbmiUsqfaDqmeazIZiPDnxSiNALuE=; b=lWOKYej8s+rVjpqqlUiWO4CsE0 H6LDoZ1BC+VqhlN8vrPJKXM9PT3IHNiuyMpVk5nHOlA0x4RPEe1t5yabL3e5Pl+4ttdy2UnnjX5W3 suVZl+6zHu5tDdCX1wYNXP2+iDrYYIv7hgjVicsj7AKD8XSZlRbdjsFpznEJBvdg8UfOO8k35e5bD yBcVJTk8zQT6/eaMdCNHuNTo93BwbcjdymEfv6CCJtqNlN575Bxe48OVIcTYY4PN6DAmAwhpqg0bk LIBijLMQGSHQU7GMSRT/Yp70S9SLEu1el98UPUuN9mbrfJkJlKAPDw2stnDpzkvEHi4JzasF79awR cV2EDgAg==; Received: from authenticated user by zero.zsh.org with local id 1muf5b-000Hsh-GZ; Tue, 07 Dec 2021 18:21:19 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1muf55-000HZ9-50; Tue, 07 Dec 2021 18:20:47 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1muf53-0000k6-LA; Tue, 07 Dec 2021 19:20:45 +0100 cc: zsh-workers In-reply-to: <1637648446-sup-9516@debian9> From: Oliver Kiddle References: <1637648446-sup-9516@debian9> To: =?utf-8?q?Claes_N=C3=A4st=C3=A9n?= Subject: Re: [PATCH] Do not define _POSIX_C_SOURCE when checking for sigset_t on Solaris MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2856.1638901245.1@hydra> Content-Transfer-Encoding: 8bit Date: Tue, 07 Dec 2021 19:20:45 +0100 Message-ID: <2857-1638901245.652587@SP8t.pF8U.pPnY> X-Seq: 49634 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 23 Nov, Claes Nästén wrote: > Trying to compile zsh on Solaris 10 fails for me right after > configuration due to misleading information in config.h > > The check for sigset_t fails, due to: Thank you for isolating the cause of this and for the clear report. The definition of _POSIX_C_SOURCE was added in 28989 (April 2011) for compatibility with musl libc. I was thinking it'd be better to define it only for musl rather building up a list of exceptions such as Solaris. Trying a zsh build on a recent Alpine Linux system running within podman, it appears to return "yes" for the sigset_t test both with and without the #define. Perhaps musl has evolved for greater compatibility with glibc since 2011. I don't think we should be too concerned about the potential for someone to still be using old musl. Solaris 10, while quite a bit older than that if you don't count updates, is still relevant. patch -R wouldn't work with 28989 because it was using the old AC_TRY_COMPILE macro at that time so I have attached a patch. Oliver diff --git a/configure.ac b/configure.ac index 1af5a2854..8bba78c56 100644 --- a/configure.ac +++ b/configure.ac @@ -1135,8 +1135,7 @@ dnl Check for sigset_t. Currently I'm looking in dnl and . Others might need dnl to be added. AC_CACHE_CHECK(for sigset_t, zsh_cv_type_sigset_t, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_C_SOURCE 200809L -#include +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]], [[sigset_t tempsigset;]])],[zsh_cv_type_sigset_t=yes],[zsh_cv_type_sigset_t=no])]) AH_TEMPLATE([sigset_t], [Define to `unsigned int' if or doesn't define])