Re: Access strauss for build tests
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: