summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Util.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2005-12-16 20:26:25 +0000
committerBernard Normier <bernard@zeroc.com>2005-12-16 20:26:25 +0000
commitbf15fad77013b28ba6d1198e1b63c8ece84824ae (patch)
treeb36e9abe549e81a962cea9658fd6cbfffd1a5fdd /cpp/src/IcePatch2/Util.cpp
parentHPUX bug fix. (diff)
downloadice-bf15fad77013b28ba6d1198e1b63c8ece84824ae.tar.bz2
ice-bf15fad77013b28ba6d1198e1b63c8ece84824ae.tar.xz
ice-bf15fad77013b28ba6d1198e1b63c8ece84824ae.zip
Fixed build failure
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r--cpp/src/IcePatch2/Util.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index afc0a63e795..fa90c6fed94 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -7,6 +7,14 @@
//
// **********************************************************************
+//
+// We need to include io.h first to get the proper signature for
+// _wfindfirst
+//
+#ifdef _WIN32
+# include <io.h>
+#endif
+
#include <IceUtil/DisableWarnings.h>
#include <IceUtil/IceUtil.h>
#include <IcePatch2/Util.h>
@@ -17,7 +25,6 @@
#ifdef _WIN32
# include <direct.h>
-# include <io.h>
#else
# include <unistd.h>
# include <dirent.h>
@@ -501,11 +508,8 @@ IcePatch2::readDirectory(const string& pa)
struct _wfinddata_t data;
const wstring fs = IceUtil::stringToWstring(simplify(path + "/*"));
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
- //
- // TODO: Why is this cast necessary?
- //
- long h = _wfindfirst(const_cast<wchar_t*>(fs.c_str()), &data);
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+ long h = _wfindfirst(fs.c_str()), &data);
#else
intptr_t h = _wfindfirst(fs.c_str(), &data);
#endif