]> git.saurik.com Git - wxWidgets.git/commitdiff
PalmOS compilation fixes (wx-trunk-out.diff part of patch 1894861)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Mar 2008 00:43:06 +0000 (00:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Mar 2008 00:43:06 +0000 (00:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

19 files changed:
include/wx/bmpbuttn.h
include/wx/buffer.h
include/wx/choice.h
include/wx/datetime.h
include/wx/debug.h
include/wx/dirdlg.h
include/wx/filectrl.h
include/wx/filefn.h
include/wx/imaglist.h
include/wx/log.h
include/wx/strconv.h
include/wx/string.h
include/wx/textctrl.h
include/wx/wxcrtbase.h
src/common/appbase.cpp
src/common/file.cpp
src/common/log.cpp
src/common/stopwatch.cpp
src/common/utilscmn.cpp

index 990f3f3842f60511a699fb10a01e0d82a2516777..27edd94fd06d1a991aae5742cc89b5164b8cce4c 100644 (file)
@@ -115,6 +115,8 @@ inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap)
     #include "wx/cocoa/bmpbuttn.h"
 #elif defined(__WXPM__)
     #include "wx/os2/bmpbuttn.h"
+#elif defined(__WXPALMOS__)
+    #include "wx/palmos/bmpbuttn.h"
 #endif
 
 #endif // wxUSE_BMPBUTTON
index d06fbf6fc15b57a76d726521cd9f4295621bd111..346ef113f9b6bb78d4f9f0e653d765e54810c773 100644 (file)
@@ -15,7 +15,9 @@
 #include "wx/chartype.h"
 #include "wx/wxcrtbase.h"
 
+#ifndef __WXPALMOS5__
 #include <stdlib.h>             // malloc() and free()
+#endif // ! __WXPALMOS5__
 
 class WXDLLIMPEXP_FWD_BASE wxCStrData;
 
index 69cab9702eaaefe0fffac2dc91a73d5eed1b1096..3127b083a5a6002804db0cfcf5e67b5f8b5542bb 100644 (file)
@@ -84,6 +84,8 @@ private:
     #include "wx/cocoa/choice.h"
 #elif defined(__WXPM__)
     #include "wx/os2/choice.h"
+#elif defined(__WXPALMOS__)
+    #include "wx/palmos/choice.h"
 #endif
 
 #endif // wxUSE_CHOICE
index a18dad3cc50bd641abc28a9ede508960b2a576c1..7677de54eda156e8cfb33cfe2d53144aa8829ad9 100644 (file)
 
 #if wxUSE_DATETIME
 
-#ifndef __WXWINCE__
-#include <time.h>
-#else
-#include "wx/msw/wince/time.h"
-#endif
+#ifdef __WXWINCE__
+    #include "wx/msw/wince/time.h"
+#elif !defined(__WXPALMOS5__)
+    #include <time.h>
+#endif // OS
 
 #include <limits.h>             // for INT_MIN
 
index 936755e71bd02fd2054b891455c80b189011e9a4..4d678a777004f047299293c377c1c79d3245b19f 100644 (file)
 #ifndef   _WX_DEBUG_H_
 #define   _WX_DEBUG_H_
 
+#ifndef __WXPALMOS5__
 #ifndef __WXWINCE__
 #include  <assert.h>
 #endif
+#endif // ! __WXPALMOS5__
 #include  <limits.h>            /*  for CHAR_BIT used below */
 
 #include  "wx/chartype.h"     /*  for __TFILE__ and wxChar */
index d54eb6ff8e342145e6405dce7656063838320b30..4258accb07b16ed8d54112168e32b5faa95cfb8a 100644 (file)
@@ -118,6 +118,7 @@ protected:
       defined(__WXX11__)   || \
       defined(__WXMGL__)   || \
       defined(__WXCOCOA__) || \
+      defined(__WXPALMOS__) || \
       defined(__WXPM__)
     #include "wx/generic/dirdlgg.h"     // Other ports use generic implementation
     #define wxDirDialog wxGenericDirDialog
index f8320f9aaffcbb8a36f1cb634b6ee7e4e4c36204..ad22cebdcfe5a156f0197a28155700de1ae39320 100644 (file)
@@ -29,7 +29,7 @@ enum
 };
 
 #define wxFC_DEFAULT_STYLE wxFC_OPEN
