mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-10 13:03:41 -04:00
99 lines
2.6 KiB
Plaintext
99 lines
2.6 KiB
Plaintext
$NetBSD: patch-configure.ac,v 1.4 2014/01/08 16:30:01 ryoon Exp $
|
|
|
|
Use a compile test, not a run test, for whether various rlimit values
|
|
are equivalent. A compile test is sufficient because zsh uses these
|
|
values in switch cases, so they must be compile-time, if not
|
|
preprocessor-time, constants.
|
|
|
|
--- configure.ac.orig 2013-11-27 19:00:20.000000000 +0000
|
|
+++ configure.ac
|
|
@@ -1837,85 +1837,9 @@ zsh_LIMIT_PRESENT(RLIMIT_NPTS)
|
|
zsh_LIMIT_PRESENT(RLIMIT_SWAP)
|
|
zsh_LIMIT_PRESENT(RLIMIT_KQUEUES)
|
|
|
|
-AH_TEMPLATE([RLIMIT_VMEM_IS_RSS],
|
|
-[Define to 1 if RLIMIT_VMEM and RLIMIT_RSS both exist and are equal.])
|
|
-AC_CACHE_CHECK(if RLIMIT_VMEM and RLIMIT_RSS are the same,
|
|
-zsh_cv_rlimit_vmem_is_rss,
|
|
-[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_VMEM) && defined(HAVE_RLIMIT_RSS)
|
|
-if (RLIMIT_RSS == RLIMIT_VMEM) ret = 0;
|
|
-#endif
|
|
-return ret;
|
|
-}],
|
|
- zsh_cv_rlimit_vmem_is_rss=yes,
|
|
- zsh_cv_rlimit_vmem_is_rss=no,
|
|
- zsh_cv_rlimit_vmem_is_rss=no)])
|
|
-
|
|
-if test x$zsh_cv_rlimit_vmem_is_rss = xyes; then
|
|
- AC_DEFINE(RLIMIT_VMEM_IS_RSS)
|
|
-fi
|
|
-
|
|
-
|
|
-AH_TEMPLATE([RLIMIT_VMEM_IS_AS],
|
|
-[Define to 1 if RLIMIT_VMEM and RLIMIT_AS both exist and are equal.])
|
|
-AC_CACHE_CHECK(if RLIMIT_VMEM and RLIMIT_AS are the same,
|
|
-zsh_cv_rlimit_vmem_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_VMEM) && defined(HAVE_RLIMIT_AS)
|
|
-if (RLIMIT_AS == RLIMIT_VMEM) ret = 0;
|
|
-#endif
|
|
-return ret;
|
|
-}],
|
|
- zsh_cv_rlimit_vmem_is_as=yes,
|
|
- zsh_cv_rlimit_vmem_is_as=no,
|
|
- zsh_cv_rlimit_vmem_is_as=no)])
|
|
-
|
|
-if test x$zsh_cv_rlimit_vmem_is_as = xyes; then
|
|
- AC_DEFINE(RLIMIT_VMEM_IS_AS)
|
|
-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 x$zsh_cv_rlimit_rss_is_as = xyes; then
|
|
- AC_DEFINE(RLIMIT_RSS_IS_AS)
|
|
-fi
|
|
+zsh_LIMITS_EQUAL(VMEM, vmem, RSS, rss)
|
|
+zsh_LIMITS_EQUAL(VMEM, vmem, AS, as)
|
|
+zsh_LIMITS_EQUAL(RSS, rss, AS, as)
|
|
|
|
|
|
dnl --------------------------------------------
|