3 * Purpose: Type-safe ANSI and Unicode builds compatible wrappers for
5 * Author: Joel Farley, Ove K�ven
6 * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
9 * Copyright: (c) 1998-2006 wxWidgets dev team
10 * Licence: wxWindows licence
13 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
15 #ifndef _WX_WXCRTBASE_H_
16 #define _WX_WXCRTBASE_H_
18 /* -------------------------------------------------------------------------
19 headers and missing declarations
20 ------------------------------------------------------------------------- */
22 #include "wx/chartype.h"
25 Standard headers we need here.
27 NB: don't include any wxWidgets headers here because almost all of them
37 #if defined(__WINDOWS__) && !defined(__WXWINCE__)
41 #if defined(HAVE_STRTOK_R) && defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
42 char *strtok_r(char *, const char *, char **);
46 a few compilers don't have the (non standard but common) isascii function,
47 define it ourselves for them
50 #if defined(__MWERKS__)
51 #define wxNEED_ISASCII
52 #elif defined(_WIN32_WCE)
54 #define wxNEED_ISASCII
60 inline int isascii(int c
) { return (unsigned)c
< 0x80; }
65 #define isspace(c) ((c) == _T(' ') || (c) == _T('\t'))
67 #endif /* _WIN32_WCE */
69 /* string.h functions */
71 #if defined(__MWERKS__) && !defined(__MACH__) && (__MSL__ < 0x00008000)
73 #elif defined(__WXWINCE__)
81 WXDLLIMPEXP_BASE
char *strdup(const char* s
);
84 /* missing functions in some WinCE versions */
86 #if (_WIN32_WCE < 300)
87 WXDLLIMPEXP_BASE
void *calloc( size_t num
, size_t size
);
89 #endif /* _WIN32_WCE */
92 #if defined(__MWERKS__)
93 /* Metrowerks only has wide char support for OS X >= 10.3 */
94 #if !defined(__DARWIN__) || \
95 (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3)
96 #define wxHAVE_MWERKS_UNICODE
99 #ifdef wxHAVE_MWERKS_UNICODE
100 #define HAVE_WPRINTF 1
101 #define HAVE_WCSRTOMBS 1
102 #define HAVE_VSWPRINTF 1
104 #endif /* __MWERKS__ */
107 /* -------------------------------------------------------------------------
108 UTF-8 locale handling
109 ------------------------------------------------------------------------- */
112 #if wxUSE_UNICODE_UTF8
113 /* flag indicating whether the current locale uses UTF-8 or not; must be
114 updated every time the locale is changed! */
115 #if wxUSE_UTF8_LOCALE_ONLY
116 #define wxLocaleIsUtf8 true
118 extern WXDLLIMPEXP_BASE
bool wxLocaleIsUtf8
;
120 /* function used to update the flag: */
121 extern WXDLLIMPEXP_BASE
void wxUpdateLocaleIsUtf8();
122 #else /* !wxUSE_UNICODE_UTF8 */
123 inline void wxUpdateLocaleIsUtf8() {}
124 #endif /* wxUSE_UNICODE_UTF8/!wxUSE_UNICODE_UTF8 */
125 #endif /* __cplusplus */
128 /* -------------------------------------------------------------------------
130 ------------------------------------------------------------------------- */
132 #define wxCRT_StrcatA strcat
133 #define wxCRT_StrchrA strchr
134 #define wxCRT_StrcmpA strcmp
135 #define wxCRT_StrcpyA strcpy
136 #define wxCRT_StrcspnA strcspn
137 #define wxCRT_StrlenA strlen
138 #define wxCRT_StrncatA strncat
139 #define wxCRT_StrncmpA strncmp
140 #define wxCRT_StrncpyA strncpy
141 #define wxCRT_StrpbrkA strpbrk
142 #define wxCRT_StrrchrA strrchr
143 #define wxCRT_StrspnA strspn
144 #define wxCRT_StrstrA strstr
146 #define wxCRT_StrcatW wcscat
147 #define wxCRT_StrchrW wcschr
148 #define wxCRT_StrcmpW wcscmp
149 #define wxCRT_StrcpyW wcscpy
150 #define wxCRT_StrcspnW wcscspn
151 #define wxCRT_StrncatW wcsncat
152 #define wxCRT_StrncmpW wcsncmp
153 #define wxCRT_StrncpyW wcsncpy
154 #define wxCRT_StrpbrkW wcspbrk
155 #define wxCRT_StrrchrW wcsrchr
156 #define wxCRT_StrspnW wcsspn
157 #define wxCRT_StrstrW wcsstr
159 /* these functions are not defined under CE, at least in VC8 CRT */
161 #define wxCRT_StrcollA strcoll
162 #define wxCRT_StrxfrmA strxfrm
164 #define wxCRT_StrcollW wcscoll
165 #define wxCRT_StrxfrmW wcsxfrm
166 #endif /* __WXWINCE__ */
168 /* Almost all compiler have strdup(), but not quite all: CodeWarrior under
169 Mac and VC++ for Windows CE don't provide it; additionally, gcc under
170 Mac and OpenVMS do not have wcsdup: */
171 #if defined(__VISUALC__) && __VISUALC__ >= 1400
172 #define wxCRT_StrdupA _strdup
173 #elif !(defined(__MWERKS__) && defined(__WXMAC__)) && !defined(__WXWINCE__)
174 #define wxCRT_StrdupA strdup
176 #if defined(__WINDOWS__)
177 #define wxCRT_StrdupW _wcsdup
178 #elif defined(HAVE_WCSDUP)
179 #define wxCRT_StrdupW wcsdup
182 #ifdef wxHAVE_TCHAR_SUPPORT
183 /* we surely have wchar_t if we have TCHAR have wcslen() */
187 #endif /* wxHAVE_TCHAR_SUPPORT */
190 #define wxCRT_StrlenW wcslen
193 #define wxCRT_StrtodA strtod
194 #define wxCRT_StrtolA strtol
195 #define wxCRT_StrtoulA strtoul
196 #define wxCRT_StrtodW wcstod
197 #define wxCRT_StrtolW wcstol
198 #define wxCRT_StrtoulW wcstoul
201 #if __VISUALC__ >= 1300 && !defined(__WXWINCE__)
202 #define wxCRT_StrtollA _strtoi64
203 #define wxCRT_StrtoullA _strtoui64
204 #define wxCRT_StrtollW _wcstoi64
205 #define wxCRT_StrtoullW _wcstoui64
209 #define wxCRT_StrtollA strtoll
210 #define wxCRT_StrtoullA strtoull
211 #endif /* HAVE_STRTOULL */
213 /* assume that we have wcstoull(), which is also C99, too */
214 #define wxCRT_StrtollW wcstoll
215 #define wxCRT_StrtoullW wcstoull
216 #endif /* HAVE_WCSTOULL */
220 /* define wxCRT_StricmpA/W and wxCRT_StrnicmpA/W for various compilers */
222 /* note that we definitely are going to need our own version for widechar
224 #if !defined(wxCRT_StricmpA)
225 #if defined(__BORLANDC__) || defined(__WATCOMC__) || \
226 defined(__SALFORDC__) || defined(__VISAGECPP__) || \
227 defined(__EMX__) || defined(__DJGPP__)
228 #define wxCRT_StricmpA stricmp
229 #define wxCRT_StrnicmpA strnicmp
230 #elif defined(__WXPALMOS__)
231 /* FIXME: There is no equivalent to strnicmp in the Palm OS API. This
232 * quick hack should do until one can be written.
234 #define wxCRT_StricmpA StrCaselessCompare
235 #define wxCRT_StrnicmpA strnicmp
236 #elif defined(__SYMANTEC__) || defined(__VISUALC__) || \
237 (defined(__MWERKS__) && defined(__INTEL__))
238 #define wxCRT_StricmpA _stricmp
239 #define wxCRT_StrnicmpA _strnicmp
240 #elif defined(__UNIX__) || defined(__GNUWIN32__)
241 #define wxCRT_StricmpA strcasecmp
242 #define wxCRT_StrnicmpA strncasecmp
243 /* #else -- use wxWidgets implementation */
245 #endif /* !defined(wxCRT_StricmpA) */
246 /* FIXME-UTF8: use wcs(n)casecmp if available for *W versions */
249 #define wxCRT_StrtokA(str, sep, last) strtok_r(str, sep, last)
251 /* FIXME-UTF8: detect and use wcstok() if available for wxCRT_StrtokW */
253 /* these are extern "C" because they are used by regex lib: */
258 #ifndef wxCRT_StrlenW
259 WXDLLIMPEXP_BASE
size_t wxCRT_StrlenW(const wchar_t *s
);
262 #ifndef wxCRT_StrncmpW
263 WXDLLIMPEXP_BASE
int wxCRT_StrncmpW(const wchar_t *s1
, const wchar_t *s2
, size_t n
);
270 /* FIXME-UTF8: remove this once we are Unicode only */
272 #define wxCRT_StrlenNative wxCRT_StrlenW
273 #define wxCRT_StrncmpNative wxCRT_StrncmpW
274 #define wxCRT_ToupperNative wxCRT_ToupperW
275 #define wxCRT_TolowerNative wxCRT_TolowerW
277 #define wxCRT_StrlenNative wxCRT_StrlenA
278 #define wxCRT_StrncmpNative wxCRT_StrncmpA
279 #define wxCRT_ToupperNative toupper
280 #define wxCRT_TolowerNative tolower
283 #ifndef wxCRT_StrcatW
284 WXDLLIMPEXP_BASE
wchar_t *wxCRT_StrcatW(wchar_t *dest
, const wchar_t *src
);
287 #ifndef wxCRT_StrchrW
288 WXDLLIMPEXP_BASE
const wchar_t *wxCRT_StrchrW(const wchar_t *s
, wchar_t c
);
291 #ifndef wxCRT_StrcmpW
292 WXDLLIMPEXP_BASE
int wxCRT_StrcmpW(const wchar_t *s1
, const wchar_t *s2
);
295 #ifndef wxCRT_StrcollW
296 WXDLLIMPEXP_BASE
int wxCRT_StrcollW(const wchar_t *s1
, const wchar_t *s2
);
299 #ifndef wxCRT_StrcpyW
300 WXDLLIMPEXP_BASE
wchar_t *wxCRT_StrcpyW(wchar_t *dest
, const wchar_t *src
);
303 #ifndef wxCRT_StrcspnW
304 WXDLLIMPEXP_BASE
size_t wxCRT_StrcspnW(const wchar_t *s
, const wchar_t *reject
);
307 #ifndef wxCRT_StrncatW
308 WXDLLIMPEXP_BASE
wchar_t *wxCRT_StrncatW(wchar_t *dest
, const wchar_t *src
, size_t n
);
311 #ifndef wxCRT_StrncpyW
312 WXDLLIMPEXP_BASE
wchar_t *wxCRT_StrncpyW(wchar_t *dest
, const wchar_t *src
, size_t n
);
315 #ifndef wxCRT_StrpbrkW
316 WXDLLIMPEXP_BASE
const wchar_t *wxCRT_StrpbrkW(const wchar_t *s
, const wchar_t *accept
);
319 #ifndef wxCRT_StrrchrW
320 WXDLLIMPEXP_BASE
const wchar_t *wxCRT_StrrchrW(const wchar_t *s
, wchar_t c
);
323 #ifndef wxCRT_StrspnW
324 WXDLLIMPEXP_BASE
size_t wxCRT_StrspnW(const wchar_t *s
, const wchar_t *accept
);
327 #ifndef wxCRT_StrstrW
328 WXDLLIMPEXP_BASE
const wchar_t *wxCRT_StrstrW(const wchar_t *haystack
, const wchar_t *needle
);
331 #ifndef wxCRT_StrtodW
332 WXDLLIMPEXP_BASE
double wxCRT_StrtodW(const wchar_t *nptr
, wchar_t **endptr
);
335 #ifndef wxCRT_StrtolW
336 WXDLLIMPEXP_BASE
long int wxCRT_StrtolW(const wchar_t *nptr
, wchar_t **endptr
, int base
);
339 #ifndef wxCRT_StrtoulW
340 WXDLLIMPEXP_BASE
unsigned long int wxCRT_StrtoulW(const wchar_t *nptr
, wchar_t **endptr
, int base
);
343 #ifndef wxCRT_StrxfrmW
344 WXDLLIMPEXP_BASE
size_t wxCRT_StrxfrmW(wchar_t *dest
, const wchar_t *src
, size_t n
);
347 #ifndef wxCRT_StrdupA
348 WXDLLIMPEXP_BASE
char *wxCRT_StrdupA(const char *psz
);
351 #ifndef wxCRT_StrdupW
352 WXDLLIMPEXP_BASE
wchar_t *wxCRT_StrdupW(const wchar_t *pwz
);
355 #ifndef wxCRT_StricmpA
356 WXDLLIMPEXP_BASE
int wxCRT_StricmpA(const char *psz1
, const char *psz2
);
359 #ifndef wxCRT_StricmpW
360 WXDLLIMPEXP_BASE
int wxCRT_StricmpW(const wchar_t *psz1
, const wchar_t *psz2
);
363 #ifndef wxCRT_StrnicmpA
364 WXDLLIMPEXP_BASE
int wxCRT_StrnicmpA(const char *psz1
, const char *psz2
, size_t len
);
367 #ifndef wxCRT_StrnicmpW
368 WXDLLIMPEXP_BASE
int wxCRT_StrnicmpW(const wchar_t *psz1
, const wchar_t *psz2
, size_t len
);
371 #ifndef wxCRT_StrtokA
372 WXDLLIMPEXP_BASE
char *wxCRT_StrtokA(char *psz
, const char *delim
, char **save_ptr
);
375 #ifndef wxCRT_StrtokW
376 WXDLLIMPEXP_BASE
wchar_t *wxCRT_StrtokW(wchar_t *psz
, const wchar_t *delim
, wchar_t **save_ptr
);
379 /* supply strtoll and strtoull, if needed */
381 #ifndef wxCRT_StrtollA
382 WXDLLIMPEXP_BASE wxLongLong_t
wxCRT_StrtollA(const char* nptr
,
385 WXDLLIMPEXP_BASE wxULongLong_t
wxCRT_StrtoullA(const char* nptr
,
389 #ifndef wxCRT_StrtollW
390 WXDLLIMPEXP_BASE wxLongLong_t
wxCRT_StrtollW(const wchar_t* nptr
,
393 WXDLLIMPEXP_BASE wxULongLong_t
wxCRT_StrtoullW(const wchar_t* nptr
,
397 #endif // wxLongLong_t
400 /* -------------------------------------------------------------------------
402 ------------------------------------------------------------------------- */
404 #if defined(__UNIX__) || defined(__WXMAC__)
411 /* these functions are only needed in the form used for filenames (i.e. char*
412 on Unix, wchar_t* on Windows), so we don't need to use A/W suffix: */
413 #if wxMBFILES || !wxUSE_UNICODE /* ANSI filenames */
415 #define wxCRT_Fopen fopen
416 #define wxCRT_Freopen freopen
417 #define wxCRT_Remove remove
418 #define wxCRT_Rename rename
420 #else /* Unicode filenames */
421 /* special case: these functions are missing under Win9x with Unicows so we
422 have to implement them ourselves */
423 #if wxUSE_UNICODE_MSLU
424 WXDLLIMPEXP_BASE
FILE* wxMSLU__wfopen(const wchar_t *name
, const wchar_t *mode
);
425 WXDLLIMPEXP_BASE
FILE* wxMSLU__wfreopen(const wchar_t *name
, const wchar_t *mode
, FILE *stream
);
426 WXDLLIMPEXP_BASE
int wxMSLU__wrename(const wchar_t *oldname
, const wchar_t *newname
);
427 WXDLLIMPEXP_BASE
int wxMSLU__wremove(const wchar_t *name
);
428 #define wxCRT_Fopen wxMSLU__wfopen
429 #define wxCRT_Freopen wxMSLU__wfreopen
430 #define wxCRT_Remove wxMSLU__wremove
431 #define wxCRT_Rename wxMSLU__wrename
433 /* WinCE CRT doesn't provide these functions so use our own */
435 WXDLLIMPEXP_BASE
int wxCRT_Rename(const wchar_t *src
,
437 WXDLLIMPEXP_BASE
int wxCRT_Remove(const wchar_t *path
);
439 #define wxCRT_Rename _wrename
440 #define wxCRT_Remove _wremove
442 #define wxCRT_Fopen _wfopen
443 #define wxCRT_Freopen _wfreopen
446 #endif /* wxMBFILES/!wxMBFILES */
448 #define wxCRT_PutsA puts
449 #define wxCRT_FputsA fputs
450 #define wxCRT_FgetsA fgets
451 #define wxCRT_FputcA fputc
452 #define wxCRT_FgetcA fgetc
453 #define wxCRT_UngetcA ungetc
455 #ifdef wxHAVE_TCHAR_SUPPORT
456 #define wxCRT_PutsW _putws
457 #define wxCRT_FputsW fputws
458 #define wxCRT_FputcW fputwc
461 #define wxCRT_FputsW fputws
464 #define wxCRT_PutsW putws
467 #define wxCRT_FputcW fputwc
469 #define wxCRT_FgetsW fgetws
472 WXDLLIMPEXP_BASE
int wxCRT_PutsW(const wchar_t *ws
);
476 WXDLLIMPEXP_BASE
int wxCRT_FputsW(const wchar_t *ch
, FILE *stream
);
480 WXDLLIMPEXP_BASE
int wxCRT_FputcW(wchar_t wc
, FILE *stream
);
484 NB: tmpnam() is unsafe and thus is not wrapped!
485 Use other wxWidgets facilities instead:
486 wxFileName::CreateTempFileName, wxTempFile, or wxTempFileOutputStream
488 #define wxTmpnam(x) wxTmpnam_is_insecure_use_wxTempFile_instead
490 /* FIXME-CE: provide our own perror() using ::GetLastError() */
493 #define wxCRT_PerrorA perror
494 #ifdef wxHAVE_TCHAR_SUPPORT
495 #define wxCRT_PerrorW _wperror
498 #endif /* !__WXWINCE__ */
500 /* -------------------------------------------------------------------------
502 ------------------------------------------------------------------------- */
504 /* there are no env vars at all under CE, so no _tgetenv neither */
506 /* can't define as inline function as this is a C file... */
507 #define wxCRT_GetenvA(name) (name, NULL)
508 #define wxCRT_GetenvW(name) (name, NULL)
510 #define wxCRT_GetenvA getenv
512 #define wxCRT_GetenvW _wgetenv
516 #ifndef wxCRT_GetenvW
517 WXDLLIMPEXP_BASE
wchar_t * wxCRT_GetenvW(const wchar_t *name
);
521 #define wxCRT_SystemA system
522 /* mingw32 doesn't provide _tsystem() or _wsystem(): */
523 #if defined(_tsystem)
524 #define wxCRT_SystemW _wsystem
527 #define wxCRT_AtofA atof
528 #define wxCRT_AtoiA atoi
529 #define wxCRT_AtolA atol
531 #if defined(__MWERKS__)
533 #define wxCRT_AtofW watof
534 #define wxCRT_AtoiW watoi
535 #define wxCRT_AtolW watol
536 /* else: use ANSI versions */
538 #elif defined(wxHAVE_TCHAR_SUPPORT)
539 #define wxCRT_AtoiW _wtoi
540 #define wxCRT_AtolW _wtol
541 /* _wtof doesn't exist */
544 #define wxCRT_AtofW(s) wcstof(s, NULL)
546 #define wxCRT_AtolW(s) wcstol(s, NULL, 10)
547 /* wcstoi doesn't exist */
551 There are 2 unrelated problems with these functions under Mac:
552 a) Metrowerks MSL CRT implements them strictly in C99 sense and
553 doesn't support (very common) extension of allowing to call
554 mbstowcs(NULL, ...) which makes it pretty useless as you can't
555 know the size of the needed buffer
556 b) OS X <= 10.2 declares and even defined these functions but
557 doesn't really implement them -- they always return an error
559 So use our own replacements in both cases.
561 #if defined(__MWERKS__) && defined(__MSL__)
562 #define wxNEED_WX_MBSTOWCS
566 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2
567 #define wxNEED_WX_MBSTOWCS
571 #ifdef wxNEED_WX_MBSTOWCS
572 /* even though they are defined and "implemented", they are bad and just
573 stubs so we need our own - we need these even in ANSI builds!! */
574 WXDLLIMPEXP_BASE
size_t wxMbstowcs(wchar_t *, const char *, size_t);
575 WXDLLIMPEXP_BASE
size_t wxWcstombs(char *, const wchar_t *, size_t);
577 #define wxMbstowcs mbstowcs
578 #define wxWcstombs wcstombs
583 /* -------------------------------------------------------------------------
585 ------------------------------------------------------------------------- */
587 #define wxCRT_StrftimeA strftime
588 /* FIXME-UTF8: when is this available? */
589 #define wxCRT_StrftimeW wcsftime
591 #ifndef wxCRT_StrftimeW
592 WXDLLIMPEXP_BASE
size_t wxCRT_StrftimeW(wchar_t *s
, size_t max
,
594 const struct tm
*tm
);
599 /* -------------------------------------------------------------------------
601 ------------------------------------------------------------------------- */
604 #define WXWCHAR_T_CAST(c) (wint_t)(c)
606 #define WXWCHAR_T_CAST(c) c
609 #define wxCRT_IsalnumW(c) iswalnum(WXWCHAR_T_CAST(c))
610 #define wxCRT_IsalphaW(c) iswalpha(WXWCHAR_T_CAST(c))
611 #define wxCRT_IscntrlW(c) iswcntrl(WXWCHAR_T_CAST(c))
612 #define wxCRT_IsdigitW(c) iswdigit(WXWCHAR_T_CAST(c))
613 #define wxCRT_IsgraphW(c) iswgraph(WXWCHAR_T_CAST(c))
614 #define wxCRT_IslowerW(c) iswlower(WXWCHAR_T_CAST(c))
615 #define wxCRT_IsprintW(c) iswprint(WXWCHAR_T_CAST(c))
616 #define wxCRT_IspunctW(c) iswpunct(WXWCHAR_T_CAST(c))
617 #define wxCRT_IsspaceW(c) iswspace(WXWCHAR_T_CAST(c))
618 #define wxCRT_IsupperW(c) iswupper(WXWCHAR_T_CAST(c))
619 #define wxCRT_IsxdigitW(c) iswxdigit(WXWCHAR_T_CAST(c))
622 #if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
623 /* /usr/include/wctype.h incorrectly declares translations */
624 /* tables which provokes tons of compile-time warnings -- try */
625 /* to correct this */
626 #define wxCRT_TolowerW(wc) towctrans((wc), (wctrans_t)__ctype_tolower)
627 #define wxCRT_ToupperW(wc) towctrans((wc), (wctrans_t)__ctype_toupper)
628 #else /* !glibc 2.0 */
629 #define wxCRT_TolowerW towlower
630 #define wxCRT_ToupperW towupper
632 #else /* !__GLIBC__ */
633 /* There is a bug in VC6 C RTL: toxxx() functions dosn't do anything
634 with signed chars < 0, so "fix" it here. */
635 #define wxCRT_TolowerW(c) towlower((wxUChar)(wxChar)(c))
636 #define wxCRT_ToupperW(c) towupper((wxUChar)(wxChar)(c))
637 #endif /* __GLIBC__/!__GLIBC__ */
643 /* -------------------------------------------------------------------------
644 wx wrappers for CRT functions in both char* and wchar_t* versions
645 ------------------------------------------------------------------------- */
649 /* NB: this belongs to wxcrt.h and not this header, but it makes life easier
650 * for buffer.h and stringimpl.h (both of which must be included before
651 * string.h, which is required by wxcrt.h) to have them here: */
653 /* safe version of strlen() (returns 0 if passed NULL pointer) */
654 inline size_t wxStrlen(const char *s
) { return s
? wxCRT_StrlenA(s
) : 0; }
655 inline size_t wxStrlen(const wchar_t *s
) { return s
? wxCRT_StrlenW(s
) : 0; }
656 #define wxWcslen wxCRT_StrlenW
658 #define wxStrdupA wxCRT_StrdupA
659 #define wxStrdupW wxCRT_StrdupW
660 inline char* wxStrdup(const char *s
) { return wxCRT_StrdupA(s
); }
661 inline wchar_t* wxStrdup(const wchar_t *s
) { return wxCRT_StrdupW(s
); }
663 #endif /* __cplusplus */
665 #endif /* _WX_WXCRTBASE_H_ */