wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Dec 2010 10:18:11 +0000 (11:18 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Dec 2010 10:18:11 +0000 (11:18 +0100)
* lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs
through wcrtomb.

ChangeLog
lib/wcsrtombs.c

index 9796a9b..3c4b1e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-20  Bruno Haible  <bruno@clisp.org>
+
+       wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t.
+       * lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs
+       through wcrtomb.
+
 2010-12-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        ftoastr: fix comment
index e995a9c..ac27e5d 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert wide string to string.
-   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -22,7 +22,7 @@
 
 extern mbstate_t _gl_wcsrtombs_state;
 
-#if HAVE_WCSRTOMBS && !WCSRTOMBS_TERMINATION_BUG
+#if HAVE_WCSRTOMBS && !WCSRTOMBS_TERMINATION_BUG && !defined GNULIB_defined_mbstate_t
 /* Override the system's wcsrtombs() function.  */
 
 # undef wcsrtombs