commit | eb93ebffba21e2c9b8a12bb86db60d38c7750270 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Mar 01 18:35:56 2013 -0800 |
committer | Elliott Hughes <enh@google.com> | Fri Mar 01 18:35:56 2013 -0800 |
tree | fcba00075768a0021c868e67b6e2160e2fc776b6 | |
parent | d392e044c7a03ff1c0903c3512d00955bc7de473 [diff] |
Switch to upstream-freebsd for the unmolested wchar code. Change-Id: I87b4d76ff8da04109ae53638eec4f11629798960
diff --git a/libc/Android.mk b/libc/Android.mk index a8b4ebd..884d759 100644 --- a/libc/Android.mk +++ b/libc/Android.mk
@@ -111,35 +111,8 @@ string/strspn.c \ string/strstr.c \ string/strtok.c \ - wchar/wcpcpy.c \ - wchar/wcpncpy.c \ - wchar/wcscasecmp.c \ - wchar/wcscat.c \ - wchar/wcschr.c \ - wchar/wcscmp.c \ - wchar/wcscpy.c \ - wchar/wcscspn.c \ - wchar/wcsdup.c \ - wchar/wcslcat.c \ - wchar/wcslcpy.c \ - wchar/wcslen.c \ - wchar/wcsncasecmp.c \ - wchar/wcsncat.c \ - wchar/wcsncmp.c \ - wchar/wcsncpy.c \ - wchar/wcsnlen.c \ - wchar/wcspbrk.c \ - wchar/wcsrchr.c \ - wchar/wcsspn.c \ - wchar/wcsstr.c \ - wchar/wcstok.c \ wchar/wcswidth.c \ wchar/wcsxfrm.c \ - wchar/wmemchr.c \ - wchar/wmemcmp.c \ - wchar/wmemcpy.c \ - wchar/wmemmove.c \ - wchar/wmemset.c \ tzcode/asctime.c \ tzcode/difftime.c \ tzcode/localtime.c \ @@ -318,6 +291,33 @@ libc_upstream_freebsd_src_files := \ upstream-freebsd/lib/libc/stdlib/realpath.c \ + upstream-freebsd/lib/libc/string/wcpcpy.c \ + upstream-freebsd/lib/libc/string/wcpncpy.c \ + upstream-freebsd/lib/libc/string/wcscasecmp.c \ + upstream-freebsd/lib/libc/string/wcscat.c \ + upstream-freebsd/lib/libc/string/wcschr.c \ + upstream-freebsd/lib/libc/string/wcscmp.c \ + upstream-freebsd/lib/libc/string/wcscpy.c \ + upstream-freebsd/lib/libc/string/wcscspn.c \ + upstream-freebsd/lib/libc/string/wcsdup.c \ + upstream-freebsd/lib/libc/string/wcslcat.c \ + upstream-freebsd/lib/libc/string/wcslcpy.c \ + upstream-freebsd/lib/libc/string/wcslen.c \ + upstream-freebsd/lib/libc/string/wcsncasecmp.c \ + upstream-freebsd/lib/libc/string/wcsncat.c \ + upstream-freebsd/lib/libc/string/wcsncmp.c \ + upstream-freebsd/lib/libc/string/wcsncpy.c \ + upstream-freebsd/lib/libc/string/wcsnlen.c \ + upstream-freebsd/lib/libc/string/wcspbrk.c \ + upstream-freebsd/lib/libc/string/wcsrchr.c \ + upstream-freebsd/lib/libc/string/wcsspn.c \ + upstream-freebsd/lib/libc/string/wcsstr.c \ + upstream-freebsd/lib/libc/string/wcstok.c \ + upstream-freebsd/lib/libc/string/wmemchr.c \ + upstream-freebsd/lib/libc/string/wmemcmp.c \ + upstream-freebsd/lib/libc/string/wmemcpy.c \ + upstream-freebsd/lib/libc/string/wmemmove.c \ + upstream-freebsd/lib/libc/string/wmemset.c \ libc_upstream_netbsd_src_files := \ upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
diff --git a/libc/include/wchar.h b/libc/include/wchar.h index ef88e04..a4e19f0 100644 --- a/libc/include/wchar.h +++ b/libc/include/wchar.h
@@ -149,6 +149,11 @@ extern wint_t towctrans(wint_t, wctrans_t); extern wctrans_t wctrans (const char *); +#if _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L +wchar_t* wcsdup(const wchar_t*); +size_t wcsnlen(const wchar_t*, size_t); +#endif + __END_DECLS #endif /* _WCHAR_H_ */
diff --git a/libc/wchar/wcpcpy.c b/libc/upstream-freebsd/lib/libc/string/wcpcpy.c similarity index 100% rename from libc/wchar/wcpcpy.c rename to libc/upstream-freebsd/lib/libc/string/wcpcpy.c
diff --git a/libc/wchar/wcpncpy.c b/libc/upstream-freebsd/lib/libc/string/wcpncpy.c similarity index 100% rename from libc/wchar/wcpncpy.c rename to libc/upstream-freebsd/lib/libc/string/wcpncpy.c
diff --git a/libc/wchar/wcscasecmp.c b/libc/upstream-freebsd/lib/libc/string/wcscasecmp.c similarity index 100% rename from libc/wchar/wcscasecmp.c rename to libc/upstream-freebsd/lib/libc/string/wcscasecmp.c
diff --git a/libc/wchar/wcscat.c b/libc/upstream-freebsd/lib/libc/string/wcscat.c similarity index 100% rename from libc/wchar/wcscat.c rename to libc/upstream-freebsd/lib/libc/string/wcscat.c
diff --git a/libc/wchar/wcschr.c b/libc/upstream-freebsd/lib/libc/string/wcschr.c similarity index 100% rename from libc/wchar/wcschr.c rename to libc/upstream-freebsd/lib/libc/string/wcschr.c
diff --git a/libc/wchar/wcscmp.c b/libc/upstream-freebsd/lib/libc/string/wcscmp.c similarity index 100% rename from libc/wchar/wcscmp.c rename to libc/upstream-freebsd/lib/libc/string/wcscmp.c
diff --git a/libc/wchar/wcscpy.c b/libc/upstream-freebsd/lib/libc/string/wcscpy.c similarity index 100% rename from libc/wchar/wcscpy.c rename to libc/upstream-freebsd/lib/libc/string/wcscpy.c
diff --git a/libc/wchar/wcscspn.c b/libc/upstream-freebsd/lib/libc/string/wcscspn.c similarity index 100% rename from libc/wchar/wcscspn.c rename to libc/upstream-freebsd/lib/libc/string/wcscspn.c
diff --git a/libc/wchar/wcsdup.c b/libc/upstream-freebsd/lib/libc/string/wcsdup.c similarity index 100% rename from libc/wchar/wcsdup.c rename to libc/upstream-freebsd/lib/libc/string/wcsdup.c
diff --git a/libc/wchar/wcslcat.c b/libc/upstream-freebsd/lib/libc/string/wcslcat.c similarity index 100% rename from libc/wchar/wcslcat.c rename to libc/upstream-freebsd/lib/libc/string/wcslcat.c
diff --git a/libc/wchar/wcslcpy.c b/libc/upstream-freebsd/lib/libc/string/wcslcpy.c similarity index 100% rename from libc/wchar/wcslcpy.c rename to libc/upstream-freebsd/lib/libc/string/wcslcpy.c
diff --git a/libc/wchar/wcslen.c b/libc/upstream-freebsd/lib/libc/string/wcslen.c similarity index 100% rename from libc/wchar/wcslen.c rename to libc/upstream-freebsd/lib/libc/string/wcslen.c
diff --git a/libc/wchar/wcsncasecmp.c b/libc/upstream-freebsd/lib/libc/string/wcsncasecmp.c similarity index 100% rename from libc/wchar/wcsncasecmp.c rename to libc/upstream-freebsd/lib/libc/string/wcsncasecmp.c
diff --git a/libc/wchar/wcsncat.c b/libc/upstream-freebsd/lib/libc/string/wcsncat.c similarity index 100% rename from libc/wchar/wcsncat.c rename to libc/upstream-freebsd/lib/libc/string/wcsncat.c
diff --git a/libc/wchar/wcsncmp.c b/libc/upstream-freebsd/lib/libc/string/wcsncmp.c similarity index 100% rename from libc/wchar/wcsncmp.c rename to libc/upstream-freebsd/lib/libc/string/wcsncmp.c
diff --git a/libc/wchar/wcsncpy.c b/libc/upstream-freebsd/lib/libc/string/wcsncpy.c similarity index 100% rename from libc/wchar/wcsncpy.c rename to libc/upstream-freebsd/lib/libc/string/wcsncpy.c
diff --git a/libc/wchar/wcsnlen.c b/libc/upstream-freebsd/lib/libc/string/wcsnlen.c similarity index 100% rename from libc/wchar/wcsnlen.c rename to libc/upstream-freebsd/lib/libc/string/wcsnlen.c
diff --git a/libc/wchar/wcspbrk.c b/libc/upstream-freebsd/lib/libc/string/wcspbrk.c similarity index 100% rename from libc/wchar/wcspbrk.c rename to libc/upstream-freebsd/lib/libc/string/wcspbrk.c
diff --git a/libc/wchar/wcsrchr.c b/libc/upstream-freebsd/lib/libc/string/wcsrchr.c similarity index 100% rename from libc/wchar/wcsrchr.c rename to libc/upstream-freebsd/lib/libc/string/wcsrchr.c
diff --git a/libc/wchar/wcsspn.c b/libc/upstream-freebsd/lib/libc/string/wcsspn.c similarity index 100% rename from libc/wchar/wcsspn.c rename to libc/upstream-freebsd/lib/libc/string/wcsspn.c
diff --git a/libc/wchar/wcsstr.c b/libc/upstream-freebsd/lib/libc/string/wcsstr.c similarity index 100% rename from libc/wchar/wcsstr.c rename to libc/upstream-freebsd/lib/libc/string/wcsstr.c
diff --git a/libc/wchar/wcstok.c b/libc/upstream-freebsd/lib/libc/string/wcstok.c similarity index 100% rename from libc/wchar/wcstok.c rename to libc/upstream-freebsd/lib/libc/string/wcstok.c
diff --git a/libc/wchar/wmemchr.c b/libc/upstream-freebsd/lib/libc/string/wmemchr.c similarity index 100% rename from libc/wchar/wmemchr.c rename to libc/upstream-freebsd/lib/libc/string/wmemchr.c
diff --git a/libc/wchar/wmemcmp.c b/libc/upstream-freebsd/lib/libc/string/wmemcmp.c similarity index 100% rename from libc/wchar/wmemcmp.c rename to libc/upstream-freebsd/lib/libc/string/wmemcmp.c
diff --git a/libc/wchar/wmemcpy.c b/libc/upstream-freebsd/lib/libc/string/wmemcpy.c similarity index 100% rename from libc/wchar/wmemcpy.c rename to libc/upstream-freebsd/lib/libc/string/wmemcpy.c
diff --git a/libc/wchar/wmemmove.c b/libc/upstream-freebsd/lib/libc/string/wmemmove.c similarity index 100% rename from libc/wchar/wmemmove.c rename to libc/upstream-freebsd/lib/libc/string/wmemmove.c
diff --git a/libc/wchar/wmemset.c b/libc/upstream-freebsd/lib/libc/string/wmemset.c similarity index 100% rename from libc/wchar/wmemset.c rename to libc/upstream-freebsd/lib/libc/string/wmemset.c