about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-04-04 10:00:25 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-04-04 10:00:25 +0000
commitf12ca5fd8ee8922c6950a398e21286f2d59a428a (patch)
treec5ed303bac133ef9a5eb4ab5468cf8b862ea6fc1 /configure.ac
parent6df44faf120b4abf8bf259a3d50deb1637335e54 (diff)
downloadzsh-f12ca5fd8ee8922c6950a398e21286f2d59a428a.tar.gz
zsh-f12ca5fd8ee8922c6950a398e21286f2d59a428a.tar.xz
zsh-f12ca5fd8ee8922c6950a398e21286f2d59a428a.zip
Toby Peterson: 21083: RLIMIT_AS and RLIMIT_RSS are the same in Mac OX X
ut_name needs to be ut_user in struct utmpx
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index dcc0acf96..da38620d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1501,6 +1501,33 @@ if test $zsh_cv_rlimit_vmem_is_as = yes; then
 fi
 
 
+AH_TEMPLATE([RLIMIT_RSS_IS_AS],
+[Define to 1 if RLIMIT_RSS and RLIMIT_AS both exist and are equal.])
+AC_CACHE_CHECK(if RLIMIT_RSS and RLIMIT_AS are the same,
+zsh_cv_rlimit_rss_is_as,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/resource.h>
+int main()
+{
+int ret = 1;
+#if defined(HAVE_RLIMIT_RSS) && defined(HAVE_RLIMIT_AS)
+if (RLIMIT_AS == RLIMIT_RSS) ret = 0;
+#endif
+return ret;
+}],
+  zsh_cv_rlimit_rss_is_as=yes,
+  zsh_cv_rlimit_rss_is_as=no,
+  zsh_cv_rlimit_rss_is_as=no)])
+
+if test $zsh_cv_rlimit_rss_is_as = yes; then
+  AC_DEFINE(RLIMIT_RSS_IS_AS)
+fi
+
+
 dnl --------------------------------------------
 dnl Check for members of struct rusage
 dnl --------------------------------------------