diff options
author | Wez Furlong <wez@php.net> | 2002-10-13 22:01:40 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-10-13 22:01:40 +0000 |
commit | 70b796b143178194041cdaa0e0c4206ed8cfb6ff (patch) | |
tree | 6adb9b9fb382f69ae0fec3ee39814b5033d7c785 /main/php_network.h | |
parent | 63212d27ee233ce0c71674ec6a6f579c2ab17c1a (diff) | |
download | php-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.h | 9 |
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 |