summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--XSUB.h2
-rw-r--r--doio.c4
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--mg.c4
-rw-r--r--perl.c6
-rw-r--r--perl.h4
-rw-r--r--perlio.c2
-rw-r--r--pp_ctl.c2
-rw-r--r--pp_sys.c4
-rw-r--r--symbian/config.pl1
-rw-r--r--symbian/find_writeable_data.pl73
-rw-r--r--symbian/sisify.pl1
-rw-r--r--util.c2
15 files changed, 92 insertions, 18 deletions
diff --git a/MANIFEST b/MANIFEST
index 700b1c5e59..6f3ea5ba95 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2644,6 +2644,7 @@ symbian/config.pl Configuration script for Symbian
symbian/config.sh Configuration data for Symbian
symbian/cwd.pl Helper code for config.pl
symbian/demo_pl "Archive" of demo code
+symbian/find_writeable_data.pl Development utility
symbian/install.cfg Installation instructions
symbian/makesis.pl Installation file creator
symbian/PerlAppAif.rss Symbian sample app code
diff --git a/XSUB.h b/XSUB.h
index 65c41bd738..c38ccd2bf2 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -100,7 +100,7 @@ is a lexical $_ in scope.
#if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
# define XS(name) __declspec(dllexport) void name(pTHX_ CV* cv)
#endif
-#if defined(SYMBIAN)
+#if defined(__SYMBIAN32__)
# define XS(name) EXPORT_C void name(pTHX_ CV* cv)
#endif
#ifndef XS
diff --git a/doio.c b/doio.c
index 640dfaf8d6..aa664a2dd1 100644
--- a/doio.c
+++ b/doio.c
@@ -1454,7 +1454,7 @@ Perl_do_aexec5(pTHX_ SV *really, register SV **mark, register SV **sp,
int fd, int do_report)
{
dVAR;
-#if defined(MACOS_TRADITIONAL) || defined(SYMBIAN)
+#if defined(MACOS_TRADITIONAL) || defined(__SYMBIAN32__)
Perl_croak(aTHX_ "exec? I'm not *that* kind of operating system");
#else
if (sp > mark) {
@@ -1505,7 +1505,7 @@ Perl_do_execfree(pTHX)
PL_Cmd = Nullch;
}
-#if !defined(OS2) && !defined(WIN32) && !defined(DJGPP) && !defined(EPOC) && !defined(SYMBIAN) && !defined(MACOS_TRADITIONAL)
+#if !defined(OS2) && !defined(WIN32) && !defined(DJGPP) && !defined(EPOC) && !defined(__SYMBIAN32__) && !defined(MACOS_TRADITIONAL)
bool
Perl_do_exec(pTHX_ const char *cmd)
diff --git a/embed.fnc b/embed.fnc
index 0ba6c4eb5d..a63fda8f36 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -184,7 +184,7 @@ p |void |do_chop |NN SV* asv|NN SV* sv
Ap |bool |do_close |NN GV* gv|bool not_implicit
p |bool |do_eof |NN GV* gv
p |bool |do_exec |NN const char* cmd
-#if defined(WIN32) || defined(SYMBIAN)
+#if defined(WIN32) || defined(__SYMBIAN32__)
Ap |int |do_aspawn |NN SV* really|NN SV** mark|NN SV** sp
Ap |int |do_spawn |NN char* cmd
Ap |int |do_spawn_nowait|NN char* cmd
diff --git a/embed.h b/embed.h
index 154d7e264f..81720fc6da 100644
--- a/embed.h
+++ b/embed.h
@@ -167,7 +167,7 @@
#define do_eof Perl_do_eof
#define do_exec Perl_do_exec
#endif
-#if defined(WIN32) || defined(SYMBIAN)
+#if defined(WIN32) || defined(__SYMBIAN32__)
#define do_aspawn Perl_do_aspawn
#define do_spawn Perl_do_spawn
#define do_spawn_nowait Perl_do_spawn_nowait
diff --git a/mg.c b/mg.c
index 46b2d75000..3ea8b82819 100644
--- a/mg.c
+++ b/mg.c
@@ -1112,7 +1112,7 @@ Perl_magic_clearenv(pTHX_ SV *sv, MAGIC *mg)
int
Perl_magic_set_all_env(pTHX_ SV *sv, MAGIC *mg)
{
-#if defined(VMS) || defined(EPOC) || defined(SYMBIAN)
+#if defined(VMS) || defined(EPOC)
Perl_die(aTHX_ "Can't make list assignment to %%ENV on this system");
#else
if (PL_localizing) {
@@ -1134,7 +1134,7 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
{
dVAR;
#ifndef PERL_MICRO
-#if defined(VMS) || defined(EPOC) || defined(SYMBIAN)
+#if defined(VMS) || defined(EPOC)
Perl_die(aTHX_ "Can't make list assignment to %%ENV on this system");
#else
# if defined(PERL_IMPLICIT_SYS) || defined(WIN32)
diff --git a/perl.c b/perl.c
index 2f8dbf4909..102a8bd8a3 100644
--- a/perl.c
+++ b/perl.c
@@ -2070,7 +2070,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
* or explicitly in some platforms.
* locale.c:Perl_init_i18nl10n() if the environment
* look like the user wants to use UTF-8. */
-#if defined(SYMBIAN)
+#if defined(__SYMBIAN32__)
PL_unicode = PERL_UNICODE_STD_FLAG; /* See PERL_SYMBIAN_CONSOLE_UTF8. */
#endif
if (PL_unicode) {
@@ -3272,7 +3272,7 @@ Perl_moreswitches(pTHX_ char *s)
PerlIO_printf(PerlIO_stdout(),"Built on " __DATE__ " " __TIME__ "\n\n");
wce_hitreturn();
#endif
-#ifdef SYMBIAN
+#ifdef __SYMBIAN32__
PerlIO_printf(PerlIO_stdout(),
"Symbian port by Nokia, 2004-2005\n");
#endif
@@ -4715,7 +4715,7 @@ S_init_perllib(pTHX)
#endif /* MACOS_TRADITIONAL */
}
-#if defined(DOSISH) || defined(EPOC) || defined(SYMBIAN)
+#if defined(DOSISH) || defined(EPOC) || defined(__SYMBIAN32__)
# define PERLLIB_SEP ';'
#else
# if defined(VMS)
diff --git a/perl.h b/perl.h
index f613aac8ad..7c2a05aa53 100644
--- a/perl.h
+++ b/perl.h
@@ -88,14 +88,14 @@
# endif
#endif
-#ifdef SYMBIAN
+#ifdef __SYMBIAN32__
# include "symbian/symbian_proto.h"
#endif
/* Any stack-challenged places. The limit varies (and often
* is configurable), but using more than a kilobyte of stack
* is usually dubious in these systems. */
-#if defined(EPOC) || defined(SYMBIAN)
+#if defined(EPOC) || defined(__SYMBIAN32__)
/* EPOC/Symbian: need to work around the SDK features. *
* On WINS: MS VC5 generates calls to _chkstk, *
* if a "large" stack frame is allocated. *
diff --git a/perlio.c b/perlio.c
index 86cc827ce5..a6d5d2af73 100644
--- a/perlio.c
+++ b/perlio.c
@@ -260,7 +260,7 @@ PerlIO_binmode(pTHX_ PerlIO *fp, int iotype, int mode, const char *names)
PerlIO *
PerlIO_fdupopen(pTHX_ PerlIO *f, CLONE_PARAMS *param, int flags)
{
-#if defined(PERL_MICRO) || defined(SYMBIAN)
+#if defined(PERL_MICRO) || defined(__SYMBIAN32__)
return NULL;
#else
#ifdef PERL_IMPLICIT_SYS
diff --git a/pp_ctl.c b/pp_ctl.c
index b2e43a7289..71917592f2 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3304,7 +3304,7 @@ PP(pp_require)
sv_setpv(namesv, unixdir);
sv_catpv(namesv, unixname);
# else
-# ifdef SYMBIAN
+# ifdef __SYMBIAN32__
if (PL_origfilename[0] &&
PL_origfilename[1] == ':' &&
!(dir[0] && dir[1] == ':'))
diff --git a/pp_sys.c b/pp_sys.c
index 2366490810..29265a3d9e 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4295,14 +4295,14 @@ PP(pp_system)
result = 0;
if (PL_op->op_flags & OPf_STACKED) {
SV *really = *++MARK;
-# if defined(WIN32) || defined(OS2) || defined(SYMBIAN)
+# if defined(WIN32) || defined(OS2) || defined(__SYMBIAN32__)
value = (I32)do_aspawn(really, MARK, SP);
# else
value = (I32)do_aspawn(really, (void **)MARK, (void **)SP);
# endif
}
else if (SP - MARK != 1) {
-# if defined(WIN32) || defined(OS2) || defined(SYMBIAN)
+# if defined(WIN32) || defined(OS2) || defined(__SYMBIAN32__)
value = (I32)do_aspawn(Nullsv, MARK, SP);
# else
value = (I32)do_aspawn(Nullsv, (void **)MARK, (void **)SP);
diff --git a/symbian/config.pl b/symbian/config.pl
index d37a49e875..21e9b2826c 100644
--- a/symbian/config.pl
+++ b/symbian/config.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl -w
# Copyright (c) 2004-2005 Nokia. All rights reserved.
+# This utility is licensed under the same terms as Perl itself.
use strict;
use lib "symbian";
diff --git a/symbian/find_writeable_data.pl b/symbian/find_writeable_data.pl
new file mode 100644
index 0000000000..24bf298713
--- /dev/null
+++ b/symbian/find_writeable_data.pl
@@ -0,0 +1,73 @@
+#!/usr/bin/perl -w
+
+#
+# find_writeable_data - find non-const data in Symbian object files
+#
+# Use this when PETRAN tells you "dll has (un)initialised data".
+# Expects to find the Symbian (GNU) nm in the executable path.
+#
+# Copyright (c) 2004-2005 Nokia. All rights reserved.
+#
+# This utility is licensed under the same terms as Perl itself.
+#
+
+use strict;
+
+BEGIN {
+ unless (exists $ENV{EPOCROOT}) {
+ die "$0: EPOCROOT unset\n";
+ }
+ if (open(my $fh, "nm --version |")) {
+ unless (<$fh> =~ /^GNU nm .*-psion-.*/) {
+ die "$0: Cannot find the GNU nm from Symbian\n";
+ }
+ close($fh);
+ } else {
+ die "$0: Cannot find any nm in the executable path: $!\n";
+ }
+ unless (@ARGV && $ARGV[0] =~ /\.mmp$/i) {
+ die "$0: Must specify target mmp as the first argument\n";
+ }
+}
+
+use Cwd;
+use File::Basename;
+
+my $dir = lc(getcwd());
+my $tgt = basename(shift @ARGV);
+
+$dir =~ s!/!\\!g;
+$dir =~ s!^c:!c:$ENV{EPOCROOT}epoc32\\build!;
+$dir .= "\\$tgt\\thumb\\urel";
+
+print $dir, "\n";
+
+unless (-d $dir) {
+ die "$0: No directory $dir\n";
+}
+
+my @o = glob("$dir\\*.o");
+
+unless (@o) {
+ die "$0: No objects in $dir\n";
+}
+
+for my $o (@o) {
+ if (open(my $fh, "nm $o |")) {
+ my @d;
+ while (<$fh>) {
+ next if / [TURtr] /;
+ push @d, $_;
+ }
+ close($fh);
+ if (@d) {
+ $o =~ s!^\Q$dir\E\\!!;
+ print "$o:\n";
+ print @d;
+ }
+ } else {
+ warn "$0: nm $o failed: $!\n";
+ }
+}
+
+exit(0);
diff --git a/symbian/sisify.pl b/symbian/sisify.pl
index 6edce4bd93..9a65d85770 100644
--- a/symbian/sisify.pl
+++ b/symbian/sisify.pl
@@ -4,7 +4,6 @@
# sisify.pl - package Perl scripts or Perl libraries into SIS files
#
# Copyright (c) 2004-2005 Nokia. All rights reserved.
-#
# The sisify.pl utility is licensed under the same terms as Perl itself.
#
diff --git a/util.c b/util.c
index d04d5d4c64..c46a40ed04 100644
--- a/util.c
+++ b/util.c
@@ -1495,7 +1495,7 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
my_setenv_format(environ[i], nam, nlen, val, vlen);
} else {
# endif
-# if defined(__CYGWIN__) || defined(EPOC) || defined(SYMBIAN)
+# if defined(__CYGWIN__) || defined(EPOC) || defined(__SYMBIAN32__)
# if defined(HAS_UNSETENV)
if (val == NULL) {
(void)unsetenv(nam);