Independently of Samuel, I ended up patching the same bug in Texlive,
but I did a different method of fixing
NOFILE instead of simply defining it to 256; According to the POSIX
reference I found, NOFILE is the maximum
files that can be opened at one time by a single process. On hurd, this
is dymanic (and I believe the default is 1024
based on what sysconf(_SC_OPEN_MAX) says). My patch causes the array to
be allocated dymanically should
NOFILE not be defined.
That being said, Samuel's patch properly fixes the build system by
adding a mh-gnu file,
(my patch simply replaces mh-unknown with mh-linux). I've included the
revelent fix for
detex.l below.
Michael
--- a/build/source/texk/detex/detex.l Sun Aug 26 05:16:32 2007 -0400
+++ b/build/source/texk/detex/detex.l Mon Aug 27 07:26:04 2007 -0400
@@ -34,6 +34,9 @@ static char rcsid[] = "$Header: /p/src/l
#endif
#ifndef MAXPATHLEN
#include <sys/param.h>
+#endif
+#ifndef NOFILE
+#include <unistd.h>
#endif
#define PATH_MAX MAXPATHLEN
#ifdef OS2
@@ -89,7 +92,15 @@ char *rgsbInputPaths[MAXINPUTPATHS]; /*
char *rgsbInputPaths[MAXINPUTPATHS]; /* list of input paths in
order */
char sbCurrentEnv[CCHMAXENV]; /* current environment being ignored */
char *sbProgName; /* name we were invoked with */
+
+/* Not all systems define NOFILE */
+#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
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]