Flesh out the logging implementation.
Add PLOG and ensure we have CHECK_STREQ and CHECK_STRNE to go with
the existing non-functional DCHECK_STREQ and DCHECK_STRNE.
This also gives us two different logging implementations, one for
the host that just uses std::cerr, and one for Android that uses
the Android log.
Also bring in the StringPrintf family.
Change-Id: I8e190c2c58f26b22ee76a2a87d447df6eb0fa73b
diff --git a/src/stringprintf.h b/src/stringprintf.h
new file mode 100644
index 0000000..b1b1d8d
--- /dev/null
+++ b/src/stringprintf.h
@@ -0,0 +1,21 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+// Author: enh@google.com (Elliott Hughes)
+
+#ifndef STRINGPRINTF_H_
+#define STRINGPRINTF_H_
+
+#include <stdarg.h>
+#include <string>
+
+// Returns a string corresponding to printf-like formatting of the arguments.
+std::string StringPrintf(const char* fmt, ...)
+ __attribute__((__format__ (__printf__, 1, 2)));
+
+// Appends a printf-like formatting of the arguments to 'dst'.
+void StringAppendF(std::string* dst, const char* fmt, ...)
+ __attribute__((__format__ (__printf__, 2, 3)));
+
+// Appends a printf-like formatting of the arguments to 'dst'.
+void StringAppendV(std::string* dst, const char* format, va_list ap);
+
+#endif // STRINGPRINTF_H_