Silence STDERR grumblings from Borland's math library.
authorSteve Hay <SteveHay@planit.com>
Fri, 17 Jun 2005 11:36:45 +0000 (11:36 +0000)
committerSteve Hay <SteveHay@planit.com>
Fri, 17 Jun 2005 11:36:45 +0000 (11:36 +0000)
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
makedef.pl
win32/win32.c

index 2143b4d..f23d9e6 100644 (file)
@@ -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)
index 58636e7..8070f0a 100644 (file)
@@ -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';
index 8f1a8ac..21e0424 100644 (file)
@@ -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)
 {