summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Greene <jason@php.net>2002-07-10 15:23:47 +0000
committerJason Greene <jason@php.net>2002-07-10 15:23:47 +0000
commitd907b2d525c6f296838dcb76b1212575721bc24b (patch)
treee84c93e9463570f71092ad32d72dfa01ff61786a
parent05007b0cbb4a86543965820f7f3d50039decf1a5 (diff)
downloadphp-git-d907b2d525c6f296838dcb76b1212575721bc24b.tar.gz
@Fixed socket_set_timeout on win32 (Jason, Edin, Jani)
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/file.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 4634a71e1e..37e4abe078 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -614,7 +614,7 @@ function_entry basic_functions[] = {
PHP_FE(file_get_wrapper_data, NULL)
PHP_FE(file_register_wrapper, NULL)
-#if HAVE_SYS_TIME_H
+#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
PHP_FE(socket_set_timeout, NULL)
#endif
diff --git a/ext/standard/file.c b/ext/standard/file.c
index dbd15ae99a..7fd6181e87 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1035,9 +1035,9 @@ PHP_FUNCTION(set_socket_blocking)
/* {{{ proto bool socket_set_timeout(int socket_descriptor, int seconds, int microseconds)
Set timeout on socket read to seconds + microseonds */
+#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
PHP_FUNCTION(socket_set_timeout)
{
-#if HAVE_SYS_TIME_H
zval **socket, **seconds, **microseconds;
int type;
void *what;
@@ -1068,9 +1068,8 @@ PHP_FUNCTION(socket_set_timeout)
}
RETURN_FALSE;
-#endif /* HAVE_SYS_TIME_H */
}
-
+#endif /* HAVE_SYS_TIME_H || defined(PHP_WIN32) */
/* }}} */