From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3268 invoked from network); 10 Feb 2003 09:09:05 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Feb 2003 09:09:05 -0000 Received: (qmail 21926 invoked by alias); 10 Feb 2003 09:08:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18215 Received: (qmail 21917 invoked from network); 10 Feb 2003 09:08:49 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 10 Feb 2003 09:08:49 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [192.35.17.28] by sunsite.dk (MessageWall 1.0.8) with SMTP; 10 Feb 2003 9:8:44 -0000 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.11.6/8.11.6) with ESMTP id h1A98kU13824; Mon, 10 Feb 2003 10:08:46 +0100 (MET) Received: from MOWD019A.mow.siemens.ru ([163.242.196.119]) by mail3.siemens.de (8.11.6/8.11.6) with ESMTP id h1A98hU19139; Mon, 10 Feb 2003 10:08:45 +0100 (MET) Received: by mowd019a.mow.siemens.ru with Internet Mail Service (5.5.2653.19) id <1P05JKGR>; Mon, 10 Feb 2003 12:10:04 +0300 Received: from mw2b210c (163.242.193.12 [163.242.193.12]) by MOWD019A.mow.siemens.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 1P05JKGQ; Mon, 10 Feb 2003 12:10:02 +0300 From: Borzenkov Andrey To: "'Clint Adams'" , "'Bart Schaefer'" Cc: zsh-workers@sunsite.dk Subject: RE: PATCH: maxfilelocks in ulimit output Date: Mon, 10 Feb 2003 12:08:36 +0300 Message-ID: <6134254DE87BD411908B00A0C99B044F03A0B63B@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: <20030209224506.GA25964@scowler.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 > > > Seems that it's treating RLIMIT_AS and RLIMIT_RSS as > > "identifiers", because they compare equally in the #if. > > I'm told that it's impossible to do a preprocessor compare because of > the enum. So to get this to work we'd need to remove something to > configure or elsewhere. Untested idea (not having the relevant system and time :( AC_DEFUN(zsh_TEST_LIMIT_VALUE,[ echo > get-limit-value.c << EOF main() { #ifdef $1 printf("%d", $1); #else printf("%d", -1); #endif return 0; } EOF cc -o get-limit-value get-limit-value.c val=`get-limit-value` if test "$val" -ge 0; then AC_DEFINE(ZSH_$1, $val) fi ] later on zsh_TEST_LIMIT_VALUE(RLIMIT_AS) zsh_TEST_LIMIT_VALUE(RLIMIT_RSS) ... and in code use ZSH_... instead of original values. Ugly as sin but it will work. -andrey