summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jack Palevich <jackpal@google.com> 2009-06-24 19:27:30 -0700
committer Jack Palevich <jackpal@google.com> 2009-06-24 19:27:30 -0700
commitc7410f6f9f8f2aeb9368502a4a725b1a7abe1190 (patch)
tree0e7c4c5a03a90b0471c8c7dd858cd3ec23f701cf
parentad39eb0a2555762a1d9157f8017097579d14f39d (diff)
Add includes to enable host C++ tools to compile with GCC 4.4
Otherwise printf is undeclared. These files worked with earlier versions of gcc because either cstdio or stdio.h was being included by some other header file. But this was not guaranteed behavior, so with GCC 4.4 there are errors. The fix is backwards compatible with earlier versions of GCC. This change includes either <cstdio> or <stdio.h> whichever looks more appropriate given the other headers included by the given source file. Note, I'm using "GCC" to mean Gnu Compile Collection, as this problem is specific to C++ source files. (Presumably a C++-specific header file changed to no longer include cstdio.)
-rwxr-xr-xtools/aidl/AST.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/aidl/AST.h b/tools/aidl/AST.h
index 1dedd048bd14..aec21644bf6b 100755
--- a/tools/aidl/AST.h
+++ b/tools/aidl/AST.h
@@ -5,6 +5,7 @@
#include <vector>
#include <set>
#include <stdarg.h>
+#include <stdio.h>
using namespace std;