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) 2002-01-13 Guido U. Draheim |
The C libraryThe Unix98 specs require that largefile must be supported and in consequence the C library should export 64bit-off_t calls as well. However, older software has been compiled with a 32bit-off_t and therefore library makers can not simply change the API-calls as it would result in a callframe-mismatch. That's been the reason for specifying the 64on32 extensions to the C library. This transitional API will make a sister symbol available for each call that would be affected by a change from 32bit-off_t into the 64bit-off_t - they follow a common naming scheme as that the original posix-name is used and a "64" appended. The glibc-2.2 does export all the relevant sister symbols (actually, since 2.1.3). - There are: "creat64", "open64", "ftw64", "nftw64", "fgetpos64", "fopen64", "freopen64", "fseeko64", "fsetpos64", "ftello64", "tmpfile64", "mmap64", "fstat64", "lstat64", "stat64", "statvfs64", "fstatvfs64", "lockf64", "lseek64", "ftruncate64", "truncate64", "aio_read64", "aio_write64", "lio_listio64", "aio_erro64", "aio_return64", "aio_cancel64", "aio_suspend64";
Any software is free to use these API calls directly. The header
files of the C library do export also sister typedefs that are
relevant for the transitional API calls - most prominently you
will find
While the transitional API is part of typedef off64_t off_t; and furthermore all the various API-calls are remapped to their 64-bit sister-calls from the transitional 64on32 - while the sourcecode of an application might read "open()" or "lseek()" the binary code will in fact be linked to C library symbols calls "open64()" and "lseek64()". This scheme of 64on32 support is called "largefile sensitive" headers - depending on compile-defines they will change the off_t mode and make a program get linked to different symbols. #define fopen fopen64 #define lseek lseek64 |