andrey          Tue Nov  2 12:03:21 2004 EDT

  Modified files:              
    /php-src/main       php.h 
    /php-src/ext/standard       basic_functions.c 
  Log:
  make sleep() return it's return value when possible
  #on some *nix systems sleep() is implemented with SIGALRM. When SIGALRM
  #interrupts sleep() it returns the number of seconds that has to be slept
  #till the number of seconds wanted by the script. Sleep() on Windows is
  # void.
  
  
http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.205&r2=1.206&ty=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.205 php-src/main/php.h:1.206
--- php-src/main/php.h:1.205    Thu Sep 30 04:03:38 2004
+++ php-src/main/php.h  Tue Nov  2 12:03:19 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php.h,v 1.205 2004/09/30 08:03:38 helly Exp $ */
+/* $Id: php.h,v 1.206 2004/11/02 17:03:19 andrey Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -252,6 +252,7 @@
 /* global variables */
 extern pval *data;
 #if !defined(PHP_WIN32)
+#define PHP_SLEEP_NON_VOID
 #define php_sleep sleep
 extern char **environ;
 #endif /* !defined(PHP_WIN32) */
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.695&r2=1.696&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.695 
php-src/ext/standard/basic_functions.c:1.696
--- php-src/ext/standard/basic_functions.c:1.695        Fri Oct  8 18:19:03 2004
+++ php-src/ext/standard/basic_functions.c      Tue Nov  2 12:03:20 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.695 2004/10/08 22:19:03 helly Exp $ */
+/* $Id: basic_functions.c,v 1.696 2004/11/02 17:03:20 andrey Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1733,7 +1733,14 @@
        }
 
        convert_to_long_ex(num);
-       php_sleep(Z_LVAL_PP(num));
+#ifdef PHP_SLEEP_NON_VOID
+       RETURN_LONG(
+#endif
+       php_sleep(Z_LVAL_PP(num))
+#ifdef PHP_SLEEP_NON_VOID
+       )
+#endif
+       ;
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to