Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RLIM_NLIMITS compile problem
- X-seq: zsh-workers 9640
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: RLIM_NLIMITS compile problem
- Date: Wed, 9 Feb 2000 21:43:08 +0000
- In-reply-to: <1000209180231.ZM1102@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000208234852.B25402@xxxxxxxxxxxxxxxxxxxxxxx> <1000209180231.ZM1102@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> It appears that zsh expects to get RLIM_NLIMITS (possibly indirectly)
> from <sys/resource.h>, 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 <asm/resource.h> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author