Mercurial > hg > xemacs-beta
comparison configure @ 5727:86d33ddc7fd6
Avoid EOVERFLOW from stat() calls due to overflowing inode numbers.
The btrfs filesystem now uses 64-bit inode numbers even on 32-bit systems.
This can lead to spurious stat() failures, where EOVERFLOW is returned because
the inode number does not fit into the 32-bit stat structure, even when the
caller is not interested in the inode number. This patch builds with
_FILE_OFFSET_BITS == 64 when possible, and deals with integers that may be
too large to fit into a Lisp fixnum. For more information, see xemacs-patches
message <CAHCOHQk_mPM6WgFChBsGafqhuazep6VED7swFoqfFXOV1r8org@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Wed, 06 Mar 2013 08:32:17 -0700 |
parents | 1af0602ff9a2 |
children | 3192994c49ca |
comparison
equal
deleted
inserted
replaced
5726:179f4a9201b5 | 5727:86d33ddc7fd6 |
---|---|
1047 with_quantify | 1047 with_quantify |
1048 enable_purify | 1048 enable_purify |
1049 with_purify | 1049 with_purify |
1050 enable_valgrind | 1050 enable_valgrind |
1051 with_valgrind | 1051 with_valgrind |
1052 enable_largefile | |
1052 with_x | 1053 with_x |
1053 ' | 1054 ' |
1054 ac_precious_vars='build_alias | 1055 ac_precious_vars='build_alias |
1055 host_alias | 1056 host_alias |
1056 target_alias | 1057 target_alias |
2027 --with-union-type Use union definition of Lisp_Object type. Known to | 2028 --with-union-type Use union definition of Lisp_Object type. Known to |
2028 trigger bugs in some compilers. | 2029 trigger bugs in some compilers. |
2029 --with-quantify Support performance debugging using Quantify. | 2030 --with-quantify Support performance debugging using Quantify. |
2030 --with-purify Support memory debugging using Purify. | 2031 --with-purify Support memory debugging using Purify. |
2031 --with-valgrind Support memory debugging using Valgrind. | 2032 --with-valgrind Support memory debugging using Valgrind. |
2033 | |
2034 Optional Features: | |
2035 --disable-option-checking ignore unrecognized --enable/--with options | |
2036 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
2037 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
2038 --disable-largefile omit support for large files | |
2032 | 2039 |
2033 Optional Packages: | 2040 Optional Packages: |
2034 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | 2041 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
2035 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | 2042 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
2036 --with-x use the X Window System | 2043 --with-x use the X Window System |
11707 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h | 11714 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h |
11708 | 11715 |
11709 fi | 11716 fi |
11710 | 11717 |
11711 | 11718 |
11719 # Check whether --enable-largefile was given. | |
11720 if test "${enable_largefile+set}" = set; then : | |
11721 enableval=$enable_largefile; | |
11722 fi | |
11723 | |
11724 if test "$enable_largefile" != no; then | |
11725 | |
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
11727 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
11728 if ${ac_cv_sys_largefile_CC+:} false; then : | |
11729 $as_echo_n "(cached) " >&6 | |
11730 else | |
11731 ac_cv_sys_largefile_CC=no | |
11732 if test "$GCC" != yes; then | |
11733 ac_save_CC=$CC | |
11734 while :; do | |
11735 # IRIX 6.2 and later do not support large files by default, | |
11736 # so use the C compiler's -n32 option if that helps. | |
11737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11738 /* end confdefs.h. */ | |
11739 #include <sys/types.h> | |
11740 /* Check that off_t can represent 2**63 - 1 correctly. | |
11741 We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
11742 since some C++ compilers masquerading as C compilers | |
11743 incorrectly reject 9223372036854775807. */ | |
11744 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
11745 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
11746 && LARGE_OFF_T % 2147483647 == 1) | |
11747 ? 1 : -1]; | |
11748 int | |
11749 main () | |
11750 { | |
11751 | |
11752 ; | |
11753 return 0; | |
11754 } | |
11755 _ACEOF | |
11756 if ac_fn_c_try_compile "$LINENO"; then : | |
11757 break | |
11758 fi | |
11759 rm -f core conftest.err conftest.$ac_objext | |
11760 CC="$CC -n32" | |
11761 if ac_fn_c_try_compile "$LINENO"; then : | |
11762 ac_cv_sys_largefile_CC=' -n32'; break | |
11763 fi | |
11764 rm -f core conftest.err conftest.$ac_objext | |
11765 break | |
11766 done | |
11767 CC=$ac_save_CC | |
11768 rm -f conftest.$ac_ext | |
11769 fi | |
11770 fi | |
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
11772 $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
11773 if test "$ac_cv_sys_largefile_CC" != no; then | |
11774 CC=$CC$ac_cv_sys_largefile_CC | |
11775 fi | |
11776 | |
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
11778 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
11779 if ${ac_cv_sys_file_offset_bits+:} false; then : | |
11780 $as_echo_n "(cached) " >&6 | |
11781 else | |
11782 while :; do | |
11783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11784 /* end confdefs.h. */ | |
11785 #include <sys/types.h> | |
11786 /* Check that off_t can represent 2**63 - 1 correctly. | |
11787 We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
11788 since some C++ compilers masquerading as C compilers | |
11789 incorrectly reject 9223372036854775807. */ | |
11790 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
11791 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
11792 && LARGE_OFF_T % 2147483647 == 1) | |
11793 ? 1 : -1]; | |
11794 int | |
11795 main () | |
11796 { | |
11797 | |
11798 ; | |
11799 return 0; | |
11800 } | |
11801 _ACEOF | |
11802 if ac_fn_c_try_compile "$LINENO"; then : | |
11803 ac_cv_sys_file_offset_bits=no; break | |
11804 fi | |
11805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11807 /* end confdefs.h. */ | |
11808 #define _FILE_OFFSET_BITS 64 | |
11809 #include <sys/types.h> | |
11810 /* Check that off_t can represent 2**63 - 1 correctly. | |
11811 We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
11812 since some C++ compilers masquerading as C compilers | |
11813 incorrectly reject 9223372036854775807. */ | |
11814 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
11815 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
11816 && LARGE_OFF_T % 2147483647 == 1) | |
11817 ? 1 : -1]; | |
11818 int | |
11819 main () | |
11820 { | |
11821 | |
11822 ; | |
11823 return 0; | |
11824 } | |
11825 _ACEOF | |
11826 if ac_fn_c_try_compile "$LINENO"; then : | |
11827 ac_cv_sys_file_offset_bits=64; break | |
11828 fi | |
11829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11830 ac_cv_sys_file_offset_bits=unknown | |
11831 break | |
11832 done | |
11833 fi | |
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
11835 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
11836 case $ac_cv_sys_file_offset_bits in #( | |
11837 no | unknown) ;; | |
11838 *) | |
11839 cat >>confdefs.h <<_ACEOF | |
11840 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
11841 _ACEOF | |
11842 ;; | |
11843 esac | |
11844 rm -rf conftest* | |
11845 if test $ac_cv_sys_file_offset_bits = unknown; then | |
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
11847 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
11848 if ${ac_cv_sys_large_files+:} false; then : | |
11849 $as_echo_n "(cached) " >&6 | |
11850 else | |
11851 while :; do | |
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11853 /* end confdefs.h. */ | |
11854 #include <sys/types.h> | |
11855 /* Check that off_t can represent 2**63 - 1 correctly. | |
11856 We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
11857 since some C++ compilers masquerading as C compilers | |
11858 incorrectly reject 9223372036854775807. */ | |
11859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
11860 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
11861 && LARGE_OFF_T % 2147483647 == 1) | |
11862 ? 1 : -1]; | |
11863 int | |
11864 main () | |
11865 { | |
11866 | |
11867 ; | |
11868 return 0; | |
11869 } | |
11870 _ACEOF | |
11871 if ac_fn_c_try_compile "$LINENO"; then : | |
11872 ac_cv_sys_large_files=no; break | |
11873 fi | |
11874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11876 /* end confdefs.h. */ | |
11877 #define _LARGE_FILES 1 | |
11878 #include <sys/types.h> | |
11879 /* Check that off_t can represent 2**63 - 1 correctly. | |
11880 We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
11881 since some C++ compilers masquerading as C compilers | |
11882 incorrectly reject 9223372036854775807. */ | |
11883 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
11884 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
11885 && LARGE_OFF_T % 2147483647 == 1) | |
11886 ? 1 : -1]; | |
11887 int | |
11888 main () | |
11889 { | |
11890 | |
11891 ; | |
11892 return 0; | |
11893 } | |
11894 _ACEOF | |
11895 if ac_fn_c_try_compile "$LINENO"; then : | |
11896 ac_cv_sys_large_files=1; break | |
11897 fi | |
11898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11899 ac_cv_sys_large_files=unknown | |
11900 break | |
11901 done | |
11902 fi | |
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
11904 $as_echo "$ac_cv_sys_large_files" >&6; } | |
11905 case $ac_cv_sys_large_files in #( | |
11906 no | unknown) ;; | |
11907 *) | |
11908 cat >>confdefs.h <<_ACEOF | |
11909 #define _LARGE_FILES $ac_cv_sys_large_files | |
11910 _ACEOF | |
11911 ;; | |
11912 esac | |
11913 rm -rf conftest* | |
11914 fi | |
11915 | |
11916 | |
11917 fi | |
11918 | |
11919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 | |
11920 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } | |
11921 if ${ac_cv_sys_largefile_source+:} false; then : | |
11922 $as_echo_n "(cached) " >&6 | |
11923 else | |
11924 while :; do | |
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11926 /* end confdefs.h. */ | |
11927 #include <sys/types.h> /* for off_t */ | |
11928 #include <stdio.h> | |
11929 int | |
11930 main () | |
11931 { | |
11932 int (*fp) (FILE *, off_t, int) = fseeko; | |
11933 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
11934 ; | |
11935 return 0; | |
11936 } | |
11937 _ACEOF | |
11938 if ac_fn_c_try_link "$LINENO"; then : | |
11939 ac_cv_sys_largefile_source=no; break | |
11940 fi | |
11941 rm -f core conftest.err conftest.$ac_objext \ | |
11942 conftest$ac_exeext conftest.$ac_ext | |
11943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11944 /* end confdefs.h. */ | |
11945 #define _LARGEFILE_SOURCE 1 | |
11946 #include <sys/types.h> /* for off_t */ | |
11947 #include <stdio.h> | |
11948 int | |
11949 main () | |
11950 { | |
11951 int (*fp) (FILE *, off_t, int) = fseeko; | |
11952 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); | |
11953 ; | |
11954 return 0; | |
11955 } | |
11956 _ACEOF | |
11957 if ac_fn_c_try_link "$LINENO"; then : | |
11958 ac_cv_sys_largefile_source=1; break | |
11959 fi | |
11960 rm -f core conftest.err conftest.$ac_objext \ | |
11961 conftest$ac_exeext conftest.$ac_ext | |
11962 ac_cv_sys_largefile_source=unknown | |
11963 break | |
11964 done | |
11965 fi | |
11966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 | |
11967 $as_echo "$ac_cv_sys_largefile_source" >&6; } | |
11968 case $ac_cv_sys_largefile_source in #( | |
11969 no | unknown) ;; | |
11970 *) | |
11971 cat >>confdefs.h <<_ACEOF | |
11972 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source | |
11973 _ACEOF | |
11974 ;; | |
11975 esac | |
11976 rm -rf conftest* | |
11977 | |
11978 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug | |
11979 # in glibc 2.1.3, but that breaks too many other things. | |
11980 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. | |
11981 if test $ac_cv_sys_largefile_source != unknown; then | |
11982 | |
11983 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h | |
11984 | |
11985 fi | |
11986 | |
11987 # The cast to long int works around a bug in the HP C Compiler | |
11988 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11989 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11990 # This bug is HP SR number 8606223364. | |
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 | |
11992 $as_echo_n "checking size of off_t... " >&6; } | |
11993 if ${ac_cv_sizeof_off_t+:} false; then : | |
11994 $as_echo_n "(cached) " >&6 | |
11995 else | |
11996 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : | |
11997 | |
11998 else | |
11999 if test "$ac_cv_type_off_t" = yes; then | |
12000 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12001 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12002 as_fn_error 77 "cannot compute sizeof (off_t) | |
12003 See \`config.log' for more details" "$LINENO" 5; } | |
12004 else | |
12005 ac_cv_sizeof_off_t=0 | |
12006 fi | |
12007 fi | |
12008 | |
12009 fi | |
12010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 | |
12011 $as_echo "$ac_cv_sizeof_off_t" >&6; } | |
12012 | |
12013 | |
12014 | |
12015 cat >>confdefs.h <<_ACEOF | |
12016 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t | |
12017 _ACEOF | |
12018 | |
12019 | |
12020 | |
11712 ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" | 12021 ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" |
11713 if test "x$ac_cv_func_sin" = xyes; then : | 12022 if test "x$ac_cv_func_sin" = xyes; then : |
11714 | 12023 |
11715 else | 12024 else |
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 | 12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 |