From: Ilia Alshanetsky Date: Wed, 12 Nov 2003 23:43:46 +0000 (+0000) Subject: Added configure check for nanosleep() availability. X-Git-Tag: php-5.0.0b3RC1~704 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=127ed194b7dd745906999d067f3d0edf2ba5e589;p=php Added configure check for nanosleep() availability. --- diff --git a/configure.in b/configure.in index 8ec86206d3..6a627b6646 100644 --- a/configure.in +++ b/configure.in @@ -526,6 +526,7 @@ tempnam \ tzset \ unsetenv \ usleep \ +nanosleep \ utime \ vsnprintf \ ) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 619e89d92b..8175ad607d 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -301,7 +301,9 @@ function_entry basic_functions[] = { PHP_FE(bin2hex, NULL) PHP_FE(sleep, NULL) PHP_FE(usleep, NULL) +#if HAVE_NANOSLEEP PHP_FE(nanosleep, NULL) +#endif PHP_FE(time, NULL) PHP_FE(mktime, NULL) PHP_FE(gmmktime, NULL) @@ -1691,6 +1693,7 @@ PHP_FUNCTION(usleep) } /* }}} */ +#if HAVE_NANOSLEEP /* {{{ proto mixed nanosleep(long seconds, long nanoseconds) Delay for a number of seconds and nano seconds */ PHP_FUNCTION(nanosleep) @@ -1718,6 +1721,7 @@ PHP_FUNCTION(nanosleep) RETURN_FALSE; } /* }}} */ +#endif /* {{{ proto string get_current_user(void) Get the name of the owner of the current PHP script */ diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index e83fb68aea..b7341fe9d1 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -48,7 +48,9 @@ PHP_FUNCTION(constant); PHP_FUNCTION(toggle_short_open_tag); PHP_FUNCTION(sleep); PHP_FUNCTION(usleep); +#if HAVE_NANOSLEEP PHP_FUNCTION(nanosleep); +#endif PHP_FUNCTION(flush); PHP_FUNCTION(ip2long); PHP_FUNCTION(long2ip);