help / color / mirror / code / Atom feed
* [PATCH] Do not define _POSIX_C_SOURCE when checking for sigset_t on Solaris
@ 2021-11-23  6:46 Claes Nästén
  0 siblings, 0 replies; only message in thread
From: Claes Nästén @ 2021-11-23  6:46 UTC (permalink / raw)
  To: zsh-workers

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:

configure:8654: checking for sigset_t
configure:8673: gcc -c  -Wall -Wmissing-prototypes -O2  conftest.c >&5
In file included from /usr/include/sys/types.h:17,
                 from conftest.c:85:
sts.h:346:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open aa
pplications     and pre-2001 POSIX applications"
 #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
conftest.c: In function 'main':
conftest.c:90:10: warning: unused variable 'tempsigset' [-Wunused-variable]
 sigset_t tempsigset;
configure:8673: $? = 1

Looking at the git history it seems _POSIX_C_SOURCE is defined to ensure
configure works with systems using musl libc so the patch should not cause
any issues as it's Linux only.

Tried configuring on Solaris 11 as well and it still detects sigset_t.

diff --git a/configure.ac b/configure.ac
index 297a7482f..7494b3529 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1135,7 +1135,9 @@ dnl Check for sigset_t.  Currently I'm looking in
 dnl <sys/types.h> and <signal.h>.  Others might need
 dnl to be added.
 AC_CACHE_CHECK(for sigset_t, zsh_cv_type_sigset_t,
+  #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])])

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-23  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23  6:46 [PATCH] Do not define _POSIX_C_SOURCE when checking for sigset_t on Solaris Claes Nästén

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


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