From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13937 invoked from network); 9 Feb 2000 21:43:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Feb 2000 21:43:19 -0000 Received: (qmail 28490 invoked by alias); 9 Feb 2000 21:43:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9640 Received: (qmail 28477 invoked from network); 9 Feb 2000 21:43:09 -0000 Date: Wed, 9 Feb 2000 21:43:08 +0000 From: Adam Spiers To: zsh workers mailing list Subject: Re: RLIM_NLIMITS compile problem Message-ID: <20000209214308.A22406@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list References: <20000208234852.B25402@thelonious.new.ox.ac.uk> <1000209180231.ZM1102@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <1000209180231.ZM1102@candle.brasslantern.com> X-Home-Page: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.12 i686 Bart Schaefer (schaefer@candle.brasslantern.com) wrote: > It appears that zsh expects to get RLIM_NLIMITS (possibly indirectly) > from , which is included by Src/system.h. However, that > depends on HAVE_SYS_RESOURCE_H being defined. Took a while, but I figured it out. HAVE_SYS_RESOURCE_H was not getting defined in config.h by configure, because the test C program configure was compiling had a warning about redefining RLIM_INFINITY. Sounds like a Linux-specific problem, I thought. Sure enough, a bit of searching on dejanews revealed the following article: http://x23.deja.com/[ST_rn=ps]/getdoc.xp?AN=561479526&CONTEXT=950132025.1817313343&hitnum=6 of which the following is a relevant quote: -------- 8< -------- 8< -------- glibc2 up to now includes in bits/resource.h and defines RLIM_INFINITY later on, so when RLIM_INFINITY moved from linux/resource.h which glibc2 does not include to asm/resource.h, folks get warning about redefined RLIM_INFINITY. This will not be a problem with new getrlimit aware glibc, but with glibc's up to now it is a problem, because e.g. configure scripts will consider the warning as sign of sys/resource.h not being present on the system. With the following patch, which defines RLIM_INFINITY only if asm/resource.h has been included from linux/resource.h, even non-rlimit-changes aware glibc should continue to work just fine. -------- 8< -------- 8< -------- My quick kludge fix was to add #ifndefs around the two conflicting #defines of RLIM_INFINITY, then rm config.cache and rerun configure. Thanks Bart for dropping some useful breadcrumbs. Adam