From c042ae3a74be2a1c6b85173b59f6a608815afef8 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 18 Aug 2005 16:43:46 +0300 Subject: [PATCH] 5.9.x (and 5.8.x): Symbian update Message-ID: p4raw-id: //depot/perl@25304 --- README.symbian | 9 ++++++--- ext/Compress/Zlib/Zlib.xs | 20 +++++++++++++++++--- numeric.c | 2 +- symbian/TODO | 4 +--- symbian/config.pl | 6 +++--- symbian/config.sh | 2 +- symbian/install.cfg | 2 ++ symbian/symbian_stubs.c | 4 ++-- symbian/xsbuild.pl | 6 ++++++ 9 files changed, 39 insertions(+), 16 deletions(-) diff --git a/README.symbian b/README.symbian index e6cb4dc..db7f1de 100644 --- a/README.symbian +++ b/README.symbian @@ -31,7 +31,8 @@ mainly as demonstrations. (0) You need to have the Symbian SDK installed. These instructions have been tested under various Nokia Series 60 - Symbian SDKs (1.2 to 2.6). You can get the SDKs from + Symbian SDKs (1.2 to 2.6, 2.8 should also work, 1.2 compiles but + does not work). You can get the SDKs from Forum Nokia (http://www.forum.nokia.com/). A prerequisite for any of the SDKs is to install ActivePerl @@ -42,7 +43,7 @@ mainly as demonstrations. 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 - about ActivePerl build 518, which does no more (as of mid-2004) exist + 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 do not work. @@ -93,6 +94,8 @@ mainly as demonstrations. 2.1 | - | + | 6670 2.6 | + | + | 6630 + Also 2.8 should work fine. + 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. @@ -331,7 +334,7 @@ Perl Symbian Port version 0.1.0: April 2005 DynaLoader Exporter File::Spec integer lib strict Symbol vars warnings XSLoader - The following extensions are available: - attrs Cwd Data::Dumper Devel::Peek Digest::MD5 DynaLoader + attrs Compress::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 DynaLoader Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes - The following extensions are missing for various technical reasons: diff --git a/ext/Compress/Zlib/Zlib.xs b/ext/Compress/Zlib/Zlib.xs index c6fd54d..5162f1e 100644 --- a/ext/Compress/Zlib/Zlib.xs +++ b/ext/Compress/Zlib/Zlib.xs @@ -85,7 +85,7 @@ typedef gzType* Compress__Zlib__gzFile ; #define crcInitial crc32(0L, Z_NULL, 0) #if 1 -static char *my_z_errmsg[] = { +static const char * const my_z_errmsg[] = { "need dictionary", /* Z_NEED_DICT 2 */ "stream end", /* Z_STREAM_END 1 */ "", /* Z_OK 0 */ @@ -98,8 +98,20 @@ static char *my_z_errmsg[] = { ""}; #endif +#if defined(__SYMBIAN32__) +# define NO_WRITEABLE_DATA +#endif + +#define TRACE_DEFAULT 0 + +#ifdef NO_WRITEABLE_DATA +#define trace TRACE_DEFAULT +#else +static int trace = TRACE_DEFAULT ; +#endif -static int trace = 0 ; +/* Dodge PerlIO hiding of these functions. */ +#undef printf static void #ifdef CAN_PROTOTYPE @@ -109,6 +121,7 @@ SetGzErrorNo(error_no) int error_no ; #endif { + dTHX; char * errstr ; SV * gzerror_sv = perl_get_sv(GZERRNO, FALSE) ; @@ -249,7 +262,7 @@ gzreadline(file, output) SV * output ; #endif { - + dTHX; SV * store = file->buffer ; char *nl = "\n"; char *p; @@ -303,6 +316,7 @@ SV * sv ; char * string; #endif { + dTHX; if (SvROK(sv)) { sv = SvRV(sv) ; switch(SvTYPE(sv)) { diff --git a/numeric.c b/numeric.c index 5eafdda..2970dad 100644 --- a/numeric.c +++ b/numeric.c @@ -897,7 +897,7 @@ Perl_my_atof2(pTHX_ const char* orig, NV* value) #ifdef HAS_STRTOD if (*s == 'n' || *s == 'N' || *s == 'i' || *s == 'I') { - char *p = negative ? s-1 : s; + const char *p = negative ? s - 1 : s; char *endp; NV rslt; rslt = strtod(p, &endp); diff --git a/symbian/TODO b/symbian/TODO index 78dcd24..9472641 100644 --- a/symbian/TODO +++ b/symbian/TODO @@ -117,7 +117,6 @@ - libnet - Bundle::CPAN - Archive::Tar - - Compress::Zlib (zlib?) (there is builtin gz support) - Term::ReadKey (useless?) - Term::ReadLine (useless?) - Bundle::LWP @@ -128,7 +127,6 @@ - HTML::HeadParser - LWP - Crypt::SSLeay? (ssl?) - - IO::Zlib? (zlib?) - IMAP? - Net::Telnet? - Archive::Zip? @@ -136,7 +134,7 @@ - Date::Calc? - XML? XML::Simple? (expat?) (there is builtin xml support) - RSS? - - DBI + - DBI (DBD::???) - DBD::SQLite? (sqlite?) - SOAP? XML-RPC? diff --git a/symbian/config.pl b/symbian/config.pl index e2cd2c6..ce5d926 100644 --- a/symbian/config.pl +++ b/symbian/config.pl @@ -554,12 +554,12 @@ perllib.sis: \$(PM) perlext.sis: perldll_arm buildext_sis perl symbian\\makesis.pl perl${VERSION}ext -EXT = 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::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 +buildext: perldll symbian\\xsbuild.pl lib\\Config.pm perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT) -buildext_sis: perldll.sis symbian\\xsbuild.pl +buildext_sis: perldll.sis symbian\\xsbuild.pl lib\\Config.pm perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) --sis \$(EXT) cleanext: symbian\\xsbuild.pl diff --git a/symbian/config.sh b/symbian/config.sh index dea35d5..731dd5c 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -645,7 +645,7 @@ pm_apiversion='5.005' privlib='\\system\\libs\\perl\\x.y.z' privlibexp='\\system\\libs\\perl\\x.y.z' procselfexe='' -prototype='undef' +prototype='define' ptrsize='4' quadkind='4' quadtype='int64_t' diff --git a/symbian/install.cfg b/symbian/install.cfg index 8cc7b10..3ff71e5 100644 --- a/symbian/install.cfg +++ b/symbian/install.cfg @@ -38,6 +38,7 @@ lib FileHandle.pm lib Filter/Simple.pm lib if.pm lib integer.pm +lib IO/Zlib.pm lib lib.pm lib Net/Cmd.pm lib Net/Config.pm @@ -69,6 +70,7 @@ lib warnings/register.pm # Extensions. # ext attrs +ext Compress/Zlib -zlib-src ext Cwd ext Data/Dumper ext Devel/Peek diff --git a/symbian/symbian_stubs.c b/symbian/symbian_stubs.c index 1505698..c997446 100644 --- a/symbian/symbian_stubs.c +++ b/symbian/symbian_stubs.c @@ -43,8 +43,8 @@ void Perl_my_setenv(pTHX_ char *var, char *val) { } void Perl_my_setenv(pTHX_ const char *var, const char *val) { } #endif -bool Perl_do_exec(pTHX_ char *cmd) { return FALSE; } -bool Perl_do_exec3(pTHX_ char *cmd, int fd, int flag) { return FALSE; } +bool Perl_do_exec(pTHX_ const char *cmd) { return FALSE; } +bool Perl_do_exec3(pTHX_ const char *cmd, int fd, int flag) { return FALSE; } int Perl_do_spawn(pTHX_ char *cmd) { return symbian_do_spawn(cmd); } int Perl_do_aspawn(pTHX_ SV *really, SV** mark, SV **sp) { return symbian_do_aspawn(really, mark, sp); } diff --git a/symbian/xsbuild.pl b/symbian/xsbuild.pl index ac6c147..afbc9ef 100644 --- a/symbian/xsbuild.pl +++ b/symbian/xsbuild.pl @@ -427,18 +427,24 @@ sub xsconfig { } } if ( my @c = glob("*.c *.cpp */*.c */*.cpp") ) { + @c = grep { ! m:^zlib-src/: } @c if $ext eq 'ext\Compress\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'; for my $h (@h) { $h =~ s:/:\\:g; $h = dirname($h); $incdir{"$dir\\$h"}++ unless $h eq "."; } } + if ( $ext eq 'ext\Compress\Zlib' ) { + system_echo("perl -pi.bak -e s:True:False: config.in") == 0 + or die "$0: changing BUILD_ZLIB failed: $!\n"; + } if ( exists $EXTCFG{$ext} ) { for my $cfg ( @{ $EXTCFG{$ext} } ) { if ( $cfg =~ /^([-+])?(.+\.(c|cpp|h))$/ ) { -- 2.7.4