Skip to content

Commit

Permalink
Fix cygwin errors from Errno
Browse files Browse the repository at this point in the history
Fix Perl#18025

This is fixing these two errors under windows:

"Never use <avx512bwintrin.h> directly; include <immintrin.h> instead."
"Never use <avx512vpopcntdqvlintrin.h> directly; include <immintrin.h> instead."
  • Loading branch information
atoomic committed Aug 3, 2020
1 parent 190ae7e commit 1f696c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ext/Errno/Errno_pm.PL
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use ExtUtils::MakeMaker;
use Config;
use strict;

our $VERSION = "1.31";
our $VERSION = "1.32";

my %err = ();

Expand All @@ -18,11 +18,18 @@ if ($Config{gccversion} ne '' && $^O eq 'MSWin32') {
# MinGW complains "warning: #pragma system_header ignored outside include
# file" if the header files are processed individually, so include them
# all in .c file and process that instead.
my %seen;
open INCS, '>', 'includes.c' or
die "Cannot open includes.c";
foreach $file (@files) {
next if $file eq 'errno.c';
next unless -f $file;
if ( $file eq 'avx512vpopcntdqvlintrin.h' || $file eq 'avx512bwintrin.h' ) {
# "Never use <avx512bwintrin.h> directly; include <immintrin.h> instead."
# "Never use <avx512vpopcntdqvlintrin.h> directly; include <immintrin.h> instead."
$file = 'immintrin.h';
}
next if ++$seen{$file} > 1;
print INCS qq[#include "$file"\n];
}
close INCS;
Expand Down

0 comments on commit 1f696c8

Please sign in to comment.