summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-15 21:58:21 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-15 21:58:21 +0000
commit2def87644d44b41bb908d4ed150a110d4d9399ea (patch)
treef909778eb7bafe08caee15da12ddce2a1694645f /include
parentecdcadbd16e1a350e9429dff668456e1f943c02b (diff)
Update.
2003-11-15 Ulrich Drepper <drepper@redhat.com> * wcsmbs/mbsinit.c: Undef mbsinit and __mbsinit. * include/wchar.h: Provide inline versions of mbsinit and __mbsinit.
Diffstat (limited to 'include')
-rw-r--r--include/wchar.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/wchar.h b/include/wchar.h
index a9cd440eec..f69463f57a 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -113,5 +113,12 @@ extern int __vfwprintf (__FILE *__restrict __s,
/* Internal functions. */
extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
mbstate_t *ps, __locale_t l) attribute_hidden;
+
+/* Special version. We know that all uses of mbsinit inside the libc
+ have a non-NULL parameter. And certainly we can access the
+ internals of the data structure directly. */
+# define mbsinit(state) ((state)->__count == 0)
+# define __mbsinit(state) ((state)->__count == 0)
+
# endif
#endif