Chainsaw part two.
[email protected] ("H.Merijn Brand") Mon, 04 Nov 2002 18:38:55 +0100
| Newsgroups | perl.perl5.build |
|---|---|
| Message-ID | <[email protected]> |
I would propose the following change to weed out 5005threads from Configure. Any remarks? (unified diff attached) ==== //depot/metaconfig/U/threads/usethreads.U#15 - /pro/3gl/CPAN/metaconfig/U/threads/usethreads.U ==== 10c10 < ?MAKE:usethreads useithreads use5005threads d_oldpthreads usereentrant: \ --- > ?MAKE:usethreads useithreads d_oldpthreads usereentrant: \ 23,27d22 < ?S:use5005threads: < ?S: This variable conditionally defines the USE_5005THREADS symbol, < ?S: and indicates that Perl should be built to use the 5.005-based < ?S: threading implementation. < ?S:. 48,51d42 < ?C:USE_5005THREADS: < ?C: This symbol, if defined, indicates that Perl should be built to < ?C: use the 5.005-based threading implementation. < ?C:. 55c46 < ?C: USE_5005THREADS, but eventually the source ought to be changed --- > ?C: USE_ITHREADS, but eventually the source ought to be changed 67d57 < ?H:#$use5005threads USE_5005THREADS /**/ 69,71d58 < ?H:?%<:#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) < ?H:?%<:#define USE_THREADS /* until src is revised*/ < ?H:?%<:#endif 75c62 < ?LINT:set usethreads useithreads use5005threads d_oldpthreads usereentrant --- > ?LINT:set usethreads useithreads d_oldpthreads usereentrant 83c70 < *) # Catch case where user specified ithreads or 5005threads but --- > *) # Catch case where user specified ithreads but 85,86c72,73 < case "$useithreads$use5005threads" in < *$define*) --- > case "$useithreads" in > *$define*) 119c106,109 < $cat <<EOM --- > dflt='y' > case "$useithreads" in > $undef|false|[nN]*) > $cat >&4 <<EOM 121,127c111,113 < Since release 5.6, Perl has had two different threading implementations, < the newer interpreter-based version (ithreads) with one interpreter per < thread, and the older 5.005 version (5005threads). < The 5005threads version is effectively unmaintained and will probably be < removed in Perl 5.10, so there should be no need to build a Perl using it < unless needed for backwards compatibility with some existing 5.005threads < code. --- > Whoa there. You have selected -Dusethreads, but somehow explicitely > disabled using threads with -Uuseithreads, either from a previous > config.sh or a command line option. 128a115,116 > I will disable threads altogether. > 130,150c118,120 < : Default to ithreads unless overridden on command line or with < : old config.sh < dflt='y' < case "$use5005threads" in < $define|true|[yY]*) dflt='n';; < esac < case "$useithreads" in < $undef|false|[nN]*) dflt='n';; < esac < rp='Use the newer interpreter-based ithreads?' < . ./myread < case "$ans" in < y|Y) val="$define" ;; < *) val="$undef" ;; < esac < set useithreads < eval $setvar < : Now set use5005threads to the opposite value. < case "$useithreads" in < $define) val="$undef" ;; < *) val="$define" ;; --- > usethreads=$undef > sleep 10 > ;; 152,154d121 < set use5005threads < eval $setvar < ;; 157,171d123 < use5005threads="$undef" < ;; < esac < < ?X: This is not supposed to be possible but with some trickery, maybe. < case "$useithreads$use5005threads" in < "$define$define") < $cat >&4 <<EOM < < You cannot have both the ithreads and the 5.005 threads enabled < at the same time. Disabling the 5.005 threads since they are < much less stable than the ithreads. < < EOM < use5005threads="$undef" -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3, WinNT 4, Win2K pro & WinCE 2.11. Smoking perl CORE: [email protected] http://archives.develooper.com/[email protected]/ [email protected] send smoke reports to: [email protected], QA: http://qa.perl.org
5005thr.diff
(application/octet-stream, 4.4 KB)
==== //depot/metaconfig/U/threads/usethreads.U#15 - /pro/3gl/CPAN/metaconfig/U/threads/usethreads.U ====
@@ -7,7 +7,7 @@
?RCS:
?RCS: $Log: usethreads.U,v $
?RCS:
-?MAKE:usethreads useithreads use5005threads d_oldpthreads usereentrant: \
+?MAKE:usethreads useithreads d_oldpthreads usereentrant: \
Myread Oldconfig Setvar test cat useperlio
?MAKE: -pick add $@ %<
?Y:TOP
@@ -20,11 +20,6 @@
?S: and indicates that Perl should be built to use the interpreter-based
?S: threading implementation.
?S:.
-?S:use5005threads:
-?S: This variable conditionally defines the USE_5005THREADS symbol,
-?S: and indicates that Perl should be built to use the 5.005-based
-?S: threading implementation.
-?S:.
?X: I'm putting old_pthreads in this unit because it might eventually
?X: be part of an automatic determination to see if we can use threads
?X: at all.
@@ -45,14 +40,10 @@
?C: This symbol, if defined, indicates that Perl should be built to
?C: use the interpreter-based threading implementation.
?C:.
-?C:USE_5005THREADS:
-?C: This symbol, if defined, indicates that Perl should be built to
-?C: use the 5.005-based threading implementation.
-?C:.
?C:USE_THREADS:
?C: This symbol, if defined, indicates that Perl should
?C: be built to use threads. At present, it is a synonym for
-?C: USE_5005THREADS, but eventually the source ought to be changed
+?C: USE_ITHREADS, but eventually the source ought to be changed
?C: to use this to mean _any_ threading implementation.
?C:.
?C:OLD_PTHREADS_API:
@@ -64,15 +55,11 @@
?C: try to use the various _r versions of library functions.
?C: This is extremely experimental.
?C:.
-?H:#$use5005threads USE_5005THREADS /**/
?H:#$useithreads USE_ITHREADS /**/
-?H:?%<:#if defined(USE_5005THREADS) && !defined(USE_ITHREADS)
-?H:?%<:#define USE_THREADS /* until src is revised*/
-?H:?%<:#endif
?H:#$d_oldpthreads OLD_PTHREADS_API /**/
?H:#$usereentrant USE_REENTRANT_API /**/
?H:.
-?LINT:set usethreads useithreads use5005threads d_oldpthreads usereentrant
+?LINT:set usethreads useithreads d_oldpthreads usereentrant
?INIT:: set usethreads on the Configure command line to enable threads.
?INIT:usereentrant='undef'
?F:!usethreads.cbu
@@ -80,10 +67,10 @@
?X: automatic setting of sensible defaults.
case "$usethreads" in
$define|true|[yY]*) dflt='y';;
-*) # Catch case where user specified ithreads or 5005threads but
+*) # Catch case where user specified ithreads but
# forgot -Dusethreads (A.D. 4/2002)
- case "$useithreads$use5005threads" in
- *$define*)
+ case "$useithreads" in
+ *$define*)
case "$useperlio" in
"$define") dflt='y' ;;
*) dflt='n' ;;
@@ -116,59 +103,24 @@
case "$usethreads" in
$define)
- $cat <<EOM
+ dflt='y'
+ case "$useithreads" in
+ $undef|false|[nN]*)
+ $cat >&4 <<EOM
-Since release 5.6, Perl has had two different threading implementations,
-the newer interpreter-based version (ithreads) with one interpreter per
-thread, and the older 5.005 version (5005threads).
-The 5005threads version is effectively unmaintained and will probably be
-removed in Perl 5.10, so there should be no need to build a Perl using it
-unless needed for backwards compatibility with some existing 5.005threads
-code.
+Whoa there. You have selected -Dusethreads, but somehow explicitely
+disabled using threads with -Uuseithreads, either from a previous
+config.sh or a command line option.
+I will disable threads altogether.
+
EOM
- : Default to ithreads unless overridden on command line or with
- : old config.sh
- dflt='y'
- case "$use5005threads" in
- $define|true|[yY]*) dflt='n';;
- esac
- case "$useithreads" in
- $undef|false|[nN]*) dflt='n';;
- esac
- rp='Use the newer interpreter-based ithreads?'
- . ./myread
- case "$ans" in
- y|Y) val="$define" ;;
- *) val="$undef" ;;
- esac
- set useithreads
- eval $setvar
- : Now set use5005threads to the opposite value.
- case "$useithreads" in
- $define) val="$undef" ;;
- *) val="$define" ;;
+ usethreads=$undef
+ sleep 10
+ ;;
esac
- set use5005threads
- eval $setvar
- ;;
*)
useithreads="$undef"
- use5005threads="$undef"
- ;;
-esac
-
-?X: This is not supposed to be possible but with some trickery, maybe.
-case "$useithreads$use5005threads" in
-"$define$define")
- $cat >&4 <<EOM
-
-You cannot have both the ithreads and the 5.005 threads enabled
-at the same time. Disabling the 5.005 threads since they are
-much less stable than the ithreads.
-
-EOM
- use5005threads="$undef"
;;
esac