summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IcePatch2/OS.cpp4
-rw-r--r--cpp/src/IcePatch2/OS.h3
-rw-r--r--cpp/src/IcePatch2/Util.cpp14
3 files changed, 11 insertions, 10 deletions
diff --git a/cpp/src/IcePatch2/OS.cpp b/cpp/src/IcePatch2/OS.cpp
index 1f27c970055..505a5e7185b 100644
--- a/cpp/src/IcePatch2/OS.cpp
+++ b/cpp/src/IcePatch2/OS.cpp
@@ -15,7 +15,7 @@ using namespace OS;
#ifdef _WIN32
int
-OS::stat(const string& path, structstat* buf)
+OS::osstat(const string& path, structstat* buf)
{
return ::_wstat(IceUtil::stringToWstring(path).c_str(), buf);
}
@@ -71,7 +71,7 @@ OS::getcwd(string& cwd)
#else
int
-OS::stat(const string& path, structstat* buf)
+OS::osstat(const string& path, structstat* buf)
{
return ::stat(path.c_str(), buf);
}
diff --git a/cpp/src/IcePatch2/OS.h b/cpp/src/IcePatch2/OS.h
index 792f421bf85..7512714c97c 100644
--- a/cpp/src/IcePatch2/OS.h
+++ b/cpp/src/IcePatch2/OS.h
@@ -41,7 +41,8 @@ typedef struct stat structstat;
#endif
-ICE_PATCH2_API int stat(const std::string&, structstat*);
+// 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&);
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index f4b0b0243a2..afc0a63e795 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -434,7 +434,7 @@ IcePatch2::remove(const string& pa)
const string path = simplify(pa);
OS::structstat buf;
- if(OS::stat(path, &buf) == -1)
+ if(OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + lastError();
}
@@ -461,7 +461,7 @@ IcePatch2::removeRecursive(const string& pa)
const string path = simplify(pa);
OS::structstat buf;
- if(OS::stat(path, &buf) == -1)
+ if(OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + lastError();
}
@@ -768,7 +768,7 @@ IcePatch2::setFileFlags(const string& pa, const FileInfo& info)
#ifndef _WIN32 // Windows doesn't support the executable flag
const string path = simplify(pa);
OS::structstat buf;
- if(OS::stat(path, &buf) == -1)
+ if(OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + lastError();
}
@@ -803,7 +803,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
else
{
OS::structstat buf;
- if(OS::stat(getWithoutSuffix(path), &buf) == -1)
+ if(OS::osstat(getWithoutSuffix(path), &buf) == -1)
{
if(errno == ENOENT)
{
@@ -833,7 +833,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
else
{
OS::structstat buf;
- if(OS::stat(path, &buf) == -1)
+ if(OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + lastError();
}
@@ -911,7 +911,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
OS::structstat bufBZ2;
const string pathBZ2 = path + ".bz2";
- if(compress >= 2 || OS::stat(pathBZ2, &bufBZ2) == -1 || buf.st_mtime >= bufBZ2.st_mtime)
+ if(compress >= 2 || OS::osstat(pathBZ2, &bufBZ2) == -1 || buf.st_mtime >= bufBZ2.st_mtime)
{
if(cb && !cb->compress(relPath))
{
@@ -930,7 +930,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
OS::rename(pathBZ2Temp, pathBZ2);
- if(OS::stat(pathBZ2, &bufBZ2) == -1)
+ if(OS::osstat(pathBZ2, &bufBZ2) == -1)
{
throw "cannot stat `" + pathBZ2 + "':\n" + lastError();
}