[poe-commits] SF.net SVN: poe:[2432] trunk/poe/lib/POE
Brought to you by:
rcaputo
From: <ap...@us...> - 2009-02-16 05:11:52
|
Revision: 2432 http://poe.svn.sourceforge.net/poe/?rev=2432&view=rev Author: apocal Date: 2009-02-16 05:11:49 +0000 (Mon, 16 Feb 2009) Log Message: ----------- shut up prototype mismatch errors tested on: linux 5.8.8, linux 5.10.0, win(straw) 5.8.8, win(straw) 5.8.9, win(straw) 5.10.0, win(AS) 5.8.9, win(AS) 5.10.0 Modified Paths: -------------- trunk/poe/lib/POE/Pipe.pm trunk/poe/lib/POE/Resource/FileHandles.pm Modified: trunk/poe/lib/POE/Pipe.pm =================================================================== --- trunk/poe/lib/POE/Pipe.pm 2009-02-15 05:56:14 UTC (rev 2431) +++ trunk/poe/lib/POE/Pipe.pm 2009-02-16 05:11:49 UTC (rev 2432) @@ -62,10 +62,14 @@ # Provide dummy constants for MSWin32, so things at least compile. BEGIN { - eval 'F_GETFL'; - if ($@) { - *F_GETFL = sub () { 0 }; - *F_SETFL = sub () { 0 }; + if ( ! defined &F_GETFL ) { + if ( ! defined prototype "F_GETFL" ) { + *F_GETFL = sub { 0 }; + *F_SETFL = sub { 0 }; + } else { + *F_GETFL = sub () { 0 }; + *F_SETFL = sub () { 0 }; + } } } Modified: trunk/poe/lib/POE/Resource/FileHandles.pm =================================================================== --- trunk/poe/lib/POE/Resource/FileHandles.pm 2009-02-15 05:56:14 UTC (rev 2431) +++ trunk/poe/lib/POE/Resource/FileHandles.pm 2009-02-16 05:11:49 UTC (rev 2432) @@ -19,10 +19,14 @@ # aren't used if we're RUNNING_IN_HELL, but Perl needs to see them. BEGIN { - eval 'F_GETFL'; - if ($@) { - *F_GETFL = sub () { 0 }; - *F_SETFL = sub () { 0 }; + if ( ! defined &F_GETFL ) { + if ( ! defined prototype "F_GETFL" ) { + *F_GETFL = sub { 0 }; + *F_SETFL = sub { 0 }; + } else { + *F_GETFL = sub () { 0 }; + *F_SETFL = sub () { 0 }; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |