]> granicus.if.org Git - php/commitdiff
Added configure check for nanosleep() availability.
authorIlia Alshanetsky <iliaa@php.net>
Wed, 12 Nov 2003 23:43:46 +0000 (23:43 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 12 Nov 2003 23:43:46 +0000 (23:43 +0000)
configure.in
ext/standard/basic_functions.c
ext/standard/basic_functions.h

index 8ec86206d37362d5beb6e345089449407a48e065..6a627b6646a8da721c0db07650de296984da57fb 100644 (file)
@@ -526,6 +526,7 @@ tempnam \
 tzset \
 unsetenv \
 usleep \
+nanosleep \
 utime \
 vsnprintf \
 )
index 619e89d92bede99eb56a6552ea38848a8c984246..8175ad607d4d83cb5c0356a3a9186a0c6119caf8 100644 (file)
@@ -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 */
index e83fb68aeaec2f0492171f72d0806113be18eb8d..b7341fe9d1fa5cee5516eaa51a3a738adda6f4ac 100644 (file)
@@ -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);