On Sat, Jan 07, 2023 at 01:06:41PM +0200, Eli Zaretskii wrote: > AFAIR, makeinfo 4.x avoided the problem completely by _always_ > behaving as if the filesystem were case-insensitive. It produced a > single file for all the nodes whose names clashed, and used the node > name in the cross-references to direct to the correct node. Can't we > do something like this in texi2any?
I've checked the source code from Texinfo 4.13 and the program checks if multiple nodes map to the same output file using the FILENAME_CMP macro, called in find_node_by_fname in makeinfo/node.c. This function is called from cm_node in node.c to set a variable which is later checked near these comments: /* See if the node name converted to a file name clashes with other nodes or anchors. If it clashes with an anchor, we complain and nuke that anchor's file. */ /* This node's file name clashes with another node. We put them both on the same file. */ FILENAME_CMP is defined in system.h at the top level of the Texinfo sources, as mbscasecmp (case-insensitive) or strcmp (case-sensitive) depending on the operating system. (system.h is still part of the Texinfo sources although not used for texi2any.) Hence makeinfo 4.13 did not check the properties of the file system when run, but the case-folding behaviour was compiled in.