Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix test on FreeBSD and other systems that have /etc/services
This commit is contained in:
Hannes Magnusson 2012-03-24 17:59:52 +01:00
commit 10809686f0

View file

@ -7,8 +7,9 @@ Michele Orselli (mo@ideato.it)
Simone Gentili (sensorario@gmail.com)
--FILE--
<?php
if(stristr(PHP_OS, "linux")) $file = "/etc/services";
elseif(stristr(PHP_OS, "Darwin")) $file = "/etc/services";
if (file_exists("/etc/services")) {
$file = "/etc/services";
}
elseif(substr(PHP_OS,0,3) == "WIN") $file = "C:/WINDOWS/system32/drivers/etc/services";
else die(PHP_OS. " unsupported");