diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index ecf6f69753..41ad07a808 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -902,10 +902,12 @@ WXDLLIMPEXP_BASE int wxSystem(const wxChar *psz); const wxChar *fmt, const struct tm *tm); #endif // wxNEED_WX_TIME_H -// missing functions in early WinCE versions -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300) -WXDLLIMPEXP_BASE char* strdup(const char* s); +// missing functions in some WinCE versions +#ifdef _WIN32_WCE +#if (_WIN32_WCE < 300) WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); +#endif +WXDLLIMPEXP_BASE char* strdup(const char* s); #if _WIN32_WCE <= 211 WXDLLIMPEXP_BASE int isspace(int c); diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 11233ff4fd..846e7d5058 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -1390,12 +1390,14 @@ int isascii( int c ) #endif #if defined(__WXWINCE__) +#if (_WIN32_WCE < 300) void *calloc( size_t num, size_t size ) { void** ptr = (void **)malloc(num * size); memset( ptr, 0, num * size); return ptr; } +#endif #if (_WIN32_WCE <= 211) int isspace(int c) @@ -1405,3 +1407,4 @@ int isspace(int c) #endif #endif +