summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp7
-rw-r--r--cpp/src/slice2cpp/Main.cpp5
-rw-r--r--cpp/src/slice2freezej/Main.cpp5
-rw-r--r--cpp/src/slice2java/Main.cpp5
4 files changed, 16 insertions, 6 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 263aa37149a..b61d43cc5c0 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -216,12 +216,12 @@ Slice::Preprocessor::preprocess(bool keepComments)
return _cppHandle;
}
-void
+bool
Slice::Preprocessor::printMakefileDependencies(Language lang, const vector<string>& includePaths)
{
if(!checkInputFile())
{
- return;
+ return false;
}
//
@@ -261,7 +261,7 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector<strin
// Calling this again causes the memory buffers to be freed.
//
mcpp_use_mem_buffers(1);
- return;
+ return false;
}
//
@@ -469,6 +469,7 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector<strin
// Output result
//
fputs(result.c_str(), stdout);
+ return true;
}
bool
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 1cd6604766f..0f053917b0b 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -169,7 +169,10 @@ main(int argc, char* argv[])
if(depend)
{
Preprocessor icecpp(argv[0], *i, cppArgs);
- icecpp.printMakefileDependencies(Preprocessor::CPlusPlus, includePaths);
+ if(!icecpp.printMakefileDependencies(Preprocessor::CPlusPlus, includePaths))
+ {
+ return EXIT_FAILURE;
+ }
}
else
{
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index a0155a74ce8..728493084e1 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1441,7 +1441,10 @@ main(int argc, char* argv[])
if(depend)
{
Preprocessor icecpp(argv[0], args[idx], cppArgs);
- icecpp.printMakefileDependencies(Preprocessor::Java, includePaths);
+ if(!icecpp.printMakefileDependencies(Preprocessor::Java, includePaths))
+ {
+ return EXIT_FAILURE;
+ }
}
else
{
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index 11f88dc71a3..e515b95d5b9 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -194,7 +194,10 @@ main(int argc, char* argv[])
if(depend)
{
Preprocessor icecpp(argv[0], *i, cppArgs);
- icecpp.printMakefileDependencies(Preprocessor::Java, includePaths);
+ if(!icecpp.printMakefileDependencies(Preprocessor::Java, includePaths))
+ {
+ return EXIT_FAILURE;
+ }
}
else
{