mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.0-236
This commit is contained in:
56
src/auto/configure
vendored
56
src/auto/configure
vendored
@@ -13688,6 +13688,62 @@ echo "${ECHO_T}not usable" >&6
|
|||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking for sysinfo.mem_unit" >&5
|
||||||
|
echo $ECHO_N "checking for sysinfo.mem_unit... $ECHO_C" >&6
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/sysinfo.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct sysinfo sinfo;
|
||||||
|
sinfo.mem_unit = 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
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
|
||||||
|
echo "$as_me:$LINENO: result: yes" >&5
|
||||||
|
echo "${ECHO_T}yes" >&6; cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define HAVE_SYSINFO_MEM_UNIT 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
|
echo "${ECHO_T}no" >&6
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for sysconf" >&5
|
echo "$as_me:$LINENO: checking for sysconf" >&5
|
||||||
echo $ECHO_N "checking for sysconf... $ECHO_C" >&6
|
echo $ECHO_N "checking for sysconf... $ECHO_C" >&6
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
@@ -176,6 +176,7 @@
|
|||||||
#undef HAVE_SYSCONF
|
#undef HAVE_SYSCONF
|
||||||
#undef HAVE_SYSCTL
|
#undef HAVE_SYSCTL
|
||||||
#undef HAVE_SYSINFO
|
#undef HAVE_SYSINFO
|
||||||
|
#undef HAVE_SYSINFO_MEM_UNIT
|
||||||
#undef HAVE_TGETENT
|
#undef HAVE_TGETENT
|
||||||
#undef HAVE_TOWLOWER
|
#undef HAVE_TOWLOWER
|
||||||
#undef HAVE_TOWUPPER
|
#undef HAVE_TOWUPPER
|
||||||
|
@@ -2590,6 +2590,17 @@ AC_TRY_COMPILE(
|
|||||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO),
|
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO),
|
||||||
AC_MSG_RESULT(not usable))
|
AC_MSG_RESULT(not usable))
|
||||||
|
|
||||||
|
dnl struct sysinfo may have the mem_unit field or not
|
||||||
|
AC_MSG_CHECKING(for sysinfo.mem_unit)
|
||||||
|
AC_TRY_COMPILE(
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/sysinfo.h>],
|
||||||
|
[ struct sysinfo sinfo;
|
||||||
|
sinfo.mem_unit = 1;
|
||||||
|
],
|
||||||
|
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
|
||||||
|
AC_MSG_RESULT(no))
|
||||||
|
|
||||||
dnl sysconf() may exist but not support what we want to use
|
dnl sysconf() may exist but not support what we want to use
|
||||||
AC_MSG_CHECKING(for sysconf)
|
AC_MSG_CHECKING(for sysconf)
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
|
@@ -3030,7 +3030,7 @@ set_init_1()
|
|||||||
#else
|
#else
|
||||||
# ifdef HAVE_TOTAL_MEM
|
# ifdef HAVE_TOTAL_MEM
|
||||||
/* Use amount of memory available to Vim. */
|
/* Use amount of memory available to Vim. */
|
||||||
n = (mch_total_mem(FALSE) >> 11);
|
n = (mch_total_mem(FALSE) >> 1);
|
||||||
# else
|
# else
|
||||||
n = (0x7fffffff >> 11);
|
n = (0x7fffffff >> 11);
|
||||||
# endif
|
# endif
|
||||||
|
@@ -428,8 +428,8 @@ mch_char_avail()
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return total amount of memory available. Doesn't change when memory has
|
* Return total amount of memory available in Kbyte.
|
||||||
* been allocated.
|
* Doesn't change when memory has been allocated.
|
||||||
*/
|
*/
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
long_u
|
long_u
|
||||||
@@ -437,9 +437,10 @@ mch_total_mem(special)
|
|||||||
int special;
|
int special;
|
||||||
{
|
{
|
||||||
# ifdef __EMX__
|
# ifdef __EMX__
|
||||||
return ulimit(3, 0L); /* always 32MB? */
|
return ulimit(3, 0L) >> 10; /* always 32MB? */
|
||||||
# else
|
# else
|
||||||
long_u mem = 0;
|
long_u mem = 0;
|
||||||
|
long_u shiftright = 10; /* how much to shift "mem" right for Kbyte */
|
||||||
|
|
||||||
# ifdef HAVE_SYSCTL
|
# ifdef HAVE_SYSCTL
|
||||||
int mib[2], physmem;
|
int mib[2], physmem;
|
||||||
@@ -460,7 +461,19 @@ mch_total_mem(special)
|
|||||||
|
|
||||||
/* Linux way of getting amount of RAM available */
|
/* Linux way of getting amount of RAM available */
|
||||||
if (sysinfo(&sinfo) == 0)
|
if (sysinfo(&sinfo) == 0)
|
||||||
|
{
|
||||||
|
# ifdef HAVE_SYSINFO_MEM_UNIT
|
||||||
|
/* avoid overflow as much as possible */
|
||||||
|
while (shiftright > 0 && (sinfo.mem_unit & 1) == 0)
|
||||||
|
{
|
||||||
|
sinfo.mem_unit = sinfo.mem_unit >> 1;
|
||||||
|
--shiftright;
|
||||||
|
}
|
||||||
|
mem = sinfo.totalram * sinfo.mem_unit;
|
||||||
|
# else
|
||||||
mem = sinfo.totalram;
|
mem = sinfo.totalram;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -473,7 +486,15 @@ mch_total_mem(special)
|
|||||||
pagesize = sysconf(_SC_PAGESIZE);
|
pagesize = sysconf(_SC_PAGESIZE);
|
||||||
pagecount = sysconf(_SC_PHYS_PAGES);
|
pagecount = sysconf(_SC_PHYS_PAGES);
|
||||||
if (pagesize > 0 && pagecount > 0)
|
if (pagesize > 0 && pagecount > 0)
|
||||||
|
{
|
||||||
|
/* avoid overflow as much as possible */
|
||||||
|
while (shiftright > 0 && (pagesize & 1) == 0)
|
||||||
|
{
|
||||||
|
pagesize = pagesize >> 1;
|
||||||
|
--shiftright;
|
||||||
|
}
|
||||||
mem = (long_u)pagesize * pagecount;
|
mem = (long_u)pagesize * pagecount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -488,15 +509,18 @@ mch_total_mem(special)
|
|||||||
# ifdef RLIM_INFINITY
|
# ifdef RLIM_INFINITY
|
||||||
&& rlp.rlim_cur != RLIM_INFINITY
|
&& rlp.rlim_cur != RLIM_INFINITY
|
||||||
# endif
|
# endif
|
||||||
&& (long_u)rlp.rlim_cur < mem
|
&& ((long_u)rlp.rlim_cur >> 10) < (mem >> shiftright)
|
||||||
)
|
)
|
||||||
return (long_u)rlp.rlim_cur;
|
{
|
||||||
|
mem = (long_u)rlp.rlim_cur;
|
||||||
|
shiftright = 10;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
if (mem > 0)
|
if (mem > 0)
|
||||||
return mem;
|
return mem >> shiftright;
|
||||||
return (long_u)0x7fffffff;
|
return (long_u)0x1fffff;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
236,
|
||||||
/**/
|
/**/
|
||||||
235,
|
235,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user