diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2005-10-19 19:19:23 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-10-19 13:09:09 +0000 |
commit | 1215b447b68a44982cbab6532e02152be37089dd (patch) | |
tree | 2665654b97ea7cb12d14984f093c7ef0d6afcb52 | |
parent | 823a54a3e80592bb1d7f6b5fc487f84a3411e104 (diff) | |
download | perl-1215b447b68a44982cbab6532e02152be37089dd.tar.gz |
blead 25801: Symbian batch of today
Message-ID: <B356D8F434D20B40A8CEDAEC305A1F24E7A663@esebe105.NOE.Nokia.com>
p4raw-id: //depot/perl@25804
-rw-r--r-- | perl.h | 5 | ||||
-rw-r--r-- | pp_sys.c | 20 | ||||
-rw-r--r-- | symbian/config.sh | 1 | ||||
-rw-r--r-- | symbian/symbianish.h | 10 | ||||
-rw-r--r-- | symbian/xsbuild.pl | 18 |
5 files changed, 50 insertions, 4 deletions
@@ -190,6 +190,11 @@ #define CALLREG_INTUIT_STRING CALL_FPTR(PL_regint_string) #define CALLREGFREE CALL_FPTR(PL_regfree) +/* XXX The PERL_UNUSED_DECL suffix is unfortunately rather inflexible: + * it assumes that in all compilers the way to suppress an "unused" + * warning is to have a suffix. In some compilers that might be a + * a compiler pragma, e.g. #pragma unused(varname). */ + #if defined(__SYMBIAN32__) && defined(__GNUC__) # ifdef __cplusplus # define PERL_UNUSED_DECL @@ -2683,16 +2683,30 @@ PP(pp_ssockopt) PUSHs(sv); break; case OP_SSOCKOPT: { - const char *buf; +#if defined(__SYMBIAN32__) +# define SETSOCKOPT_OPTION_VALUE_T void * +#else +# define SETSOCKOPT_OPTION_VALUE_T const char * +#endif + /* XXX TODO: We need to have a proper type (a Configure probe, + * etc.) for what the C headers think of the third argument of + * setsockopt(), the option_value read-only buffer: is it + * a "char *", or a "void *", const or not. Some compilers + * don't take kindly to e.g. assuming that "char *" implicitly + * promotes to a "void *", or to explicitly promoting/demoting + * consts to non/vice versa. The "const void *" is the SUS + * definition, but that does not fly everywhere for the above + * reasons. */ + SETSOCKOPT_OPTION_VALUE_T buf; int aint; if (SvPOKp(sv)) { STRLEN l; - buf = SvPV_const(sv, l); + buf = (SETSOCKOPT_OPTION_VALUE_T) SvPV_const(sv, l); len = l; } else { aint = (int)SvIV(sv); - buf = (const char*)&aint; + buf = (SETSOCKOPT_OPTION_VALUE_T) &aint; len = sizeof(int); } if (PerlSock_setsockopt(fd, lvl, optname, buf, len) < 0) diff --git a/symbian/config.sh b/symbian/config.sh index 1337d890bd..313bc40715 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -71,6 +71,7 @@ d_chown='undef' d_chroot='undef' d_chsize='undef' d_class='undef' +d_clearenv='undef' d_closedir='undef' d_cmsghdr_s='undef' d_const='define' diff --git a/symbian/symbianish.h b/symbian/symbianish.h index 1aebaf1007..4f06e0a217 100644 --- a/symbian/symbianish.h +++ b/symbian/symbianish.h @@ -207,3 +207,13 @@ pid_t wait(int *status); #endif /* _MSC_VER */ +#ifdef __MWERKS__ +/* No good way of using the CodeWarrior #pragma unused(varname) with Perl + * source code (e.g. PERL_UNUSED_DECL doesn't work with the pragma syntax). + * Therefore we brutally turn off these particular warnings since there + * is a lot of this in Perl code (pTHX, for example). TOther compilers + * will have to detect these naughty bits. */ +#pragma warn_unusedarg off +#pragma warn_unusedvar off +#pragma warn_emptydecl off +#endif diff --git a/symbian/xsbuild.pl b/symbian/xsbuild.pl index 0f6d66da26..eb7c63d5e8 100644 --- a/symbian/xsbuild.pl +++ b/symbian/xsbuild.pl @@ -160,7 +160,7 @@ sub run_PL { print "(patching $BUILDROOT\\lib\\Config.pm)\n"; system_echo("perl -pi.bak -e \"s:\\Q$R_V_SV:$V:\" $BUILDROOT\\lib\\Config.pm"); } - system_echo("perl -I$BUILDROOT\\lib -I$BUILDROOT\\xlib\\symbian $PL") == 0 + system_echo("perl -I$BUILDROOT\\lib -I$BUILDROOT\\xlib\\symbian -I$BUILDROOT\\t\\lib $PL") == 0 or warn "$0: $PL failed.\n"; if ($CoreBuild) { system_echo("copy $BUILDROOT\\lib\\Config.pm.bak $BUILDROOT\\lib\\Config.pm"); @@ -729,6 +729,11 @@ for my $ext (@ARGV) { next if $Config; } + if ($dir eq ".") { + warn "$0: No directory for $ext, skipping...\n"; + next; + } + my $chdir = $ext eq "ext\\XSLoader" ? "ext\\DynaLoader" : $dir; die "$0: no directory '$chdir'\n" unless -d $chdir; update_dir($chdir) or die "$0: chdir '$chdir' failed: $!\n"; @@ -867,10 +872,21 @@ __EOF__ or die "$0: make distclean failed\n"; } } + if ( $ext eq "ext\\Compress\\Zlib" ) { + my @bak; + find( sub { push @bak, $File::Find::name if /\.bak$/ }, "." ); + unlink(@bak) if @bak; + my @src; + find( sub { push @src, $_ if -f $_ }, "zlib-src" ); + unlink(@src) if @src; + unlink("constants.xs"); + } if ( $ext eq "ext\\Devel\\PPPort" ) { unlink("ppport.h"); } } + my @D = glob("../BMARM/*.def ../BWINS/*.def"); + unlink(@D) if @D; my @B = glob("ext/BWINS ext/BMARM ext/*/BWINS ext/*/BMARM Makefile"); rmdir(@B) if @B; } |