Implement wctomb(3) for ltrace.

This is an implementation in the style of the rest: char == byte.

We might want to come back and implement UTF-8, but this is enough for ltrace.

Bug: 13747066
Change-Id: Ib2b63609c9014fdef9a8491e067467c4fc5ae3cc
This commit is contained in:
Elliott Hughes
2014-04-04 17:34:51 -07:00
parent dc5fcf3620
commit 77e944fd46
5 changed files with 80 additions and 18 deletions

View File

@@ -151,7 +151,6 @@ extern lldiv_t lldiv(long long, long long);
extern const char* getprogname(void);
extern void setprogname(const char*);
#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
/* make STLPort happy */
extern int mblen(const char *, size_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
@@ -160,7 +159,6 @@ extern int mbtowc(wchar_t *, const char *, size_t);
/* Likewise, make libstdc++-v3 happy. */
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
#endif /* MISSING */
#define MB_CUR_MAX 1