use Config;
use strict;
-our $VERSION = "1.09_01";
+our $VERSION = "1.10";
my %err = ();
my %wsa = ();
open INCS, '>includes.c' or
die "Cannot open includes.c";
foreach $file (@files) {
+ next if $file eq 'errno.c';
+ next unless -f $file;
print INCS qq[#include "$file"\n];
}
close INCS;
} elsif ($Config{archname} eq 'epoc') {
# Watch out for cross compiling for EPOC (usually done on linux)
$file{'/usr/local/epocemx/epocsdk/include/libc/sys/errno.h'} = 1;
+ } elsif ($Config{archname} eq 'arm-riscos') {
+ # Watch out for cross compiling for RISC OS
+ my $dep = `echo "#include <errno.h>" | gcc -E -M -`;
+ if ($dep =~ /(\S+errno\.h)/) {
+ $file{$1} = 1;
+ }
} elsif ($^O eq 'linux' &&
- $Config{gccversion} ne '' # might be using, say, Intel's icc
+ $Config{gccversion} ne '' &&
+ $Config{gccversion} !~ /intel/i
+ # might be using, say, Intel's icc
) {
# Some Linuxes have weird errno.hs which generate
# no #file or #line directives
if (/$pat/o) {
my $f = $1;
$f =~ s,\\\\,/,g;
- next if $f eq 'errno.c';
- next unless -f $f;
$file{$f} = 1;
}
}