diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-10-04 10:22:02 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-10-04 10:22:02 (GMT) |
commit | 399a6890f5726b83f25fb3b0758dbb79770a1c91 (patch) | |
tree | 6f8d2195c3cb9375d56c8bf203043badc29d8136 /configure.in | |
parent | c7cdd7182aadcbb242ce61e5515cc91964806da4 (diff) | |
download | cpython-399a6890f5726b83f25fb3b0758dbb79770a1c91.zip cpython-399a6890f5726b83f25fb3b0758dbb79770a1c91.tar.gz cpython-399a6890f5726b83f25fb3b0758dbb79770a1c91.tar.bz2 |
Disable LFS if Solaris/gcc bug is detected. Fixes #618095.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.in b/configure.in index fef6e22..aef3c06 100644 --- a/configure.in +++ b/configure.in @@ -654,12 +654,33 @@ if test "$ac_cv_has_makedev" = "yes"; then AC_DEFINE(HAVE_MAKEDEV, 1, [Define this if you have the makedev macro.]) fi +# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in +# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are +# defined, but the compiler does not support pragma redefine_extname, +# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit +# structures (such as rlimit64) without declaring them. As a +# work-around, disable LFS on such configurations + +use_lfs=yes +AC_MSG_CHECKING(Solaris LFS bug) +AC_TRY_COMPILE([ +#define _LARGEFILE_SOURCE 1 +#define _FILE_OFFSET_BITS 64 +#include <sys/resource.h> +],struct rlimit foo;,sol_lfs_bug=no,sol_lfs_bug=yes) +AC_MSG_RESULT($sol_lfs_bug) +if test "$sol_lfs_bug" = "yes"; then + use_lfs=no +fi + +if test "$use_lfs" = "yes"; then # Two defines needed to enable largefile support on various platforms # These may affect some typedefs AC_DEFINE(_LARGEFILE_SOURCE, 1, [This must be defined on some systems to enable large file support.]) AC_DEFINE(_FILE_OFFSET_BITS, 64, [This must be set to 64 on some systems to enable large file support.]) +fi # Add some code to confdefs.h so that the test for off_t works on SCO cat >> confdefs.h <<\EOF |