make definitions match declarations in wxcrt.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dcd9ce72d5
commit
37140a7124
@ -58,7 +58,7 @@ using namespace std ;
|
||||
#endif
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||
WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||
{
|
||||
// assume that we have mbsrtowcs() too if we have wcsrtombs()
|
||||
#ifdef HAVE_WCSRTOMBS
|
||||
@ -91,7 +91,7 @@ size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t WXDLLEXPORT wxWC2MB(char *buf, const wchar_t *pwz, size_t n)
|
||||
WXDLLIMPEXP_BASE size_t wxWC2MB(char *buf, const wchar_t *pwz, size_t n)
|
||||
{
|
||||
#ifdef HAVE_WCSRTOMBS
|
||||
mbstate_t mbstate;
|
||||
@ -119,7 +119,7 @@ size_t WXDLLEXPORT wxWC2MB(char *buf, const wchar_t *pwz, size_t n)
|
||||
}
|
||||
#endif // wxUSE_WCHAR_T
|
||||
|
||||
bool WXDLLEXPORT wxOKlibc()
|
||||
WXDLLIMPEXP_BASE bool wxOKlibc()
|
||||
{
|
||||
#if wxUSE_WCHAR_T && defined(__UNIX__) && defined(__GLIBC__) && !defined(__WINE__)
|
||||
// glibc 2.0 uses UTF-8 even when it shouldn't
|
||||
@ -704,7 +704,7 @@ int wxVsnprintf(wchar_t *str, size_t size, const wxString& format, va_list argpt
|
||||
|
||||
#ifdef wxNEED_WX_MBSTOWCS
|
||||
|
||||
WXDLLEXPORT size_t wxMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
||||
WXDLLIMPEXP_BASE size_t wxMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
||||
{
|
||||
if (!out)
|
||||
{
|
||||
@ -726,7 +726,7 @@ WXDLLEXPORT size_t wxMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
||||
return in - origin;
|
||||
}
|
||||
|
||||
WXDLLEXPORT size_t wxWcstombs (char * out, const wchar_t * in, size_t outlen)
|
||||
WXDLLIMPEXP_BASE size_t wxWcstombs (char * out, const wchar_t * in, size_t outlen)
|
||||
{
|
||||
if (!out)
|
||||
{
|
||||
@ -751,14 +751,14 @@ WXDLLEXPORT size_t wxWcstombs (char * out, const wchar_t * in, size_t outlen)
|
||||
#endif // wxNEED_WX_MBSTOWCS
|
||||
|
||||
#ifndef wxCRT_StrdupA
|
||||
WXDLLEXPORT char *wxCRT_StrdupA(const char *s)
|
||||
WXDLLIMPEXP_BASE char *wxCRT_StrdupA(const char *s)
|
||||
{
|
||||
return strcpy((char *)malloc(strlen(s) + 1), s);
|
||||
}
|
||||
#endif // wxCRT_StrdupA
|
||||
|
||||
#ifndef wxCRT_StrdupW
|
||||
WXDLLEXPORT wchar_t * wxCRT_StrdupW(const wchar_t *pwz)
|
||||
WXDLLIMPEXP_BASE wchar_t * wxCRT_StrdupW(const wchar_t *pwz)
|
||||
{
|
||||
size_t size = (wxWcslen(pwz) + 1) * sizeof(wchar_t);
|
||||
wchar_t *ret = (wchar_t *) malloc(size);
|
||||
@ -768,7 +768,7 @@ WXDLLEXPORT wchar_t * wxCRT_StrdupW(const wchar_t *pwz)
|
||||
#endif // wxCRT_StrdupW
|
||||
|
||||
#ifndef wxCRT_StricmpA
|
||||
int WXDLLEXPORT wxCRT_StricmpA(const char *psz1, const char *psz2)
|
||||
WXDLLIMPEXP_BASE int wxCRT_StricmpA(const char *psz1, const char *psz2)
|
||||
{
|
||||
register char c1, c2;
|
||||
do {
|
||||
@ -780,7 +780,7 @@ int WXDLLEXPORT wxCRT_StricmpA(const char *psz1, const char *psz2)
|
||||
#endif // !defined(wxCRT_StricmpA)
|
||||
|
||||
#ifndef wxCRT_StricmpW
|
||||
int WXDLLEXPORT wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2)
|
||||
WXDLLIMPEXP_BASE int wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2)
|
||||
{
|
||||
register wchar_t c1, c2;
|
||||
do {
|
||||
@ -792,7 +792,7 @@ int WXDLLEXPORT wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2)
|
||||
#endif // !defined(wxCRT_StricmpW)
|
||||
|
||||
#ifndef wxCRT_StrnicmpA
|
||||
int WXDLLEXPORT wxCRT_StrnicmpA(const char *s1, const char *s2, size_t n)
|
||||
WXDLLIMPEXP_BASE int wxCRT_StrnicmpA(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
// initialize the variables just to suppress stupid gcc warning
|
||||
register char c1 = 0, c2 = 0;
|
||||
@ -806,7 +806,7 @@ int WXDLLEXPORT wxCRT_StrnicmpA(const char *s1, const char *s2, size_t n)
|
||||
#endif // !defined(wxCRT_StrnicmpA)
|
||||
|
||||
#ifndef wxCRT_StrnicmpW
|
||||
int WXDLLEXPORT wxCRT_StrnicmpW(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
WXDLLIMPEXP_BASE int wxCRT_StrnicmpW(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
{
|
||||
// initialize the variables just to suppress stupid gcc warning
|
||||
register wchar_t c1 = 0, c2 = 0;
|
||||
@ -826,7 +826,7 @@ int WXDLLEXPORT wxCRT_StrnicmpW(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
// this (and wxCRT_StrncmpW below) are extern "C" because they are needed
|
||||
// by regex code, the rest isn't needed, so it's not declared as extern "C"
|
||||
#ifndef wxCRT_StrlenW
|
||||
extern "C" WXDLLEXPORT size_t wxCRT_StrlenW(const wchar_t *s)
|
||||
extern "C" WXDLLIMPEXP_BASE size_t wxCRT_StrlenW(const wchar_t *s)
|
||||
{
|
||||
size_t n = 0;
|
||||
while ( *s++ )
|
||||
@ -841,7 +841,7 @@ extern "C" WXDLLEXPORT size_t wxCRT_StrlenW(const wchar_t *s)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifndef wxCRT_GetenvW
|
||||
WXDLLEXPORT wchar_t* wxCRT_GetenvW(const wchar_t *name)
|
||||
WXDLLIMPEXP_BASE wchar_t* wxCRT_GetenvW(const wchar_t *name)
|
||||
{
|
||||
// NB: buffer returned by getenv() is allowed to be overwritten next
|
||||
// time getenv() is called, so it is OK to use static string
|
||||
@ -853,7 +853,7 @@ WXDLLEXPORT wchar_t* wxCRT_GetenvW(const wchar_t *name)
|
||||
#endif // !wxCRT_GetenvW
|
||||
|
||||
#ifndef wxCRT_StrftimeW
|
||||
WXDLLEXPORT size_t
|
||||
WXDLLIMPEXP_BASE size_t
|
||||
wxCRT_StrftimeW(wchar_t *s, size_t maxsize, const wchar_t *fmt, const struct tm *tm)
|
||||
{
|
||||
if ( !maxsize )
|
||||
|
Loading…
Reference in New Issue
Block a user