rp='What is your architecture name'
. ./myread
case "$usethreads" in
-$define) archname="$ans-thread"
- echo "Threads selected... architecture name is now $archname." >&4
+$define) echo "Threads selected." >&4
+ case "$ans" in
+ *-thread) echo "...and architecture name already ends in -thread." >&4
+ archname="$ans"
+ ;;
+ *) archname="$ans-thread"
+ echo "...setting architecture name to $archname." >&4
+ ;;
+ esac
;;
*) archname="$ans" ;;
esac
if test "X$d_pthreads_created_joinable" = X; then
echo >&4 "Checking whether pthreads are created joinable."
$cat >try.c <<EOCP
-/* Note: this program returns 1 if detached, 0 if not.
- * Easier this way because the PTHREAD_CREATE_DETACHED is more
- * portable than the obsolete PTHREAD_CREATE_UNDETACHED.
- * Testing for joinable (aka undetached) as opposed to detached
- * is then again logically more sensible because that's
- * the more modern default state in the pthreads implementations. */
#include <pthread.h>
#include <stdio.h>
int main() {
: Compile and link separately because the used cc might not be
: able to link the right CRT and libs for pthreading.
if $cc $ccflags -c try.c >/dev/null 2>&1 &&
- $ld $lddlflags $ldflags -o try try$obj_ext $libs >/dev/null 2>&1; then
+ $ld $ldflags -o try try$obj_ext $libs >/dev/null 2>&1; then
yyy=`./try`
else
echo "(I can't execute the test program--assuming they are.)"
yyy=joinable
fi
case "$yyy" in
- joinable)
+ detached)
+ val="$undef"
+ echo "Nope, they aren't."
+ ;;
+ *)
val="$define"
echo "Yup, they are."
;;
- *)
- val="$undef"
- echo "Nope, they aren't."
- ;;
esac
set d_pthreads_created_joinable
eval $setvar
void
sv_setiv(register SV *sv, IV i)
{
- dTHR; /* just for taint */
sv_check_thinkfirst(sv);
switch (SvTYPE(sv)) {
case SVt_NULL:
void
sv_setnv(register SV *sv, double num)
{
- dTHR; /* just for taint */
sv_check_thinkfirst(sv);
switch (SvTYPE(sv)) {
case SVt_NULL:
if (SvPOKp(sv) && SvLEN(sv))
return asIV(sv);
if (!SvROK(sv)) {
- dTHR; /* just for localizing */
- if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP))
- warn(warn_uninit);
+ if (dowarn && !(SvFLAGS(sv) & SVs_PADTMP)) {
+ dTHR;
+ if (!localizing)
+ warn(warn_uninit);
+ }
return 0;
}
}
if (SvPOKp(sv) && SvLEN(sv))
return asUV(sv);
if (!SvROK(sv)) {
- dTHR; /* just for localizing */
- if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP))
- warn(warn_uninit);
+ if (dowarn && !(SvFLAGS(sv) & SVs_PADTMP)) {
+ dTHR;
+ if (!localizing)
+ warn(warn_uninit);
+ }
return 0;
}
}
SvUVX(sv) = asUV(sv);
}
else {
- dTHR; /* just for localizing */
- if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP))
- warn(warn_uninit);
+ if (dowarn && !(SvFLAGS(sv) & SVs_PADTMP)) {
+ dTHR;
+ if (!localizing)
+ warn(warn_uninit);
+ }
return 0;
}
DEBUG_c(PerlIO_printf(Perl_debug_log, "0x%lx 2uv(%lu)\n",
if (SvIOKp(sv))
return (double)SvIVX(sv);
if (!SvROK(sv)) {
- dTHR; /* just for localizing */
- if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP))
- warn(warn_uninit);
+ if (dowarn && !(SvFLAGS(sv) & SVs_PADTMP)) {
+ dTHR;
+ if (!localizing)
+ warn(warn_uninit);
+ }
return 0;
}
}
goto tokensave;
}
if (!SvROK(sv)) {
- dTHR; /* just for localizing */
- if (dowarn && !localizing && !(SvFLAGS(sv) & SVs_PADTMP))
- warn(warn_uninit);
+ if (dowarn && !(SvFLAGS(sv) & SVs_PADTMP)) {
+ dTHR;
+ if (!localizing)
+ warn(warn_uninit);
+ }
*lp = 0;
return "";
}
void
sv_setpvn(register SV *sv, register const char *ptr, register STRLEN len)
{
- dTHR; /* just for taint */
assert(len >= 0); /* STRLEN is probably unsigned, so this may
elicit a warning, but it won't hurt. */
sv_check_thinkfirst(sv);
void
sv_setpv(register SV *sv, register const char *ptr)
{
- dTHR; /* just for taint */
register STRLEN len;
sv_check_thinkfirst(sv);
void
sv_usepvn(register SV *sv, register char *ptr, register STRLEN len)
{
- dTHR; /* just for taint */
sv_check_thinkfirst(sv);
if (!SvUPGRADE(sv, SVt_PV))
return;
void
sv_catpvn(register SV *sv, register char *ptr, register STRLEN len)
{
- dTHR; /* just for taint */
STRLEN tlen;
char *junk;
void
sv_catpv(register SV *sv, register char *ptr)
{
- dTHR; /* just for taint */
register STRLEN len;
STRLEN tlen;
char *junk;
if (name)
if (namlen >= 0)
mg->mg_ptr = savepvn(name, namlen);
- else if (namlen == HEf_SVKEY) {
- dTHR; /* just for SvREFCNT_inc */
+ else if (namlen == HEf_SVKEY)
mg->mg_ptr = (char*)SvREFCNT_inc((SV*)name);
- }
switch (how) {
case 0:
sv = GvSV(gv);
(void)SvOK_off(sv);
if (SvTYPE(sv) >= SVt_PV) {
- dTHR; /* just for taint */
SvCUR_set(sv, 0);
if (SvPVX(sv) != Nullch)
*SvPVX(sv) = '\0';
*SvEND(sv) = '\0';
}
if (!SvPOK(sv)) {
- dTHR; /* just for taint */
SvPOK_on(sv); /* validate pointer */
SvTAINT(sv);
DEBUG_c(PerlIO_printf(Perl_debug_log, "0x%lx 2pv(%s)\n",