[tex-live] behaviour of kpsewhich on case-insensitive mac system

Manfred Lotz manfred at dante.de
Wed Sep 20 20:48:37 CEST 2017

Is there time to check the case sensitivity of the filesystem by
   touch   some_weird_name
   touch   SOME_WEIRD_name

If there was a single file created then we have a case insensitive file
system. Otherwise we have a case sensitive file system. Ok, after that
I would delete the file or both files.

Just an idea, but perhaps a naive idea. In this case I apologize.


On Tue, 19 Sep 2017 22:42:38 GMT
Karl Berry <karl at freefriends.org> wrote:

> What I can imagine doing is first looking up the name as-is, and iff
> that fails, doing a case-insensitive lookup. Patches welcome, else I
> will put it on my ever-lengthening list. It essentially amounts to
> removing the compile-time configuration done now, and falling back to
> the case-insensitive test regardless of the system.
> It would be wrong to "randomly" return any case-insensitive match if
> an exact match exists.  That is, on Unix, \input FOO.TEX should
> prefer a file named "FOO.TEX" to "foo.tex".
> -k
> P.S. Explanation of the current behavior: Kpathsea was written at a
> time when in practice there was no such thing as an operating system
> which supported both case-insensitve and case-sensitive filesystems.
> (Also at a time when no one dreamed that a company would make such a
> disruptive and incompatible change to their systems, but never
> mind.)  Therefore the test was done at configure time.  In
> kpathsea/config.h there is:
> #if defined(OS2)     || \
>     defined(MSDOS)   || defined(__MSDOS__) || defined(DOS)    || \
>     defined(WIN32)   || defined(__WIN32__) || defined(_WIN32) || \
>     defined(DJGPP)   || defined(__DJGPP__) || \
>     defined(MINGW32) || defined(__MINGW32__)
> #define DOSISH
> #endif
> which is ultimately what determines whether case-sensitive or
> -insensitive test is done.
> (Zdenek, why this does not match on your OS/2 system, I can't say.)

More information about the tex-live mailing list