Re: Access strauss for build tests
- To: Samuel Thibault <sthibault@debian.org>
- Cc: Debian-TeX-maint <debian-tex-maint@lists.debian.org>
- Subject: Re: Access strauss for build tests
- From: Hilmar Preusse <hille42@web.de>
- Date: Thu, 17 Dec 2009 13:27:21 +0100
- Message-id: <[🔎] 20091217122721.GA1044@PC23>
- Mail-followup-to: Samuel Thibault <sthibault@debian.org>, Debian-TeX-maint <debian-tex-maint@lists.debian.org>
- In-reply-to: <20091217101025.GR5076@const.bordeaux.inria.fr>
- References: <20091212220414.GA880@PC23> <20091212225033.GC7333@const> <20091212233910.GA17881@preusse-16223.user.cis.dfn.de> <20091212234741.GZ7333@const> <20091212235204.GB17881@preusse-16223.user.cis.dfn.de> <20091213001249.GE7333@const> <20091214104809.GA2580@PC23> <20091215194618.GE4962@const.famille.thibault.fr> <20091217100309.GA4548@PC23> <20091217101025.GR5076@const.bordeaux.inria.fr>
On 17.12.09 Samuel Thibault (sthibault@debian.org) wrote:
> Hilmar Preusse, le Thu 17 Dec 2009 11:03:09 +0100, a écrit :
Hi Samuel,
> > detex.l:92: error: 'NOFILE' undeclared here (not in a function)
> >
> > i.e. this line in the header
> >
> > FILE *rgfp[NOFILE+1]; /* stack of input/include files */
> >
> > Can you help us here?
>
> Just quoting glibc's NOFILE comment:
>
> /* The following are not really correct but it is a value we used for a
> long time and which seems to be usable. People should not use NOFILE
> and NCARGS anyway. */
> #define NOFILE 256
> #define NCARGS 131072
>
> http://www.gnu.org/software/hurd/hurd/porting/guidelines.html tells to
> dynamically request it through
>
> getrlimit(RLIMIT_NOFILE,...)
>
> Which returns 1024,1024 on Linux (and 1024,2^31-1 on GNU/Hurd).
>
I'm sorry, I'm not a programmer. How should the correct code look in
your opinion:
#ifdef GNU
FILE *rgfp[getrlimit(RLIMIT_NOFILE,...)+1];
#else
FILE *rgfp[NOFILE+1];
#endif
Or should I replace the getrlimit by 1024?
Many thanks,
Hilmar
--
Close cover before striking.
http://www.hilmar-preusse.de.vu/
Reply to: