diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-08-17 14:40:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-08-17 14:40:27 -0400 |
commit | f724b2e5aaded4bc471b72f39eb990cc4114cb90 (patch) | |
tree | 3e8c8f09cb2d6d7479460fe2020541456fa18a1f /src/common/compat.h | |
parent | 5fe18bcf5459d8801fdeaf01e74571cd36ba47da (diff) | |
parent | 720a9ccb2f4392ca12e9a473125e54c20c291d4a (diff) | |
download | tor-f724b2e5aaded4bc471b72f39eb990cc4114cb90.tar.gz tor-f724b2e5aaded4bc471b72f39eb990cc4114cb90.zip |
Merge remote-tracking branch 'public/bug16741_026'
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index d3b18eba92..c7c468c754 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -563,6 +563,8 @@ int network_init(void); ((e) == WSAEMFILE || (e) == WSAENOBUFS) /** Return true if e is EADDRINUSE or the local equivalent. */ #define ERRNO_IS_EADDRINUSE(e) ((e) == WSAEADDRINUSE) +/** Return true if e is EINTR or the local equivalent */ +#define ERRNO_IS_EINTR(e) ((e) == WSAEINTR || 0) int tor_socket_errno(tor_socket_t sock); const char *tor_socket_strerror(int e); #else @@ -573,6 +575,7 @@ const char *tor_socket_strerror(int e); #else #define ERRNO_IS_EAGAIN(e) ((e) == EAGAIN || (e) == EWOULDBLOCK) #endif +#define ERRNO_IS_EINTR(e) ((e) == EINTR || 0) #define ERRNO_IS_EINPROGRESS(e) ((e) == EINPROGRESS || 0) #define ERRNO_IS_CONN_EINPROGRESS(e) ((e) == EINPROGRESS || 0) #define ERRNO_IS_ACCEPT_EAGAIN(e) \ |