./configure and large file support

Russ Allbery rra at stanford.edu
Wed Jan 5 23:51:40 UTC 2005


Heath Kehoe <hakehoe at avalon.net> writes:
> On Dec 19, 2004, at 16:04, Russ Allbery wrote:

>> glibc's handling of fseeko and ftello is just one of the most annoying
>> things ever.  Okay, configure now probes separately to see if they are
>> declared, and declares them if not.

> This change breaks the build under HP/UX.  The check for declarations 
> of fseeko/ftello fails, because configure does not use the largefile 
> defines when it does its little compilation test.

Er, why not?  It should be.

> My quickie solution is to wrap the declarations in clibrary.h with
> #ifndef _HPUX_SOURCE

I'd rather try to figure out why configure isn't building its probes with
the large file defines it's already figured out.  I thought that configure
probes were supposed to include the defines that had been built so far
when doing probes, and the code in configure seems to support that.

Note this bit in the configure code after probing _FILE_OFFSET_BITS:

cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF

and then when probing for fseeko:

  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
#ifndef fseeko
  char *p = (char *) fseeko;
#endif

  ;
  return 0;
}
_ACEOF

Hm.  Maybe we have to use AC_FUNC_FSEEKO instead?  It also defines
_LARGEFILE_SOURCE, which otherwise isn't necessary.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list