czmq-ffi-gen 0.12.0-x64-mingw32 → 0.13.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1015,10 +1015,6 @@ module CZMQ
1015
1015
  attach_function :zsock_set_ipv6, [:pointer, :int], :void, **opts
1016
1016
  attach_function :zsock_immediate, [:pointer], :int, **opts
1017
1017
  attach_function :zsock_set_immediate, [:pointer, :int], :void, **opts
1018
- attach_function :zsock_set_router_raw, [:pointer, :int], :void, **opts
1019
- attach_function :zsock_ipv4only, [:pointer], :int, **opts
1020
- attach_function :zsock_set_ipv4only, [:pointer, :int], :void, **opts
1021
- attach_function :zsock_set_delay_attach_on_connect, [:pointer, :int], :void, **opts
1022
1018
  attach_function :zsock_type, [:pointer], :int, **opts
1023
1019
  attach_function :zsock_sndhwm, [:pointer], :int, **opts
1024
1020
  attach_function :zsock_set_sndhwm, [:pointer, :int], :void, **opts
@@ -1066,9 +1062,13 @@ module CZMQ
1066
1062
  attach_function :zsock_tcp_accept_filter, [:pointer], :pointer, **opts
1067
1063
  attach_function :zsock_set_tcp_accept_filter, [:pointer, :string], :void, **opts
1068
1064
  attach_function :zsock_rcvmore, [:pointer], :int, **opts
1069
- attach_function :zsock_fd, [:pointer], (::FFI::Platform.unix? ? :int : :uint64_t), **opts
1065
+ attach_function :zsock_fd, [:pointer], (::FFI::Platform.unix? ? :int : :uint64), **opts
1070
1066
  attach_function :zsock_events, [:pointer], :int, **opts
1071
1067
  attach_function :zsock_last_endpoint, [:pointer], :pointer, **opts
1068
+ attach_function :zsock_set_router_raw, [:pointer, :int], :void, **opts
1069
+ attach_function :zsock_ipv4only, [:pointer], :int, **opts
1070
+ attach_function :zsock_set_ipv4only, [:pointer, :int], :void, **opts
1071
+ attach_function :zsock_set_delay_attach_on_connect, [:pointer, :int], :void, **opts
1072
1072
  attach_function :zsock_test, [:bool], :void, **opts
1073
1073
 
1074
1074
  require_relative 'ffi/zsock'
@@ -1,5 +1,5 @@
1
1
  module CZMQ
2
2
  module FFI
3
- GEM_VERSION = "0.12.0"
3
+ GEM_VERSION = "0.13.0"
4
4
  end
5
5
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -28,7 +28,7 @@
28
28
  // CZMQ version macros for compile-time API detection
29
29
  #define CZMQ_VERSION_MAJOR 4
30
30
  #define CZMQ_VERSION_MINOR 0
31
- #define CZMQ_VERSION_PATCH 0
31
+ #define CZMQ_VERSION_PATCH 3
32
32
 
33
33
  #define CZMQ_MAKE_VERSION(major, minor, patch) \
34
34
  ((major) * 10000 + (minor) * 100 + (patch))
@@ -49,8 +49,14 @@
49
49
  # else
50
50
  # define CZMQ_EXPORT __declspec(dllimport)
51
51
  # endif
52
+ # define CZMQ_PRIVATE
52
53
  #else
53
54
  # define CZMQ_EXPORT
55
+ # if (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
56
+ # define CZMQ_PRIVATE __attribute__ ((visibility ("hidden")))
57
+ # else
58
+ # define CZMQ_PRIVATE
59
+ # endif
54
60
  #endif
55
61
 
56
62
  // Opaque class structures to allow forward references
@@ -193,7 +193,7 @@
193
193
  #elif (defined (sinix))
194
194
  # define __UTYPE_SINIX
195
195
  # define __UNIX__
196
- #elif (defined (SOLARIS) || defined (__SRV4))
196
+ #elif (defined (SOLARIS) || defined (__SVR4)) || defined (SVR4)
197
197
  # define __UTYPE_SUNSOLARIS
198
198
  # define __UNIX__
199
199
  #elif (defined (SUNOS) || defined (SUN) || defined (sun))
