further Symbian/S90 fixes from alexander smishlajev
Jarkko Hietaniemi [Fri, 26 Jan 2007 05:51:50 +0000 (07:51 +0200)]
Message-Id: <20070126035150.41A4143A67@anubis.hut.fi>

p4raw-id: //depot/perl@29990

README.symbian
ext/Data/Dumper/Dumper.xs
symbian/PerlBase.cpp
symbian/config.sh
symbian/symbianish.h
symbian/xsbuild.pl

index 314c14f..040b37a 100644 (file)
@@ -12,7 +12,7 @@ This document describes various features of the Symbian operating
 system that will affect how Perl version 5 (hereafter just Perl)
 is compiled and/or runs.
 
-B<NOTE: this port (as of 0.2.0) does not compile into a Symbian
+B<NOTE: this port (as of 0.4.1) does not compile into a Symbian
 OS GUI application, but instead it results in a Symbian DLL.>
 The DLL includes a C++ class called CPerlBase, which one can then
 (derive from and) use to embed Perl into applications, see F<symbian/README>.
@@ -28,13 +28,13 @@ mainly as demonstrations.
 
 =head2 Compiling Perl on Symbian
 
-(0) You need to have the Symbian SDK installed.
+(0) You need to have the appropriate Symbian SDK installed.
 
     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), 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 very rough port ("it compiles") to UIQ 2.1 has also been made.
 
     A prerequisite for any of the SDKs is to install ActivePerl
     from ActiveState, http://www.activestate.com/Products/ActivePerl/
@@ -98,9 +98,9 @@ mainly as demonstrations.
         S60 2.8 | -  | +  | (not tested in a device)
         S80 2.6 | -  | +  | 9300
         S90 1.1 | +  | -  | 7710
-        UIQ 2.0 | -  | +  | (not tested in a device)
+        UIQ 2.1 | -  | +  | (not tested in a device)
 
-    (*) Compiles but does not work, unfortunately.
+    (*) Compiles but does not work, unfortunately, a problem with Symbian.
 
     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
@@ -302,7 +302,7 @@ Lots.  See F<symbian\TODO>.
 
 =head1 WARNING
 
-As of Perl Symbian port version 0.2.0 any part of Perl's standard
+As of Perl Symbian port version 0.4.1 any part of Perl's standard
 regression test suite has not been run on a real Symbian device using
 the ported Perl, so innumerable bugs may lie in wait.  Therefore there
 is absolutely no warranty.
@@ -310,11 +310,12 @@ is absolutely no warranty.
 =head1 NOTE
 
 When creating and extending application programming interfaces (APIs)
-for Symbian or Series 60 or Series 80 it is suggested that trademarks,
-registered trademarks, or trade names are not used in the API names.
-Instead, developers should consider basing the API naming in the existing
-(C++) public component and API naming, modified as appropriate by the rules
-of the programming language the new APIs are for.
+for Symbian or Series 60 or Series 80 or Series 90 it is suggested
+that trademarks, registered trademarks, or trade names are not used in
+the API names.  Instead, developers should consider basing the API
+naming in the existing (C++, or maybe Java) public component and API
+naming, modified as appropriate by the rules of the programming
+language the new APIs are for.
   
 Nokia is a registered trademark of Nokia Corporation. Nokia's product
 names are trademarks or registered trademarks of Nokia.  Other product
@@ -404,7 +405,7 @@ We maintain the binary incompatibility.
   - 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
+  - port to S90 1.1 by alexander smishlajev
 
 We maintain the binary incompatibility.
 
index 5ed117a..b09a023 100644 (file)
@@ -439,7 +439,13 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
        (*levelp)++;
        ipad = sv_x(aTHX_ Nullsv, SvPVX_const(xpad), SvCUR(xpad), *levelp);
 
