-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Subject was "Re: [openZIM dev-l] Suggested Budget for 2010"
Your new implementation which should help to avoid the 2GB limit under
windows works well on GNU/Linux. Unfortunately, on Windows with MSVC
this is not the case.
Few things to modify to achieve to compile:
* remove the #include <unistd.h> which is a POSIX specific header... and
seems not to be necessary under GNU/Linux.
* include io.h in fstream.[h|cpp]
After that it will achieve to compile... But unfortunately it does not
run *at all*. I always get reading errors. The errors are not always at
the same place, depends on file I try to open.
For example with the following file, the process dies pretty early by
reading the header:
http://tmp.kiwix.org/zim/0.9/wikipedia_en_wp1_0.7_30000+_05_2009_beta3.zim
After reading the 72 first bytes from the header, the stream has the
fail flag... In fact, if I only read 16 bytes it's OK (until the next
read error), but more than 17 and I will get an error. The byte at the
16th position has the value 26 which is maybe interpreted as a end of
file character.
But with an other file... the error may occurs later.
So, it seems to me that the problem depends on the content and is
independent of the file size. Maybe the file is read in text mode and
not in binary mode... but I have no evidence of that.
Someone has an idea?
Emmanuel
Tommi Mäkitalo a écrit :
Great news! So lets go on doing something useful for
that money;-)
I'm back from my vacation and already checked in the first of what I've done. I
was offline but had my netbook with me.
I successfully replaced the std::ifstream with my own implentation. So for the
windows porters there should be one a single system call left to #ifdef with
some win32-specific call. In zimlib/src/fstream.cpp there is a call to lseek64.
Tommi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEUEARECAAYFAku8+xQACgkQn3IpJRpNWtOfowCfRNxdSC9ogfRcWSA+Z58pgYSQ
yuwAmPIBmNqDcsa5fOdxHFdE6mjJ404=
=qDjl
-----END PGP SIGNATURE-----