patch by Jeffrey Yasskin for porting to Ubuntu Hardy.  Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series.  For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104516 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/iosfwd b/include/iosfwd
index e9a6a0f..32f679e 100644
--- a/include/iosfwd
+++ b/include/iosfwd
@@ -86,7 +86,7 @@
 */
 
 #include <__config>
-#include <_types.h>  // for __darwin_mbstate_t
+#include <wchar.h>  // for mbstate_t
 
 #pragma GCC system_header
 
@@ -153,11 +153,11 @@
 typedef basic_fstream<wchar_t>       wfstream;
 
 template <class _State>             class fpos;
-typedef fpos<__darwin_mbstate_t>    streampos;
-typedef fpos<__darwin_mbstate_t>    wstreampos;
+typedef fpos<mbstate_t>    streampos;
+typedef fpos<mbstate_t>    wstreampos;
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
-typedef fpos<__darwin_mbstate_t>    u16streampos;
-typedef fpos<__darwin_mbstate_t>    u32streampos;
+typedef fpos<mbstate_t>    u16streampos;
+typedef fpos<mbstate_t>    u32streampos;
 #endif
 
 typedef long long streamoff;        // for char_traits in <string>