Hi Tommi,

Thank you for applying the patch. I have tried, and noticed the following problems:
1. uuid does not compile due to new _WIN32 define.
2. Error that getpid() is not defined in uuid. This is why unistd.h has to be included. I'd expect that this is not specific to symbian, but that the problems occurs if cxxtools are disabled,
        which is the case for symbian builds.
In difference to the first patch I moved it to the else branch of the _WIN32 clause, as it probably is not available on windows. (getpid is defined to some other function on windows).
3. content bld.inf and zimlib.mmp is appearantly doubled up.

Attached a patch which fixes these problems.
The patch additionally removes bzip2 dependency.

Could you apply the patch?

Best regards,
Christian

Am 24.03.2010 00:20, schrieb Tommi Mäkitalo:
Hi Christian,

after some changes in zimlib I decided to apply your patch. Unfortunately
there are some problems.

I changed zim.h not to query _WIN32, so there is no need to undef it there.
Can you check, if it needs to be undefined elsewhere? It is checked in
src/uuid.cpp. Is it a problem? Maybe we need to undefine it there?

What about unistd.h? Why it is needed it uuid.cpp?

I added the other files into the repository.

Tommi
_______________________________________________
dev-l mailing list
[email protected]
https://intern.openzim.org/mailman/listinfo/dev-l


### Eclipse Workspace Patch 1.0
#P zimlib
Index: symbian/config.h
===================================================================
--- symbian/config.h    (revision 307)
+++ symbian/config.h    (working copy)
@@ -8,7 +8,7 @@
 #define DIRENT_CACHE_SIZE 512
 
 /* defined if bzip2 compression is enabled */
-  #define ENABLE_BZIP2 1
+/* #undef ENABLE_BZIP2 */
 
 /* defined if lzma compression is enabled */
  #define ENABLE_LZMA 1
Index: group/zimlib.mmp
===================================================================
--- group/zimlib.mmp    (revision 307)
+++ group/zimlib.mmp    (working copy)
@@ -32,41 +32,4 @@
 OPTION CW -wchar_t on
 
 SOURCEPATH      ..\src
