summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/OS.h
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2009-08-07 11:10:57 +0800
committerMatthew Newhook <matthew@zeroc.com>2009-08-07 11:10:57 +0800
commite47e08887c823824bfc36f102c065075737394b1 (patch)
treedcbb175cb6ba3204ac55a06d61d28c488227ab4f /cpp/src/IcePatch2/OS.h
parentRevert "4171 - Global namespace pollution" (diff)
downloadice-e47e08887c823824bfc36f102c065075737394b1.tar.bz2
ice-e47e08887c823824bfc36f102c065075737394b1.tar.xz
ice-e47e08887c823824bfc36f102c065075737394b1.zip
Revert "Changes for bug 3962 and 4714"
This reverts commit d38ad95e45c0083d602a43e6d77e6c1599f324fe.
Diffstat (limited to 'cpp/src/IcePatch2/OS.h')
-rw-r--r--cpp/src/IcePatch2/OS.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/IcePatch2/OS.h b/cpp/src/IcePatch2/OS.h
index 7f4e1e1bd1e..09352685c51 100644
--- a/cpp/src/IcePatch2/OS.h
+++ b/cpp/src/IcePatch2/OS.h
@@ -11,6 +11,7 @@
#define ICE_PATCH2_OS_H
#include <Ice/Config.h>
+#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
@@ -25,6 +26,26 @@
namespace OS
{
+#ifdef _WIN32
+
+typedef struct _stat structstat;
+#ifdef _MSC_VER
+# define O_RDONLY _O_RDONLY
+# define O_BINARY _O_BINARY
+
+# define S_ISDIR(mode) ((mode) & _S_IFDIR)
+# define S_ISREG(mode) ((mode) & _S_IFREG)
+#endif
+
+#else
+
+typedef struct stat structstat;
+# define O_BINARY 0
+
+#endif
+
+// BUGFIX: aCC errors if this is stat.
+ICE_PATCH2_API int osstat(const std::string&, structstat*);
ICE_PATCH2_API int remove(const std::string&);
ICE_PATCH2_API int rename(const std::string&, const std::string&);
ICE_PATCH2_API int rmdir(const std::string&);