aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/link-rule.hxx4
-rw-r--r--libbuild2/cc/msvc.cxx11
2 files changed, 9 insertions, 6 deletions
diff --git a/libbuild2/cc/link-rule.hxx b/libbuild2/cc/link-rule.hxx
index c68466a..c761d53 100644
--- a/libbuild2/cc/link-rule.hxx
+++ b/libbuild2/cc/link-rule.hxx
@@ -4,8 +4,6 @@
#ifndef LIBBUILD2_CC_LINK_RULE_HXX
#define LIBBUILD2_CC_LINK_RULE_HXX
-#include <set>
-
#include <libbuild2/types.hxx>
#include <libbuild2/utility.hxx>
@@ -262,7 +260,7 @@ namespace build2
bool operator< (const windows_dll& y) const {return dll < y.dll;}
};
- using windows_dlls = std::set<windows_dll>;
+ using windows_dlls = set<windows_dll>;
timestamp
windows_rpath_timestamp (const file&,
diff --git a/libbuild2/cc/msvc.cxx b/libbuild2/cc/msvc.cxx
index cceb1fe..9e8ae18 100644
--- a/libbuild2/cc/msvc.cxx
+++ b/libbuild2/cc/msvc.cxx
@@ -426,6 +426,7 @@ namespace build2
bool obj (false), dll (false);
string s;
+ bool io (false);
try
{
ifdstream is (
@@ -465,14 +466,18 @@ namespace build2
}
}
}
+
+ is.close ();
}
catch (const io_error&)
{
- // Presumably the child process failed. Let run_finish() deal with
- // that.
+ // Presumably the child process failed so let run_finish() deal with
+ // that first.
+ //
+ io = true;
}
- if (!run_finish_code (args, pr, s))
+ if (!run_finish_code (args, pr, s) || io)
{
diag_record dr;
dr << warn << "unable to detect " << l << " library type, ignoring" <<