[gdal-dev] Symbian Porting Issues

Mark Wilcox m_p_wilcox at yahoo.co.uk
Tue Jan 6 13:06:12 EST 2009


Thanks Frank & Even,

Following Even's comments I think I'll just leave the gzip functionality out until we get the platform zlib fixed.  I'll also ignore the img2tif stuff assuming it will disappear in a future release anyway.  A conditionally compiled lfind in gdal/port sounds ideal.  I've got a crazy schedule for the next few weeks but as soon as I get the chance I'll submit some tickets.

For the issue where zlib.h defines WIN32 I can do:
#ifdef SYMBIAN
#  undef WIN32
#endif
in the 2 or 3 places where this is an issue at present if that's what you'd prefer?  My thought was just that this doesn't actually resolve the root of the problem and it might be better to do something more central.

Symbian has a windows based emulator that actually uses windows threads to emulate Symbian processes and runs native x86 instructions.  The proper simulator environments like qemu that run ARM code in a virtual machine on an x86 processor were too slow when this was created.  A qemu-based simulator is in the works as an alternative/replacement.  Until then, we need to run emulator builds on windows and in this environment _WIN32 is defined by the compiler and may be used by some of the low-level code, this causes zlib.h to define WIN32 and the same used to happen in cpl_port.h except that I've extended the _WIN32_WCE exception to include Symbian as well:

/* ==================================================================== */
/*      We will use SYMBIAN as a standard Symbian OS define.            */
/* ==================================================================== */
#ifdef __SYMBIAN32__
#  define SYMBIAN
/* could add #undef WIN32 here to be safe */
#endif

/* ==================================================================== */
/*      We will use WIN32 as a standard windows define.                 */
/* ==================================================================== */
/* very tempting to clean this section up by doing #undef WIN32 here and merging the others */
#if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) && !defined(SYMBIAN)
#  define WIN32
#endif

#if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE) && !defined(SYMBIAN)
#  define WIN32
#endif


The only thing I'm unsure about is whether there could be a case where we legitimately want to define WIN32 and _WIN32 or _WINDOWS will not be defined?

@Even, Symbian doesn't have any kind of autotools, autoconf, cmake etc.  There's no support for configure scripts, it's all pretty manual - hence not getting appropriate build flags by default and building things that shouldn't be included on my first go. :-(   I'll definitely do all I can to get the python bindings and autotest running though as that seems like the only viable option for validating my port without writing a whole new test suite!

Best regards,
Mark


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090106/99d187bd/attachment.html


More information about the gdal-dev mailing list