diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-02-23 23:43:31 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-02-23 23:43:31 +0100 |
commit | 551fa104ffdb8c417b7d75ce70c463992e7d4652 (patch) | |
tree | fc44c02e46c1533343b0c2ec58484207d5977157 /bindings/cpp | |
parent | 95329719cda2b941e422d06daad3a7ba4c4a8829 (diff) |
zmq_errno used in C++ binding
Diffstat (limited to 'bindings/cpp')
-rw-r--r-- | bindings/cpp/zmq.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bindings/cpp/zmq.hpp b/bindings/cpp/zmq.hpp index aecdb0d..3ddc043 100644 --- a/bindings/cpp/zmq.hpp +++ b/bindings/cpp/zmq.hpp @@ -23,7 +23,6 @@ #include "zmq.h" #include <assert.h> -#include <errno.h> #include <string.h> #include <exception> @@ -37,7 +36,7 @@ namespace zmq { public: - error_t () : errnum (errno) {} + error_t () : errnum (zmq_errno ()) {} virtual const char *what () const throw () { @@ -232,7 +231,7 @@ namespace zmq int rc = zmq_send (ptr, &msg_, flags_); if (rc == 0) return true; - if (rc == -1 && errno == EAGAIN) + if (rc == -1 && zmq_errno () == EAGAIN) return false; throw error_t (); } @@ -249,7 +248,7 @@ namespace zmq int rc = zmq_recv (ptr, msg_, flags_); if (rc == 0) return true; - if (rc == -1 && errno == EAGAIN) + if (rc == -1 && zmq_errno () == EAGAIN) return false; throw error_t (); } |