Guido Draheim | 10 Jan 12:49
Picon
Picon

libaudiofile not largefile sensitive

Through a discussion on alt.os.linux.mandrake, I had to notice
that every library has a risk of being broken when using the
system off_t type in its exported interfaces, including
structures and function synopsis.

The point comes from the fact that systems like linux and
solaris are "largefile sensitive" - a -D_LARGEFILE_SOURCE
will shift the "off_t" type from being a 32bit entity into
a 64bit entity. This will make for a nice and pretty
callframe mismatch.

Grepping a bit through header files installed on my system
it occurs to me that audiofile.h contains quite a lot of
these off_t arguments in its api calls - it can be only by
luck that no application had the misfortune to trap on one
of these, doesn't it.

A autoconf'ed lib 'centric treatment of the topic is given in:
http://article.gmane.org/gmane.comp.sysutils.autoconf.general/1893

Given the number of affected calls in this lib, it might be
the  best trick to just #error out as soon as a largefile
compile -Ddef will be seen. It's not the best thing, right.

cheers,
-- guido                                 http://ac-archive.sf.net


Gmane