[ENBD] 2GB limit on x86 hardware
Staffan.Ohman@nokia.com
Staffan.Ohman@nokia.com
Fri, 16 Mar 2001 09:57:22 +0200
> #include "confdefs.h"
> #include <assert.h>
> /* Override any gcc2 internal prototype to avoid an error. */
> /* We use char because int might match the return type of a gcc2
> builtin and then its argument prototype would still apply. */
> char lseek64();
> int main() {
> /* The GNU C library defines this for functions which it
> * implements to always fail with ENOSYS. Some
> functions are actually
> named something starting with __ and the normal name is an
> alias. */
> #if defined (__stub_lseek64) || defined (__stub___lseek64)
> choke me
> #else
> lseek64();
> #endif
> ; return 0;
> }
>
> So see how that compiles for you. Alternatively, remake the configure
> script by running autoconf.
>
Complains about not being able to find confdefs.h
If I change the first line to #include "config.h" gcc doesn't say anything.
I think, however, I've found the reason for why make config failed to
generate
the correct config.h file for me. There is already a config.cache file
present
in the tarball. If you first say make distclean (or rm nbd/config.cache) and
then make config both llseek and lseek64 are detected.
(and apparently lseek64 is used since the warning message about llseek
disappears)
I realize that only newbies like myself fail to see that right away,
but perhaps the person who creates the tarballs could
rip out the config.cache file before putting it on the ftp server :)
-Staffan