Paul Eggert schrieb:
I don't think we should worry about supporting mixed 32- and 64-bit
off_t. All sane programs will use plain 64-bit off_t on modern
platforms. Libraries should be built in 64-bit mode as well. If you
really need a 32-bit off_t library for some strange reason, build it
separately; that's easy to do.
People who want to spend time building libraries that support both 32-
and 64-bit off_t simultaneously are obviously free to do so, but I
wouldn't make Autoconf any more complicated than it already is to help
them maintain their chimeras.
The problem is in call-mismatch: the library is compiled as 64bit off_t
which makes a call like "lseek (int,off_t,int)" to be actually an
"lseek (int,off64_t,int)". When an application is compiled without the
largefile-macro, it will be including the header files however as 32bit
off_t, ie. the callframe is build as "lseek (int,off32_t,int)". That's
a callframe mismatch between the shared library and user application.
A library maker should therefore put in efforts to defend itself from
these problems - detecting a LARGEFILE_SENSITIVE system is therefore
desperatly needed. If it makes any sense to support dualmode chimeras,
well, that's verrry questionable indeed, I just wanted to show that
it is possible as soon as one detects a LARGEFILE_SENSITIVE system ;-)
thanks, and have fun, guido http://ac-archive.sf.net