]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 15 Nov 2003 21:58:21 +0000 (21:58 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 15 Nov 2003 21:58:21 +0000 (21:58 +0000)
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.

ChangeLog
include/wchar.h
wcsmbs/mbsinit.c

index 8aaed91fa9a04953d07eb80cf88b2f057bdb24c2..8df65fb210698b5bcbf67275735a7fee0b330459 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
 2003-11-14  Jakub Jelinek  <jakub@redhat.com>
 
        * posix/tst-rxspencer.c (check_match): @ without any following
index a9cd440eec698fb7a23d671c0fbd1f9299947c7a..f69463f57a7fda564cdbcc16dcf2734c02fc3697 100644 (file)
@@ -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
index 5d740c85fcef769c20ec3f231101f35cfaf44d51..569cdd89ecc089d49db36e05fb15a534c300c5ce 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -20,6 +20,9 @@
 #include <string.h>
 #include <wchar.h>
 
+#undef mbsinit
+#undef __mbsinit
+
 /* In GNU libc the conversion functions only can convert between the
    fixed wide character representation and the multibyte
    representation of the same character set.  Since we use ISO 10646