beautified the autoconf code snippet to define the value of PATH_MAX
This commit is contained in:
parent
bfa190a4fa
commit
11290dce63
12
moo/configure
vendored
12
moo/configure
vendored
@ -19962,7 +19962,6 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX" >&5
|
||||||
$as_echo_n "checking for PATH_MAX... " >&6; }
|
$as_echo_n "checking for PATH_MAX... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
@ -19979,17 +19978,18 @@ PATH_MAX
|
|||||||
}
|
}
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
_value_of_path_max="`$ac_cv_prog_CPP conftest.c | awk '/;;;;;;;;;;/ { start=1 } /^(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*/ { if (start == 1) { print $0; start++; } }'`"
|
moo_cv_path_max="`$ac_cv_prog_CPP conftest.c | awk '/;;;;;;;;;;/ { start=1 } /^(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*/ { if (start == 1) { print $0; start++; } }'`"
|
||||||
if test "x${_value_of_path_max}" = "x"
|
if test "x${moo_cv_path_max}" = "x"
|
||||||
then
|
then
|
||||||
|
dcl either not defined or defined to a non-numeric value
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not defined" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not defined" >&5
|
||||||
$as_echo "not defined" >&6; }
|
$as_echo "not defined" >&6; }
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_value_of_path_max}" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${moo_cv_path_max}" >&5
|
||||||
$as_echo "${_value_of_path_max}" >&6; }
|
$as_echo "${moo_cv_path_max}" >&6; }
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define MOO_PATH_MAX ${_value_of_path_max}
|
#define MOO_PATH_MAX ${moo_cv_path_max}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -253,7 +253,7 @@ AC_TRY_RUN(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dnl check the defined value of PATH_MAX in limits.h
|
||||||
AC_MSG_CHECKING([for PATH_MAX])
|
AC_MSG_CHECKING([for PATH_MAX])
|
||||||
AC_LANG_CONFTEST([
|
AC_LANG_CONFTEST([
|
||||||
AC_LANG_PROGRAM(
|
AC_LANG_PROGRAM(
|
||||||
@ -261,13 +261,14 @@ AC_LANG_CONFTEST([
|
|||||||
[;;;;;;;;;;
|
[;;;;;;;;;;
|
||||||
PATH_MAX])
|
PATH_MAX])
|
||||||
])
|
])
|
||||||
_value_of_path_max="`$ac_cv_prog_CPP conftest.c | awk '/;;;;;;;;;;/ { start=1 } /^(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*/ { if (start == 1) { print $0; start++; } }'`"
|
moo_cv_path_max="`$ac_cv_prog_CPP conftest.c | awk '/;;;;;;;;;;/ { start=1 } /^(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*/ { if (start == 1) { print $0; start++; } }'`"
|
||||||
if test "x${_value_of_path_max}" = "x"
|
if test "x${moo_cv_path_max}" = "x"
|
||||||
then
|
then
|
||||||
|
dcl either not defined or defined to a non-numeric value
|
||||||
AC_MSG_RESULT(not defined)
|
AC_MSG_RESULT(not defined)
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(${_value_of_path_max})
|
AC_MSG_RESULT(${moo_cv_path_max})
|
||||||
AC_DEFINE_UNQUOTED(MOO_PATH_MAX, ${_value_of_path_max}, [PATH_MAX])
|
AC_DEFINE_UNQUOTED(MOO_PATH_MAX, ${moo_cv_path_max}, [PATH_MAX])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl check the size of primitive data types
|
dnl check the size of primitive data types
|
||||||
|
Loading…
Reference in New Issue
Block a user