Various compile fixes for WinCE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2002-12-07 15:41:13 +00:00
parent 694f2f3cc7
commit 0e0126c220
5 changed files with 26 additions and 1 deletions

View File

@ -95,6 +95,19 @@ private: \
chartype *m_str; \
}
#ifndef strdup
inline char *strdup(const char *cs)
{
size_t len = 0;
while (cs[len] != 0)
len++;
const size_t siz = (len + 1)*sizeof(char);
char *csCopy = (char *)malloc(siz);
memcpy(csCopy, cs, siz);
return csCopy;
}
#endif
DEFINE_BUFFER(wxCharBuffer, char, strdup);
#if wxUSE_WCHAR_T

View File

@ -12,7 +12,9 @@
#ifndef _WX_DEBUG_H_
#define _WX_DEBUG_H_
#ifndef __WXWINCE__
#include <assert.h>
#endif
#include <limits.h> // for CHAR_BIT used below
#include "wx/wxchar.h" // for __TFILE__ and wxChar

View File

@ -95,7 +95,7 @@
// compiler defects workarounds
// ----------------------------------------------------------------------------
#if defined(__VISUALC__) && !defined(WIN32)
#if defined(__VISUALC__) && !defined(WIN32) && !defined(__WXWINCE__)
// VC1.5 does not have LPTSTR type
#define LPTSTR LPSTR
#define LPCTSTR LPCSTR

View File

@ -18,12 +18,18 @@
#include "wx/list.h"
#ifndef __WXWINCE__
#include <time.h>
#endif
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
#ifdef __WXWINCE__
typedef long off_t;
#else
// define off_t
#if !defined(__WXMAC__) || defined(__UNIX__)
#include <sys/types.h>
@ -41,6 +47,8 @@
typedef long off_t;
#endif
#endif
#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
//
// VisualAge C++ V4.0 cannot have any external linkage const decs

View File

@ -40,7 +40,9 @@ typedef unsigned long wxLogLevel;
#if wxUSE_LOG
#ifndef __WXWINCE__
#include <time.h> // for time_t
#endif
#include "wx/dynarray.h"