From 3a00b83ed94a188580921b4677320b4295bee93d Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Fri, 17 Jun 2005 11:36:45 +0000 Subject: [PATCH] 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 --- lib/warnings.t | 5 ----- makedef.pl | 3 +++ win32/win32.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 5 deletions(-) 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) { -- 2.7.4