diff options
author | Pixel <pixel@mandrakesoft.com> | 2000-11-05 22:49:34 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-05 21:15:13 +0000 |
commit | 9ae2e8df64ee1443365b7a5edd4bab2daca7684c (patch) | |
tree | 075663db24ac94c358e37615dad35c4de0452852 /ext/Errno | |
parent | 00ff3b56132a225d6f20f8216aaa1d9a45a711a2 (diff) | |
download | perl-9ae2e8df64ee1443365b7a5edd4bab2daca7684c.tar.gz |
Use -dM for gcc (the suggested patch did it only for Linux,
but I think it can be generalized).
Subject: Re: connect and $!{EINPROGRESS} pb (was [ID 20001030.010] [PATCH] io_multihomed.t failing)
Message-ID: <ly8zqygn4x.fsf@leia.mandrakesoft.com>
p4raw-id: //depot/perl@7565
Diffstat (limited to 'ext/Errno')
-rw-r--r-- | ext/Errno/Errno_pm.PL | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 0666b2af60..9ea60416f6 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -29,6 +29,12 @@ sub process_file { warn "Cannot open '$file'"; return; } + } elsif ($Config{gccversion} ne '') { + # With the -dM option, gcc outputs every #define it finds + unless(open(FH,"$Config{cc} -E -dM $file |")) { + warn "Cannot open '$file'"; + return; + } } else { unless(open(FH,"< $file")) { # This file could be a temporary file created by cppstdin @@ -79,6 +85,10 @@ sub get_files { } elsif ($^O eq 'vmesa') { # OS/390 C compiler doesn't generate #file or #line directives $file{'../../vmesa/errno.h'} = 1; + } elsif ($^O eq 'linux') { + # Some Linuxes have weird errno.hs which generate + # no #file or #line directives + $file{'/usr/include/errno.h'} = 1; } else { open(CPPI,"> errno.c") or die "Cannot open errno.c"; |