summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--README.symbian31
-rw-r--r--embed.fnc7
-rw-r--r--embed.h6
-rw-r--r--embedvar.h2
-rw-r--r--global.sym1
-rw-r--r--hv.c1
-rw-r--r--intrpvar.h3
-rw-r--r--lib/ExtUtils/Constant/ProxySubs.pm15
-rw-r--r--mg.c4
-rw-r--r--perl.h41
-rw-r--r--perlapi.h2
-rw-r--r--perlio.c4
-rw-r--r--pod/perlapi.pod2
-rw-r--r--proto.h11
-rw-r--r--sv.c17
-rw-r--r--symbian/PerlApp.cpp36
-rw-r--r--symbian/PerlApp.h4
-rw-r--r--symbian/PerlUi.cpp40
-rw-r--r--symbian/PerlUi.h16
-rw-r--r--symbian/config.pl55
-rw-r--r--symbian/config.sh2
-rw-r--r--symbian/cwd.pl2
-rw-r--r--symbian/install.cfg10
-rw-r--r--symbian/makesis.pl3
-rw-r--r--symbian/sdk.pl5
-rw-r--r--symbian/xsbuild.pl23
-rw-r--r--util.c68
28 files changed, 319 insertions, 93 deletions
diff --git a/MANIFEST b/MANIFEST
index e3bd2725f0..7d36ce5c5b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3225,6 +3225,7 @@ symbian/PerlUi.h Symbian Perl UI class header
symbian/PerlUi.hrh Symbian Perl UI class resource header
symbian/PerlUiS60.rss Symbian app launcher resource definition
symbian/PerlUiS80.rss Symbian app launcher resource definition
+symbian/PerlUiS90.rss Symbian app launcher resource definition
symbian/PerlUiUIQ.rss Symbian app launcher resource definition
symbian/PerlUtil.cpp Symbian Perl utility class
symbian/PerlUtil.h Symbian Perl utility class header
diff --git a/README.symbian b/README.symbian
index 4c005af56a..314c14f055 100644
--- a/README.symbian
+++ b/README.symbian
@@ -32,9 +32,9 @@ mainly as demonstrations.
These instructions have been tested under various Nokia Series 60
Symbian SDKs (1.2 to 2.6, 2.8 should also work, 1.2 compiles but
- does not work), and Series 80 2.0. You can get the SDKs from
- Forum Nokia (http://www.forum.nokia.com/). A very rough port
- ("it compiles") to UIQ 2.1 has also been made.
+ does not work), Series 80 2.0, and Nokia 7710 (Series 90) SDK.
+ You can get the SDKs from Forum Nokia (http://www.forum.nokia.com/).
+ A very rough port ("it compiles") to UIQ 2.0 has also been made.
A prerequisite for any of the SDKs is to install ActivePerl
from ActiveState, http://www.activestate.com/Products/ActivePerl/
@@ -43,7 +43,7 @@ mainly as demonstrations.
the Metrowerks CodeWarrior installed (2.8 and 3.0 were used in testing)
or the Microsoft Visual C++ 6.0 installed (SP3 minimum, SP5 recommended).
- Note that for example the Serie s60 2.0 VC SDK installation talks
+ Note that for example the Series 60 2.0 VC SDK installation talks
about ActivePerl build 518, which does no more (as of mid-2005) exist
at the ActiveState website. The ActivePerl 5.8.4 build 810 was
used successfully for compiling Perl on Symbian. The 5.6.x ActivePerls
@@ -85,9 +85,8 @@ mainly as demonstrations.
the VC6 makefiles and workspaces. "make vc6" will compile for the VC6,
and "make cw" for the CodeWarrior.
- The following Series 60, Series 80, and UIQ SDK and compiler
- configurations and Nokia phones that were tested at some point in time
- (+ = compiled and PerlApp run, - = not),
+ The following SDK and compiler configurations and Nokia phones were
+ tested at some point in time (+ = compiled and PerlApp run, - = not),
both for Perl 5.8.x and 5.9.x:
SDK | VC | CW |
@@ -96,15 +95,16 @@ mainly as demonstrations.
S60 2.0 | + | + | 6600
S60 2.1 | - | + | 6670
S60 2.6 | + | + | 6630
- S60 2.8 | - | + | (not tested in device)
+ S60 2.8 | - | + | (not tested in a device)
S80 2.6 | - | + | 9300
- UIQ 2.0 | - | + | (not tested in device)
+ S90 1.1 | + | - | 7710
+ UIQ 2.0 | - | + | (not tested in a device)
+ (*) Compiles but does not work, unfortunately.
If you are using the 'make' directly, it is the GNU make from the SDKs,
and it will invoke the right make commands for the Windows emulator
build and the Arm target builds ('thumb' by default) as necessary.
- (*) Compiles but does not work, unfortunately.
The build scripts assume the 'absolute style' SDK installs under C:,
the 'subst style' will not work.
@@ -283,7 +283,7 @@ backslashes in doublequoted strings.
The Perl DLL is installed in \System\Libs\. The Perl libraries and
extension DLLs are installed in \System\Libs\Perl\X.Y.Z\. The PerlApp
is installed in \System\Apps\, and the SIS also installs a couple of
-demo scripts in \Perl\.
+demo scripts in \Perl\ (C:\Mydocs\Perl\ on Nokia 7710).
Note that the Symbian filesystem is very picky: it strongly prefers
the \ instead of the /.
@@ -399,6 +399,15 @@ We maintain the binary incompatibility.
We maintain the binary incompatibility.
+0.4.1: December 2006
+
+ - Perl 5.9.4 (patch level 29622)
+ - added extensions: Compress/Raw/Zlib, Digest/SHA,
+ Hash/Util, Math/BigInt/FastCalc, Text/Soundex, Time/Piece
+ - port to S90 1.1 by Alexander Smishlajev
+
+We maintain the binary incompatibility.
+
=back
=cut
diff --git a/embed.fnc b/embed.fnc
index c4dc7c776b..0294389002 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -833,7 +833,7 @@ Apd |STRLEN |sv_len |NULLOK SV* sv
Apd |STRLEN |sv_len_utf8 |NULLOK SV* sv
Apd |void |sv_magic |NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \
|I32 namlen
-Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK MGVTBL *vtbl \
+Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK const MGVTBL *vtbl \
|NULLOK const char* name|I32 namlen
ApdaR |SV* |sv_mortalcopy |NULLOK SV* oldsv
ApdR |SV* |sv_newmortal
@@ -1749,8 +1749,13 @@ Apnod |int |my_vsnprintf |NN char *buffer|const Size_t len|NN const char *format
px |void |my_clearenv
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+Apo |void* |my_cxt_init |NN const char *my_cxt_key|size_t size
+Apo |int |my_cxt_index |NN const char *my_cxt_key
+#else
Apo |void* |my_cxt_init |NN int *index|size_t size
#endif
+#endif
#ifndef HAS_STRLCAT
Apno |Size_t |my_strlcat |NULLOK char *dst|NULLOK const char *src|Size_t size
diff --git a/embed.h b/embed.h
index f82e043e36..f2fa696e01 100644
--- a/embed.h
+++ b/embed.h
@@ -1788,6 +1788,9 @@
#define my_clearenv Perl_my_clearenv
#endif
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+#else
+#endif
#endif
#ifndef HAS_STRLCAT
#endif
@@ -4000,6 +4003,9 @@
#define my_clearenv() Perl_my_clearenv(aTHX)
#endif
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+#else
+#endif
#endif
#ifndef HAS_STRLCAT
#endif
diff --git a/embedvar.h b/embedvar.h
index 189d4b65cc..634fb42286 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -284,6 +284,7 @@
#define PL_multi_end (vTHX->Imulti_end)
#define PL_multi_open (vTHX->Imulti_open)
#define PL_multi_start (vTHX->Imulti_start)
+#define PL_my_cxt_keys (vTHX->Imy_cxt_keys)
#define PL_my_cxt_list (vTHX->Imy_cxt_list)
#define PL_my_cxt_size (vTHX->Imy_cxt_size)
#define PL_nexttoke (vTHX->Inexttoke)
@@ -581,6 +582,7 @@
#define PL_Imulti_end PL_multi_end
#define PL_Imulti_open PL_multi_open
#define PL_Imulti_start PL_multi_start
+#define PL_Imy_cxt_keys PL_my_cxt_keys
#define PL_Imy_cxt_list PL_my_cxt_list
#define PL_Imy_cxt_size PL_my_cxt_size
#define PL_Inexttoke PL_nexttoke
diff --git a/global.sym b/global.sym
index 281ab12d1a..7b38aa9ae2 100644
--- a/global.sym
+++ b/global.sym
@@ -727,6 +727,7 @@ Perl_my_sprintf
Perl_my_snprintf
Perl_my_vsnprintf
Perl_my_cxt_init
+Perl_my_cxt_index
Perl_my_strlcat
Perl_my_strlcpy
# ex: set ro:
diff --git a/hv.c b/hv.c
index fbfdce3e73..ea7247e6b1 100644
--- a/hv.c
+++ b/hv.c
@@ -2996,6 +2996,7 @@ and C<refcounted_he_free> iterates onto the parent node.
void
Perl_refcounted_he_free(pTHX_ struct refcounted_he *he) {
+ dVAR;
PERL_UNUSED_CONTEXT;
while (he) {
diff --git a/intrpvar.h b/intrpvar.h
index 7fd8670fa5..660b716e54 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -545,6 +545,9 @@ PERLVARI(Idumper_fd, int, -1)
#ifdef PERL_IMPLICIT_CONTEXT
PERLVARI(Imy_cxt_size, int, 0) /* size of PL_my_cxt_list */
PERLVARI(Imy_cxt_list, void **, NULL) /* per-module array of MY_CXT pointers */
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+PERLVARI(Imy_cxt_keys, const char **, NULL) /* per-module array of pointers to MY_CXT_KEY constants */
+#endif
#endif
#ifdef PERL_TRACK_MEMPOOL
diff --git a/lib/ExtUtils/Constant/ProxySubs.pm b/lib/ExtUtils/Constant/ProxySubs.pm
index 9b0737293e..6cef5fc709 100644
--- a/lib/ExtUtils/Constant/ProxySubs.pm
+++ b/lib/ExtUtils/Constant/ProxySubs.pm
@@ -242,7 +242,9 @@ static MGVTBL not_defined_vtbl = {
EXPLODE
+#ifndef SYMBIAN
static HV *${c_subname}_missing = NULL;
+#endif
DONT
@@ -318,8 +320,10 @@ EOBOOT
'symbol_table',
$add_symbol_subname);
}
- print $xs_fh "\n", $explosives ? "" : <<"EOBOOT";
+ print $xs_fh $explosives ? "\n" : <<"EOBOOT";
+#ifndef SYMBIAN
${c_subname}_missing = newHV();
+#endif
EOBOOT
print $xs_fh <<"EOBOOT";
@@ -372,11 +376,12 @@ EXPLODE
CvXSUB(cv) = NULL;
CvXSUBANY(cv).any_ptr = NULL;
}
-
+#ifndef SYMBIAN
if (!hv_store(${c_subname}_missing, value_for_notfound->name,
value_for_notfound->namelen, &PL_sv_yes, 0))
Perl_croak($athx "Couldn't add key '%s' to missing_hash",
value_for_notfound->name);
+#endif
DONT
print $xs_fh <<"EOBOOT";
@@ -456,6 +461,9 @@ $xs_subname(sv)
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
+#ifdef SYMBIAN
+ sv = newSVpvf("%"SVf" is not a valid $package_sprintf_safe macro", sv);
+#else
if (hv_exists(${c_subname}_missing, s, SvUTF8(sv) ? -(I32)len : (I32)len)) {
sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
", used", sv);
@@ -463,7 +471,8 @@ $xs_subname(sv)
sv = newSVpvf("%"SVf" is not a valid $package_sprintf_safe macro",
sv);
}
- PUSHs(sv_2mortal(sv));
+#endif
+ PUSHs(sv_2mortal(sv));
DONT
}
diff --git a/mg.c b/mg.c
index d658bbca33..acc6fa825d 100644
--- a/mg.c
+++ b/mg.c
@@ -1843,7 +1843,7 @@ Perl_magic_setpos(pTHX_ SV *sv, MAGIC *mg)
SSize_t pos;
STRLEN len;
STRLEN ulen = 0;
- MAGIC *found;
+ MAGIC* found;
PERL_UNUSED_ARG(mg);
@@ -1859,7 +1859,7 @@ Perl_magic_setpos(pTHX_ SV *sv, MAGIC *mg)
sv_force_normal_flags(lsv, 0);
#endif
found = sv_magicext(lsv, NULL, PERL_MAGIC_regex_global, &PL_vtbl_mglob,
- NULL, 0);
+ NULL, 0);
}
else if (!SvOK(sv)) {
found->mg_len = -1;
diff --git a/perl.h b/perl.h
index 1742d61d05..14e76d8f4b 100644
--- a/perl.h
+++ b/perl.h
@@ -2066,6 +2066,12 @@ int isnan(double d);
# endif
#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER < 1400) && (WINVER < 0x0500)
+/* VC7 or 7.1, building with pre-VC7 runtime libraries. */
+long _ftol( double ); /* Defined by VC6 C libs. */
+long _ftol2( double dblSource ) { return _ftol( dblSource ); }
+#endif
+
/* The default is to use Perl's own atof() implementation (in numeric.c).
* Usually that is the one to use but for some platforms (e.g. UNICOS)
* it is however best to use the native implementation of atof.
@@ -5311,6 +5317,39 @@ typedef struct am_table_short AMTS;
#if defined(PERL_IMPLICIT_CONTEXT)
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+
+/* This must appear in all extensions that define a my_cxt_t structure,
+ * right after the definition (i.e. at file scope). The non-threads
+ * case below uses it to declare the data as static. */
+#define START_MY_CXT
+#define MY_CXT_INDEX Perl_my_cxt_index(aTHX_ MY_CXT_KEY)
+
+/* Creates and zeroes the per-interpreter data.
+ * (We allocate my_cxtp in a Perl SV so that it will be released when
+ * the interpreter goes away.) */
+#define MY_CXT_INIT \
+ my_cxt_t *my_cxtp = \
+ (my_cxt_t*)Perl_my_cxt_init(aTHX_ MY_CXT_KEY, sizeof(my_cxt_t))
+#define MY_CXT_INIT_INTERP(my_perl) \
+ my_cxt_t *my_cxtp = \
+ (my_cxt_t*)Perl_my_cxt_init(my_perl, MY_CXT_KEY, sizeof(my_cxt_t))
+
+/* This declaration should be used within all functions that use the
+ * interpreter-local data. */
+#define dMY_CXT \
+ my_cxt_t *my_cxtp = (my_cxt_t *)PL_my_cxt_list[MY_CXT_INDEX]
+#define dMY_CXT_INTERP(my_perl) \
+ my_cxt_t *my_cxtp = (my_cxt_t *)(my_perl)->Imy_cxt_list[MY_CXT_INDEX]
+
+/* Clones the per-interpreter data. */
+#define MY_CXT_CLONE \
+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
+ Copy(PL_my_cxt_list[MY_CXT_INDEX], my_cxtp, 1, my_cxt_t);\
+ PL_my_cxt_list[MY_CXT_INDEX] = my_cxtp \
+
+#else /* #ifdef PERL_GLOBAL_STRUCT_PRIVATE */
+
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
@@ -5339,6 +5378,8 @@ typedef struct am_table_short AMTS;
Copy(PL_my_cxt_list[my_cxt_index], my_cxtp, 1, my_cxt_t);\
PL_my_cxt_list[my_cxt_index] = my_cxtp \
+#endif /* #ifdef PERL_GLOBAL_STRUCT_PRIVATE */
+
/* This macro must be used to access members of the my_cxt_t structure.
* e.g. MYCXT.some_data */
#define MY_CXT (*my_cxtp)
diff --git a/perlapi.h b/perlapi.h
index 25473234a5..a69addb3f6 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -446,6 +446,8 @@ END_EXTERN_C
#define PL_multi_open (*Perl_Imulti_open_ptr(aTHX))
#undef PL_multi_start
#define PL_multi_start (*Perl_Imulti_start_ptr(aTHX))
+#undef PL_my_cxt_keys
+#define PL_my_cxt_keys (*Perl_Imy_cxt_keys_ptr(aTHX))
#undef PL_my_cxt_list
#define PL_my_cxt_list (*Perl_Imy_cxt_list_ptr(aTHX))
#undef PL_my_cxt_size
diff --git a/perlio.c b/perlio.c
index 0d4231c9a0..603274e099 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2399,7 +2399,7 @@ PerlIO_cleanup(pTHX)
void PerlIO_teardown(pTHX) /* Call only from PERL_SYS_TERM(). */
{
-
+ dVAR;
#ifdef DEBUGGING
{
/* By now all filehandles should have been closed, so any
@@ -2423,8 +2423,6 @@ void PerlIO_teardown(pTHX) /* Call only from PERL_SYS_TERM(). */
}
}
-
-
/*--------------------------------------------------------------------------------------*/
/*
* Bottom-most level for UNIX-like case
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 5cdc152387..992afe8ab8 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -5503,7 +5503,7 @@ to contain an C<SV*> and is stored as-is with its REFCNT incremented.
(This is now used as a subroutine by C<sv_magic>.)
- MAGIC * sv_magicext(SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen)
+ MAGIC * sv_magicext(SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
=for hackers
Found in file sv.c
diff --git a/proto.h b/proto.h
index e988ca7287..23e5857597 100644
--- a/proto.h
+++ b/proto.h
@@ -2263,7 +2263,7 @@ PERL_CALLCONV STRLEN Perl_sv_len_utf8(pTHX_ SV* sv);
PERL_CALLCONV void Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen)
+PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV SV* Perl_sv_mortalcopy(pTHX_ SV* oldsv)
@@ -4447,10 +4447,19 @@ PERL_CALLCONV int Perl_my_vsnprintf(char *buffer, const Size_t len, const char *
PERL_CALLCONV void Perl_my_clearenv(pTHX);
#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV int Perl_my_cxt_index(pTHX_ const char *my_cxt_key)
+ __attribute__nonnull__(pTHX_1);
+
+#else
PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *index, size_t size)
__attribute__nonnull__(pTHX_1);
#endif
+#endif
#ifndef HAS_STRLCAT
PERL_CALLCONV Size_t Perl_my_strlcat(char *dst, const char *src, Size_t size);
diff --git a/sv.c b/sv.c
index 58c495e76c..487582a44a 100644
--- a/sv.c
+++ b/sv.c
@@ -4358,7 +4358,7 @@ to contain an C<SV*> and is stored as-is with its REFCNT incremented.
=cut
*/
MAGIC *
-Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtable,
+Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtable,
const char* name, I32 namlen)
{
dVAR;
@@ -4420,7 +4420,7 @@ Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtable,
else
mg->mg_ptr = (char *) name;
}
- mg->mg_virtual = vtable;
+ mg->mg_virtual = (MGVTBL *) vtable;
mg_magical(sv);
if (SvGMAGICAL(sv))
@@ -4447,7 +4447,7 @@ void
Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 namlen)
{
dVAR;
- MGVTBL *vtable;
+ const MGVTBL *vtable;
MAGIC* mg;
#ifdef PERL_OLD_COPY_ON_WRITE
@@ -10298,6 +10298,7 @@ Perl_any_dup(pTHX_ void *v, const PerlInterpreter *proto_perl)
ANY *
Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
{
+ dVAR;
ANY * const ss = proto_perl->Tsavestack;
const I32 max = proto_perl->Tsavestack_max;
I32 ix = proto_perl->Tsavestack_ix;
@@ -11042,9 +11043,17 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
if (PL_my_cxt_size) {
Newx(PL_my_cxt_list, PL_my_cxt_size, void *);
Copy(proto_perl->Imy_cxt_list, PL_my_cxt_list, PL_my_cxt_size, void *);
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+ Newx(PL_my_cxt_keys, PL_my_cxt_size, char *);
+ Copy(proto_perl->Imy_cxt_keys, PL_my_cxt_keys, PL_my_cxt_size, char *);
+#endif
}
- else
+ else {
PL_my_cxt_list = (void**)NULL;
+#ifdef PERL_GLOBAL_STRUCT_PRIVATE
+ PL_my_cxt_keys = (void**)NULL;
+#endif
+ }
PL_modglobal = hv_dup_inc(proto_perl->Imodglobal, param);
PL_custom_op_names = hv_dup_inc(proto_perl->Icustom_op_names,param);
PL_custom_op_descs = hv_dup_inc(proto_perl->Icustom_op_descs,param);
diff --git a/symbian/PerlApp.cpp b/symbian/PerlApp.cpp
index d90cc044ff..ffca7afc52 100644
--- a/symbian/PerlApp.cpp
+++ b/symbian/PerlApp.cpp
@@ -77,7 +77,7 @@ TUid CPerlAppApplication::AppDllUid() const
return KPerlAppUid;
}
-enum TPerlAppPanic
+enum TPerlAppPanic
{
EPerlAppCommandUnknown = 1
};
@@ -115,12 +115,12 @@ static TBool IsInInbox(TFileName aFileName)
static TBool IsPerlModule(TParsePtrC aParsed)
{
- return aParsed.Ext().CompareF(_L(".pm")) == 0;
+ return aParsed.Ext().CompareF(_L(".pm")) == 0;
}
static TBool IsPerlScript(TParsePtrC aParsed)
{
- return aParsed.Ext().CompareF(_L(".pl")) == 0;
+ return aParsed.Ext().CompareF(_L(".pl")) == 0;
}
static void CopyFromInboxL(RFs aFs, const TFileName& aSrc, const TFileName& aDst)
@@ -182,7 +182,7 @@ static TBool FindPerlPackageName(TPeekBuffer aPeekBuffer, TInt aOff, TFileName&
isALPHA(aPeekBuffer[j])) {
while (j < n &&
isALNUM(aPeekBuffer[j]) &&
- i < m)
+ i < m)
aFn[i++] = aPeekBuffer[j++];
}
}
@@ -238,7 +238,7 @@ static TBool InstallStuffL(const TFileName &aSrc, TParse aDrive, TParse aFile, T
{
TFileName aDst;
TPtrC drive = aDrive.Drive();
- TPtrC namext = aFile.NameAndExt();
+ TPtrC namext = aFile.NameAndExt();
aDst.Format(_L("%S%S%S"), &drive, &KScriptPrefix, &namext);
if (!IsPerlScript(aDst) && !LooksLikePerlL(aPeekBuffer)) {
@@ -266,7 +266,7 @@ static TBool RunStuffL(const TFileName& aScriptName, TPeekBuffer aPeekBuffer)
if (isModule)
message.Format(_L("Really run module %S?"), &aScriptName);
- else
+ else
message.Format(_L("Run %S?"), &aScriptName);
if (CPerlUi::YesNoDialogL(message))
DoRunScriptL(aScriptName);
@@ -435,9 +435,9 @@ void CPerlAppAppUi::DoHandleCommandL(TInt aCommand) {
#ifdef __SERIES60__
_LIT(prompt, "Oneliner:");
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
_LIT(prompt, "Code:"); // The title has "Oneliner" already.
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
CPerlAppAppUi* cAppUi =
static_cast<CPerlAppAppUi*>(CEikonEnv::Static()->EikAppUi());
if (CPerlUi::TextQueryDialogL(_L("Oneliner"),
@@ -450,16 +450,26 @@ void CPerlAppAppUi::DoHandleCommandL(TInt aCommand) {
CnvUtfConverter::ConvertFromUnicodeToUtf8(utf8,
cAppUi->iOneLiner);
CPerlBase* perl = CPerlBase::NewInterpreterLC();
- int argc = 3;
- char **argv = (char**) malloc(argc * sizeof(char *));
+#ifdef __SERIES90__
+ int argc = 5;
+#else
+ int argc = 3;
+#endif
+ char **argv = (char**) malloc(argc * sizeof(char *));
User::LeaveIfNull(argv);
TCleanupItem argvCleanupItem = TCleanupItem(free, argv);
CleanupStack::PushL(argvCleanupItem);
argv[0] = (char *) "perl";
argv[1] = (char *) "-le";
+#ifdef __SERIES90__
+ argv[2] = (char *) "unshift @INC, 'C:/Mydocs';";
+ argv[3] = (char *) "-e";
+ argv[4] = (char *) utf8.PtrZ();
+#else
argv[2] = (char *) utf8.PtrZ();
- perl->ParseAndRun(argc, argv);
+#endif
+ perl->ParseAndRun(argc, argv);
CleanupStack::PopAndDestroy(2, perl);
}
}
@@ -497,7 +507,7 @@ void CPerlAppAppUi::DoHandleCommandL(TInt aCommand) {
}
}
-CApaDocument* CPerlAppApplication::CreateDocumentL()
+CApaDocument* CPerlAppApplication::CreateDocumentL()
{
CPerlAppDocument* cDoc = new (ELeave) CPerlAppDocument(*this);
return cDoc;
@@ -524,7 +534,7 @@ CFileStore* CPerlAppDocument::OpenFileL(TBool aDoOpen, const TDesC& aFileName, R
#endif // #ifndef PerlAppMinimal
-EXPORT_C CApaApplication* NewApplication()
+EXPORT_C CApaApplication* NewApplication()
{
return new CPerlAppApplication;
}
diff --git a/symbian/PerlApp.h b/symbian/PerlApp.h
index 43f61b60d5..cbf1963cf4 100644
--- a/symbian/PerlApp.h
+++ b/symbian/PerlApp.h
@@ -73,9 +73,9 @@ class CPerlAppAppUi : public CPerlUiAppUi
class CPerlAppAppView : public CPerlUiAppView
{
public:
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
void HandleCommandL(TInt aCommand);
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
};
#endif // __PerlApp_h__
diff --git a/symbian/PerlUi.cpp b/symbian/PerlUi.cpp
index 384148b679..01be136d09 100644
--- a/symbian/PerlUi.cpp
+++ b/symbian/PerlUi.cpp
@@ -13,14 +13,14 @@
# endif
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
# include <eikon.hrh>
# include <cknflash.h>
# include <ckndgopn.h>
# include <ckndgfob.h>
# include <eiklabel.h>
# include <cknconf.h>
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
# include <qikon.hrh>
@@ -42,9 +42,9 @@
#include "PerlUi.hrh"
#include "PerlUi.rsg"
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
#include "Eikon.rsg"
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#include "EXTERN.h"
#include "perl.h"
@@ -74,9 +74,9 @@ EXPORT_C TBool CPerlUi::OkCancelDialogL(TDesC& aMessage)
dlg->SetTextL(aMessage);
return dlg->RunDlgLD() == EAknSoftkeyOk;
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
return CCknConfirmationDialog::RunDlgWithDefaultIconLD(aMessage, R_EIK_BUTTONS_CANCEL_OK);
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
CEikDialog* dlg = new (ELeave) CEikDialog();
return dlg->ExecuteLD(R_PERLUI_OK_CANCEL_DIALOG) == EEikBidOk;
@@ -92,9 +92,9 @@ EXPORT_C TBool CPerlUi::YesNoDialogL(TDesC& aMessage)
dlg->SetTextL(aMessage);
return dlg->RunDlgLD() == EAknSoftkeyOk;
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
return CCknConfirmationDialog::RunDlgWithDefaultIconLD(aMessage, R_EIK_BUTTONS_NO_YES);
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
CEikDialog* dlg = new (ELeave) CEikDialog();
return dlg->ExecuteLD(R_PERLUI_YES_NO_DIALOG) == EEikBidOk;
@@ -107,9 +107,9 @@ EXPORT_C void CPerlUi::InformationNoteL(TDesC& aMessage)
CAknInformationNote* note = new (ELeave) CAknInformationNote;
note->ExecuteLD(aMessage);
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
CEikonEnv::Static()->InfoMsg(aMessage);
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
}
EXPORT_C TInt CPerlUi::WarningNoteL(TDesC& aMessage)
@@ -118,13 +118,13 @@ EXPORT_C TInt CPerlUi::WarningNoteL(TDesC& aMessage)
CAknWarningNote* note = new (ELeave) CAknWarningNote;
return note->ExecuteLD(aMessage);
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
CEikonEnv::Static()->AlertWin(aMessage);
return ETrue;
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
}
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
CPerlUiTextQueryDialog::CPerlUiTextQueryDialog(HBufC*& aBuffer) :
iData(aBuffer)
@@ -147,7 +147,7 @@ void CPerlUiTextQueryDialog::PreLayoutDynInitL()
/* TODO: OfferKeyEventL() so that newline can be seen as 'OK'.
* Or a hotkey for the button? */
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aPrompt, TDes& aData, const TInt aMaxLength)
{
@@ -158,7 +158,7 @@ EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aProm
dlg->SetMaxLength(aMaxLength);
return dlg->ExecuteLD(R_PERLUI_TEXT_QUERY_DIALOG);
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
HBufC* data = NULL;
CPerlUiTextQueryDialog* dlg =
new (ELeave) CPerlUiTextQueryDialog(data);
@@ -170,7 +170,7 @@ EXPORT_C TBool CPerlUi::TextQueryDialogL(const TDesC& aTitle, const TDesC& aProm
return ETrue;
}
return EFalse;
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
}
EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename)
@@ -179,7 +179,7 @@ EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename)
return AknCommonDialogs::RunSelectDlgLD(aFilename,
R_PERLUI_FILE_SELECTION_DIALOG);
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
if (CCknOpenFileDialog::RunDlgLD(aFilename,
CCknFileListDialogBase::EShowAllDrives
|CCknFileListDialogBase::EShowSystemFilesAndFolders
@@ -194,7 +194,7 @@ EXPORT_C TBool CPerlUi::FileQueryDialogL(TDes& aFilename)
CEikonEnv::Static()->InfoMsg(_L("File not found"));
}
return EFalse;
-#endif /* #ifdef __SERIES80__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
return EFalse; // No filesystem access in UIQ 2.x!
#endif /* #ifdef __UIQ__ */
@@ -218,7 +218,7 @@ EXPORT_C void CPerlUiAppUi::HandleCommandL(TInt aCommand)
#endif /* #ifdef __SERIES60__ */
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
EXPORT_C void CPerlUiAppView::HandleCommandL(TInt aCommand, CPerlUiAppUi* aAppUi) {
aAppUi->DoHandleCommandL(aCommand);
@@ -236,7 +236,7 @@ EXPORT_C void CPerlUiAppUi::HandleCommandL(TInt aCommand) {
}
}
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
CPerlUiAppView* CPerlUiAppView::NewL(const TRect& aRect)
{
diff --git a/symbian/PerlUi.h b/symbian/PerlUi.h
index b6011c82da..9a5002032f 100644
--- a/symbian/PerlUi.h
+++ b/symbian/PerlUi.h
@@ -11,14 +11,14 @@
# include <akndoc.h>
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
# include <eikapp.h>
# include <eikappui.h>
# include <eikdoc.h>
# include <eikbctrl.h>
# include <eikgted.h>
# include <eikdialg.h>
-#endif /* #ifdef __SERIES60__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
# include <qikapplication.h>
@@ -38,13 +38,13 @@
# define CgPerlUiAppView CCoeControl
#endif /* #ifdef __SERIES60__ */
-#ifdef __SERIES80__
+#if defined(__SERIES80__) || defined(__SERIES90__)
# define CgPerlUiDocument CEikDocument
# define CgPerlUiApplication CEikApplication
# define CgPerlUiAppUi CEikAppUi
# define CgPerlUiNoteDialog CCknFlashingDialog
# define CgPerlUiAppView CEikBorderedControl
-#endif /* #ifdef __SERIES60__ */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) */
#ifdef __UIQ__
# define CgPerlUiDocument CEikDocument
@@ -80,14 +80,14 @@ class CPerlUiAppView : public CgPerlUiAppView
static CPerlUiAppView* NewLC(const TRect& aRect);
~CPerlUiAppView();
void Draw(const TRect& aRect) const;
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
IMPORT_C void HandleCommandL(TInt aCommand, CPerlUiAppUi* aAppUi);
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
private:
void ConstructL(const TRect& aRect);
};
-#if defined(__SERIES80__) || defined(__UIQ__)
+#if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__)
class CPerlUiTextQueryDialog : public CEikDialog
{
@@ -104,7 +104,7 @@ class CPerlUiTextQueryDialog : public CEikDialog
TBool OkToExitL(TInt aKeycode);
};
-#endif /* #if defined(__SERIES80__) || defined(__UIQ__) */
+#endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */
class CPerlUi : public CgPerlUiAppUi
{
diff --git a/symbian/config.pl b/symbian/config.pl
index e23b35992c..52b6e71a67 100644
--- a/symbian/config.pl
+++ b/symbian/config.pl
@@ -31,6 +31,7 @@ my $WIN = $ENV{WIN} ; # 'wins', 'winscw' (from sdk.pl)
my $ARM = 'thumb'; # 'thumb', 'armv5'
my $S60SDK = $ENV{S60SDK}; # qw(1.2 2.0 2.1 2.6) (from sdk.pl)
my $S80SDK = $ENV{S80SDK}; # qw(2.0) (from sdk.pl)
+my $S90SDK = $ENV{S90SDK}; # qw(1.1) (from sdk.pl)
my $UIQSDK = $ENV{UIQSDK}; # qw(2.0 2.1) (from sdk.pl)
my $UREL = $ENV{UREL}; # from sdk.pl
@@ -40,7 +41,7 @@ my $UARM = $ENV{UARM}; # from sdk.pl
die "$0: SDK not recognized\n"
if !defined($SYMBIAN_VERSION) ||
!defined($SDK_VERSION) ||
- (!defined($S60SDK) && !defined($S80SDK) && !defined($UIQSDK));
+ (!defined($S60SDK) && !defined($S80SDK) && !defined($S90SDK) && !defined($UIQSDK));
die "$0: does not know which Windows compiler to use\n"
unless defined $WIN;
@@ -86,6 +87,9 @@ __EOF__
print $fh "MACRO\t__SERIES80_1X__\n" if $S80SDK =~ /^1\./;
print $fh "MACRO\t__SERIES80_2X__\n" if $S80SDK =~ /^2\./;
}
+ if ($SDK_VARIANT eq 'S90') {
+ print $fh "MACRO\t__SERIES90__\n";
+ }
if ($SDK_VARIANT eq 'UIQ') {
print $fh "MACRO\t__UIQ__\n";
print $fh "MACRO\t__UIQ_1X__\n" if $UIQSDK =~ /^1\./;
@@ -95,6 +99,7 @@ __EOF__
@c = map { glob } qw(*.c); # Find the .c files.
@c = map { lc } @c; # Lowercase the names.
@c = grep { !/malloc\.c/ } @c; # Use the system malloc.
+ @c = grep { !/madly\.c/ } @c; # mad is undef.
@c = grep { !/main\.c/ } @c; # main.c must be explicit.
push @c, map { lc } @x;
@c = map { s:^\.\./::; $_ } @c; # Remove the leading ../
@@ -124,7 +129,7 @@ LIBRARY hal.lib
LIBRARY estor.lib
__EOF__
}
- if ($SDK_VARIANT =~ /^S[68]0$/) {
+ if ($SDK_VARIANT =~ /^S[689]0$/) {
print $fh <<__EOF__;
LIBRARY commonengine.lib
__EOF__
@@ -135,7 +140,7 @@ LIBRARY avkon.lib
LIBRARY commondialogs.lib
__EOF__
}
- if (defined $S80SDK) {
+ if ((defined $S80SDK) or (defined $S90SDK)) {
print $fh <<__EOF__;
LIBRARY eikctl.lib
LIBRARY eikcoctl.lib
@@ -211,6 +216,7 @@ sub load_config_sh {
my ( $var, $val ) = ( $1, $2 );
$val =~ s/x.y.z/$R_V_SV/gi;
$val =~ s/thumb/$ARM/gi;
+ $val = "C:$val" if (defined($S90SDK) and ($val =~ /^(\/|\\\\)system[\/\\]/i));
$val = "'$SYMBIAN_VERSION'" if $var eq 'osvers';
$val = "'$SDK_VERSION'" if $var eq 'sdkvers';
$config{$var} = $val;
@@ -265,7 +271,7 @@ __EOF__
sub create_DynaLoader_cpp {
print "\text\\DynaLoader\\DynaLoader.cpp\n";
system(
-q[perl -Ilib lib\ExtUtils\xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
+q[xsubpp ext\DynaLoader\dl_symbian.xs >ext\DynaLoader\DynaLoader.cpp]
) == 0
or die "$0: creating DynaLoader.cpp failed: $!\n";
push @unclean, 'ext\DynaLoader\DynaLoader.cpp';
@@ -284,6 +290,10 @@ sub create_symbian_port_h {
$S80SDK =~ /^(\d+)\.(\d+)$/;
($sdkmajor, $sdkminor) = ($1, $2);
}
+ if ($SDK_VARIANT eq 'S90') {
+ $S90SDK =~ /^(\d+)\.(\d+)$/;
+ ($sdkmajor, $sdkminor) = ($1, $2);
+ }
if ($SDK_VARIANT eq 'UIQ') {
$UIQSDK =~ /^(\d+)\.(\d+)$/;
($sdkmajor, $sdkminor) = ($1, $2);
@@ -315,7 +325,7 @@ __EOF__
sub create_perlmain_c {
print "\tperlmain.c\n";
system(
-q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c]
+q[perl -ne "print qq[ char *file = __FILE__;\n] if /dXSUB_SYS/;print unless /PERL_UNUSED_CONTEXT/;print qq[ newXS(\"DynaLoader::boot_DynaLoader\", boot_DynaLoader, file);\n] if /dXSUB_SYS/;print qq[EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);\n] if /Do not delete this line/" miniperlmain.c > perlmain.c]
) == 0
or die "$0: Creating perlmain.c failed: $!\n";
push @unclean, 'perlmain.c';
@@ -329,16 +339,18 @@ sub create_PerlApp_pkg {
qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
defined $S80SDK ?
qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
+ defined $S90SDK ?
+qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
defined $UIQSDK && $SDK_VERSION =~ /^(\d)\.(\d)$/ ?
qq[;Supports UIQ v2.1\n(0x101F617B), $1, $2, 0, {"UIQ21ProductID"}\n] :
";Supports Series NN";
my $APPS = $UREL;
- if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK) { # Do only if not in S60 1.2 VC.
+ if (($SDK_VARIANT eq 'S60' && $SDK_VERSION ne '1.2' || $WIN eq 'winscw') || defined $S80SDK || defined $S90SDK) { # Do only if not in S60 1.2 VC.
$APPS =~ s!\\epoc32\\release\\(.+)\\$UARM$!\\epoc32\\data\\z\\system\\apps\\PerlApp!i;
}
# TODO: in S60 3.0 there will be no more recognizers.
my $mdl = qq["$UREL\\PerlRecog.mdl"-"!:\\system\\recogs\\PerlRecog.mdl";];
- my $AIF = $SDK_VARIANT =~ /^S[68]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : "";
+ my $AIF = $SDK_VARIANT =~ /^S[689]0/ ? qq["$APPS\\PerlApp.aif"-"!:\\system\\apps\\PerlApp\\PerlApp.aif"] : "";
print PERLAPP_PKG <<__EOF__;
; !!!!!! DO NOT EDIT THIS FILE !!!!!!
; This file is built by symbian\\config.pl.
@@ -365,7 +377,11 @@ __EOF__
if ( open( DEMOS, "perl symbian\\demo_pl list |" ) ) {
while (<DEMOS>) {
chomp;
- print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
+ if (defined $S90SDK) {
+ print PERLAPP_PKG qq["$_"-"!:\\Mydocs\\Perl\\$_"\n];
+ } else {
+ print PERLAPP_PKG qq["$_"-"!:\\Perl\\$_"\n];
+ }
}
close(DEMOS);
}
@@ -438,6 +454,15 @@ LIBRARY eikdlg.lib
LIBRARY ckndlg.lib
__EOF__
}
+ if (defined $S90SDK) {
+ push @MACRO, '__SERIES90__';
+ push @LIB, <<__EOF__;
+LIBRARY eikctl.lib
+LIBRARY eikcoctl.lib
+LIBRARY eikdlg.lib
+LIBRARY ckndlg.lib
+__EOF__
+ }
if (defined $UIQSDK) {
push @MACRO, '__UIQ__';
push @MACRO, '__UIQ_1X__' if $UIQSDK =~ /^1\./;
@@ -488,7 +513,7 @@ MACRO $macro
__EOF__
}
}
- if ($SDK_VARIANT =~ /^S[68]0$/) {
+ if ($SDK_VARIANT =~ /^S[689]0$/) {
print PERLAPP_MMP <<__EOF__;
AIF PerlApp.aif . PerlAppAif.rss
__EOF__
@@ -641,7 +666,17 @@ XSBOPT = --win=\$(WIN) --arm=\$(ARM)
lib\\Config.pm:
copy symbian\\config.sh config.sh
+__EOF__
+ if (defined $S90SDK) {
+ print MAKEFILE <<__EOF__;
+ perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g; s!='(\\\\\\\\system)!='C:\\1!" config.sh
+__EOF__
+ } else {
+ print MAKEFILE <<__EOF__;
perl -pi.bak -e "s:x\\.y\\.z+:$R_V_SV:g" config.sh
+__EOF__
+ };
+ print MAKEFILE <<__EOF__;
perl \$(XLIB) configpm --cross=symbian
copy xlib\\symbian\\Config.pm lib\\Config.pm
perl -pi.bak -e "s:x\\.y\\.z:$R_V_SV:g" lib\\Config.pm
@@ -682,7 +717,7 @@ perl${VERSION}lib.sis perllib.sis: \$(PM)
perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis
perl symbian\\makesis.pl perl${VERSION}ext
-EXT = Compress::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attrs
+EXT = Compress::Raw::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attrs
buildext: perldll symbian\\xsbuild.pl lib\\Config.pm
perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT)
diff --git a/symbian/config.sh b/symbian/config.sh
index 450effb9d2..f58e71357f 100644
--- a/symbian/config.sh
+++ b/symbian/config.sh
@@ -60,6 +60,8 @@ d_attribute_noreturn='undef'
d_attribute_pure='undef'
d_attribute_unused='undef'
d_attribute_warn_unused_result='undef'
+d_builtin_expect='undef'
+d_builtin_choose_expr='undef'
d_bcmp='undef'
d_bcopy='undef'
d_bsd='undef'
diff --git a/symbian/cwd.pl b/symbian/cwd.pl
index d3272d2de5..3ee402be8d 100644
--- a/symbian/cwd.pl
+++ b/symbian/cwd.pl
@@ -1,6 +1,6 @@
use strict;
use Cwd;
my $CWD = getcwd();
-$CWD =~ s!^C:!!i;
+$CWD =~ s!^[a-z]:!!i;
$CWD =~ s!/!\\!g;
$CWD;
diff --git a/symbian/install.cfg b/symbian/install.cfg
index 3ff71e588a..b235ecf1a6 100644
--- a/symbian/install.cfg
+++ b/symbian/install.cfg
@@ -70,24 +70,29 @@ lib warnings/register.pm
# Extensions.
#
ext attrs
-ext Compress/Zlib -zlib-src
+ext Compress/Raw/Zlib -zlib-src
ext Cwd
ext Data/Dumper
ext Devel/Peek
ext Digest/MD5
+ext Digest/SHA
ext Errno
ext Fcntl CONST
ext File/Glob CONST
ext Filter/Util/Call
+ext Hash/Util
ext IO
ext List/Util
+ext Math/BigInt/FastCalc
ext MIME/Base64
ext PerlIO/scalar
ext PerlIO/via
ext SDBM_File -sdbm/db?.c -sdbm/util.c
ext Socket CONST
ext Storable
+ext Text/Soundex
ext Time/HiRes CONST
+ext Time/Piece
ext XSLoader
# ext B ERROR
# ext ByteLoader byterun.c ERROR VERSION
@@ -96,6 +101,8 @@ ext XSLoader
# ext Encode nonconst Encode/encode.h def_t.c encengine.c
# ext I18N/Langinfo PORT
# ext IPC/SysV PORT
+# ext NDBM_File PORT
+# ext ODBM_File PORT
# ext Opcode ERROR
# ext PerlIO/encoding Encode
# ext POSIX CONST USELESS
@@ -105,6 +112,7 @@ ext XSLoader
# ext threads PORT
# ext threads/shared PORT
# ext Unicode/Normalize nonconst
+# ext Win32 USELESS
# ext XS/APItest USELESS
# ext XS/Typemap nonconst USELESS
diff --git a/symbian/makesis.pl b/symbian/makesis.pl
index 8072249785..dbf533ce7b 100644
--- a/symbian/makesis.pl
+++ b/symbian/makesis.pl
@@ -19,6 +19,7 @@ my %PORT = %{ do "port.pl" };
my $ARM = 'thumb'; # TODO
my $S60SDK = $ENV{S60SDK}; # from sdk.pl
my $S80SDK = $ENV{S80SDK}; # from sdk.pl
+my $S90SDK = $ENV{S90SDK}; # from sdk.pl
my $UREL = $ENV{UREL}; # from sdk.pl
$UREL =~ s/-ARM-/$ARM/;
@@ -160,6 +161,8 @@ for my $target (@target) {
qq[;Supports Series 60 v0.9\n(0x101F6F88), 0, 0, 0, {"Series60ProductID"}\n] :
defined $S80SDK ?
qq[;Supports Series 80 v2.0\n(0x101F8ED2), 0, 0, 0, {"Series80ProductID"}\n] :
+ defined $S90SDK ?
+qq[;Supports Series 90 v1.1\n(0x101FBE05), 0, 0, 0, {"Series90ProductID"}\n] :
";Supports Series NN";
open PKG, ">$pkg" or die "$0: failed to create $pkg: $!\n";
diff --git a/symbian/sdk.pl b/symbian/sdk.pl
index 71059a9831..0db16ed323 100644
--- a/symbian/sdk.pl
+++ b/symbian/sdk.pl
@@ -28,6 +28,9 @@ if ($ENV{PATH} =~ m!\\Symbian\\(.+?)\\(.+?)\\Epoc32\\gcc\\bin!i) {
} elsif ($SDK_NAME =~ m!S80_DP2_0_SDK!) {
$SDK_VARIANT = 'S80';
$SDK_VERSION = $ENV{S80SDK} = '2.0';
+ } elsif ($SDK_NAME =~ m!Nokia_7710_SDK!) {
+ $SDK_VARIANT = 'S90';
+ $SDK_VERSION = $ENV{S90SDK} = '1.1';
}
} elsif ($ENV{PATH} =~ m!\\Symbian\\UIQ_(\d)(\d)\\Epoc32\\gcc\\bin!i) {
$SDK_NAME = 'UIQ';
@@ -45,7 +48,7 @@ if ($ENV{PATH} =~ m!\\Symbian\\(.+?)\\(.+?)\\Epoc32\\gcc\\bin!i) {
if (open(GCC, "gcc -v 2>&1 |")) {
while (<GCC>) {
# print;
- if (/Reading specs from ((?:C:)?\\Symbian.+?)\\Epoc32\\/i) {
+ if (/Reading specs from (.+?)\\Epoc32\\/i) {
$SYMBIAN_ROOT = $1;
# The S60SDK tells the Series 60 SDK version.
if ($ENV{S60SDK}) {
diff --git a/symbian/xsbuild.pl b/symbian/xsbuild.pl
index b98b4af68c..aee912a1ae 100644
--- a/symbian/xsbuild.pl
+++ b/symbian/xsbuild.pl
@@ -101,18 +101,18 @@ die "$0: Symbian version undefined\n" unless defined $SymbianVersion;
$SymbianVersion =~ s:/:\\:g;
-die "$0: Symbian version '$SymbianVersion' not found\n"
- unless -d "\\Symbian\\$SymbianVersion";
+#die "$0: Symbian version '$SymbianVersion' not found\n"
+# unless -d "\\Symbian\\$SymbianVersion";
die "$0: Perl version undefined\n" unless defined $PerlVersion;
+$PERLSDK = "$SYMBIAN_ROOT\\Perl\\$PerlVersion";
+
die "$0: Perl version '$PerlVersion' not found\n"
- if !$CoreBuild && !-d "\\Symbian\\Perl\\$PerlVersion";
+ if !$CoreBuild && !-d $PERLSDK;
print "Configuring with Symbian $SymbianVersion and Perl $PerlVersion...\n";
-$PERLSDK = "\\Symbian\\Perl\\$PerlVersion";
-
$R_V_SV = $PerlVersion;
$VERSION = $PerlVersion unless defined $VERSION;
@@ -164,6 +164,7 @@ sub run_PL {
}
my $cmd;
if ($CoreBuild) {
+ $ENV{PERL_CORE} = 1;
# Problem: the Config.pm we have in $BUILDROOT\\lib carries the
# version number of the Perl we are building, while the Perl
# we are running might have some other version. Solution:
@@ -269,6 +270,10 @@ sub write_mmp {
push @{ $CONF{MACRO} }, '__SERIES80__'
unless grep { $_ eq '__SERIES80__' } @{ $CONF{MACRO} };
}
+ if ($SDK_VARIANT eq 'S90') {
+ push @{ $CONF{MACRO} }, '__SERIES90__'
+ unless grep { $_ eq '__SERIES90__' } @{ $CONF{MACRO} };
+ }
if ($SDK_VARIANT eq 'UIQ') {
push @{ $CONF{MACRO} }, '__UIQ__'
unless grep { $_ eq '__UIQ__' } @{ $CONF{MACRO} };
@@ -472,14 +477,14 @@ sub xsconfig {
}
}
if ( my @c = glob("*.c *.cpp */*.c */*.cpp") ) {
- @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\Zlib';
+ @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\Raw\Zlib';
for my $c (@c) {
$c =~ s:/:\\:g;
$src{$c}++;
}
}
if ( my @h = glob("*.h */*.h") ) {
- @h = grep { ! m:^zlib-src/: } @h if $ext eq 'ext\Compress\Zlib';
+ @h = grep { ! m:^zlib-src/: } @h if $ext eq 'ext\Compress\Raw\Zlib';
for my $h (@h) {
$h =~ s:/:\\:g;
$h = dirname($h);
@@ -685,7 +690,7 @@ __EOF__
sub update_cwd {
$CWD = getcwd();
- $CWD =~ s!^[CD]:!!i;
+ $CWD =~ s!^[A-Z]:!!i;
$CWD =~ s!/!\\!g;
}
@@ -901,7 +906,7 @@ __EOF__
or die "$0: make distclean failed\n";
}
}
- if ( $ext eq "ext\\Compress\\Zlib" ) {
+ if ( $ext eq "ext\\Compress\\Raw\\Zlib" ) {
my @bak;
find( sub { push @bak, $File::Find::name if /\.bak$/ }, "." );
unlink(@bak) if @bak;
diff --git a/util.c b/util.c
index 2912092fd4..3eb4f09ce6 100644
--- a/util.c
+++ b/util.c
@@ -5521,13 +5521,14 @@ Perl_my_clearenv(pTHX)
#ifdef PERL_IMPLICIT_CONTEXT
-/* implements the MY_CXT_INIT macro. The first time a module is loaded,
+/* Implements the MY_CXT_INIT macro. The first time a module is loaded,
the global PL_my_cxt_index is incremented, and that value is assigned to
that module's static my_cxt_index (who's address is passed as an arg).
Then, for each interpreter this function is called for, it makes sure a
void* slot is available to hang the static data off, by allocating or
extending the interpreter's PL_my_cxt_list array */
+#ifndef PERL_GLOBAL_STRUCT_PRIVATE
void *
Perl_my_cxt_init(pTHX_ int *index, size_t size)
{
@@ -5558,7 +5559,70 @@ Perl_my_cxt_init(pTHX_ int *index, size_t size)
Zero(p, size, char);
return p;
}
-#endif
+
+#else /* #ifndef PERL_GLOBAL_STRUCT_PRIVATE */
+
+int
+Perl_my_cxt_index(pTHX_ const char *my_cxt_key)
+{
+ dVAR;
+ int index;
+
+ for (index = 0; index < PL_my_cxt_index; index++) {
+ const char *key = PL_my_cxt_keys[index];
+ /* try direct pointer compare first - there are chances to success,
+ * and it's much faster.
+ */
+ if ((key == my_cxt_key) || strEQ(key, my_cxt_key))
+ return index;
+ }
+ return -1;
+}
+
+void *
+Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size)
+{
+ dVAR;
+ void *p;
+ int index;
+
+ index = Perl_my_cxt_index(aTHX_ my_cxt_key);
+ if (index == -1) {
+ /* this module hasn't been allocated an index yet */
+ MUTEX_LOCK(&PL_my_ctx_mutex);
+ index = PL_my_cxt_index++;
+ MUTEX_UNLOCK(&PL_my_ctx_mutex);
+ }
+
+ /* make sure the array is big enough */
+ if (PL_my_cxt_size <= index) {
+ int old_size = PL_my_cxt_size;
+ int i;
+ if (PL_my_cxt_size) {
+ while (PL_my_cxt_size <= index)
+ PL_my_cxt_size *= 2;
+ Renew(PL_my_cxt_list, PL_my_cxt_size, void *);
+ Renew(PL_my_cxt_keys, PL_my_cxt_size, const char *);
+ }
+ else {
+ PL_my_cxt_size = 16;
+ Newx(PL_my_cxt_list, PL_my_cxt_size, void *);
+ Newx(PL_my_cxt_keys, PL_my_cxt_size, const char *);
+ }
+ for (i = old_size; i < PL_my_cxt_size; i++) {
+ PL_my_cxt_keys[i] = 0;
+ PL_my_cxt_list[i] = 0;
+ }
+ }
+ PL_my_cxt_keys[index] = my_cxt_key;
+ /* newSV() allocates one more than needed */
+ p = (void*)SvPVX(newSV(size-1));
+ PL_my_cxt_list[index] = p;
+ Zero(p, size, char);
+ return p;
+}
+#endif /* #ifndef PERL_GLOBAL_STRUCT_PRIVATE */
+#endif /* PERL_IMPLICIT_CONTEXT */
#ifndef HAS_STRLCAT
Size_t