@@ -421,11 +421,17 @@ typedef struct {
421
421
  #define strneq(s1,s2) (strcmp ((s1), (s2)))
422
422
 
423
423
  // Provide random number from 0..(num-1)
424
+ // Note that (at least in Solaris) while rand() returns an int limited by
425
+ // RAND_MAX, random() returns a 32-bit value all filled with random bits.
424
426
  #if (defined (__WINDOWS__)) || (defined (__UTYPE_IBMAIX)) \
425
- || (defined (__UTYPE_HPUX)) || (defined (__UTYPE_SUNOS))
427
+ || (defined (__UTYPE_HPUX)) || (defined (__UTYPE_SUNOS)) || (defined (__UTYPE_SOLARIS))
426
428
  # define randof(num) (int) ((float) (num) * rand () / (RAND_MAX + 1.0))
427
429
  #else
428
- # define randof(num) (int) ((float) (num) * random () / (RAND_MAX + 1.0))
430
+ # if defined(RAND_MAX)
431
+ # define randof(num) (int) ((float) (num) * (random () % RAND_MAX) / (RAND_MAX + 1.0))
432
+ # else
433
+ # define randof(num) (int) ((float) (num) * (uint32_t)random () / (UINT32_MAX + 1.0))
434
+ # endif
429
435
  #endif
430
436
 
431
437
  // Windows MSVS doesn't have stdbool
@@ -164,7 +164,8 @@ CZMQ_EXPORT int
164
164
  CZMQ_EXPORT int
165
165
  zhash_refresh (zhash_t *self);
166
166
 
167
- // Set hash for automatic value destruction
167
+ // Set hash for automatic value destruction. Note that this assumes that
168
+ // values are NULL-terminated strings. Do not use with different types.
168
169
  CZMQ_EXPORT void
169
170
  zhash_autofree (zhash_t *self);
170
171
 
@@ -38,11 +38,11 @@ typedef void * (zhashx_duplicator_fn) (
38
38
  typedef int (zhashx_comparator_fn) (
39
39
  const void *item1, const void *item2);
40
40
 
41
- // compare two items, for sorting
41
+ // Destroy an item.
42
42
  typedef void (zhashx_free_fn) (
43
43
  void *data);
44
44
 
45
- // compare two items, for sorting
45
+ // Hash function for keys.
46
46
  typedef size_t (zhashx_hash_fn) (
47
47
  const void *key);
48
48
 
@@ -41,7 +41,7 @@
41
41
  /* Version macros for compile-time API version detection */
42
42
  #define ZMQ_VERSION_MAJOR 4
43
43
  #define ZMQ_VERSION_MINOR 2
44
- #define ZMQ_VERSION_PATCH 0
44
+ #define ZMQ_VERSION_PATCH 2
45
45
 
46
46
  #define ZMQ_MAKE_VERSION(major, minor, patch) \
47
47
  ((major) * 10000 + (minor) * 100 + (patch))
@@ -112,6 +112,13 @@ extern "C" {
112
112
  # include <stdint.h>
113
113
  #endif
114
114
 
115
+ // 32-bit AIX's pollfd struct members are called reqevents and rtnevents so it
116
+ // defines compatibility macros for them. Need to include that header first to
117
+ // stop build failures since zmq_pollset_t defines them as events and revents.
118
+ #ifdef ZMQ_HAVE_AIX
119
+ #include <poll.h>
120
+ #endif
121
+
115
122
 
116
123
  /******************************************************************************/
117
124
  /* 0MQ errors. */
@@ -229,10 +236,23 @@ ZMQ_EXPORT int zmq_ctx_destroy (void *context);
229
236
  /* 0MQ message definition. */
230
237
  /******************************************************************************/
231
238
 
232
- /* union here ensures correct alignment on architectures that require it, e.g.
233
- * SPARC
239
+ /* Some architectures, like sparc64 and some variants of aarch64, enforce pointer
240
+ * alignment and raise sigbus on violations. Make sure applications allocate
241
+ * zmq_msg_t on addresses aligned on a pointer-size boundary to avoid this issue.
234
242
  */
235
- typedef union zmq_msg_t {unsigned char _ [64]; void *p; } zmq_msg_t;
243
+ typedef struct zmq_msg_t {
244
+ #if defined (__GNUC__) || defined ( __INTEL_COMPILER) || \
245
+ (defined (__SUNPRO_C) && __SUNPRO_C >= 0x590) || \
246
+ (defined (__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
247
+ unsigned char _ [64] __attribute__ ((aligned (sizeof (void *))));
248
+ #elif defined (_MSC_VER) && (defined (_M_X64) || defined (_M_ARM64))
249
+ __declspec (align (8)) unsigned char _ [64];
250
+ #elif defined (_MSC_VER) && (defined (_M_IX86) || defined (_M_ARM_ARMV7VE))
251
+ __declspec (align (4)) unsigned char _ [64];
252
+ #else
253
+ unsigned char _ [64];
254
+ #endif
255
+ } zmq_msg_t;
236
256
 
237
257
  typedef void (zmq_free_fn) (void *data, void *hint);
238
258
 
@@ -330,8 +350,6 @@ ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property);
330
350
  #define ZMQ_HANDSHAKE_IVL 66
331
351
  #define ZMQ_SOCKS_PROXY 68
332
352
  #define ZMQ_XPUB_NODROP 69
333
- // All options after this is for version 4.2 and still *draft*
334
- // Subject to arbitrary change without notice
335
353
  #define ZMQ_BLOCKY 70
336
354
  #define ZMQ_XPUB_MANUAL 71
337
355
  #define ZMQ_XPUB_WELCOME_MSG 72
@@ -543,6 +561,13 @@ ZMQ_EXPORT void zmq_threadclose (void* thread);
543
561
  #define ZMQ_SCATTER 17
544
562
  #define ZMQ_DGRAM 18
545
563
 
564
+ /* DRAFT 0MQ socket events and monitoring */
565
+ #define ZMQ_EVENT_HANDSHAKE_FAILED 0x0800
566
+ #define ZMQ_EVENT_HANDSHAKE_SUCCEED 0x1000
567
+
568
+ /* DRAFT Context options */
569
+ #define ZMQ_MSG_T_SIZE 6
570
+
546
571
  /* DRAFT Socket methods. */
547
572
  ZMQ_EXPORT int zmq_join (void *s, const char *group);
548
573
  ZMQ_EXPORT int zmq_leave (void *s, const char *group);
@@ -577,6 +602,7 @@ ZMQ_EXPORT int zmq_poller_add (void *poller, void *socket, void *user_data, sho
577
602
  ZMQ_EXPORT int zmq_poller_modify (void *poller, void *socket, short events);
578
603
  ZMQ_EXPORT int zmq_poller_remove (void *poller, void *socket);
579
604
  ZMQ_EXPORT int zmq_poller_wait (void *poller, zmq_poller_event_t *event, long timeout);
605
+ ZMQ_EXPORT int zmq_poller_wait_all (void *poller, zmq_poller_event_t *events, int n_events, long timeout);
580
606
 
581
607
  #if defined _WIN32
582
608
  ZMQ_EXPORT int zmq_poller_add_fd (void *poller, SOCKET fd, void *user_data, short events);