]> git.saurik.com Git - wxWidgets.git/commitdiff
check for wputc wputchar putws fputws availability
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 20 Jun 2004 17:18:50 +0000 (17:18 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 20 Jun 2004 17:18:50 +0000 (17:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
include/wx/wxchar.h
setup.h.in
setup.h_vms
src/common/wxchar.cpp

index 3a997b47606751b5e7a802b201aa951e302e0b74..41ffb63e7610232b34abc1c38c5323e9a0df0247 100755 (executable)
--- a/configure
+++ b/configure
@@ -30215,7 +30215,10 @@ if test "$wxUSE_UNICODE" = yes; then
 
 
 
-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
index 4a47f64294a04bde4eb6cb5f5739940e46e77e93..4d2984ade319f9e128c90698b79277f7ef1c6976 100644 (file)
@@ -3709,7 +3709,7 @@ fi
 
 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
index 99cf662689e12fdbebaa24056eff305cc37cfca9..5e65c13bce02374298ab76b83d84e9eda349c451 100644 (file)
             #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
index b746329504ea561f144720a9c5e3bc648a8f4061..f8df8e47e4c82132dc7f3245c03c551576cae5e5 100644 (file)
 /* 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
index 7ce91e99ef834e22aa19641a04e0d125633e5641..8932864838f718fcc43a544b2500848cdb142ada 100644 (file)
 /* 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
index 7184706d3203afc274f835f7d91f123c383ccf89..b7e5c75272aad1993fade36f4a97c5e218e6a3a3 100644 (file)
@@ -604,23 +604,23 @@ int WXDLLEXPORT wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, ...)
 // 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