|go text: || - index - problems - systems - libraries - converting - [ programming ] - old library - new library - links -
||topics: || - largefile default - off_t in headers - make export64 - find mismatch - the autowrappers - environ changes - best practice? - Programming

Programming

Programming Support has a number of hints ..... how to enable the largefile support on systems that do not do so by default ..... a recommended style on the usage of off_t in headers when that seems to be needed ..... how to make up dualmode libraries in 64on32 ..... and finding mismatches in the software setup when everythings done.

 

 

And these are preprocessor defines that your system will look for:

-D_LARGEFILE_SOURCE
Make extra symbols visible as defined after the large file summit (LFS). These are "off_t", "fseeko", "ftello", the errno "EOVERFLOW" and the open-flag "O_LARGEFILE". The unix98 systems will export these by default.
-D_LARGEFILE64_SOURCE
Make the 64bit-modified symbols visible when on a 64on32 system. It allows to use "off64_t" variables with "fseeko64". An "fopen64" will wrap an "fopen" with an added mode-flag "O_LARGEFILE".
-D_FILE_OFFSET_BITS=64
On a 64on32 system, make a `typedef off64_t off_t`, and implant redefines so that any source using "fseek" will fact link with an api-call "fseek64". The typeshifting magic.

 

to use 64bit largefile on 64on32 systems, use
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE