From 0efb49f12fdec061b267a7526cbaa8d149d8c254 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Thu, 16 Feb 2012 12:04:25 -0600 Subject: [PATCH] Fixed up all references to zmq_msg_size --- doc/zmq_msg_size.txt | 16 ++++++++++++---- include/zmq.h | 1 + perf/inproc_lat.cpp | 4 ++-- perf/inproc_thr.cpp | 4 ++-- perf/local_lat.cpp | 4 ++-- perf/local_thr.cpp | 4 ++-- perf/remote_lat.cpp | 4 ++-- 7 files changed, 23 insertions(+), 14 deletions(-) diff --git a/doc/zmq_msg_size.txt b/doc/zmq_msg_size.txt index 354ca284..75f5f1ce 100644 --- a/doc/zmq_msg_size.txt +++ b/doc/zmq_msg_size.txt @@ -9,7 +9,7 @@ zmq_msg_size - retrieve message content size in bytes SYNOPSIS -------- -*size_t zmq_msg_size (zmq_msg_t '*msg');* +*ssize_t zmq_msg_size (zmq_msg_t '*msg');* DESCRIPTION @@ -29,7 +29,15 @@ message content in bytes. ERRORS ------ -No errors are defined. +The _zmq_msg_size()_ function shall return a positive integer (0 or higher) +if successful. Otherwise it shall return `-1` and set 'errno' to one of the +values defined below. + + +ERRORS +------ +*EFAULT*:: +The provided 'msg' was NULL. SEE ALSO @@ -44,5 +52,5 @@ linkzmq:zmq[7] AUTHORS ------- -This 0MQ manual page was written by Martin Sustrik and -Martin Lucina . +This 0MQ manual page was written by Martin Sustrik , +Martin Lucina , and Pieter Hintjens . diff --git a/include/zmq.h b/include/zmq.h index d6d44682..a42576d7 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -29,6 +29,7 @@ extern "C" { #include #include +#include #if defined _WIN32 #include #endif diff --git a/perf/inproc_lat.cpp b/perf/inproc_lat.cpp index 5b6a830c..e19b2366 100644 --- a/perf/inproc_lat.cpp +++ b/perf/inproc_lat.cpp @@ -1,6 +1,6 @@ /* + Copyright (c) 2007-2012 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -35,7 +35,7 @@ #include #endif -static size_t message_size; +static ssize_t message_size; static int roundtrip_count; #if defined ZMQ_HAVE_WINDOWS diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp index b4cadfcc..b4fe8024 100644 --- a/perf/inproc_thr.cpp +++ b/perf/inproc_thr.cpp @@ -1,6 +1,6 @@ /* + Copyright (c) 2007-2012 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -36,7 +36,7 @@ #endif static int message_count; -static size_t message_size; +static ssize_t message_size; #if defined ZMQ_HAVE_WINDOWS static unsigned int __stdcall worker (void *ctx_) diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp index 714b8c0f..9811fa3b 100644 --- a/perf/local_lat.cpp +++ b/perf/local_lat.cpp @@ -1,6 +1,6 @@ /* + Copyright (c) 2007-2012 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -28,7 +28,7 @@ int main (int argc, char *argv []) { const char *bind_to; int roundtrip_count; - size_t message_size; + ssize_t message_size; void *ctx; void *s; int rc; diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp index 5c495d83..451c3b88 100644 --- a/perf/local_thr.cpp +++ b/perf/local_thr.cpp @@ -1,6 +1,6 @@ /* + Copyright (c) 2007-2012 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -28,7 +28,7 @@ int main (int argc, char *argv []) { const char *bind_to; int message_count; - size_t message_size; + ssize_t message_size; void *ctx; void *s; int rc; diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp index 9eb76b0b..07979985 100644 --- a/perf/remote_lat.cpp +++ b/perf/remote_lat.cpp @@ -1,6 +1,6 @@ /* + Copyright (c) 2007-2012 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. - Copyright (c) 2007-2009 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. @@ -29,7 +29,7 @@ int main (int argc, char *argv []) { const char *connect_to; int roundtrip_count; - size_t message_size; + ssize_t message_size; void *ctx; void *s; int rc;