index -summary -history -testscript perl / python problems -with callframes -with structures -largefile seeks -broken builds systems -freeBSD/darwin -linux/solaris -64on32 mix -distro makers -win32/other (2) libraries - libc ..(3264)
- zlib ..(-32-)
- gtk2 ..(-64-)
converting -old non-off_t code -going largefile -longlong default -face dualmode -make twinlibs -and defend (it) programming -largefile default -off_t in headers -make export64 -find mismatch -the autowrappers -environ changes -best practice? old library -dualmode renames -the extra function -largefile64_source -glibc headers -libgz example *** new library -dual export -largefiles win32 -compat32 calls -compat32 library -long32 dualmode links -some quotes -sitemap / mpl -large.file Group* -ac-archive Site*
(C) 2010-03-28 Guido U. Draheim |
LibGZ Example ProjectThe LibGZ is derived from the ZZipLib library - in the latter ZIP-files can be handled like a filesystem complete with directories and (transparently compressed) files. The LibGZ library will only provide for a GZ_FILE handle that allows to transparently read gzipped files as if they were not compressed at all. This example gives you an overview how to create a library that is similar to the stdio libary while providing the same dualmode binary library. So there is really some "filelength64" / "filelength" pair of functions in the binary distribution while the example program "gzlib.c" only references "filelength". Looking into the resulting binary "gzlib.exe" shows that it does call to "filelength64" - in other words, it was pushed into the largefile64 mode. You can download the source tarball in the
ZZipLib download area
named like libgz-0.1.0.tar.gz. Using "rpm -ta"
you can easily turn this into a proper Linux RPM archive. The sources have been
prepared for the WIN32 case (any comments welcome on this part). You can have a
look at the sources directly in the SCM at ===> Copy it, Modify it, Use it in your own code! Additional notes
|