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

Unified Diff: ui/gl/gl_bindings.h

Issue 1939683002: Test X11 header pollution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 | « media/media_gpu.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_bindings.h
diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h
index c973bed4caf3abffd525f153095234489a0e1bcd..d45b743a51c0c7376cf66597b5b0eff0056cacfc 100644
--- a/ui/gl/gl_bindings.h
+++ b/ui/gl/gl_bindings.h
@@ -10,6 +10,14 @@
// the X11 headers on linux, which define all kinds of macros that are
// liable to cause conflicts.
+// GL headers may include inttypes.h and so we need to ensure that
+// __STDC_FORMAT_MACROS is defined in order for //base/format_macros.h to
+// function correctly. See comment and #error message in //base/format_macros.h
+// for details.
+#if defined(OS_POSIX) && !defined(__STDC_FORMAT_MACROS)
+#define __STDC_FORMAT_MACROS
+#endif
+
#include <GL/gl.h>
#include <GL/glext.h>
#include <EGL/egl.h>
« no previous file with comments | « media/media_gpu.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698