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/netbsd/nameser/ns_ttl.c b/libc/netbsd/nameser/ns_ttl.c
index 0878194..cc98331 100644
--- a/libc/netbsd/nameser/ns_ttl.c
+++ b/libc/netbsd/nameser/ns_ttl.c
@@ -47,7 +47,7 @@
 
 /* Macros. */
 
-#define T(x) if ((x) < 0) return (-1); else
+#define T(x) do { if ((x) < 0) return (-1); } while(0)
 
 /* Public. */