summaryrefslogtreecommitdiff
path: root/main/php_network.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-10-13 22:01:40 +0000
committerWez Furlong <wez@php.net>2002-10-13 22:01:40 +0000
commit70b796b143178194041cdaa0e0c4206ed8cfb6ff (patch)
tree6adb9b9fb382f69ae0fec3ee39814b5033d7c785 /main/php_network.h
parent63212d27ee233ce0c71674ec6a6f579c2ab17c1a (diff)
downloadphp-git-70b796b143178194041cdaa0e0c4206ed8cfb6ff.tar.gz
(php_socket_errno) win32 errno compatible macro.
(php_socket_strerror) win32 compatible strerror replacement. Add an E_NOTICE when a socket write fails.
Diffstat (limited to 'main/php_network.h')
-rw-r--r--main/php_network.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/php_network.h b/main/php_network.h
index 59c6bdf069..4e6ae61ad8 100644
--- a/main/php_network.h
+++ b/main/php_network.h
@@ -44,11 +44,16 @@
#endif /* defined(PHP_WIN32) */
#ifdef PHP_WIN32
-#define streams_socket_errno WSAGetLastError()
+#define php_socket_errno() WSAGetLastError()
#else
-#define streams_socket_errno errno
+#define php_socket_errno() errno
#endif
+/* like strerror, but caller must efree the returned string,
+ * unless buf is not NULL.
+ * Also works sensibly for win32 */
+PHPAPI char *php_socket_strerror(long err, char *buf, size_t bufsize);
+
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif