summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2012-08-17 10:53:09 +0000
committerwiz <wiz@pkgsrc.org>2012-08-17 10:53:09 +0000
commitb56aa316a4dd0b7f5eaf1de087d6ba85377e7730 (patch)
treec65444d02d1970a958c77ca6753b108e43541b41 /shells
parentb914859b69daa15b4bf92d264c9fb2a44a431def (diff)
downloadpkgsrc-b56aa316a4dd0b7f5eaf1de087d6ba85377e7730.tar.gz
Add support for thread limits.
From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers. Bump PKGREVISION.
Diffstat (limited to 'shells')
-rw-r--r--shells/zsh/Makefile3
-rw-r--r--shells/zsh/distinfo9
-rw-r--r--shells/zsh/patches/patch-Doc_Zsh_builtins.yo36
-rw-r--r--shells/zsh/patches/patch-Src_Builtins_rlimits.awk15
-rw-r--r--shells/zsh/patches/patch-Src_Builtins_rlimits.c32
-rw-r--r--shells/zsh/patches/patch-ac59
-rw-r--r--shells/zsh/patches/patch-config.h.in17
-rw-r--r--shells/zsh/patches/patch-configure.ac15
8 files changed, 177 insertions, 9 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 19ccf63b8bf..227774ca634 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.57 2012/07/22 10:03:40 ryoon Exp $
+# $NetBSD: Makefile,v 1.58 2012/08/17 10:53:09 wiz Exp $
.include "../../shells/zsh/Makefile.common"
ZSH_VERSION= 5.0.0
ZSH_MAINTAINER= uebayasi@NetBSD.org
+PKGREVISION= 1
USE_TOOLS+= env
diff --git a/shells/zsh/distinfo b/shells/zsh/distinfo
index 3dd7742414a..eadb5046a6e 100644
--- a/shells/zsh/distinfo
+++ b/shells/zsh/distinfo
@@ -1,9 +1,14 @@
-$NetBSD: distinfo,v 1.38 2012/08/17 07:53:38 wiz Exp $
+$NetBSD: distinfo,v 1.39 2012/08/17 10:53:09 wiz Exp $
SHA1 (zsh-5.0.0.tar.bz2) = 692669243433c55384a54b397a1cc926e582e9f2
RMD160 (zsh-5.0.0.tar.bz2) = d2aff295e245dd5e805215c6dcca1e76af8b9725
Size (zsh-5.0.0.tar.bz2) = 3014362 bytes
+SHA1 (patch-Doc_Zsh_builtins.yo) = 37f1d49ae99da20b9027b2b386422cc8bb3d509a
+SHA1 (patch-Src_Builtins_rlimits.awk) = dd397c3d9dd39da15d4338055ce909e787f67cba
+SHA1 (patch-Src_Builtins_rlimits.c) = c607f322fe105f79bdb8817020330da1d3eab8ba
SHA1 (patch-Src_prototypes.h) = 14a766668bda382b3fc736ef4fccf49670e1be9c
SHA1 (patch-Src_zsh__system.h) = 1d5827a571b897ae139cb7b0c31d3e5a429aa190
SHA1 (patch-ab) = ebde4d35de2754dc9113988930764552c4bf811e
-SHA1 (patch-ac) = 9bfa22be47ce6478f48bb121b93d972cb28fe6cf
+SHA1 (patch-ac) = a442cbf576582a7efb2f25d20c20db7f7fc64346
+SHA1 (patch-config.h.in) = 2853aa18096bedaa8864a2eb8a5948024712d466
+SHA1 (patch-configure.ac) = 7ce0c325557185485bf9462d030d4f64d579788f
diff --git a/shells/zsh/patches/patch-Doc_Zsh_builtins.yo b/shells/zsh/patches/patch-Doc_Zsh_builtins.yo
new file mode 100644
index 00000000000..302e4d13411
--- /dev/null
+++ b/shells/zsh/patches/patch-Doc_Zsh_builtins.yo
@@ -0,0 +1,36 @@
+$NetBSD: patch-Doc_Zsh_builtins.yo,v 1.1 2012/08/17 10:53:10 wiz Exp $
+
+Add support for thread limits.
+From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers.
+
+--- Doc/Zsh/builtins.yo.orig 2012-03-13 20:04:40.000000000 +0000
++++ Doc/Zsh/builtins.yo
+@@ -1736,7 +1736,7 @@ enditem()
+ findex(ulimit)
+ cindex(resource limits)
+ cindex(limits, resource)
+-item(tt(ulimit) [ [ tt(-SHacdfilmnpqstvx) | tt(-N) var(resource) [ var(limit) ] ... ])(
++item(tt(ulimit) [ [ tt(-SHacdfilmnpqrstvx) | tt(-N) var(resource) [ var(limit) ] ... ])(
+ Set or display resource limits of the shell and the processes started by
+ the shell. The value of var(limit) can be a number in the unit specified
+ below or one of the values `tt(unlimited)', which removes the limit on the
+@@ -1757,6 +1757,9 @@ When looping over multiple resources, th
+ it detects a badly formed argument. However, if it fails to set a limit
+ for some other reason it will continue trying to set the remaining limits.
+
++Not all the following resources are supported on all systems. Running
++tt(ulimit -a) will show which are supported.
++
+ startsitem()
+ sitem(tt(-a))(Lists all of the current resource limits.)
+ sitem(tt(-c))(512-byte blocks on the size of core dumps.)
+@@ -1769,7 +1772,8 @@ sitem(tt(-n))(open file descriptors.)
+ sitem(tt(-q))(Bytes in POSIX message queues.)
+ sitem(tt(-s))(K-bytes on the size of the stack.)
+ sitem(tt(-t))(CPU seconds to be used.)
+-sitem(tt(-u))(processes available to the user.)
++sitem(tt(-r))(The number of simultaneous threads available to the user.)
++sitem(tt(-u))(The number of processes available to the user.)
+ sitem(tt(-v))(K-bytes on the size of virtual memory. On some systems this
+ refers to the limit called `address space'.)
+ sitem(tt(-x))(The number of locks on files.)
diff --git a/shells/zsh/patches/patch-Src_Builtins_rlimits.awk b/shells/zsh/patches/patch-Src_Builtins_rlimits.awk
new file mode 100644
index 00000000000..c71f902cb5a
--- /dev/null
+++ b/shells/zsh/patches/patch-Src_Builtins_rlimits.awk
@@ -0,0 +1,15 @@
+$NetBSD: patch-Src_Builtins_rlimits.awk,v 1.1 2012/08/17 10:53:10 wiz Exp $
+
+Add support for thread limits.
+From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers.
+
+--- Src/Builtins/rlimits.awk.orig 2011-06-18 23:34:23.000000000 +0000
++++ Src/Builtins/rlimits.awk
+@@ -42,6 +42,7 @@ BEGIN {limidx = 0}
+ if (limnam == "MEMLOCK") { msg[limnum] = "Mmemorylocked" }
+ if (limnam == "NOFILE") { msg[limnum] = "Ndescriptors" }
+ if (limnam == "NPROC") { msg[limnum] = "Nmaxproc" }
++ if (limnam == "NTHR") { msg[limnum] = "Nmaxthr" }
+ if (limnam == "OFILE") { msg[limnum] = "Ndescriptors" }
+ if (limnam == "PTHREAD") { msg[limnum] = "Nmaxpthreads" }
+ if (limnam == "RSS") { msg[limnum] = "Mresident" }
diff --git a/shells/zsh/patches/patch-Src_Builtins_rlimits.c b/shells/zsh/patches/patch-Src_Builtins_rlimits.c
new file mode 100644
index 00000000000..c662237bf9b
--- /dev/null
+++ b/shells/zsh/patches/patch-Src_Builtins_rlimits.c
@@ -0,0 +1,32 @@
+$NetBSD: patch-Src_Builtins_rlimits.c,v 1.1 2012/08/17 10:53:10 wiz Exp $
+
+Add support for thread limits.
+From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers.
+
+--- Src/Builtins/rlimits.c.orig 2011-11-04 20:47:24.000000000 +0000
++++ Src/Builtins/rlimits.c
+@@ -314,6 +314,12 @@ printulimit(char *nam, int lim, int hard
+ printf("-u: processes ");
+ break;
+ # endif /* HAVE_RLIMIT_NPROC */
++# ifdef HAVE_RLIMIT_NTHR
++ case RLIMIT_NTHR:
++ if (head)
++ printf("-r: threads ");
++ break;
++#endif /* HAVE_RLIMIT_NTHR */
+ # if defined(HAVE_RLIMIT_VMEM) && (!defined(HAVE_RLIMIT_RSS) || !defined(RLIMIT_VMEM_IS_RSS))
+ case RLIMIT_VMEM:
+ if (head)
+@@ -791,6 +797,11 @@ bin_ulimit(char *name, char **argv, UNUS
+ res = RLIMIT_NOFILE;
+ break;
+ # endif /* HAVE_RLIMIT_NOFILE */
++# ifdef HAVE_RLIMIT_NTHR
++ case 'r':
++ res = RLIMIT_NTHR;
++ break;
++# endif /* HAVE_RLIMIT_NTHR */
+ # ifdef HAVE_RLIMIT_NPROC
+ case 'u':
+ res = RLIMIT_NPROC;
diff --git a/shells/zsh/patches/patch-ac b/shells/zsh/patches/patch-ac
index c9507fbc885..428c53dce67 100644
--- a/shells/zsh/patches/patch-ac
+++ b/shells/zsh/patches/patch-ac
@@ -1,6 +1,10 @@
-$NetBSD: patch-ac,v 1.25 2012/08/17 07:53:39 wiz Exp $
+$NetBSD: patch-ac,v 1.26 2012/08/17 10:53:10 wiz Exp $
-All chunks:
+First chunk:
+Add support for thread limits.
+From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers.
+
+All other chunks:
Make this package build on Interix. Patches provided by Hiramatsu
Yoshifumi in PR pkg/25946.
Last chunk only:
@@ -11,9 +15,52 @@ All chunks:
Accepted by Peter Stephenson <p.w.stephenson@ntlworld.com> on
zsh-workers on 2012-08-16.
---- configure.orig 2011-05-16 15:49:15.000000000 +0000
+--- configure.orig 2012-06-21 18:36:43.000000000 +0000
+++ configure
-@@ -11443,6 +11443,10 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
+@@ -9608,6 +9608,42 @@ if test $zsh_cv_have_RLIMIT_NPROC = yes;
+
+ fi
+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for limit RLIMIT_NTHR" >&5
++$as_echo_n "checking for limit RLIMIT_NTHR... " >&6; }
++if ${zsh_cv_have_RLIMIT_NTHR+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++#include <sys/types.h>
++#ifdef HAVE_SYS_TIME_H
++#include <sys/time.h>
++#endif
++#include <sys/resource.h>
++int
++main ()
++{
++RLIMIT_NTHR
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ zsh_cv_have_RLIMIT_NTHR=yes
++else
++ zsh_cv_have_RLIMIT_NTHR=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $zsh_cv_have_RLIMIT_NTHR" >&5
++$as_echo "$zsh_cv_have_RLIMIT_NTHR" >&6; }
++
++if test $zsh_cv_have_RLIMIT_NTHR = yes; then
++ $as_echo "#define HAVE_RLIMIT_NTHR 1" >>confdefs.h
++
++fi
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for limit RLIMIT_NOFILE" >&5
+ $as_echo_n "checking for limit RLIMIT_NOFILE... " >&6; }
+ if ${zsh_cv_have_RLIMIT_NOFILE+:} false; then :
+@@ -11589,6 +11625,10 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
DLLD="${DLLD=$CC}"
DLLDARG=""
;;
@@ -24,7 +71,7 @@ zsh-workers on 2012-08-16.
* )
DLLD="${DLLD=ld}"
DLLDARG=""
-@@ -11453,6 +11457,7 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
+@@ -11599,6 +11639,7 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
case "$host_os" in
hpux*) DLLDFLAGS="${DLLDFLAGS=-shared}" ;;
darwin*) DLCFLAGS="${DLCFLAGS=-fno-common}" ;;
@@ -32,7 +79,7 @@ zsh-workers on 2012-08-16.
*) DLCFLAGS="${DLCFLAGS=-fPIC}" ;;
esac
else
-@@ -11467,10 +11472,9 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
+@@ -11613,10 +11654,9 @@ $as_echo "$zsh_cv_sys_elf" >&6; }
fi
case "$host_os" in
osf*) DLLDFLAGS="${DLLDFLAGS=-shared -expect_unresolved '*'}" ;;
diff --git a/shells/zsh/patches/patch-config.h.in b/shells/zsh/patches/patch-config.h.in
new file mode 100644
index 00000000000..4c218a0becd
--- /dev/null
+++ b/shells/zsh/patches/patch-config.h.in
@@ -0,0 +1,17 @@
+$NetBSD: patch-config.h.in,v 1.1 2012/08/17 10:53:10 wiz Exp $
+
+Add support for thread limits.
+From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers.
+
+--- config.h.in.orig 2012-06-21 18:37:23.000000000 +0000
++++ config.h.in
+@@ -520,6 +520,9 @@
+ /* Define to 1 if RLIMIT_NPROC is present (whether or not as a macro). */
+ #undef HAVE_RLIMIT_NPROC
+
++/* Define to 1 if RLIMIT_NTHR is present (whether or not as a macro). */
++#undef HAVE_RLIMIT_NTHR
++
+ /* Define to 1 if RLIMIT_PTHREAD is present (whether or not as a macro). */
+ #undef HAVE_RLIMIT_PTHREAD
+
diff --git a/shells/zsh/patches/patch-configure.ac b/shells/zsh/patches/patch-configure.ac
new file mode 100644
index 00000000000..74376b8461b
--- /dev/null
+++ b/shells/zsh/patches/patch-configure.ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-configure.ac,v 1.1 2012/08/17 10:53:10 wiz Exp $
+
+Add support for thread limits.
+From Peter Stephenson <Peter.Stephenson@csr.com> on zsh-workers.
+
+--- configure.ac.orig 2012-06-21 18:36:03.000000000 +0000
++++ configure.ac
+@@ -1799,6 +1799,7 @@ zsh_LIMIT_PRESENT(RLIMIT_AS)
+ zsh_LIMIT_PRESENT(RLIMIT_LOCKS)
+ zsh_LIMIT_PRESENT(RLIMIT_MEMLOCK)
+ zsh_LIMIT_PRESENT(RLIMIT_NPROC)
++zsh_LIMIT_PRESENT(RLIMIT_NTHR)
+ zsh_LIMIT_PRESENT(RLIMIT_NOFILE)
+ zsh_LIMIT_PRESENT(RLIMIT_PTHREAD)
+ zsh_LIMIT_PRESENT(RLIMIT_RSS)