summaryrefslogtreecommitdiffstats
path: root/tools/localize/Perforce.cpp
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2009-06-24 19:01:27 -0700
committerJack Palevich <jackpal@google.com>2009-06-24 19:01:27 -0700
commitbdb087c9305d6d753444e1c0176a793c00f07840 (patch)
tree8f0d197874bc9b0a8eac4d2fe816cb1218749712 /tools/localize/Perforce.cpp
parent5158cc55088fec902320cafc02c746e3bf087a10 (diff)
downloadframeworks_base-bdb087c9305d6d753444e1c0176a793c00f07840.zip
frameworks_base-bdb087c9305d6d753444e1c0176a793c00f07840.tar.gz
frameworks_base-bdb087c9305d6d753444e1c0176a793c00f07840.tar.bz2
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.)
Diffstat (limited to 'tools/localize/Perforce.cpp')
-rw-r--r--tools/localize/Perforce.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/localize/Perforce.cpp b/tools/localize/Perforce.cpp
index 3425668..1c644ed 100644
--- a/tools/localize/Perforce.cpp
+++ b/tools/localize/Perforce.cpp
@@ -1,6 +1,7 @@
#include "Perforce.h"
#include "log.h"
#include <string.h>
+#include <cstdio>
#include <stdlib.h>
#include <sstream>
#include <sys/types.h>