For Android (wxQT), add private wcstol, wcstoul and wcstod
These functions are needed by wxString::ToLong wxString::ToDouble etc.. They do exist in the android library, but do not work corretly. This change implements them using strtol strtoul and strtod For more info see discussion in wx-dev list: https://groups.google.com/d/msg/wx-dev/71qtIFcujgM/TRCfCjGHUhEJ Thanks @seandepagnier (modified a bit the comments) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -197,9 +197,21 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size );
|
||||
#define wxCRT_StrtodA strtod
|
||||
#define wxCRT_StrtolA strtol
|
||||
#define wxCRT_StrtoulA strtoul
|
||||
|
||||
#ifdef __ANDROID__ // these functions are broken on android
|
||||
|
||||
extern double android_wcstod(const wchar_t *nptr, wchar_t **endptr);
|
||||
extern long android_wcstol(const wchar_t *nptr, wchar_t **endptr, int base);
|
||||
extern unsigned long android_wcstoul(const wchar_t *nptr, wchar_t **endptr, int base);
|
||||
|
||||
#define wxCRT_StrtodW android_wcstod
|
||||
#define wxCRT_StrtolW android_wcstol
|
||||
#define wxCRT_StrtoulW android_wcstoul
|
||||
#else
|
||||
#define wxCRT_StrtodW wcstod
|
||||
#define wxCRT_StrtolW wcstol
|
||||
#define wxCRT_StrtoulW wcstoul
|
||||
#endif
|
||||
|
||||
#ifdef __VISUALC__
|
||||
#define wxCRT_StrtollA _strtoi64
|
||||
|
Reference in New Issue
Block a user