Compilation fixes for wide char functions under IRIX with mipsPro.

Use correct (XPG5, not XPG4) version of wcsftime().

Bring the wide char functions only declared in std namespace into global one
under IRIX.

Declare vswscanf() ourselves as we just don't seem to get its declaration from
C++ code (only from C99).

Add a cast to fix incorrect putws() signature.

All these fixes apply to IRIX 6.5.18 with mipsPro 7.4.2. It doesn't seem to
add configure checks for most of the above fixes as previous versions of both
the OS and the compiler should be completely extinct by now but we may need to
do it if anybody is still found to use them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-02-28 11:09:15 +00:00
parent 3e026ad22e
commit d0204feee6
2 changed files with 36 additions and 5 deletions

View File

@@ -29,6 +29,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#ifdef __SGI__
// wide character functions are declared in std namespace under IRIX
using namespace std;
// and this one is only declared if __c99 is defined which is not the case
// for C++ builds, so declare it ourselves
extern "C" int vswscanf(const wchar_t *, const wchar_t *, va_list);
#endif
#ifndef __WXPALMOS5__
#ifndef __WXWINCE__
@@ -1246,9 +1256,11 @@ void wxUpdateLocaleIsUtf8()
int wxPuts(const wxString& s)
{
// under IRIX putws() takes a non-const argument so use wchar_str() instead
// of wc_str()
CALL_ANSI_OR_UNICODE(return,
wxCRT_PutsA(s.mb_str()),
wxCRT_PutsW(s.wc_str()));
wxCRT_PutsW(s.wchar_str()));
}
int wxFputs(const wxString& s, FILE *stream)