diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-07-19 17:19:26 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-07-19 17:19:51 +0100 |
commit | 23b70323c7d91b941344df6a27ddd035d0fea934 (patch) | |
tree | 3686fa5b6c75b85754a76f91988a14908b6157a6 /src/include/wchar.h | |
parent | d32aac88efa05df8f70848befe64da827f94276b (diff) | |
download | ipxe-23b70323c7d91b941344df6a27ddd035d0fea934.zip ipxe-23b70323c7d91b941344df6a27ddd035d0fea934.tar.gz ipxe-23b70323c7d91b941344df6a27ddd035d0fea934.tar.bz2 |
[libc] Add missing wchar.h header
Commit 58ed3b1 ("[libc] Add support for "%lc" and "%ls" format
specifiers") was missing a file.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/wchar.h')
-rw-r--r-- | src/include/wchar.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/wchar.h b/src/include/wchar.h new file mode 100644 index 0000000..84312c7 --- /dev/null +++ b/src/include/wchar.h @@ -0,0 +1,27 @@ +#ifndef WCHAR_H +#define WCHAR_H + +FILE_LICENCE ( GPL2_ONLY ); + +#include <stddef.h> + +typedef void mbstate_t; + +/** + * Convert wide character to multibyte sequence + * + * @v buf Buffer + * @v wc Wide character + * @v ps Shift state + * @ret len Number of characters written + * + * This is a stub implementation, sufficient to handle basic ASCII + * characters. + */ +static inline __attribute__ (( always_inline )) +size_t wcrtomb ( char *buf, wchar_t wc, mbstate_t *ps __unused ) { + *buf = wc; + return 1; +} + +#endif /* WCHAR_H */ |