]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Declare mbstate_t and wcrtomb for Borland
authorBrad King <brad.king@kitware.com>
Wed, 11 Jan 2012 13:15:09 +0000 (08:15 -0500)
committerBrad King <brad.king@kitware.com>
Wed, 11 Jan 2012 13:15:09 +0000 (08:15 -0500)
The Borland C++ 5.81 runtime library provides wcrtomb but only the C++
header <cwchar> actually declares the API.  Since this is C code we
cannot use the header, so declare it ourselves.

SVN-Revision: 4126

libarchive/archive_windows.h

index 53deadd932d9e21ca011fa916610137e40655093..033d620dd9bf8295b02436be8f6caaacd7a04f62 100644 (file)
@@ -270,5 +270,9 @@ extern wchar_t *__la_win_permissive_name_w(const wchar_t *wname);
 extern void __la_dosmaperr(unsigned long e);
 #define la_dosmaperr(e) __la_dosmaperr(e)
 
+#if defined(HAVE_WCRTOMB) && defined(__BORLANDC__)
+typedef int mbstate_t;
+size_t wcrtomb(char *, wchar_t, mbstate_t *);
+#endif
 
 #endif /* LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED */