From 7bd161a15a083a0aed82ba8e1fa3d6df6f975c68 Mon Sep 17 00:00:00 2001 From: Lupe Christoph Date: Wed, 9 Aug 2000 13:35:54 +0200 Subject: [PATCH] Getting perlio and threads to compile Message-ID: <20000809113554.G23160@alanya.lupe-christoph.de> (the Solaris version changes in Configure skipped) p4raw-id: //depot/perl@6594 --- hints/solaris_2.sh | 10 +++++++--- thread.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index 21b0b0e..4e5d6fa 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -328,8 +328,12 @@ case "$usethreads" in $define|true|[yY]*) ccflags="-D_REENTRANT $ccflags" - # sched_yield is in -lposix4 - set `echo X "$libswanted "| sed -e 's/ c / posix4 pthread c /'` + # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 7 + case `uname -r` in + 5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;; + *) sched_yield_lib="rt"; + esac + set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"` shift libswanted="$*" @@ -354,7 +358,7 @@ $define|true|[yY]*) siglongjmp(env, 2); } EOM - if test "`arch`" = i86pc -a "$osvers" = 2.6 && \ + if test "`arch`" = i86pc -a `uname -r` = 5.6 && \ ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then d_sigsetjmp=$undef cat << 'EOM' >&2 diff --git a/thread.h b/thread.h index f7ab18c..206a5c5 100644 --- a/thread.h +++ b/thread.h @@ -251,7 +251,7 @@ # define ALLOC_THREAD_KEY \ STMT_START { \ if (pthread_key_create(&PL_thr_key, 0)) { \ - fprintf(stderr, "panic: pthread_key_create"); \ + PerlIO_printf(PerlIO_stderr(), "panic: pthread_key_create"); \ exit(1); \ } \ } STMT_END -- 1.8.3.1