@@ -273,6 +273,17 @@ struct is_range<
273
273
typedef zmq_free_fn free_fn;
274
274
typedef zmq_pollitem_t pollitem_t ;
275
275
276
+ // duplicate definition from libzmq 4.3.3
277
+ #if defined _WIN32
278
+ #if defined _WIN64
279
+ typedef unsigned __int64 fd_t ;
280
+ #else
281
+ typedef unsigned int fd_t ;
282
+ #endif
283
+ #else
284
+ typedef int fd_t ;
285
+ #endif
286
+
276
287
class error_t : public std ::exception
277
288
{
278
289
public:
@@ -1351,10 +1362,6 @@ constexpr const_buffer operator"" _zbuf(const char32_t *str, size_t len) noexcep
1351
1362
}
1352
1363
}
1353
1364
1354
- #endif // ZMQ_CPP11
1355
-
1356
-
1357
- #ifdef ZMQ_CPP11
1358
1365
namespace sockopt
1359
1366
{
1360
1367
// There are two types of options,
@@ -1390,16 +1397,8 @@ template<int Opt, int NullTerm = 1> struct array_option
1390
1397
using NAME##_t = array_option<OPT, 2 >; \
1391
1398
ZMQ_INLINE_VAR ZMQ_CONSTEXPR_VAR NAME##_t NAME {}
1392
1399
1393
- // duplicate definition from libzmq 4.3.3
1394
- #if defined _WIN32
1395
- #if defined _WIN64
1396
- typedef unsigned __int64 cppzmq_fd_t ;
1397
- #else
1398
- typedef unsigned int cppzmq_fd_t ;
1399
- #endif
1400
- #else
1401
- typedef int cppzmq_fd_t ;
1402
- #endif
1400
+ // deprecated, use zmq::fd_t
1401
+ using cppzmq_fd_t = ::zmq::fd_t ;
1403
1402
1404
1403
#ifdef ZMQ_AFFINITY
1405
1404
ZMQ_DEFINE_INTEGRAL_OPT (ZMQ_AFFINITY, affinity, uint64_t );
@@ -1435,7 +1434,7 @@ ZMQ_DEFINE_ARRAY_OPT_BIN_OR_Z85(ZMQ_CURVE_SERVERKEY, curve_serverkey);
1435
1434
ZMQ_DEFINE_INTEGRAL_OPT (ZMQ_EVENTS, events, int );
1436
1435
#endif
1437
1436
#ifdef ZMQ_FD
1438
- ZMQ_DEFINE_INTEGRAL_OPT (ZMQ_FD, fd, cppzmq_fd_t );
1437
+ ZMQ_DEFINE_INTEGRAL_OPT (ZMQ_FD, fd, ::zmq:: fd_t );
1439
1438
#endif
1440
1439
#ifdef ZMQ_GSSAPI_PLAINTEXT
1441
1440
ZMQ_DEFINE_INTEGRAL_BOOL_UNIT_OPT (ZMQ_GSSAPI_PLAINTEXT, gssapi_plaintext, int );
@@ -2587,11 +2586,7 @@ struct no_user_data;
2587
2586
template <class T = no_user_data> struct poller_event
2588
2587
{
2589
2588
socket_ref socket;
2590
- #ifdef _WIN32
2591
- SOCKET fd;
2592
- #else
2593
- int fd;
2594
- #endif
2589
+ ::zmq::fd_t fd;
2595
2590
T *user_data;
2596
2591
event_flags events;
2597
2592
};
0 commit comments