libc: Copy private C library declarations to private/

This patch is the first in a series that aims at cleaning up the
public C library headers (which end up being distributed with the NDK).

<resolv.h> and <time.h> contain declarations that should not be public.
They are used by other parts of the platform, but NDK applications should
not use or rely on them.

So copy them to private <bionic_time.h> and <resolv_iface.h> headers
and use a guard macro to avoid conflicts when both headers are included
at the same time.

The idea is that we're going to fix the other platform modules to
include these private headers. After this is done, we will remove the
duplicate definitions from <resolv.h> and <time.h>

Change-Id: I121c11936951c98ca7165e811126ed8a4a3a394d
diff --git a/libc/include/time.h b/libc/include/time.h
index 4ad4f7b..011d161 100644
--- a/libc/include/time.h
+++ b/libc/include/time.h
@@ -79,7 +79,17 @@
 extern char*       strptime(const char *buf, const char *fmt, struct tm *tm);
 extern size_t      strftime(char *s, size_t max, const char *format, const struct tm *tm);
 
-/* ANDROID-BEGIN */
+/* The following declarations should not be part of the C library's public
+ * headers. They are duplicated under bionic/libc/private/bionic_time.h and
+ * will be removed from here when we modify system/libcutils to use the
+ * proper header instead.
+ *
+ * Use a guard macro to avoid compilation error when both headers are
+ * included.
+ */
+#ifndef _BIONIC_STRFTIME_TZ_DECLARED
+#define _BIONIC_STRFTIME_TZ_DECLARED
+
 struct strftime_locale {
     const char *  mon[12];
     const char *  month[12];
@@ -95,7 +105,8 @@
 };
 
 extern size_t      strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale*  lc);
-/* ANDROID-END */
+
+#endif /* _BIONIC_STRFTIME_TZ_DECLARED */
 
 extern char *ctime(const time_t *timep);
 extern char *ctime_r(const time_t *timep, char *buf);