This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Remove -std=c89/-ansi if freebsd has "inline static" in <fenv.h>"
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 26 Nov 2014 22:15:51 +0000 (17:15 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 26 Nov 2014 22:17:12 +0000 (17:17 -0500)
This reverts commit f5fdb0259d5e9470e8291544a8b209e202d36334.

(the theory is that 7ff69a2d made this unnecessary)

ext/POSIX/Makefile.PL

index fe93efc..5a24a34 100644 (file)
@@ -144,35 +144,3 @@ WriteConstants(
     NAME => 'POSIX',
     NAMES => \@names,
 );
-
-package MY;
-
-use strict;
-use Config;
-
-sub cflags {
-    my $self = shift;
-
-    my $cflags = $self->SUPER::cflags(@_);
-
-    if ($^O eq 'freebsd') {
-        my $issue = "use <fenv.h> with -std=c89/-ansi";
-        print "$^O: checking if you can $issue\n";
-        # For example FreeBSD 10.0 uses "...static inline int" in <fenv.h>,
-        # which is incompatible with -std=c89 aka -ansi.
-        if (open(my $fh, ">fenv$$.c")) {
-            print { $fh } "#include <fenv.h>\nint main() { return 0; }\n";
-            close $fh;
-            system("$Config{cc} -std=c89 -o fenv$$ fenv$$.c 2>/dev/null");
-            if (-x "fenv$$") {
-                print "$^O: you can $issue\n";
-            } else {
-                print "$^O: you cannot $issue, removing those from flags\n";
-                $cflags =~ s/(?<=[ =])(?:-ansi|-std=c89)\b//g;
-            }
-            unlink("fenv$$.c", "fenv$$");
-        }
-   }
-
-   $cflags;
-}