Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
diff --git a/SDKs/darwin/usr/include/inttypes.h b/SDKs/darwin/usr/include/inttypes.h
new file mode 100644
index 0000000..406fa6f
--- /dev/null
+++ b/SDKs/darwin/usr/include/inttypes.h
@@ -0,0 +1,86 @@
+/* ===-- inttypes.h - stub SDK header for compiler-rt -----------------------===
+ *
+ *                     The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===-----------------------------------------------------------------------===
+ *
+ * This is a stub SDK header file. This file is not part of the interface of
+ * this library nor an official version of the appropriate SDK header. It is
+ * intended only to stub the features of this header required by compiler-rt.
+ *
+ * ===-----------------------------------------------------------------------===
+ */
+
+#ifndef __INTTYPES_H__
+#define __INTTYPES_H__
+
+#if __WORDSIZE == 64
+#define __INTTYPE_PRI64__ "l"
+#else
+#define __INTTYPE_PRI64__ "ll"
+#endif
+
+#define PRId8  "hhd"
+#define PRId16 "hd"
+#define PRId32 "d"
+#define PRId64 __INTTYPE_PRI64__ "d"
+
+#define PRIi8  "hhi"
+#define PRIi16 "hi"
+#define PRIi32 "i"
+#define PRIi64 __INTTYPE_PRI64__ "i"
+
+#define PRIo8  "hho"
+#define PRIo16 "ho"
+#define PRIo32 "o"
+#define PRIo64 __INTTYPE_PRI64__ "o"
+
+#define PRIu8  "hhu"
+#define PRIu16 "hu"
+#define PRIu32 "u"
+#define PRIu64 __INTTYPE_PRI64__ "u"
+
+#define PRIx8  "hhx"
+#define PRIx16 "hx"
+#define PRIx32 "x"
+#define PRIx64 __INTTYPE_PRI64__ "x"
+
+#define PRIX8  "hhX"
+#define PRIX16 "hX"
+#define PRIX32 "X"
+#define PRIX64 __INTTYPE_PRI64__ "X"
+
+#define SCNd8  "hhd"
+#define SCNd16 "hd"
+#define SCNd32 "d"
+#define SCNd64 __INTTYPE_PRI64__ "d"
+
+#define SCNi8  "hhi"
+#define SCNi16 "hi"
+#define SCNi32 "i"
+#define SCNi64 __INTTYPE_PRI64__ "i"
+
+#define SCNo8  "hho"
+#define SCNo16 "ho"
+#define SCNo32 "o"
+#define SCNo64 __INTTYPE_PRI64__ "o"
+
+#define SCNu8  "hhu"
+#define SCNu16 "hu"
+#define SCNu32 "u"
+#define SCNu64 __INTTYPE_PRI64__ "u"
+
+#define SCNx8  "hhx"
+#define SCNx16 "hx"
+#define SCNx32 "x"
+#define SCNx64 __INTTYPE_PRI64__ "x"
+
+#define SCNX8  "hhX"
+#define SCNX16 "hX"
+#define SCNX32 "X"
+#define SCNX64 __INTTYPE_PRI64__ "X"
+
+#endif  /* __INTTYPES_H__ */
diff --git a/SDKs/darwin/usr/include/stdio.h b/SDKs/darwin/usr/include/stdio.h
index 006652f..629b450 100644
--- a/SDKs/darwin/usr/include/stdio.h
+++ b/SDKs/darwin/usr/include/stdio.h
@@ -39,7 +39,7 @@
 #    define __FOPEN_NAME "_fopen"
 #    define __FWRITE_NAME "_fwrite"
 #  else
-#    error "unrecognized architecture for targetting OS X"
+#    error "unrecognized architecture for targeting OS X"
 #  endif
 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
 #  if defined(__i386) || defined (__x86_64)
@@ -51,10 +51,10 @@
 #    define __FOPEN_NAME "_fopen"
 #    define __FWRITE_NAME "_fwrite"
 #  else
-#    error "unrecognized architecture for targetting iOS"
+#    error "unrecognized architecture for targeting iOS"
 #  endif
 #else
-#  error "unrecognized architecture for targetting Darwin"
+#  error "unrecognized architecture for targeting Darwin"
 #endif
 
 #    define stderr __stderrp
@@ -75,6 +75,7 @@
 FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME);
 FILE *fdopen(int, const char *) __asm(__FDOPEN_NAME);
 int fprintf(FILE * __restrict, const char * __restrict, ...);
+int fputc(int, FILE *);
 size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict)
   __asm(__FWRITE_NAME);
 size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
diff --git a/SDKs/darwin/usr/include/string.h b/SDKs/darwin/usr/include/string.h
index c6ab5d8..1a00574 100644
--- a/SDKs/darwin/usr/include/string.h
+++ b/SDKs/darwin/usr/include/string.h
@@ -35,16 +35,16 @@
 #  elif defined(__x86_64__) || defined(__arm)
 #    define __STRERROR_NAME  "_strerror"
 #  else
-#    error "unrecognized architecture for targetting OS X"
+#    error "unrecognized architecture for targeting OS X"
 #  endif
 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
 #  if defined(__i386) || defined (__x86_64) || defined(__arm)
 #    define __STRERROR_NAME  "_strerror"
 #  else
-#    error "unrecognized architecture for targetting iOS"
+#    error "unrecognized architecture for targeting iOS"
 #  endif
 #else
-#  error "unrecognized architecture for targetting Darwin"
+#  error "unrecognized architecture for targeting Darwin"
 #endif
 
 char *strerror(int) __asm(__STRERROR_NAME);
diff --git a/SDKs/darwin/usr/include/sys/fcntl.h b/SDKs/darwin/usr/include/sys/fcntl.h
index b71706b..e121949 100644
--- a/SDKs/darwin/usr/include/sys/fcntl.h
+++ b/SDKs/darwin/usr/include/sys/fcntl.h
@@ -26,7 +26,7 @@
 #  elif defined(__arm)
 #    define __OPEN_NAME  "_open"
 #  else
-#    error "unrecognized architecture for targetting OS X"
+#    error "unrecognized architecture for targeting OS X"
 #  endif
 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
 #  if defined(__i386) || defined (__x86_64)
@@ -34,10 +34,10 @@
 #  elif defined(__arm)
 #    define __OPEN_NAME  "_open"
 #  else
-#    error "unrecognized architecture for targetting iOS"
+#    error "unrecognized architecture for targeting iOS"
 #  endif
 #else
-#  error "unrecognized architecture for targetting Darwin"
+#  error "unrecognized architecture for targeting Darwin"
 #endif
 
 #define O_RDONLY   0x0000    /* open for reading only */
@@ -45,7 +45,7 @@
 #define O_RDWR     0x0002    /* open for reading and writing */
 #define O_ACCMODE  0x0003    /* mask for above modes */
 
-#define O_CREAT    0x0200    /* create if nonexistant */
+#define O_CREAT    0x0200    /* create if nonexistent */
 
 int open(const char *, int, ...) __asm(__OPEN_NAME);