Remove compiler warnings when building Bionic.

Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.

Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
diff --git a/libc/stdlib/strntoumax.c b/libc/stdlib/strntoumax.c
index a151ef5..050d718 100644
--- a/libc/stdlib/strntoumax.c
+++ b/libc/stdlib/strntoumax.c
@@ -48,7 +48,7 @@
 uintmax_t
 strntoumax(const char *nptr, char **endptr, int base, size_t n)
 {
-    const unsigned char*  p   = nptr;
+    const unsigned char*  p   = (const unsigned char *)nptr;
     const unsigned char*  end = p + n;
     int                   minus = 0;
     uintmax_t             v = 0;