added autoconf code to define MOO_PATH_MAX is PATH_MAX is defined in limits.h
This commit is contained in:
parent
8eae9095c1
commit
bfa190a4fa
32
moo/configure
vendored
32
moo/configure
vendored
@ -19962,6 +19962,38 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX" >&5
|
||||
$as_echo_n "checking for PATH_MAX... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <limits.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
;;;;;;;;;;
|
||||
PATH_MAX
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_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++; } }'`"
|
||||
if test "x${_value_of_path_max}" = "x"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not defined" >&5
|
||||
$as_echo "not defined" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_value_of_path_max}" >&5
|
||||
$as_echo "${_value_of_path_max}" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define MOO_PATH_MAX ${_value_of_path_max}
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# The cast to long int works around a bug in the HP C Compiler
|
||||
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
|
||||
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
|
||||
|
@ -253,6 +253,23 @@ AC_TRY_RUN(
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for PATH_MAX])
|
||||
AC_LANG_CONFTEST([
|
||||
AC_LANG_PROGRAM(
|
||||
[#include <limits.h>],
|
||||
[;;;;;;;;;;
|
||||
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++; } }'`"
|
||||
if test "x${_value_of_path_max}" = "x"
|
||||
then
|
||||
AC_MSG_RESULT(not defined)
|
||||
else
|
||||
AC_MSG_RESULT(${_value_of_path_max})
|
||||
AC_DEFINE_UNQUOTED(MOO_PATH_MAX, ${_value_of_path_max}, [PATH_MAX])
|
||||
fi
|
||||
|
||||
dnl check the size of primitive data types
|
||||
AC_CHECK_SIZEOF(char,,[[]])
|
||||
AC_CHECK_SIZEOF(short,,[[]])
|
||||
|
@ -416,6 +416,9 @@
|
||||
/* Patch level */
|
||||
#undef MOO_PACKAGE_VERSION_PATCH
|
||||
|
||||
/* PATH_MAX */
|
||||
#undef MOO_PATH_MAX
|
||||
|
||||
/* Define if sa_family_t is signed */
|
||||
#undef MOO_SA_FAMILY_T_IS_SIGNED
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user