-for ac_func in fputwc wprintf vswprintf
+
+
+
+for ac_func in wputc wputchar putws fputws wprintf vswprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
if test "$wxUSE_UNICODE" = yes; then
dnl also look if we have wide char IO functions
- AC_CHECK_FUNCS(fputwc wprintf vswprintf)
+ AC_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf)
dnl MinGW has a vswprintf with a different prototype, and
dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
#define wxGets getws
#define wxUngetc ungetwc
- #ifdef HAVE_FPUTWC
- #define wxPutc wputc
- #define wxPutchar wputchar
- #define wxPuts putws
- #define wxFputs fputws
+ #ifdef HAVE_FPUTWS
+ #define wxFputs fputws
#else
- #define wxNEED_FPUTWC
-
+ #define wxNEED_FPUTS
#include <stdio.h>
-
int wxFputs(const wxChar *ch, FILE *stream);
+ #endif
+
+ #ifdef HAVE_WPUTC
+ #define wxPutc wputc
+ #else
+ #define wxNEED_PUTC
+ #include <stdio.h>
int wxPutc(wxChar ch, FILE *stream);
+ #endif
- #define wxPuts(ws) wxFputs(ws, stdout)
+ #ifdef HAVE_WPUTCHAR
+ #define wxPutchar wputchar
+ #else
#define wxPutchar(wch) wxPutc(wch, stdout)
#endif
+
+ #ifdef HAVE_PUTWS
+ #define wxPuts putws
+ #else
+ #define wxPuts(ws) wxFputs(ws, stdout)
+ #endif
/* we need %s to %ls conversion for printf and scanf etc */
#define wxNEED_PRINTF_CONVERSION
/* Define if you have wcsrtombs() function */
#undef HAVE_WCSRTOMBS
-/* Define this if you have fputws() and putwc() */
-#undef HAVE_FPUTWC
+/* Define this if you have wputc() */
+#undef HAVE_WPUTC
+
+/* Define this if you have wputchar() */
+#undef HAVE_WPUTCHAR
+
+/* Define this if you have putws() */
+#undef HAVE_PUTWS
+
+/* Define this if you have fputws() */
+#undef HAVE_FPUTWS
/* Define this if you have strcasecmp() function in <string.h> */
#undef HAVE_STRCASECMP_IN_STRING_H
/* Define if you have wcsrtombs() function */
#define HAVE_WCSRTOMBS 1
-/* Define this if you have fputws() and putwc() */
-#define HAVE_FPUTWC 1
+/* Define this if you have wputc() */
+#define HAVE_WPUTC 1
+
+/* Define this if you have wputchar() */
+#define HAVE_WPUTCHAR 1
+
+/* Define this if you have putws() */
+#define HAVE_PUTWS 1
+
+/* Define this if you have fputws() */
+#define HAVE_FPUTWS 1
/* Define this if you have strcasecmp() function in <string.h> */
#define HAVE_STRCASECMP_IN_STRING_H 1
// implement the standard IO functions for wide char if libc doesn't have them
// ----------------------------------------------------------------------------
-#ifdef wxNEED_FPUTWC
-
+#ifdef wxNEED_FPUTS
int wxFputs(const wchar_t *ws, FILE *stream)
{
// counting the number of wide characters written isn't worth the trouble,
// simply distinguish between ok and error
return fputs(wxConvLibc.cWC2MB(ws), stream) == -1 ? -1 : 0;
}
+#endif // wxNEED_FPUTS
+#ifdef wxNEED_PUTC
int /* not wint_t */ wxPutc(wchar_t wc, FILE *stream)
{
wchar_t ws[2] = { wc, L'\0' };
return wxFputs(ws, stream);
}
-
-#endif // wxNEED_FPUTWC
+#endif // wxNEED_PUTC
// NB: we only implement va_list functions here, the ones taking ... are
// defined below for wxNEED_PRINTF_CONVERSION case anyhow and we reuse