|go text: || - index - problems - systems - [ libraries ] - converting - programming - old library - new library - links -
||topics: || - libc ..(3264) - zlib ..(-32-) - [ gtk2 ..(-64-) ] - GTK+ 2 Library

The GLIB 2 / GTK+ 2 Libraries

The GLIB and GTK+2 Libraries are compiled as a largefile variants - that's due to the usage of the autoconf macro "AC_SYS_LARGEFILE" embedded into the configure.ac script. The library does also show how to make it right. Even that GTK offers some file access exports, they do not use the system off_t typedef, nor do they make use of one derived from it.

Instead, you will find a call as io_seek in giochannel.h that does not use an off_t but "gint64" directly - in other words, the offset will always be 64bit no matter which platform the library has been compiled on. That does even include platforms that use 32bit offsets internally for their files - e.g. most win32 platforms.

    GIOError  g_io_channel_seek     (GIOChannel    *channel,
                                     gint64         offset, 
                                     GSeekType      type);

That's actually the best way to circumvent the problems of a shapeshifting off_t type - to just not export it in header files even that they make up a functionaly close to the system's "seek" call. Most programmers however will think of off_t as being a constant type, and just start using it - it does creep into places some of the time, see the history log about the kde3 having a code point in that respect.

Other than problems of filedescriptor-inheritance, the use of a 64bit-off_t compiled gtk library should be just fine.