-extern WXDLLEXPORT_DATA( const wxChar ) wxFileCtrlNameStr[];
+extern WXDLLEXPORT_DATA( const wxChar ) wxFileCtrlNameStr[]; // in filectrlcmn.cpp
 
 extern WXDLLIMPEXP_CORE const wxEventType wxEVT_FILECTRL_SELECTIONCHANGED;
 extern WXDLLIMPEXP_CORE const wxEventType wxEVT_FILECTRL_FILEACTIVATED;
index a44970676f41ddb21b413fd331b614ff3ec982df..3c69ff07588414053fac8844aa2388f4d254f4bb 100644 (file)
@@ -385,6 +385,43 @@ enum wxFileKind
 
     // it's a private define, undefine it so that nobody gets tempted to use it
     #undef wxHAS_HUGE_FILES
+#elif defined (__WXPALMOS__)
+    typedef off_t wxFileOffset;
+#ifdef _LARGE_FILES
+    #define wxFileOffsetFmtSpec wxLongLongFmtSpec
+    wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t), BadFileSizeType );
+    // wxFile is present and supports large files
+    #ifdef wxUSE_FILE
+        #define wxHAS_LARGE_FILES
+    #endif
+    // wxFFile is present and supports large files
+    #if SIZEOF_LONG == 8 || defined HAVE_FSEEKO
+        #define wxHAS_LARGE_FFILES
+    #endif
+#else
+    #define wxFileOffsetFmtSpec _T("")
+#endif
+    #define   wxClose      close
+    #define   wxRead       ::read
+    #define   wxWrite      ::write
+    #define   wxLseek      lseek
+    #define   wxSeek       lseek
+    #define   wxFsync      fsync
+    #define   wxEof        eof
+
+    #define   wxCRT_MkDir      mkdir
+    #define   wxCRT_RmDir      rmdir
+
+    #define   wxTell(fd)   lseek(fd, 0, SEEK_CUR)
+
+    #define   wxStructStat struct stat
+
+    #define   wxCRT_Open       open
+    #define   wxCRT_Stat       svfs_stat
+    #define   wxCRT_Lstat      lstat
+    #define   wxCRT_Access     access
+
+    #define wxHAS_NATIVE_LSTAT
 #else // Unix or Windows using unknown compiler, assume POSIX supported
     typedef off_t wxFileOffset;
     #ifdef _LARGE_FILES
index f4468e216f9ca75abd133df219c19f4306059fbd..2779e3f1e598daa23351c68219cff19989677915 100644 (file)
@@ -40,7 +40,7 @@ enum
 #define wxIMAGELIST_DRAW_SELECTED       0x0004
 #define wxIMAGELIST_DRAW_FOCUSED        0x0008
 
-#if defined(__WXMSW__) || defined(__WXMAC__)
+#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXPALMOS__)
     #define wxHAS_NATIVE_IMAGELIST
 #endif
 
@@ -50,6 +50,8 @@ enum
     #include "wx/msw/imaglist.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/imaglist.h"
+#elif defined(__WXPALMOS__)
+    #include "wx/palmos/imaglist.h"
 #endif
 
 #endif // _WX_IMAGLIST_H_BASE_
index a4d800e62342da52523abad8ac21f70f957d5cbb..4d9523604271ef8422f6d77a1c594350411e4b3e 100644 (file)
@@ -55,9 +55,11 @@ typedef unsigned long wxLogLevel;
 
 #include "wx/arrstr.h"
 
+#ifndef __WXPALMOS5__
 #ifndef __WXWINCE__
     #include <time.h>   // for time_t
 #endif
+#endif // ! __WXPALMOS5__
 
 #include "wx/dynarray.h"
 
index 96dc8d8a70b1511ab7b1dee9a78f43f94f55f139..e78282f92210316280ca713bea19d037930d385b 100644 (file)
@@ -25,7 +25,9 @@
 #  undef __BSEXCPT__
 #endif
 
+#ifndef __WXPALMOS5__
 #include <stdlib.h>
+#endif // ! __WXPALMOS5__
 
 #if wxUSE_WCHAR_T
 
index deecb1795bf7193f172beb2f33bd1c772fd657c6..f3afbd34fff8e74b19858fb3c80e6f0022c171e2 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "wx/defs.h"        // everybody should include this
 
+#ifndef __WXPALMOS5__
 #if defined(__WXMAC__) || defined(__VISAGECPP__)
     #include <ctype.h>
 #endif
 #ifdef HAVE_STRCASECMP_IN_STRINGS_H
     #include <strings.h>    // for strcasecmp()
 #endif // HAVE_STRCASECMP_IN_STRINGS_H
