Closed wxtrac closed 15 years ago
nostrnlen.patch
(0.8 KiB)patch for wxrtbase.h
oops..sorry for missing description!:P but it's a trivial patch.
The patch is trivial however I'm afraid it's not totally correct as according to http://msdn.microsoft.com/en-us/library/aa934514.aspx Windows Embedded CE does provide these functions -- although it's true that Windows Mobile does not.
Unfortunately we don't have a specific define for Windows Mobile so we could either use __WXHANDHELD__
(which covers it if I read wx/platform.h
correctly) or add yet another define... Does anybody have any preference or better ideas?
Yes,it's right, but from sixth edition of OS (Windows Embedded CE 6.0). According http://msdn.microsoft.com/en-us/library/aa908874.aspx in this case we have _WIN32_WCE=600
Remember these: OS # WINCE 6.0(*) -> PlatformWindows Mobile 7(**) OS # WINCE 5.2 -> PlatformWindows Mobile 6 OS # WINCE 4.2 -> PlatformWindows Mobile 2003 OS # WINCE 3.0 -> PlatformPocketPC 2000/2002 etc..
(*) released on November 1, 2006 (**) is due for release on 1 June 2010
(see http://en.wikipedia.org/wiki/Windows_Embedded_CE_6.0 http://en.wikipedia.org/wiki/Windows_Mobile )
If it wasn't clear, Windows Mobile is only a platform that uses the underlying OS named Windows CE. So, we're going to see strnlen (and wcsnlen ) function in Windows Mobile 7 (or in windows CE 6.0 devices)
Sorry if it is a useless clarification
(In [60476]) WinCE doesn't provide strnlen/wcsnlen() until version 6.0 (closes #10763)
If I understand it correctly, my fix above should hopefully fix this, please reopen if it didn't.
Thanks!
oops.... compilation fails!! So I saw that in PocketPC 2003 _WIN32_WCE = 0x420 (hex format) and not 400! 0x420=660 > 600!!
Googling I found this:
http://www.mail-archive.com/cegcc-devel@lists.sourceforge.net/msg00902.html
In practice I think that with new version of SDK they (MS) should use hex notation (http://stuff.mit.edu/afs/athena/software/qt-static/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf )
So replace 600 with 0x600!
(In [60480]) use correct Windows CE version number in strnlen() check (really closes #10763)
Sorry, I should have checked this more carefully. And thanks for testing!
Issue migrated from trac ticket # 10763
component: wxMSW-CE | priority: blocker | resolution: fixed | keywords: strnlen, wcsnlen
2009-05-02 15:24:57: alexodus (Alessandro) created the issue