From: Jarkko Hietaniemi Date: Tue, 27 Oct 1998 12:55:34 +0000 (+0000) Subject: $Config{sig_num_init}. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=824a2ba35a8a435c7dda7b79d43bec16c40e4bd9;p=p5sagit%2Fp5-mst-13.2.git $Config{sig_num_init}. Also, a new approach to the 'pthreads-created-joinable': drop it and use {PTHREAD_CREATE_{JOINABLE,UNDETACHED},__UNDETACHED} directly. (See also #2096). p4raw-id: //depot/cfgperl@2101 --- diff --git a/Configure b/Configure index 3bedfdf..1aaeb2f 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Oct 27 09:57:04 EET 1998 [metaconfig 3.0 PL70] +# Generated on Tue Oct 27 14:23:10 EET 1998 [metaconfig 3.0 PL70] # (with additional metaconfig patches by jhi@iki.fi) cat >/tmp/c1$$ <&4 - $cat >try.c <<'EOCP' -#include -#ifdef PTHREAD_CREATE_UNDETACHED -# define ATTR_JOINABLE PTHREAD_CREATE_UNDETACHED -#else -# ifdef __UNDETACHED -# define ATTR_JOINABLE __UNDETACHED -# endif -#endif -#include -int main() { - pthread_attr_t attr; - int detachstate; - printf("%s\n", - pthread_attr_init(&attr) == 0 && -#if PTHREAD_ATTR_GETDETACHSTATE_INT - pthread_attr_getdetachstate(&attr) == ATTR_JOINABLE && -#else - pthread_attr_getdetachstate(&attr, &detachstate) == 0 && - detachstate == PTHREAD_ATTR_JOINABLE -#endif - ? "detached" : "joinable"); - exit(0); -} -EOCP - set try - if eval $compile; then - yyy=`./try` - case "$yyy" in - detached) echo "Nope, they aren't." >&4 ;; - *) echo "Yup, they are." >&4 ;; - esac - else - set try -DPTHREAD_ATTR_GETDETACHSTATE_INT - if eval $compile; then - yyy=`./try` - case "$yyy" in - detached) echo "Nope, they aren't." >&4 ;; - *) echo "Yup, they are." >&4 ;; - esac - else - echo " " - echo "(I can't execute the test program--assuming they are.)" >&4 - yyy=joinable - fi - fi - $rm -f try try.* - case "$yyy" in - detached) val="$undef" ;; - *) val="$define" ;; - esac - set d_pthreads_created_joinable - eval $setvar -else - d_pthreads_created_joinable="$undef" -fi - : see if this is a pwd.h system set pwd.h i_pwd eval $inhdr @@ -11221,6 +11161,10 @@ $eunicefix signal_cmd : generate list of signal names echo " " +case "$sig_num" in +*,*) sig_num="" # Ignore old-style sig_num with commas from config.sh. + ;; +esac case "$sig_name_init" in '') echo "Generating a list of signal names and numbers..." >&4 @@ -11230,7 +11174,9 @@ case "$sig_name_init" in sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " } { printf "\"%s\", ", $1 } END { printf "0\n" }' signal.lst` - sig_num=`$awk 'BEGIN { printf "0, " } + sig_num=`$awk '{printf "%d ", $2}' signal.lst` + sig_num="0 $sig_num" + sig_num_init=`$awk 'BEGIN { printf "0, " } { printf "%d, ", $2} END { printf "0\n"}' signal.lst` ;; @@ -12352,7 +12298,6 @@ d_pipe='$d_pipe' d_poll='$d_poll' d_portable='$d_portable' d_pthread_yield='$d_pthread_yield' -d_pthreads_created_joinable='$d_pthreads_created_joinable' d_pwage='$d_pwage' d_pwchange='$d_pwchange' d_pwclass='$d_pwclass' @@ -12684,6 +12629,7 @@ shsharp='$shsharp' sig_name='$sig_name' sig_name_init='$sig_name_init' sig_num='$sig_num' +sig_num_init='$sig_num_init' signal_t='$signal_t' sitearch='$sitearch' sitearchexp='$sitearchexp' diff --git a/config_h.SH b/config_h.SH index 76ac762..bfdb62a 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1869,7 +1869,7 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * the sig_name list. */ #define SIG_NAME $sig_name_init /**/ -#define SIG_NUM $sig_num /**/ +#define SIG_NUM $sig_num_init /**/ /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this @@ -2286,12 +2286,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define SCHED_YIELD $sched_yield /**/ #$d_sched_yield HAS_SCHED_YIELD /**/ -/* PTHREADS_CREATED_JOINABLE: - * This symbol, if defined, indicates that pthreads are created - * in the joinable (aka undetached) state. - */ -#$d_pthreads_created_joinable PTHREADS_CREATED_JOINABLE /**/ - /* I_MACH_CTHREADS: * This symbol, if defined, indicates to the C program that it should * include .