-
-#ifdef __WXPALMOS__
-    #include <StringMgr.h>
-#endif
+#endif // ! __WXPALMOS5__
 
 #include "wx/wxcrtbase.h"   // for wxChar, wxStrlen() etc.
 #include "wx/strvararg.h"
index f0e93fc0dba916ab096f8be59a211284672446b3..b86137bc117197d18d91a61e6b995421e61ac1cc 100644 (file)
@@ -697,6 +697,8 @@ protected:
     #include "wx/cocoa/textctrl.h"
 #elif defined(__WXPM__)
     #include "wx/os2/textctrl.h"
+#elif defined(__WXPALMOS__)
+    #include "wx/palmos/textctrl.h"
 #endif
 
 // ----------------------------------------------------------------------------
index f69584b83680cf151d6e87ffd78dd2f8ce1abfbe..a48756a4314b62692380287b2b594a845fcf96e4 100644 (file)
@@ -594,8 +594,10 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name);
    ------------------------------------------------------------------------- */
 
 #define wxCRT_StrftimeA  strftime
+#ifndef __WXPALMOS__
 /* FIXME-UTF8: when is this available? */
 #define wxCRT_StrftimeW  wcsftime
+#endif /* ! __WXPALMOS__ */
 
 #ifndef wxCRT_StrftimeW
 WXDLLIMPEXP_BASE size_t wxCRT_StrftimeW(wchar_t *s, size_t max,
index e7eec2c75ef10f5ccf1ed5dedcc8f65b221d8a6f..857b15782262b7d88151830fdf75b248331fc39d 100644 (file)
     #include <typeinfo>
 #endif
 
+#ifndef __WXPALMOS5__
 #if !defined(__WXMSW__) || defined(__WXMICROWIN__)
   #include  <signal.h>      // for SIGTRAP used by wxTrap()
 #endif  //Win/Unix
 
 #include <locale.h>
+#endif // ! __WXPALMOS5__
 
 #if wxUSE_FONTMAP
     #include "wx/fontmap.h"
index abcf92a78c7956ca8fbb217f5da744de638341a2..a6d96d6a8ed45e6625c4a0ce17bfd46a3850033b 100644 (file)
@@ -80,6 +80,8 @@
     char* mktemp( char * path ) { return path ;}
     #include <stat.h>
     #include <unistd.h>
+#elif defined(__WXPALMOS__)
+    #include "wx/palmos/missing.h"
 #else
     #error  "Please specify the header with file functions declarations."
 #endif  //Win/UNIX
index 262477de4003838aa9cd3995f574f28f6dd39816..ddb361a2547b2cc3253bfc15ea17033f727ee32b 100644 (file)
 
 #include <stdlib.h>
 
+#ifndef __WXPALMOS5__
 #ifndef __WXWINCE__
 #include <time.h>
 #else
 #include "wx/msw/wince/time.h"
 #endif
+#endif /* ! __WXPALMOS5__ */
 
 #if defined(__WINDOWS__)
     #include "wx/msw/private.h" // includes windows.h
index 5a3776da285e13659f9c1e5135a3b472eb0ee652..22ecaadecdf2ddd3f4cf8a35d1137b3e4aa7e0d8 100644 (file)
 #   undef HAVE_GETTIMEOFDAY
 #endif
 
+#ifndef __WXPALMOS5__
 #ifndef __WXWINCE__
 #include <time.h>
 #else
 #include "wx/msw/private.h"
 #include "wx/msw/wince/time.h"
 #endif
+#endif // __WXPALMOS5__
+
 
 #if !defined(__WXMAC__) && !defined(__WXWINCE__)
     #include <sys/types.h>      // for time_t
index e656559ad26e5f2bef1224894a959c6a4c764827..c3b7898538ff7c11a7f5685f1c1787e4d1932e14 100644 (file)
     #include "wx/statusbr.h"
 #endif // wxUSE_GUI
 
+#ifndef __WXPALMOS5__
 #ifndef __WXWINCE__
 #include <time.h>
 #else
 #include "wx/msw/wince/time.h"
 #endif
+#endif // ! __WXPALMOS5__
 
 #ifdef __WXMAC__
 #include "wx/mac/private.h"
 #endif
 #endif
 
+#ifndef __WXPALMOS5__
 #if !defined(__MWERKS__) && !defined(__WXWINCE__)
     #include <sys/types.h>
     #include <sys/stat.h>
 #endif
+#endif // ! __WXPALMOS5__
 
 #if defined(__WXMSW__)
     #include "wx/msw/private.h"