summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-12-09 09:51:28 -0800
committerJose <jose@zeroc.com>2016-12-09 09:51:28 -0800
commitbee19ea19c2b6e25045f918cfde1fbccb34eb231 (patch)
treead5b2ee640a1cd58b69774bfbf004a90354cd58f
parentFixed ICE-7463 - icehashpassword now uses hash method instead of encrypt when... (diff)
downloadice-bee19ea19c2b6e25045f918cfde1fbccb34eb231.tar.bz2
ice-bee19ea19c2b6e25045f918cfde1fbccb34eb231.tar.xz
ice-bee19ea19c2b6e25045f918cfde1fbccb34eb231.zip
Fixed (ICE-7464) - bogus dependencies generated with Slice compilers
-rw-r--r--CHANGELOG-3.6.md4
-rw-r--r--cpp/src/Slice/Preprocessor.cpp9
2 files changed, 9 insertions, 4 deletions
diff --git a/CHANGELOG-3.6.md b/CHANGELOG-3.6.md
index 7f00d2063b2..b1c13af3189 100644
--- a/CHANGELOG-3.6.md
+++ b/CHANGELOG-3.6.md
@@ -47,6 +47,10 @@ These are the changes since Ice 3.6.4.
would fail if the service used the IceBox shared communicator. Thanks to
Andreas Sommer for the bug report and fix.
+- Fixed a bug in Slice compilers which generates bogus dependencies when the
+ Slice files are located in a directory that contains the string ".ice" in
+ the path.
+
# Changes in Ice 3.6.3
These are the changes since Ice 3.6.2.
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 13a2a5cc4c8..83b574b5a5b 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -368,10 +368,11 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
// First make it a single line.
//
string::size_type pos;
- while((pos = unprocessed.find("\\\n")) != string::npos)
+ while((pos = unprocessed.find("\\")) != string::npos)
{
- unprocessed.replace(pos, 2, "");
+ unprocessed.replace(pos, 1, "");
}
+ pos = unprocessed.find("\n", pos) + 1;
//
// Get the main output file name.
@@ -403,9 +404,9 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
vector<string> dependencies;
string::size_type end;
- while((end = unprocessed.find(".ice", pos)) != string::npos)
+ while((end = unprocessed.find("\n", pos)) != string::npos)
{
- end += 4;
+ end += 1;
string file = IceUtilInternal::trim(unprocessed.substr(pos, end - pos));
if(IceUtilInternal::isAbsolutePath(file))
{