diff options
Diffstat (limited to 'package/heirloom-cpio/src/mbtowi.h')
-rw-r--r-- | package/heirloom-cpio/src/mbtowi.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/package/heirloom-cpio/src/mbtowi.h b/package/heirloom-cpio/src/mbtowi.h new file mode 100644 index 000000000..525ad08d1 --- /dev/null +++ b/package/heirloom-cpio/src/mbtowi.h @@ -0,0 +1,22 @@ +/* Sccsid @(#)mbtowi.h 1.2 (gritter) 7/16/04 */ + +#ifndef LIBCOMMON_MBTOWI_H +#define LIBCOMMON_MBTOWI_H + +static +#if defined (__GNUC__) || defined (__USLC__) || defined (__INTEL_COMPILER) || \ + defined (__IBMC__) || defined (__SUNPRO_C) + inline +#endif + int +mbtowi(wint_t *pwi, const char *s, size_t n) +{ + wchar_t wc; + int i; + + i = mbtowc(&wc, s, n); + *pwi = wc; + return i; +} + +#endif /* !LIBCOMMON_MBTOWI_H */ |