summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/single/Subscriber.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-01-13 16:07:56 +0000
committerMarc Laukien <marc@zeroc.com>2004-01-13 16:07:56 +0000
commit7db65aa3d43b934793aa7cc03c5adbe1f1876a20 (patch)
treefac7ee47f9b4d85a70b99df9c5f00d879a366206 /cpp/test/IceStorm/single/Subscriber.cpp
parentminor cleanup (diff)
downloadice-7db65aa3d43b934793aa7cc03c5adbe1f1876a20.tar.bz2
ice-7db65aa3d43b934793aa7cc03c5adbe1f1876a20.tar.xz
ice-7db65aa3d43b934793aa7cc03c5adbe1f1876a20.zip
promotion fix
Diffstat (limited to 'cpp/test/IceStorm/single/Subscriber.cpp')
-rw-r--r--cpp/test/IceStorm/single/Subscriber.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp
index d955e965340..0767819523d 100644
--- a/cpp/test/IceStorm/single/Subscriber.cpp
+++ b/cpp/test/IceStorm/single/Subscriber.cpp
@@ -15,10 +15,13 @@
#include <Ice/Ice.h>
#include <IceStorm/IceStorm.h>
#include <Single.h>
-#include <fstream>
#ifdef _WIN32
# include <io.h>
+#else
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
#endif
using namespace std;
@@ -53,17 +56,23 @@ private:
void
createLock(const string& name)
{
- ofstream f(name.c_str());
+#ifdef _WIN32
+ int ret = _open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL);
+#else
+ int ret = open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL);
+#endif
+ assert(ret != -1);
}
void
deleteLock(const string& name)
{
#ifdef _WIN32
- _unlink(name.c_str());
+ int ret = _unlink(name.c_str());
#else
- unlink(name.c_str());
+ int ret = unlink(name.c_str());
#endif
+ assert(ret != -1);
}
int