Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: sdch/logging_forward.h

Issue 68253006: Remove static initializers introduced by open-vcdiff's logging.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdch/sdch.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdch/logging_forward.h
diff --git a/sdch/logging_forward.h b/sdch/logging_forward.h
new file mode 100644
index 0000000000000000000000000000000000000000..09e9b3897308d9ff0bd73c0781cfee4b20bfb809
--- /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_
+
+// Define open-vcdiff's logging.h header guard, so that it doesn't get used.
+#define OPEN_VCDIFF_LOGGING_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"
+
+#endif // SDCH_LOGGING_FORWARD_H_
« no previous file with comments | « no previous file | sdch/sdch.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698