From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5422 invoked from network); 3 Apr 2005 08:50:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Apr 2005 08:50:06 -0000 Received: (qmail 9717 invoked from network); 3 Apr 2005 08:49:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Apr 2005 08:49:59 -0000 Received: (qmail 1194 invoked by alias); 3 Apr 2005 08:49:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21083 Received: (qmail 28838 invoked from network); 3 Apr 2005 08:43:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Apr 2005 08:43:14 -0000 Received: (qmail 7065 invoked from network); 3 Apr 2005 08:43:14 -0000 Received: from sancho.opendarwin.org (204.152.184.200) by a.mx.sunsite.dk with SMTP; 3 Apr 2005 08:43:10 -0000 Received: from [128.84.19.116] (rrdhcp18-372.redrover.cornell.edu [128.84.19.116]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by sancho.opendarwin.org (Postfix) with ESMTP id 7F4C83B5EE69 for ; Sun, 3 Apr 2005 00:43:08 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v728) To: zsh-workers@sunsite.dk Message-Id: Content-Type: multipart/mixed; boundary=Apple-Mail-3-1066597378 From: Toby Peterson Subject: Patches for zsh on Mac OS X 10.4 Date: Sun, 3 Apr 2005 04:43:03 -0400 X-Mailer: Apple Mail (2.728) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 --Apple-Mail-3-1066597378 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Two patches (against current CVS) included... rlimit-rss-as.diff: RLIMIT_RSS and RLIMIT_AS are the same. Patch includes configure check and source changes. utmpx-apple.diff: We now include utmpx, but the struct has no ut_name field. I suspect this issue may occur on other platforms... Solaris 9 and Fedora Core 2 didn't appear to have the field either. - Toby Peterson --Apple-Mail-3-1066597378 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-mac-type=54455854; x-unix-mode=0644; name="rlimit-rss-as.diff" Content-Disposition: attachment; filename=rlimit-rss-as.diff Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.30 diff -u -r1.30 configure.ac --- configure.ac 14 Mar 2005 10:51:17 -0000 1.30 +++ configure.ac 3 Apr 2005 08:37:44 -0000 @@ -1502,6 +1502,33 @@ 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 +#ifdef HAVE_SYS_TIME_H +#include +#endif +#include +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 -------------------------------------------- Index: Src/Builtins/rlimits.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Builtins/rlimits.c,v retrieving revision 1.13 diff -u -r1.13 rlimits.c --- Src/Builtins/rlimits.c 19 Jan 2005 13:04:10 -0000 1.13 +++ Src/Builtins/rlimits.c 3 Apr 2005 08:37:44 -0000 @@ -242,7 +242,7 @@ # endif /* HAVE_RLIMIT_MEMLOCK */ /* If RLIMIT_VMEM and RLIMIT_RSS are defined and equal, avoid * * duplicate case statement. Observed on QNX Neutrino 6.1.0. */ -# if defined(HAVE_RLIMIT_RSS) && !defined(RLIMIT_VMEM_IS_RSS) +# if defined(HAVE_RLIMIT_RSS) && !defined(RLIMIT_VMEM_IS_RSS) && !defined(RLIMIT_RSS_IS_AS) case RLIMIT_RSS: if (head) printf("-m: resident set size (kbytes) "); @@ -834,7 +834,7 @@ case RLIMIT_VMEM: # endif /* HAVE_RLIMIT_VMEM */ /* ditto RLIMIT_VMEM and RLIMIT_AS */ -# if defined(HAVE_RLIMIT_AS) && !defined(RLIMIT_VMEM_IS_AS) +# if defined(HAVE_RLIMIT_AS) && !defined(RLIMIT_VMEM_IS_AS) && !defined(RLIMIT_RSS_IS_AS) case RLIMIT_AS: # endif /* HAVE_RLIMIT_AS */ # ifdef HAVE_RLIMIT_AIO_MEM --Apple-Mail-3-1066597378 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-mac-type=54455854; x-unix-mode=0644; x-mac-creator=522A6368; name="utmpx-apple.diff" Content-Disposition: attachment; filename=utmpx-apple.diff Index: Src/watch.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/watch.c,v retrieving revision 1.4 diff -u -r1.4 watch.c --- Src/watch.c 2 Jun 2004 22:14:26 -0000 1.4 +++ Src/watch.c 3 Apr 2005 08:37:44 -0000 @@ -103,6 +103,9 @@ # ifdef HAVE_STRUCT_UTMPX_UT_HOST # define WATCH_UTMP_UT_HOST 1 # endif +# ifdef __APPLE__ +# define ut_name ut_user +# endif #endif #if !defined(WATCH_STRUCT_UTMP) && defined(HAVE_STRUCT_UTMP) && defined(REAL_UTMP_FILE) --Apple-Mail-3-1066597378--