summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-04-03 20:59:25 +0200
committerJose <jose@zeroc.com>2012-04-03 20:59:25 +0200
commit98b2cc69a992598049e8acd3f413c27c4ccbf570 (patch)
tree6d5e427e5d3be8cdc396e9ea617d23a385ce9d7b /cpp/src
parentVisual Studio 2008 add-in fix. Exception if c++ not installed. (diff)
downloadice-98b2cc69a992598049e8acd3f413c27c4ccbf570.tar.bz2
ice-98b2cc69a992598049e8acd3f413c27c4ccbf570.tar.xz
ice-98b2cc69a992598049e8acd3f413c27c4ccbf570.zip
ICE-4785 - IceGrid/deployer fails with GCC-4.6.2 builds
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/FileCache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp
index 1dbc6da5a7a..576a57f842e 100644
--- a/cpp/src/IceGrid/FileCache.cpp
+++ b/cpp/src/IceGrid/FileCache.cpp
@@ -195,15 +195,15 @@ FileCache::read(const string& file, Ice::Long offset, int size, Ice::Long& newOf
totalSize += lineSize;
lines.push_back(line);
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
+ //
+ // Some eofbit cases will also set failbit. So first
+ // check eof.
+ //
if(is.eof())
{
newOffset += line.size();
}
- else
-#else
- if(!is.fail())
-#endif
+ else if(!is.fail())
{
newOffset = is.tellg();
}