Mercurial > vim
comparison src/auto/configure @ 2241:60da25e3aab7 vim73
Correct use of long instead of off_t for file size. (James Vega)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 31 May 2010 21:59:46 +0200 |
parents | 2e6906bbc5f4 |
children | c40cd9aad546 |
comparison
equal
deleted
inserted
replaced
2240:6b4879aea261 | 2241:60da25e3aab7 |
---|---|
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | 2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
2011 $as_echo "$ac_res" >&6; } | 2011 $as_echo "$ac_res" >&6; } |
2012 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | 2012 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} |
2013 | 2013 |
2014 } # ac_fn_c_find_uintX_t | 2014 } # ac_fn_c_find_uintX_t |
2015 | |
2016 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES | |
2017 # -------------------------------------------- | |
2018 # Tries to find the compile-time value of EXPR in a program that includes | |
2019 # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2020 # computed | |
2021 ac_fn_c_compute_int () | |
2022 { | |
2023 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2024 if test "$cross_compiling" = yes; then | |
2025 # Depending upon the size, compute the lo and hi bounds. | |
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2027 /* end confdefs.h. */ | |
2028 $4 | |
2029 int | |
2030 main () | |
2031 { | |
2032 static int test_array [1 - 2 * !(($2) >= 0)]; | |
2033 test_array [0] = 0 | |
2034 | |
2035 ; | |
2036 return 0; | |
2037 } | |
2038 _ACEOF | |
2039 if ac_fn_c_try_compile "$LINENO"; then : | |
2040 ac_lo=0 ac_mid=0 | |
2041 while :; do | |
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2043 /* end confdefs.h. */ | |
2044 $4 | |
2045 int | |
2046 main () | |
2047 { | |
2048 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2049 test_array [0] = 0 | |
2050 | |
2051 ; | |
2052 return 0; | |
2053 } | |
2054 _ACEOF | |
2055 if ac_fn_c_try_compile "$LINENO"; then : | |
2056 ac_hi=$ac_mid; break | |
2057 else | |
2058 as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2059 if test $ac_lo -le $ac_mid; then | |
2060 ac_lo= ac_hi= | |
2061 break | |
2062 fi | |
2063 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2064 fi | |
2065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2066 done | |
2067 else | |
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2069 /* end confdefs.h. */ | |
2070 $4 | |
2071 int | |
2072 main () | |
2073 { | |
2074 static int test_array [1 - 2 * !(($2) < 0)]; | |
2075 test_array [0] = 0 | |
2076 | |
2077 ; | |
2078 return 0; | |
2079 } | |
2080 _ACEOF | |
2081 if ac_fn_c_try_compile "$LINENO"; then : | |
2082 ac_hi=-1 ac_mid=-1 | |
2083 while :; do | |
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2085 /* end confdefs.h. */ | |
2086 $4 | |
2087 int | |
2088 main () | |
2089 { | |
2090 static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2091 test_array [0] = 0 | |
2092 | |
2093 ; | |
2094 return 0; | |
2095 } | |
2096 _ACEOF | |
2097 if ac_fn_c_try_compile "$LINENO"; then : | |
2098 ac_lo=$ac_mid; break | |
2099 else | |
2100 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2101 if test $ac_mid -le $ac_hi; then | |
2102 ac_lo= ac_hi= | |
2103 break | |
2104 fi | |
2105 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2106 fi | |
2107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2108 done | |
2109 else | |
2110 ac_lo= ac_hi= | |
2111 fi | |
2112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2113 fi | |
2114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2115 # Binary search between lo and hi bounds. | |
2116 while test "x$ac_lo" != "x$ac_hi"; do | |
2117 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2119 /* end confdefs.h. */ | |
2120 $4 | |
2121 int | |
2122 main () | |
2123 { | |
2124 static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2125 test_array [0] = 0 | |
2126 | |
2127 ; | |
2128 return 0; | |
2129 } | |
2130 _ACEOF | |
2131 if ac_fn_c_try_compile "$LINENO"; then : | |
2132 ac_hi=$ac_mid | |
2133 else | |
2134 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2135 fi | |
2136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2137 done | |
2138 case $ac_lo in #(( | |
2139 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2140 '') ac_retval=1 ;; | |
2141 esac | |
2142 else | |
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2144 /* end confdefs.h. */ | |
2145 $4 | |
2146 static long int longval () { return $2; } | |
2147 static unsigned long int ulongval () { return $2; } | |
2148 #include <stdio.h> | |
2149 #include <stdlib.h> | |
2150 int | |
2151 main () | |
2152 { | |
2153 | |
2154 FILE *f = fopen ("conftest.val", "w"); | |
2155 if (! f) | |
2156 return 1; | |
2157 if (($2) < 0) | |
2158 { | |
2159 long int i = longval (); | |
2160 if (i != ($2)) | |
2161 return 1; | |
2162 fprintf (f, "%ld", i); | |
2163 } | |
2164 else | |
2165 { | |
2166 unsigned long int i = ulongval (); | |
2167 if (i != ($2)) | |
2168 return 1; | |
2169 fprintf (f, "%lu", i); | |
2170 } | |
2171 /* Do not output a trailing newline, as this causes \r\n confusion | |
2172 on some platforms. */ | |
2173 return ferror (f) || fclose (f) != 0; | |
2174 | |
2175 ; | |
2176 return 0; | |
2177 } | |
2178 _ACEOF | |
2179 if ac_fn_c_try_run "$LINENO"; then : | |
2180 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2181 else | |
2182 ac_retval=1 | |
2183 fi | |
2184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2185 conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2186 rm -f conftest.val | |
2187 | |
2188 fi | |
2189 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2190 as_fn_set_status $ac_retval | |
2191 | |
2192 } # ac_fn_c_compute_int | |
2015 cat >auto/config.log <<_ACEOF | 2193 cat >auto/config.log <<_ACEOF |
2016 This file contains any messages produced by compilers while | 2194 This file contains any messages produced by compilers while |
2017 running configure, to aid debugging if configure makes a mistake. | 2195 running configure, to aid debugging if configure makes a mistake. |
2018 | 2196 |
2019 It was created by $as_me, which was | 2197 It was created by $as_me, which was |
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5 | 11371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5 |
11194 $as_echo "not usable" >&6; } | 11372 $as_echo "not usable" >&6; } |
11195 fi | 11373 fi |
11196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | 11374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11197 | 11375 |
11198 | 11376 # The cast to long int works around a bug in the HP C Compiler |
11377 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11378 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11379 # This bug is HP SR number 8606223364. | |
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 | 11380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 |
11200 $as_echo_n "checking size of int... " >&6; } | 11381 $as_echo_n "checking size of int... " >&6; } |
11201 if test "${ac_cv_sizeof_int+set}" = set; then : | 11382 if test "${ac_cv_sizeof_int+set}" = set; then : |
11202 $as_echo_n "(cached) " >&6 | 11383 $as_echo_n "(cached) " >&6 |
11203 else | 11384 else |
11204 if test "$cross_compiling" = yes; then : | 11385 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : |
11205 as_fn_error "failed to compile test program" "$LINENO" 5 | 11386 |
11206 else | 11387 else |
11207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 11388 if test "$ac_cv_type_int" = yes; then |
11208 /* end confdefs.h. */ | 11389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
11209 | 11390 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
11210 #include <stdio.h> | 11391 { as_fn_set_status 77 |
11211 #if STDC_HEADERS | 11392 as_fn_error "cannot compute sizeof (int) |
11212 # include <stdlib.h> | 11393 See \`config.log' for more details." "$LINENO" 5; }; } |
11213 # include <stddef.h> | 11394 else |
11214 #endif | 11395 ac_cv_sizeof_int=0 |
11215 main() | 11396 fi |
11216 { | 11397 fi |
11217 FILE *f=fopen("conftestval", "w"); | 11398 |
11218 if (!f) exit(1); | 11399 fi |
11219 fprintf(f, "%d\n", (int)sizeof(int)); | |
11220 exit(0); | |
11221 } | |
11222 _ACEOF | |
11223 if ac_fn_c_try_run "$LINENO"; then : | |
11224 ac_cv_sizeof_int=`cat conftestval` | |
11225 else | |
11226 as_fn_error "failed to determine sizeof(int)" "$LINENO" 5 | |
11227 fi | |
11228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11229 conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11230 fi | |
11231 | |
11232 fi | |
11233 | |
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 | 11400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 |
11235 $as_echo "$ac_cv_sizeof_int" >&6; } | 11401 $as_echo "$ac_cv_sizeof_int" >&6; } |
11402 | |
11403 | |
11404 | |
11236 cat >>confdefs.h <<_ACEOF | 11405 cat >>confdefs.h <<_ACEOF |
11237 #define SIZEOF_INT $ac_cv_sizeof_int | 11406 #define SIZEOF_INT $ac_cv_sizeof_int |
11238 _ACEOF | 11407 _ACEOF |
11239 | 11408 |
11240 | 11409 |
11410 # The cast to long int works around a bug in the HP C Compiler | |
11411 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11412 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11413 # This bug is HP SR number 8606223364. | |
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
11415 $as_echo_n "checking size of long... " >&6; } | |
11416 if test "${ac_cv_sizeof_long+set}" = set; then : | |
11417 $as_echo_n "(cached) " >&6 | |
11418 else | |
11419 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : | |
11420 | |
11421 else | |
11422 if test "$ac_cv_type_long" = yes; then | |
11423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11424 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11425 { as_fn_set_status 77 | |
11426 as_fn_error "cannot compute sizeof (long) | |
11427 See \`config.log' for more details." "$LINENO" 5; }; } | |
11428 else | |
11429 ac_cv_sizeof_long=0 | |
11430 fi | |
11431 fi | |
11432 | |
11433 fi | |
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 | |
11435 $as_echo "$ac_cv_sizeof_long" >&6; } | |
11436 | |
11437 | |
11438 | |
11439 cat >>confdefs.h <<_ACEOF | |
11440 #define SIZEOF_LONG $ac_cv_sizeof_long | |
11441 _ACEOF | |
11442 | |
11443 | |
11444 # The cast to long int works around a bug in the HP C Compiler | |
11445 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11446 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11447 # This bug is HP SR number 8606223364. | |
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 | 11448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 |
11242 $as_echo_n "checking size of time_t... " >&6; } | 11449 $as_echo_n "checking size of time_t... " >&6; } |
11243 if test "${ac_cv_sizeof_time_t+set}" = set; then : | 11450 if test "${ac_cv_sizeof_time_t+set}" = set; then : |
11244 $as_echo_n "(cached) " >&6 | 11451 $as_echo_n "(cached) " >&6 |
11245 else | 11452 else |
11246 if test "$cross_compiling" = yes; then : | 11453 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : |
11247 as_fn_error "failed to compile test program" "$LINENO" 5 | 11454 |
11248 else | 11455 else |
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | 11456 if test "$ac_cv_type_time_t" = yes; then |
11250 /* end confdefs.h. */ | 11457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
11251 | 11458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
11252 #include <stdio.h> | 11459 { as_fn_set_status 77 |
11253 #if STDC_HEADERS | 11460 as_fn_error "cannot compute sizeof (time_t) |
11254 # include <stdlib.h> | 11461 See \`config.log' for more details." "$LINENO" 5; }; } |
11255 # include <stddef.h> | 11462 else |
11256 #endif | 11463 ac_cv_sizeof_time_t=0 |
11257 #include <time.h> | 11464 fi |
11258 main() | 11465 fi |
11259 { | 11466 |
11260 FILE *f=fopen("conftestval", "w"); | 11467 fi |
11261 if (!f) exit(1); | |
11262 fprintf(f, "%d\n", (int)sizeof(time_t)); | |
11263 exit(0); | |
11264 } | |
11265 _ACEOF | |
11266 if ac_fn_c_try_run "$LINENO"; then : | |
11267 ac_cv_sizeof_time_t=`cat conftestval` | |
11268 else | |
11269 as_fn_error "failed to determine sizeof(time_t)" "$LINENO" 5 | |
11270 fi | |
11271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11272 conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11273 fi | |
11274 | |
11275 fi | |
11276 | |
11277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 | 11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 |
11278 $as_echo "$ac_cv_sizeof_time_t" >&6; } | 11469 $as_echo "$ac_cv_sizeof_time_t" >&6; } |
11470 | |
11471 | |
11472 | |
11279 cat >>confdefs.h <<_ACEOF | 11473 cat >>confdefs.h <<_ACEOF |
11280 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t | 11474 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
11281 _ACEOF | 11475 _ACEOF |
11476 | |
11477 | |
11478 # The cast to long int works around a bug in the HP C Compiler | |
11479 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11480 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11481 # This bug is HP SR number 8606223364. | |
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 | |
11483 $as_echo_n "checking size of off_t... " >&6; } | |
11484 if test "${ac_cv_sizeof_off_t+set}" = set; then : | |
11485 $as_echo_n "(cached) " >&6 | |
11486 else | |
11487 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : | |
11488 | |
11489 else | |
11490 if test "$ac_cv_type_off_t" = yes; then | |
11491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11492 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11493 { as_fn_set_status 77 | |
11494 as_fn_error "cannot compute sizeof (off_t) | |
11495 See \`config.log' for more details." "$LINENO" 5; }; } | |
11496 else | |
11497 ac_cv_sizeof_off_t=0 | |
11498 fi | |
11499 fi | |
11500 | |
11501 fi | |
11502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 | |
11503 $as_echo "$ac_cv_sizeof_off_t" >&6; } | |
11504 | |
11505 | |
11506 | |
11507 cat >>confdefs.h <<_ACEOF | |
11508 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t | |
11509 _ACEOF | |
11510 | |
11282 | 11511 |
11283 | 11512 |
11284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5 | 11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5 |
11285 $as_echo_n "checking uint32_t is 32 bits... " >&6; } | 11514 $as_echo_n "checking uint32_t is 32 bits... " >&6; } |
11286 if test "$cross_compiling" = yes; then : | 11515 if test "$cross_compiling" = yes; then : |