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
#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
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) {
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)
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
#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
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) {
{
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)
* 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) {
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
#endif /* MACOS_TRADITIONAL */
}
-#if defined(DOSISH) || defined(EPOC) || defined(SYMBIAN)
+#if defined(DOSISH) || defined(EPOC) || defined(__SYMBIAN32__)
# define PERLLIB_SEP ';'
#else
# if defined(VMS)
# 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. *
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
sv_setpv(namesv, unixdir);
sv_catpv(namesv, unixname);
# else
-# ifdef SYMBIAN
+# ifdef __SYMBIAN32__
if (PL_origfilename[0] &&
PL_origfilename[1] == ':' &&
!(dir[0] && dir[1] == ':'))
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);
#!/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";
--- /dev/null
+#!/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);
# 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.
#
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);