-SOURCE          article.cpp articlesearch.cpp bunzip2stream.cpp bzip2.cpp 
bzip2stream.cpp cluster.cpp deflatestream.cpp dirent.cpp envvalue.cpp file.cpp 
fileheader.cpp fileimpl.cpp indexarticle.cpp inflatestream.cpp ptrstream.cpp 
search.cpp template.cpp unicode.cpp uuid.cpp zintstream.cpp lzmastream.cpp 
unlzmastream.cpp
-
-/*
-============================================================================
- Name        : zimlib.mmp
- Author      : 
- Copyright   : Your copyright notice
- Description : This is the project specification file for zimlib.
-============================================================================
-Notes:
-       1. see bld.inf files for exported includes      
-       2. symbian/config.h generated with cygwin on windows, manually adapted.
-          Changed clustercache from 16 to 1. Else out of memory fails 
(unfortunately just silently 
-          closes the application both on emu and on device). Probably 
increasing heap would help 
-          as well (Note, that anyway larger than default heap and stack sizes 
have to be defined in projects
-          using zimlib), but anyway large cluster cache questionable. 
(clusters are very large,
-          and probably not that frequently accessed more than once)
-*/
-
-TARGET          zimlib.lib
-TARGETTYPE      LIB
-UID        0
-
-USERINCLUDE     ..\include ..\symbian
-
-SYSTEMINCLUDE   \epoc32\include\stdapis
-SYSTEMINCLUDE   \epoc32\include\stdapis\sys
-SYSTEMINCLUDE   \epoc32\include\stdapis\stlport 
-
-SYSTEMINCLUDE   \epoc32\include
-
-EXPORTUNFROZEN
-
-OPTION CW -wchar_t on
-
-SOURCEPATH      ..\src
-SOURCE          article.cpp articlesearch.cpp bunzip2stream.cpp bzip2.cpp 
bzip2stream.cpp cluster.cpp deflatestream.cpp dirent.cpp envvalue.cpp file.cpp 
fileheader.cpp fileimpl.cpp indexarticle.cpp inflatestream.cpp ptrstream.cpp 
search.cpp template.cpp unicode.cpp uuid.cpp zintstream.cpp lzmastream.cpp 
unlzmastream.cpp
-
+SOURCE          article.cpp articlesearch.cpp cluster.cpp deflatestream.cpp 
dirent.cpp envvalue.cpp file.cpp fileheader.cpp fileimpl.cpp indexarticle.cpp 
inflatestream.cpp ptrstream.cpp search.cpp template.cpp unicode.cpp uuid.cpp 
zintstream.cpp lzmastream.cpp unlzmastream.cpp
Index: src/uuid.cpp
===================================================================
--- src/uuid.cpp        (revision 307)
+++ src/uuid.cpp        (working copy)
@@ -1,4 +1,4 @@
-/*
+/*     
  * Copyright (C) 2009 Tommi Maekitalo
  *
  * This program is free software; you can redistribute it and/or
@@ -26,6 +26,10 @@
 #include <cxxtools/md5stream.h>
 #endif
 
+// Symbian compiler defines _WIN32 in builds for emulator.
+#ifdef __SYMBIAN32__
+   #undef _WIN32
+#endif
 #ifdef _WIN32
 
 #  include <time.h>
@@ -41,6 +45,7 @@
 #define getpid GetCurrentProcessId
 
 #else
+#  include <unistd.h>
 #  include <sys/time.h>
 #endif
 
Index: group/bld.inf
===================================================================
--- group/bld.inf       (revision 307)
+++ group/bld.inf       (working copy)
@@ -15,9 +15,6 @@
 ../include/zim/article.h zim/article.h
 ../include/zim/articlesearch.h zim/articlesearch.h
 ../include/zim/blob.h  zim/blob.h
-../include/zim/bunzip2stream.h  zim/bunzip2stream.h
-../include/zim/bzip2.h  zim/bzip2.h
-../include/zim/bzip2stream.h  zim/bzip2stream.h
 ../include/zim/cache.h  zim/cache.h
 ../include/zim/cluster.h  zim/cluster.h
 ../include/zim/deflatestream.h  zim/deflatestream.h
@@ -41,46 +38,3 @@
 ../include/zim/uuid.h zim/uuid.h
 ../include/zim/zim.h zim/zim.h
 ../include/zim/zintstream.h zim/zintstream.h
-/*
-============================================================================
- Name        : bld.inf
- Author      : 
- Copyright   : Your copyright notice
- Description : This file provides the information required for building the
-               whole of a openctst.
-============================================================================
-*/
-
-PRJ_MMPFILES
-zimlib.mmp
-
-PRJ_EXPORTS
-../include/zim/article.h zim/article.h
-../include/zim/articlesearch.h zim/articlesearch.h
-../include/zim/blob.h  zim/blob.h
-../include/zim/bunzip2stream.h  zim/bunzip2stream.h
-../include/zim/bzip2.h  zim/bzip2.h
-../include/zim/bzip2stream.h  zim/bzip2stream.h
-../include/zim/cache.h  zim/cache.h
-../include/zim/cluster.h  zim/cluster.h
-../include/zim/deflatestream.h  zim/deflatestream.h
-../include/zim/dirent.h  zim/dirent.h
-../include/zim/endian.h  zim/endian.h
-../include/zim/error.h zim/error.h
-../include/zim/file.h zim/file.h
-../include/zim/fileheader.h zim/fileheader.h
-../include/zim/fileimpl.h zim/fileimpl.h
-../include/zim/fileiterator.h zim/fileiterator.h
-../include/zim/indexarticle.h zim/indexarticle.h
-../include/zim/inflatestream.h zim/inflatestream.h
-../include/zim/lzmastream.h zim/lzmastream.h
-../include/zim/noncopyable.h zim/noncopyable.h
-../include/zim/refcounted.h zim/refcounted.h
-../include/zim/search.h zim/search.h
-../include/zim/smartptr.h zim/smartptr.h
-../include/zim/template.h zim/template.h
-../include/zim/unicode.h zim/unicode.h
-../include/zim/unlzmastream.h zim/unlzmastream.h
-../include/zim/uuid.h zim/uuid.h
-../include/zim/zim.h zim/zim.h
-../include/zim/zintstream.h zim/zintstream.h
_______________________________________________
dev-l mailing list
[email protected]
https://intern.openzim.org/mailman/listinfo/dev-l

Reply via email to