From 714a8d50a03e773320a02247847c58020c96e867 Mon Sep 17 00:00:00 2001 From: Brett Cameron Date: Wed, 12 May 2010 12:45:12 +0200 Subject: fixes for OpenVMS --- src/uuid.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/uuid.cpp') diff --git a/src/uuid.cpp b/src/uuid.cpp index 5991bfb..631a625 100644 --- a/src/uuid.cpp +++ b/src/uuid.cpp @@ -97,6 +97,35 @@ const char *zmq::uuid_t::to_string () return string_buf; } +#elif defined ZMQ_HAVE_OPENVMS + +#include + +#define uuid_generate(x) sys$create_uid(&(x)) + +#define uuid_unparse(x, y) \ + sprintf (y, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", \ + x.data0, x.data1, x.data2, \ + x.data3 [0], x.data3 [1], \ + x.data3 [2], x.data3 [3], \ + x.data3 [4], x.data3 [5], \ + x.data3 [6], x.data3 [7]); + +zmq::uuid_t::uuid_t () +{ + uuid_generate (uuid); + uuid_unparse (uuid, string_buf); +} + +zmq::uuid_t::~uuid_t () +{ +} + +const char *zmq::uuid_t::to_string () +{ + return string_buf; +} + #else #include -- cgit v1.2.3