summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/zmq.h24
-rw-r--r--include/zmq.hpp21
-rw-r--r--include/zmq_utils.h12
3 files changed, 39 insertions, 18 deletions
diff --git a/include/zmq.h b/include/zmq.h
index 9afd8e1..7a63253 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -4,16 +4,16 @@
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU General Public License as published by
+ the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,6 +39,9 @@ extern "C" {
# endif
#else
# define ZMQ_EXPORT
+# if defined __GNUC__ && __GNUC__ >= 4
+# pragma GCC visibility push(default)
+# endif
#endif
/******************************************************************************/
@@ -47,8 +50,8 @@ extern "C" {
/* Version macros for compile-time API version detection */
#define ZMQ_VERSION_MAJOR 2
-#define ZMQ_VERSION_MINOR 0
-#define ZMQ_VERSION_PATCH 11
+#define ZMQ_VERSION_MINOR 1
+#define ZMQ_VERSION_PATCH 0
#define ZMQ_MAKE_VERSION(major, minor, patch) \
((major) * 10000 + (minor) * 100 + (patch))
@@ -93,10 +96,10 @@ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
#endif
/* Native 0MQ error codes. */
-#define EMTHREAD (ZMQ_HAUSNUMERO + 50)
#define EFSM (ZMQ_HAUSNUMERO + 51)
#define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52)
#define ETERM (ZMQ_HAUSNUMERO + 53)
+#define EMTHREAD (ZMQ_HAUSNUMERO + 54)
/* This function retrieves the errno as it is known to 0MQ library. The goal */
/* of this function is to make the code 100% portable, including where 0MQ */
@@ -188,6 +191,12 @@ ZMQ_EXPORT int zmq_term (void *context);
#define ZMQ_SNDBUF 11
#define ZMQ_RCVBUF 12
#define ZMQ_RCVMORE 13
+#define ZMQ_FD 14
+#define ZMQ_EVENTS 15
+#define ZMQ_TYPE 16
+#define ZMQ_LINGER 17
+#define ZMQ_RECONNECT_IVL 18
+#define ZMQ_BACKLOG 19
/* Send/recv options. */
#define ZMQ_NOBLOCK 1
@@ -237,6 +246,9 @@ ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);
ZMQ_EXPORT int zmq_device (int device, void * insocket, void* outsocket);
#undef ZMQ_EXPORT
+#if defined __GNUC__ && __GNUC__ >= 4 && !defined _WIN32
+# pragma GCC visibility pop
+#endif
#ifdef __cplusplus
}
diff --git a/include/zmq.hpp b/include/zmq.hpp
index 86ffff6..4cfa399 100644
--- a/include/zmq.hpp
+++ b/include/zmq.hpp
@@ -4,16 +4,16 @@
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU General Public License as published by
+ the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,8 +22,8 @@
#include "zmq.h"
-#include <assert.h>
-#include <string.h>
+#include <cassert>
+#include <cstring>
#include <exception>
namespace zmq
@@ -43,6 +43,11 @@ namespace zmq
return zmq_strerror (errnum);
}
+ int num () const
+ {
+ return errnum;
+ }
+
private:
int errnum;
@@ -94,8 +99,7 @@ namespace zmq
inline ~message_t ()
{
int rc = zmq_msg_close (this);
- if (rc != 0)
- throw error_t ();
+ assert (rc == 0);
}
inline void rebuild ()
@@ -202,8 +206,7 @@ namespace zmq
inline ~socket_t ()
{
int rc = zmq_close (ptr);
- if (rc != 0)
- throw error_t ();
+ assert (rc == 0);
}
inline operator void* ()
diff --git a/include/zmq_utils.h b/include/zmq_utils.h
index 5b78e10..6d42bf9 100644
--- a/include/zmq_utils.h
+++ b/include/zmq_utils.h
@@ -4,16 +4,16 @@
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU General Public License as published by
+ the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -33,6 +33,9 @@ extern "C" {
# endif
#else
# define ZMQ_EXPORT
+# if defined __GNUC__ && __GNUC__ >= 4
+# pragma GCC visibility push(default)
+# endif
#endif
/* Helper functions are used by perf tests so that they don't have to care */
@@ -49,6 +52,9 @@ ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_);
ZMQ_EXPORT void zmq_sleep (int seconds_);
#undef ZMQ_EXPORT
+#if defined __GNUC__ && __GNUC__ >= 4 && !defined _WIN32
+# pragma GCC visibility pop
+#endif
#ifdef __cplusplus
}