Bug#437949: texlive-bin: FTBFS on hurd-i386 because of icu
Hi,
Michael Casadevall, le Tue 28 Aug 2007 01:17:10 -0400, a écrit :
> +#ifdef NOFILE
> FILE *rgfp[NOFILE+1]; /* stack of input/include files */
> +#else
> +FILE **rgfp;
> +#endif /* NOFILE */
> +
> int cfp = 0; /* count of files in stack */
> int cOpenBrace = 0; /* count of `{' in <LaMacro2> */
> int csbEnvIgnore; /* count of environments ignored */
> @@ -278,6 +289,11 @@ char *rgsbArgs[];
> char *pch, *sbEnvList = DEFAULTENV, sbBadOpt[2];
> FILE *TexOpen();
> int fSawFile = 0, iArgs = 1;
> +
> + /* Allocate rgfp if we don't have NOFILE defined */
> +#ifndef NOFILE
> + *rgfp = malloc((sysconf(_SC_OPEN_MAX)+1) * sizeof(FILE));
> +#endif
That should rather be sizeof(FILE*): rgfp is an array of FILE*, not an
array of FILE.
Also, sysconf() may return -1 when there is no actual limit on the
number of opened files, your patch doesn't cope with this.
Samuel
Reply to: