aboutsummaryrefslogtreecommitdiff
path: root/src/rt
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-07-25 22:07:21 -0700
committerRoy Frostig <[email protected]>2010-07-25 22:07:21 -0700
commitbeca62e2e3db5c5540003de9aac2766a7f1ab9b9 (patch)
tree8e5b52b1a28606cd899235e7bcf3bbc795595170 /src/rt
parentAttempt number 1 at extinguishing the windows tree remotely (apologies to tho... (diff)
downloadrust-beca62e2e3db5c5540003de9aac2766a7f1ab9b9.tar.xz
rust-beca62e2e3db5c5540003de9aac2766a7f1ab9b9.zip
Attempt 2. This time actually reading my own diffs before committing.
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_dom.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/rt/rust_dom.cpp b/src/rt/rust_dom.cpp
index 81751a86..205084ff 100644
--- a/src/rt/rust_dom.cpp
+++ b/src/rt/rust_dom.cpp
@@ -154,6 +154,25 @@ rust_dom::free(void *p) {
srv->free(p);
}
+#ifdef __WIN32__
+void
+rust_dom::win32_require(LPCTSTR fn, BOOL ok) {
+ if (!ok) {
+ LPTSTR buf;
+ DWORD err = GetLastError();
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, err,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &buf, 0, NULL );
+ log(rust_log::ERR, "%s failed with error %ld: %s", fn, err, buf);
+ LocalFree((HLOCAL)buf);
+ I(this, ok);
+ }
+}
+#endif
+
size_t
rust_dom::n_live_tasks()
{