From 4a7aad06d95701cf232198093ce396dcdbb53e5b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 16 Feb 2012 10:01:47 +0900 Subject: ZeroMQ renamed to Crossroads Signed-off-by: Martin Sustrik --- src/err.hpp | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src/err.hpp') diff --git a/src/err.hpp b/src/err.hpp index 53a6569..a62d0fd 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -1,16 +1,16 @@ /* - Copyright (c) 2009-2011 250bpm s.r.o. + Copyright (c) 2009-2012 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. + This file is part of Crossroads project. - 0MQ is free software; you can redistribute it and/or modify it under + Crossroads is free software; you can redistribute it and/or modify it under 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, + Crossroads 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 GNU Lesser General Public License for more details. @@ -19,11 +19,11 @@ along with this program. If not, see . */ -#ifndef __ZMQ_ERR_HPP_INCLUDED__ -#define __ZMQ_ERR_HPP_INCLUDED__ +#ifndef __XS_ERR_HPP_INCLUDED__ +#define __XS_ERR_HPP_INCLUDED__ -// 0MQ-specific error codes are defined in zmq.h -#include "../include/zmq.h" +// Crossroads-specific error codes are defined in xs.h +#include "../include/xs.h" #include #include @@ -34,21 +34,21 @@ #include "platform.hpp" #include "likely.hpp" -#ifdef ZMQ_HAVE_WINDOWS +#ifdef XS_HAVE_WINDOWS #include "windows.hpp" #else #include #endif -namespace zmq +namespace xs { const char *errno_to_string (int errno_); - void zmq_abort (const char *errmsg_); + void xs_abort (const char *errmsg_); } -#ifdef ZMQ_HAVE_WINDOWS +#ifdef XS_HAVE_WINDOWS -namespace zmq +namespace xs { const char *wsa_error (); const char *wsa_error_no (int no_); @@ -60,11 +60,11 @@ namespace zmq #define wsa_assert(x) \ do {\ if (unlikely (!(x))) {\ - const char *errstr = zmq::wsa_error ();\ + const char *errstr = xs::wsa_error ();\ if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ - zmq::zmq_abort (errstr);\ + xs::xs_abort (errstr);\ }\ }\ } while (false) @@ -72,11 +72,11 @@ namespace zmq // Provides convenient way to assert on WSA-style errors on Windows. #define wsa_assert_no(no) \ do {\ - const char *errstr = zmq::wsa_error_no (no);\ + const char *errstr = xs::wsa_error_no (no);\ if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ - zmq::zmq_abort (errstr);\ + xs::xs_abort (errstr);\ }\ } while (false) @@ -85,10 +85,10 @@ namespace zmq do {\ if (unlikely (!(x))) {\ char errstr [256];\ - zmq::win_error (errstr, 256);\ + xs::win_error (errstr, 256);\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ - zmq::zmq_abort (errstr);\ + xs::xs_abort (errstr);\ }\ } while (false) @@ -97,12 +97,12 @@ namespace zmq // This macro works in exactly the same way as the normal assert. It is used // in its stead because standard assert on Win32 in broken - it prints nothing // when used within the scope of JNI library. -#define zmq_assert(x) \ +#define xs_assert(x) \ do {\ if (unlikely (!(x))) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", #x, \ __FILE__, __LINE__);\ - zmq::zmq_abort (#x);\ + xs::xs_abort (#x);\ }\ } while (false) @@ -112,7 +112,7 @@ namespace zmq if (unlikely (!(x))) {\ const char *errstr = strerror (errno);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ - zmq::zmq_abort (errstr);\ + xs::xs_abort (errstr);\ }\ } while (false) @@ -122,7 +122,7 @@ namespace zmq if (unlikely (x)) {\ const char *errstr = strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ - zmq::zmq_abort (errstr);\ + xs::xs_abort (errstr);\ }\ } while (false) @@ -132,7 +132,7 @@ namespace zmq if (unlikely (x)) {\ const char *errstr = gai_strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ - zmq::zmq_abort (errstr);\ + xs::xs_abort (errstr);\ }\ } while (false) @@ -142,7 +142,7 @@ namespace zmq if (unlikely (!x)) {\ fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n",\ __FILE__, __LINE__);\ - zmq::zmq_abort ("FATAL ERROR: OUT OF MEMORY");\ + xs::xs_abort ("FATAL ERROR: OUT OF MEMORY");\ }\ } while (false) -- cgit v1.2.3