From af71f2534fc1e99ed7d483190e99d4dc674bcd76 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 19 Sep 2013 12:20:30 +0200 Subject: compat: new API, check for success --- compat/compat.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compat/compat.cpp') diff --git a/compat/compat.cpp b/compat/compat.cpp index d8aac9bc..f6261738 100644 --- a/compat/compat.cpp +++ b/compat/compat.cpp @@ -61,6 +61,15 @@ PortableLockedShm::PortableLockedShm(const char *shmName, const char *mutexName, mem = (void*) -1; } +PortableLockedShm::success() +{ +#ifndef _WIN32 + return (void*) mem != (void*) -1 +#else + return (void*) mem != NULL; +#endif +} + PortableLockedShm::~PortableLockedShm() { //(void) shm_unlink(shm_filename); -- cgit v1.2.3