Index: sdch/logging_forward.h |
diff --git a/sdch/logging_forward.h b/sdch/logging_forward.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..536317bfbdc926b1e8c6a4997b9335f17927c655 |
--- /dev/null |
+++ b/sdch/logging_forward.h |
@@ -0,0 +1,22 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef SDCH_LOGGING_FORWARD_H_ |
+#define SDCH_LOGGING_FORWARD_H_ |
+ |
+#include "base/logging.h" |
+ |
+// open-vcdiff's logging.h includes iostream, which adds static initializers |
+// to several compilation units. To prevent this, provide this replacement |
+// header which forwards open-vcdiffs logging macros to chromium's base logging |
+// mechanism. |
+#define VCD_WARNING LOG(WARNING) |
+#define VCD_ERROR LOG(ERROR) |
+#define VCD_DFATAL LOG(DFATAL) |
+#define VCD_ENDL "\n" |
wtc
2013/11/12 18:14:03
This is missing the open_vcdiff::CheckFatalError()
Nico
2013/11/12 18:34:42
Yes. (I think LOG(DFATAL) might implicitly add a n
|
+ |
+// Define open-vcdiff's logging.h header guard, so that it doesn't get used. |
+#define OPEN_VCDIFF_LOGGING_H_ |
wtc
2013/11/12 18:14:03
Nit: it seems a little better to define this heade
Nico
2013/11/12 18:34:42
Done.
jar (doing other things)
2013/11/13 00:34:45
+1
|
+ |
+#endif // SDCH_LOGGING_FORWARD_H_ |