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) 2003-12-20 Guido U. Draheim |
Step 3: converting to longlong seek valuesIf your library exports seek values or file descriptors then you need to care about the shapeshift semantics on 64on32 systems like linux/solaris. The easiest to get away with them is twofold: compile as largefile: your library will use file descriptors
internally that can get beyond 2 GiB. Be sure to check function
calls (esp. seeks) for errors of type export longlong: do not use off_t in your header files since
that typedef is subject to shapeshifting on 64on32
systems. Instead use wrap it: using these techniques above, ensure that all real work on a file descriptor is done right within your library. You may need to export a bunch of extra mylib_seek and my_tell functions that use a mylib_off_t as arguments/returntypes which are really 64bit wide even on 64on32 systems with a largefile kernel. Those wrappers are generally written quick and easy and they ensure that no problems come up with third party software to chew on your file descriptors directly. |