|go text: || - index - problems - systems - libraries - converting - programming - old library - [ new library ] - links -
||topics: || - dual export - largefiles win32 - compat32 calls - compat32 library - long32 dualmode -

New Library Design

As you have seen in the pages on the old compatible library design you have to provide for quite a long series of ifdefs and precompile-designs in combination with configure checks to detect the 64on32 case and emit the LFS-precompilerr symbol -D_FILE_OFFSET_BITS=64 to do the right thing. For a new library design you can drop quite a number of the ifdef series - however you still need to provide two implementations. The main difference to the classic dualmode approach is that both implementations are exposed in headers on all platforms - 64on32 or not - which makes maintanance somewhat easier.

Just like the oldlibs section the following pages will provide you with template code that you can take over to your application. In many cases they are similar to the dualmode approach as far as the real C code goes - but the ifdef fuzz is different.