Large file support

Russ Allbery rra at stanford.edu
Thu Apr 27 08:29:41 UTC 2000


I've just committed the following patch, which should add large file
support for AIX and also make the large file support somewhat more robust
and widely usable.  getconf is now only used on Solaris, Linux and IRIX
are specifically listed as platforms on which INN doesn't support large
files currently (along with AIX 4.1), and we default to using the flags
specified by the large file summit documents if we don't know about a
given platform.

I checked IRIX 6.5, and while it has a large file API, it doesn't have any
way of forcing all the standard structs and function calls to give the
large file versions, which INN currently needs since it has no way of
using stat64, etc.

Let me know if you run into any problems with this patch.  It was one of
the few things I had left to do before the 2.3 release.

--- configure.in	2000/04/07 04:14:20	1.163
+++ configure.in	2000/04/27 08:21:13	1.164
@@ -1,10 +1,12 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_REVISION($Id: configure.in,v 1.163 2000/04/07 04:14:20 rra Exp $)dnl
+dnl $Id: configure.in,v 1.164 2000/04/27 08:21:13 rra Exp $
+
+AC_REVISION($Revision: 1.164 $)dnl
 AC_PREREQ(2.13)
 
 dnl FIXME: The separable tests in this file should be broken out into
 dnl individual .m4 files and submitted back to autoconf or the general
-dnl macro repository.  autoconf 2.14 should have better support for doing
+dnl macro repository.  autoconf 2.15 should have better support for doing
 dnl this.
 
 AC_INIT(Makefile.global.in)
@@ -328,9 +330,8 @@
     fi
     ;;
 
-dnl INN doesn't use alloca(), but Boyd Gerber <gerberb at zenez.com> included
-dnl this fix in his patch to get INN compiling on UnixWare 7.1.  Left in
-dnl just in case bison needs it or INN uses alloca() down the road.
+dnl From Boyd Gerber <gerberb at zenez.com>, needed in some cases to compile
+dnl the bison-generated parser for innfeed.conf.
 *UnixWare*|*unixware*|*-sco3*)
     if test x"$GCC" != xyes ; then
         CFLAGS="$CFLAGS -Kalloca"
@@ -396,14 +397,6 @@
 dnl lynx -source; it only writes to stdout.
 AC_PATH_PROGS(GETFTP, ncftp wget, $prefix/bin/simpleftp)
 
-dnl If we're going to be configuring large file support, we'll need getconf.
-if test x"$DO_LFS" = xDO ; then
-    AC_PATH_PROG(GETCONF, getconf)
-    if test -z "$GETCONF" ; then
-      AC_MSG_ERROR(getconf not found, required to configure largefile support)
-    fi
-fi
-
 dnl Look for both compress and gzip, since the UUCP batching scripts require
 dnl both.  If we're using a log compression method other than compress or
 dnl gzip, check for it too and make sure whatever log compressor we're using
@@ -574,22 +567,46 @@
 if test x"$DO_LFS" = xDO ; then
     AC_MSG_CHECKING(for largefile linkage)
     case "$host" in
-      *hpux*)
-        # HP doesn't have the getconf flags
+    *-aix4.[01]*)
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([AIX before 4.2 does not support large files])
+        ;;
+    *-aix4*)
+        AC_MSG_RESULT(ok)
+        LFS_CFLAGS="-D_LARGE_FILES"
+        LFS_LDFLAGS=""
+        LFS_LIBS=""
+        ;;
+    *-hpux*)
+        AC_MSG_RESULT(ok)
         LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
         LFS_LDFLAGS=""
         LFS_LIBS=""
-	;;
-      *)
+        ;;
+    *-linux*|*-irix*)
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([Large files not supported on this platform])
+        ;;
+    *-solaris*)
+        AC_MSG_RESULT(ok)
+        AC_PATH_PROG(GETCONF, getconf)
+        if test -z "$GETCONF" ; then
+            AC_MSG_ERROR([getconf required to configure large file support])
+        fi
         LFS_CFLAGS=`$GETCONF LFS_CFLAGS`
         LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS`
         LFS_LIBS=`$GETCONF LFS_LIBS`
-	;;
+        ;;
+    *)
+        AC_MSG_RESULT(maybe)
+        LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+        LFS_LDFLAGS=""
+        LFS_LIBS=""
+        ;;
     esac
     AC_SUBST(LFS_CFLAGS)
     AC_SUBST(LFS_LDFLAGS)
     AC_SUBST(LFS_LIBS)
-    AC_MSG_RESULT(ok)
     AC_CHECK_FUNCS(ftello fseeko)
 fi
 
@@ -879,7 +896,6 @@
 
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
-AC_FUNC_SETVBUF_REVERSED        dnl NOTUSED
 AC_FUNC_VFORK
 AC_TYPE_SIGNAL
 
-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the inn-workers mailing list