[PHP4BETA] CVS update: php4
| From: | zeev | Date: | Sat, 24 Apr 1999 16:17:05 +0000 |
| Subject: | [PHP4BETA] CVS update: php4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-454@lists.php.net to get a copy of this message | ||
Date: Saturday April 24, 1999 @ 12:17
Author: zeev
Update of /repository/php4
In directory php:/tmp/cvs-serv29413
Modified Files:
main.c
Log Message:
We'd have to find a different way of allowing timeouts in Win32
Index: php4/main.c
diff -u php4/main.c:1.29 php4/main.c:1.30
--- php4/main.c:1.29 Fri Apr 23 20:11:49 1999
+++ php4/main.c Sat Apr 24 12:17:04 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.29 1999/04/24 00:11:49 zeev Exp $ */
+/* $Id: main.c,v 1.30 1999/04/24 16:17:04 zeev Exp $ */
#include <stdio.h>
@@ -248,12 +248,6 @@
* Globals yet to be protected
*/
-#if WIN32|WINNT
-unsigned int wintimer;
-unsigned int timerstart;
-unsigned int wintimer_counter = 0;
-#endif
-
#if APACHE
request_rec *php3_rqst = NULL; /* request record pointer for apache module version */
#endif
@@ -496,14 +490,8 @@
static void php3_set_timeout(long seconds)
{
#if WIN32|WINNT
- if (seconds > 0) {
- timerstart = (unsigned int) clock();
- wintimer = timerstart + (CLOCKS_PER_SEC * seconds);
- } else {
- wintimer = 0;
- }
#else
-#if HAVE_SETITIMER
+# if HAVE_SETITIMER
struct itimerval t_r; /* timeout requested */
t_r.it_value.tv_sec = seconds;
@@ -511,7 +499,7 @@
setitimer(ITIMER_PROF, &t_r, NULL);
signal(SIGPROF, php3_timeout);
-#endif
+# endif
#endif
}
@@ -519,15 +507,14 @@
static void php3_unset_timeout()
{
#if WIN32|WINNT
- wintimer = 0;
#else
-#if HAVE_SETITIMER
+# if HAVE_SETITIMER
struct itimerval no_timeout;
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec =
no_timeout.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &no_timeout, NULL);
-#endif
+# endif
#endif
}
--
PHP 4 Beta