Thomas Esser writes:

>> I am trying to use tetex in BeOS and have managed to compile it making 
>> some small changes that I will post later for reference.
> ...
>> fmtutil: config file `fmtutil.cnf' not found.

> kpathsea translates search path read from texmf.cnf on unix-like
> systems by replacing ";" -> ":". The unix-defection can be found in
> texk/kpathsea/cnf.c:

>     /* gcc -ansi doesn't predefine `unix', since ANSI forbids it.  And AIX
>        generally doesn't predefine unix, who knows why.  HP-UX is, of course,
>        also different.  Apple's MacOsX is also unix-like.  */
>     #ifndef unix
>     #if defined (__unix__) || defined (_AIX) || defined (_HPUX_SOURCE)
>     #define unix
>     #elif defined (__APPLE__) && defined (__MACH__)
>     #define unix
>     #elif defined (__NetBSD__)
>     #define unix
>     #endif
>     #endif

Which is quite a mess, and what is worse, here we test for a feature
that we've also determined elsewhere, and in an unrelated way.  No
wonder we're running into trouble.  As far as I can tell, we can
trivially ditch this mess by replacing it as follows:

Index: cnf.c
===================================================================
RCS file: /usr/local/cvsroot/texk/texk/kpathsea/cnf.c,v
retrieving revision 1.11
diff -u -d -r1.11 cnf.c
--- cnf.c       14 Dec 2002 12:10:31 -0000      1.11
+++ cnf.c       19 Feb 2003 20:11:23 -0000
@@ -19,6 +19,7 @@
 #include <kpathsea/config.h>
 #include <kpathsea/c-fopen.h>
 #include <kpathsea/c-ctype.h>
+#include <kpathsea/c-pathch.h>
 #include <kpathsea/cnf.h>
 #include <kpathsea/db.h>
 #include <kpathsea/hash.h>
@@ -126,22 +127,7 @@
      -DALLOW_SEMICOLON_IN_FILENAMES.  (And there's no way to get :'s in
      your filenames, sorry.)  */

-/* gcc -ansi doesn't predefine `unix', since ANSI forbids it.  And AIX
-   generally doesn't predefine unix, who knows why.  HP-UX is, of course,
-   also different.  Apple's MacOsX is also unix-like.  */
-#ifndef unix
-#if defined (__unix__) || defined (_AIX) || defined (_HPUX_SOURCE)
-#define unix
-#elif defined (__APPLE__) && defined (__MACH__)
-#define unix
-#elif defined (__NetBSD__)
-#define unix
-#endif
-#endif
-
-/* DJGPP defines `unix' (for portability), but generates MSDOS programs.  */
-#ifndef __DJGPP__
-#if !defined (ALLOW_SEMICOLON_IN_FILENAMES) && defined (unix)
+#if IS_ENV_SEP(':') && !defined (ALLOW_SEMICOLON_IN_FILENAMES)
   {
     string loc;
     for (loc = value; *loc; loc++) {
@@ -149,7 +135,6 @@
         *loc = ':';
     }
   }
-#endif
 #endif

   /* We want TEXINPUTS.prog to override plain TEXINPUTS.  The simplest



Does anyone care to test?

-- 
Olaf Weber

               (This space left blank for technical reasons.)

Reply via email to