diff options
author | stwo <stwo> | 2010-09-06 12:57:31 (GMT) |
---|---|---|
committer | stwo <stwo> | 2010-09-06 12:57:31 (GMT) |
commit | 3c5c0386e0a63f34a79ce78f5d35c48599949508 (patch) | |
tree | da0b07ffe6eb9d201b76d0c12b6568095681ce58 /unix/configure | |
parent | a3ca2c33322a3f277d3affa55344c20ea64c1605 (diff) | |
download | tcl-3c5c0386e0a63f34a79ce78f5d35c48599949508.zip tcl-3c5c0386e0a63f34a79ce78f5d35c48599949508.tar.gz tcl-3c5c0386e0a63f34a79ce78f5d35c48599949508.tar.bz2 |
Backport blkcnt_t detection/usage.
Diffstat (limited to 'unix/configure')
-rwxr-xr-x | unix/configure | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/unix/configure b/unix/configure index 2965f76..7eaf6ed 100755 --- a/unix/configure +++ b/unix/configure @@ -13696,7 +13696,8 @@ _ACEOF #-------------------------------------------------------------------- # Some systems (e.g., IRIX 4.0.5) lack some fields in struct stat. But -# we might be able to use fstatfs instead. +# we might be able to use fstatfs instead. Some systems (OpenBSD?) also +# lack blkcnt_t. #-------------------------------------------------------------------- echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 @@ -13918,6 +13919,71 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for blkcnt_t" >&5 +echo $ECHO_N "checking for blkcnt_t... $ECHO_C" >&6 +if test "${ac_cv_type_blkcnt_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((blkcnt_t *) 0) + return 0; +if (sizeof (blkcnt_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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 + ac_cv_type_blkcnt_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_blkcnt_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_blkcnt_t" >&5 +echo "${ECHO_T}$ac_cv_type_blkcnt_t" >&6 +if test $ac_cv_type_blkcnt_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_BLKCNT_T 1 +_ACEOF + + +fi + echo "$as_me:$LINENO: checking for fstatfs" >&5 echo $ECHO_N "checking for fstatfs... $ECHO_C" >&6 if test "${ac_cv_func_fstatfs+set}" = set; then |