summaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-05-02 20:18:21 +0000
committerNick Mathewson <nickm@torproject.org>2004-05-02 20:18:21 +0000
commitaf08c4f878827928109a59a257cd6681bca7d68c (patch)
tree3ecdfa0edc8799499efe0ba6d03f9e3c469f2b2f /src/common/util.h
parenta187d3e0b6329bd70b9823bd2d5489c8aaccf08e (diff)
downloadtor-af08c4f878827928109a59a257cd6681bca7d68c.tar.gz
tor-af08c4f878827928109a59a257cd6681bca7d68c.zip
Working strerror for windows socket errors, plus some snide comments.
svn:r1775
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 708c87fd28..1976e6ad54 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -250,11 +250,13 @@ int tor_lookup_hostname(const char *name, uint32_t *addr);
#define ERRNO_IS_EINPROGRESS(e) ((e) == WSAEINPROGRESS)
#define ERRNO_IS_CONN_EINPROGRESS(e) ((e) == WSAEINPROGRESS || (e)== WSAEINVAL)
int tor_socket_errno(int sock);
+const char *tor_socket_strerror(int e);
#else
#define ERRNO_IS_EAGAIN(e) ((e) == EAGAIN)
#define ERRNO_IS_EINPROGRESS(e) ((e) == EINPROGRESS)
#define ERRNO_IS_CONN_EINPROGRESS(e) ((e) == EINPROGRESS)
#define tor_socket_errno(sock) (errno)
+#define tor_socket_strerror(e) strerror(e)
#endif
#endif