]> git.saurik.com Git - wxWidgets.git/commitdiff
Various compile fixes for WinCE.
authorRobert Roebling <robert@roebling.de>
Sat, 7 Dec 2002 15:41:13 +0000 (15:41 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 7 Dec 2002 15:41:13 +0000 (15:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/buffer.h
include/wx/debug.h
include/wx/defs.h
include/wx/filefn.h
include/wx/log.h

index b913e75100b40ea1546a53f882e60bbf3cf1d3d3..17fd98fff29cd93738e50bf19e3abdb6485903dd 100644 (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
index 49a15d363b596258466c54cf3851dd8d4437631b..ba28e3ca0ceb271a6fa07a4728140693bfea48cd 100644 (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
index 5482b488488ef237c338d436ac430631e8284857..e98d4a549805b4985075b421561b4d6df4113488 100644 (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
index b6d2f0087f888719a39ffa38f2e6096515d8a984..f679c611451ed54ed4d3284e4b3ce87420cce0d2 100644 (file)
 
 #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
index a93daa1585f73db4a8b3b317a083dd720fcedb1c..f4b5163c2bd897661a4f93e65f7df4b2ff603453 100644 (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"