]> 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)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 17 Mar 2012 20:11:33 +0000 (05:11 +0900)
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 df62dce7c99860294267431c2c41ae15bab427b5..8783291aff7765575632db11fbeba9bb9d0a552d 100644 (file)
@@ -272,6 +272,10 @@ extern void __la_dosmaperr(unsigned long e);
 extern struct archive_entry *__la_win_entry_in_posix_pathseparator(
     struct archive_entry *);
 
+#if defined(HAVE_WCRTOMB) && defined(__BORLANDC__)
+typedef int mbstate_t;
+size_t wcrtomb(char *, wchar_t, mbstate_t *);
+#endif
 
 #if defined(_MSC_VER) && _MSC_VER < 1300
 WINBASEAPI BOOL WINAPI GetVolumePathNameW(