From: Steve Hay Date: Fri, 17 Jun 2005 11:36:45 +0000 (+0000) Subject: Silence STDERR grumblings from Borland's math library. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3a00b83ed94a188580921b4677320b4295bee93d;p=p5sagit%2Fp5-mst-13.2.git Silence STDERR grumblings from Borland's math library. This fixes failures in ext/B/t/deparse.t and lib/warnings.t (and renders change 24870 obsolete, hence it is reverted here). p4raw-id: //depot/perl@24883 --- diff --git a/lib/warnings.t b/lib/warnings.t index 2143b4d..f23d9e6 100644 --- a/lib/warnings.t +++ b/lib/warnings.t @@ -137,11 +137,6 @@ for (@prgs){ $results =~ s|:abc(d)?\b|./abc$1|g; } - # Borland compiler whines about DOMAIN errors for some "uninit" tests - if ($^O eq 'MSWin32' and $Config{ccname} =~ /bcc32/) { - $results =~ s|\n\n\w+: DOMAIN error||g; - } - $expected =~ s/\n+$//; my $prefix = ($results =~ s#^PREFIX(\n|$)##) ; # any special options? (OPTIONS foo bar zap) diff --git a/makedef.pl b/makedef.pl index 58636e7..8070f0a 100644 --- a/makedef.pl +++ b/makedef.pl @@ -1234,6 +1234,9 @@ if ($PLATFORM =~ /^win(?:32|ce)$/) { { try_symbol($symbol); } + if ($CCTYPE eq "BORLAND") { + try_symbol('_matherr'); + } } elsif ($PLATFORM eq 'os2') { open MAP, 'miniperl.map' or die 'Cannot read miniperl.map'; diff --git a/win32/win32.c b/win32/win32.c index 8f1a8ac..21e0424 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -117,6 +117,16 @@ static DWORD w32_platform = (DWORD)-1; #define ONE_K_BUFSIZE 1024 +#ifdef __BORLANDC__ +/* Silence STDERR grumblings from Borland's math library. */ +DllExport int +_matherr(struct _exception *a) +{ + PERL_UNUSED_VAR(a); + return 1; +} +#endif + int IsWin95(void) {