From: Nicholas Clark Date: Mon, 1 May 2006 19:07:06 +0000 (+0000) Subject: Disable SIGRTMAX and SIGRTMIN in POSIX if Configure's probes found that X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5b7de33164333623115fd731d37408d6cff1ceb;p=p5sagit%2Fp5-mst-13.2.git Disable SIGRTMAX and SIGRTMIN in POSIX if Configure's probes found that they aren't viable. (Certain glibcs are "interesting") p4raw-id: //depot/perl@28039 --- diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL index ad87d5d..fb2bffd 100644 --- a/ext/POSIX/Makefile.PL +++ b/ext/POSIX/Makefile.PL @@ -5,6 +5,14 @@ BEGIN { @INC = '../../lib';} use ExtUtils::MakeMaker; use ExtUtils::Constant 0.11 'WriteConstants'; use Config; +my $rt_signals; +if ($Config{sig_name} =~ /\bRTMIN\b/ && $Config{sig_name} =~ /\bRTMAX\b/) { + # Yes, it really has them. (Some systems define the C pre-processor + # symbols, but they depend on other macros that are only defined during + # kernel compilation + $rt_signals++; +} + my @libs; if ($^O ne 'MSWin32') { @libs = ('LIBS' => ["-lm -lposix -lcposix"]); @@ -56,8 +64,6 @@ my @names = _SC_VERSION), {name=>"CLK_TCK", not_constant=>1}, {name=>"MB_CUR_MAX", not_constant=>1}, - {name=>"SIGRTMAX", not_constant=>1}, - {name=>"SIGRTMIN", not_constant=>1}, {name=>"EXIT_FAILURE", default=>["IV", "1"]}, {name=>"EXIT_SUCCESS", default=>["IV", "0"]}, {name=>"SIG_DFL", value=>"(IV)SIG_DFL", not_constant=>1}, @@ -105,6 +111,16 @@ push @names, {name=>$_, type=>"IV", default=>["IV", "0"]} _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION )); +if ($rt_signals) { + push @names, {name=>"SIGRTMAX", not_constant=>1}, + {name=>"SIGRTMIN", not_constant=>1}, +} else { + # Well, it seems that your vendor has defined them, but not in a way that + # would actually compile. + push @names, {name=>"SIGRTMAX", macro=>0}, + {name=>"SIGRTMIN", macro=>0}, +} + WriteConstants( PROXYSUBS => 1, NAME => 'POSIX',