summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-07-12 12:53:40 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-07-12 12:53:40 +0000
commit76af18c5f83726ca5cce63423ad1e5a77c21fe10 (patch)
treefb94f01c6c1047c524900151c36d1e17ede4c965
parent5bcb3f6cb4b756598a342fcff08b0a7b18954891 (diff)
parent983f8c39d1d673620d5153b40c61e46afb5d2df5 (diff)
downloadperl-76af18c5f83726ca5cce63423ad1e5a77c21fe10.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@11304
-rw-r--r--ext/ByteLoader/bytecode.h4
-rw-r--r--hints/aix.sh34
-rw-r--r--pod/perl572delta.pod13
-rw-r--r--regexec.c11
-rw-r--r--thread.h3
5 files changed, 41 insertions, 24 deletions
diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h
index 01886883ed..ca9509f05e 100644
--- a/ext/ByteLoader/bytecode.h
+++ b/ext/ByteLoader/bytecode.h
@@ -132,8 +132,8 @@ typedef IV IV64;
hv_store((HV*)sv, bstate->bs_pv.xpv_pv, bstate->bs_pv.xpv_cur, arg, 0)
#define BSET_pv_free(pv) Safefree(pv.xpv_pv)
#define BSET_pregcomp(o, arg) \
- (PM_SETRE(((PMOP*)o), arg ? \
- CALLREGCOMP(aTHX_ arg, arg + bstate->bs_pv.xpv_cur, ((PMOP*)o)) : 0))
+ (PM_SETRE(((PMOP*)o), (arg ? \
+ CALLREGCOMP(aTHX_ arg, arg + bstate->bs_pv.xpv_cur, ((PMOP*)o)) : 0)))
#define BSET_newsv(sv, arg) \
STMT_START { \
sv = (arg == SVt_PVAV ? (SV*)newAV() : \
diff --git a/hints/aix.sh b/hints/aix.sh
index 10d5d64bc8..0295182170 100644
--- a/hints/aix.sh
+++ b/hints/aix.sh
@@ -475,21 +475,25 @@ then
*) ldflags="$ldflags -brtl" ;;
esac
else
- # If the C++ libraries, libC and libC_r, are available we will prefer them
- # over the vanilla libc, because the libC contain loadAndInit() and
- # terminateAndUnload() which work correctly with C++ statics while libc
- # load() and unload() do not. See ext/DynaLoader/dl_aix.xs.
- # The C-to-C_r switch is done by usethreads.cbu, if needed.
- if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then
- # Cify libswanted.
- set `echo X "$libswanted "| sed -e 's/ c / C c /'`
- shift
- libswanted="$*"
- # Cify lddlflags.
- set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'`
- shift
- lddlflags="$*"
- fi
+ case `oslevel` in
+ 4.2.*) ;; # libC_r has broke gettimeofday
+ *) # If the C++ libraries, libC and libC_r, are available we will
+ # prefer them over the vanilla libc, because the libC contain
+ # loadAndInit() and terminateAndUnload() which work correctly
+ # with C++ statics while libc load() and unload() do not. See
+ # ext/DynaLoader/dl_aix.xs. The C-to-C_r switch is done by
+ # usethreads.cbu, if needed.
+ if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then
+ # Cify libswanted.
+ set `echo X "$libswanted "| sed -e 's/ c / C c /'`
+ shift
+ libswanted="$*"
+ # Cify lddlflags.
+ set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'`
+ shift
+ lddlflags="$*"
+ fi
+ esac
fi
# EOF
diff --git a/pod/perl572delta.pod b/pod/perl572delta.pod
index 199802deea..0dc191f91f 100644
--- a/pod/perl572delta.pod
+++ b/pod/perl572delta.pod
@@ -546,12 +546,13 @@ problems for all the 5.7 releases.
=item *
-If Perl is configured to use long doubles the op/int subtests 13 and
-14 and the ext/POSIX subtest 14 may fail.
-
-=item *
-
-If Perl is configured to use threads the op/magic subtest 28 may fail.
+In AIX 4.2 Perl extensions that use C++ functions that use statics
+may have problems in that the statics are not getting initialized.
+In newer AIX releases this has been solved by linking Perl with
+the libC_r library, but unfortunately in AIX 4.2 the said library
+has an obscure bug where the various functions related to time
+(such as time() and gettimeofday()) return broken values, and
+therefore in AIX 4.2 Perl is not linked against the libC_r.
=item *
diff --git a/regexec.c b/regexec.c
index b5f8f4759a..0e780d0915 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1850,8 +1850,17 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
PL_reg_oldpos = mg->mg_len;
SAVEDESTRUCTOR_X(restore_pos, 0);
}
- if (!PL_reg_curpm)
+ if (!PL_reg_curpm) {
Newz(22,PL_reg_curpm, 1, PMOP);
+#ifdef USE_ITHREADS
+ {
+ SV* repointer = newSViv(0);
+ av_push(PL_regex_padav,repointer);
+ PL_reg_curpm->op_pmoffset = av_len(PL_regex_padav);
+ PL_regex_pad = AvARRAY(PL_regex_padav);
+ }
+#endif
+ }
PM_SETRE(PL_reg_curpm, prog);
PL_reg_oldcurpm = PL_curpm;
PL_curpm = PL_reg_curpm;
diff --git a/thread.h b/thread.h
index a1e8fdc65b..c76534fe3e 100644
--- a/thread.h
+++ b/thread.h
@@ -302,6 +302,9 @@
} STMT_END
#endif
+void Perl_atfork_lock(void);
+void Perl_atfork_unlock(void);
+
#ifndef PTHREAD_ATFORK
# define PTHREAD_ATFORK(prepare,parent,child) \
pthread_atfork(prepare,parent,child)