summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-06 18:52:29 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-06 18:52:29 (GMT)
commit00f0f6ef0319e338730baaee4773689064061709 (patch)
tree8911349e77b62cf5880b99a6cc0a243229b2bd0c
parent3c9fe0cce30748688d310fe92a7bf7db2293c380 (diff)
downloadcpython-00f0f6ef0319e338730baaee4773689064061709.zip
cpython-00f0f6ef0319e338730baaee4773689064061709.tar.gz
cpython-00f0f6ef0319e338730baaee4773689064061709.tar.bz2
Changes for long file support by Steve Clift.
(Slightly modified to isolate the test for various funcs more.)
-rw-r--r--configure.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index ab38bcf..d73c11b 100644
--- a/configure.in
+++ b/configure.in
@@ -297,6 +297,33 @@ if test $have_long_long = yes ; then
AC_CHECK_SIZEOF(long long)
fi
+# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
+AC_MSG_CHECKING(size of off_t)
+AC_CACHE_VAL(ac_cv_sizeof_off_t,
+[AC_TRY_RUN([#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(off_t));
+ exit(0);
+}], ac_cv_sizeof_off_t=`cat conftestval`, ac_cv_sizeof_off_t=0)
+])
+AC_MSG_RESULT($ac_cv_sizeof_off_t)
+AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t)
+
+AC_MSG_CHECKING(whether to enable large file support)
+if test $have_long_long = yes -a \
+ $ac_cv_sizeof_off_t -gt $ac_cv_sizeof_long -a \
+ $ac_cv_sizeof_long_long -ge $ac_cv_sizeof_off_t; then
+ AC_DEFINE(HAVE_LARGEFILE_SUPPORT)
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+
# Set info about shared libraries.
AC_SUBST(SO)
AC_SUBST(LDSHARED)
@@ -516,6 +543,10 @@ AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork ftime ftruncate \
select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
sigaction siginterrupt sigrelse strftime strptime symlink \
tcgetpgrp tcsetpgrp timegm times truncate uname waitpid)
+
+# check for long file support functions
+AC_CHECK_FUNCS(fseek64 fseeko fstatvfs ftell64 ftello statvfs)
+
AC_REPLACE_FUNCS(dup2 getcwd strdup strerror memmove)
AC_CHECK_FUNC(getpgrp, AC_TRY_COMPILE([#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
AC_CHECK_FUNC(setpgrp, AC_TRY_COMPILE([#include <unistd.h>], [setpgrp(0,0);], AC_DEFINE(SETPGRP_HAVE_ARG)))