#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
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)
d_chroot='undef'
d_chsize='undef'
d_class='undef'
+d_clearenv='undef'
d_closedir='undef'
d_cmsghdr_s='undef'
d_const='define'
#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
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");
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";
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;
}