Mailing List Archive

python/dist/src configure,1.339,1.340 configure.in,1.350,1.351
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv29982

Modified Files:
configure configure.in
Log Message:
Disable LFS if Solaris/gcc bug is detected. Fixes #618095.


Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.339
retrieving revision 1.340
diff -C2 -d -r1.339 -r1.340
*** configure 4 Oct 2002 07:21:21 -0000 1.339
--- configure 4 Oct 2002 10:21:59 -0000 1.340
***************
*** 1,4 ****
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
--- 1,4 ----
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
***************
*** 4424,4427 ****
--- 4424,4485 ----
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
+ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
+ echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
+
+ #define _LARGEFILE_SOURCE 1
+ #define _FILE_OFFSET_BITS 64
+ #include <sys/resource.h>
+
+ #ifdef F77_DUMMY_MAIN
+ # ifdef __cplusplus
+ extern "C"
+ # endif
+ int F77_DUMMY_MAIN() { return 1; }
+ #endif
+ int
+ main ()
+ {
+ struct rlimit foo;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ sol_lfs_bug=no
+ else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ sol_lfs_bug=yes
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
+ echo "${ECHO_T}$sol_lfs_bug" >&6
+ 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
***************
*** 4436,4439 ****
--- 4494,4498 ----
_ACEOF

+ fi

# Add some code to confdefs.h so that the test for off_t works on SCO

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.350
retrieving revision 1.351
diff -C2 -d -r1.350 -r1.351
*** configure.in 4 Oct 2002 07:21:24 -0000 1.350
--- configure.in 4 Oct 2002 10:22:02 -0000 1.351
***************
*** 655,658 ****
--- 655,678 ----
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
***************
*** 661,664 ****
--- 681,685 ----
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