CVS update: php3/functions
| From: | sas | Date: | Thu, 27 May 1999 13:54:26 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6066@lists.php.net to get a copy of this message | ||
Date: Thursday May 27, 1999 @ 9:54
Author: sas
Update of /repository/php3/functions
In directory php:/tmp/cvs-serv26961/functions
Modified Files:
fsock.c fsock.h
Log Message:
- make connect_nonb callable from "outer world"
Index: php3/functions/fsock.c
diff -u php3/functions/fsock.c:1.106 php3/functions/fsock.c:1.107
--- php3/functions/fsock.c:1.106 Wed May 26 15:03:18 1999
+++ php3/functions/fsock.c Thu May 27 09:54:26 1999
@@ -27,7 +27,7 @@
| Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.c,v 1.106 1999/05/26 19:03:18 sas Exp $ */
+/* $Id: fsock.c,v 1.107 1999/05/27 13:54:26 sas Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
@@ -158,6 +158,10 @@
}
/* }}} */
+
+/* {{{ connect_nonb */
+PHPAPI int connect_nonb(int sockfd, struct sockaddr *addr, int addrlen, struct timeval *timeout)
+
/* probably won't work on Win32, someone else might try it (read: fix it ;) */
#if !defined(WIN32) && (defined(O_NONBLOCK) || defined(O_NDELAY))
@@ -165,7 +169,6 @@
#define O_NONBLOCK O_NDELAY
#endif
-static int connect_nonb(int sockfd, struct sockaddr *addr, int addrlen, struct timeval *timeout)
{
int flags;
int n;
@@ -217,10 +220,13 @@
return ret;
}
#else
-
-#define connect_nonb(a,b,c,d) connect(a,b,c)
-
+#warning "compiling without nonblocking connect support"
+{
+ return connect(sockfd, addr, addrlen);
+}
#endif
+/* }}} */
+
/* {{{ _php3_fsockopen() */
/*
Index: php3/functions/fsock.h
diff -u php3/functions/fsock.h:1.20 php3/functions/fsock.h:1.21
--- php3/functions/fsock.h:1.20 Wed May 26 09:08:50 1999
+++ php3/functions/fsock.h Thu May 27 09:54:26 1999
@@ -27,7 +27,7 @@
| Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.h,v 1.20 1999/05/26 13:08:50 sas Exp $ */
+/* $Id: fsock.h,v 1.21 1999/05/27 13:54:26 sas Exp $ */
#ifndef _FSOCK_H
#define _FSOCK_H
@@ -45,5 +45,6 @@
int _php3_is_persistent_sock(int);
int _php3_sock_set_blocking(int socket, int mode);
+PHPAPI int connect_nonb(int sockfd, struct sockaddr *addr, int addrlen, struct timeval *timeout);
#endif /* _FSOCK_H */
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net