-       if (realtype <= SVt_PVBM) {                          /* scalar ref */
+       if (
+#if PERL_VERSION < 9
+               realtype <= SVt_PVBM
+#else
+               realtype <= SVt_PVMG
+#endif
+       ) {                          /* scalar ref */
            SV * const namesv = newSVpvn("${", 2);
            sv_catpvn(namesv, name, namelen);
            sv_catpvn(namesv, "}", 1);
index 443ae0b..851fc15 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2004-2005 Nokia. All rights reserved. */
+
 /* The CPerlBase class is licensed under the same terms as Perl itself. */
 
 /* See PerlBase.pod for documentation. */
@@ -193,7 +193,7 @@ EXPORT_C TInt CPerlBase::RunScriptL(const TDesC& aFileName,
     Argv = 0;
     return error == 0 ? KErrNone : KErrGeneral;
 }
-    
+
 
 EXPORT_C int CPerlBase::Parse(int argc, char *argv[], char *envp[])
 {
@@ -230,7 +230,7 @@ EXPORT_C int CPerlBase::Run()
         iState = EPerlRunning;
         int ran = perl_run(iPerl);
         iState = (ran == 0) ? EPerlSuccess : EPerlFailure;
-        return ran; 
+        return ran;
     } else
         return -1;
 }
@@ -264,7 +264,7 @@ int CPerlBase::ConsoleReadLine()
                 iConsoleBuffer[offset++] = 0;
             }
             break;
-        } 
+        }
         else {
             TBool doBackward  = EFalse;
             TBool doBackspace = EFalse;
@@ -318,26 +318,26 @@ int CPerlBase::ConsoleRead(const int fd, char* buf, int n)
         errno = EIO;
         return -1;
     }
-   
+
     if (n < 0) {
         errno = EINVAL;
         return -1;
     }
-    
+
     if (n == 0)
         return 0;
+
     TBuf8<4 * KPerlConsoleBufferMaxTChars> aBufferUtf8;
     TBuf16<KPerlConsoleBufferMaxTChars>    aBufferUtf16;
     int length = ConsoleReadLine();
-    int i;    
+    int i;
 
     iConsoleUsed += length;
 
     aBufferUtf16.SetLength(length);
     for (i = 0; i < length; i++)
         aBufferUtf16[i] = iConsoleBuffer[i];
-    aBufferUtf8.SetLength(4 * length); 
+    aBufferUtf8.SetLength(4 * length);
 
     CnvUtfConverter::ConvertFromUnicodeToUtf8(aBufferUtf8, aBufferUtf16);
 
@@ -358,7 +358,7 @@ int CPerlBase::ConsoleRead(const int fd, char* buf, int n)
             return -1;
         }
         buf[i] = u;
-    } 
+    }
 #endif
     if (nUtf8 < n)
         buf[nUtf8] = 0;
index 206c9bc..5645808 100644 (file)
@@ -84,8 +84,8 @@ d_cplusplus='undef'
 d_crypt='undef'
 d_crypt_r='undef'
 d_csh='undef'
+d_ctermid='undef'
 d_ctermid_r='undef'
-d_cterm='undef'
 d_ctime_r='undef'
 d_c99_variadic_macros='undef'
 d_cuserid='undef'
index 4eaffc3..b8e6940 100644 (file)
@@ -22,7 +22,7 @@
  *     available to set I/O characteristics
  */
 #define        HAS_IOCTL               / **/
+
 /* HAS_UTIME:
  *     This symbol, if defined, indicates that the routine utime() is
  *     available to update the access and modification times of files.
@@ -47,7 +47,7 @@
 #undef HAS_WAIT
 
 #endif /* !PERL_MICRO */
-  
+
 /* USEMYBINMODE
  *     This symbol, if defined, indicates that the program should
  *     use the routine my_binmode(FILE *fp, char iotype) to insure
@@ -71,7 +71,7 @@
 #define USE_STAT_RDEV  /**/
 
 /* ACME_MESS:
- *     This symbol, if defined, indicates that error messages should be 
+ *     This symbol, if defined, indicates that error messages should be
  *     should be generated in a format that allows the use of the Acme
  *     GUI/editor's autofind feature.
  */
index 84d0a63..5fbf4ae 100644 (file)
@@ -6,6 +6,7 @@ use Getopt::Long;
 use File::Basename;
 use Cwd;
 
+unshift @INC, dirname $0 or '.';
 do "sanity.pl" or die $@;
 
 my $CoreBuild = -d "ext" && -f "perl.h" && -d "symbian" && -f "perl.c";
@@ -63,7 +64,6 @@ if ( !defined $SymbianVersion) {
 my ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION);
 
 if ($CoreBuild) {
-    unshift @INC, "symbian";
     do "sanity.pl" or die $@;
     my %VERSION = %{ do "version.pl" or die $@ };
     ($SYMBIAN_ROOT, $SYMBIAN_VERSION, $SDK_NAME, $SDK_VARIANT, $SDK_VERSION) =