larsbrinkhoff / lbForth

Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
GNU General Public License v3.0
423 stars 113 forks source link

search-path entries are truncated to NAME_LEN #55

Open pipcet opened 7 years ago

pipcet commented 7 years ago
lbForth$ strace -e open ./b-forth
[...]
s" /this/is/a/really/really/long/path" searched
 ok
include foo.fth
open("/this/is/a/realfoo.fth", O_RDONLY) = -1 ENOENT (No such file or directory)
larsbrinkhoff commented 7 years ago

As you probably know, this is because path strings are stored as word names in the dictionary.

This isn't much of a issue for the C target per se, because it's not intended for serious use. Except it's also used to bootstrap a "real" target, which may be a problem.

So for me, it boils down to: does bootstrapping necessarily involve searching long paths? I don't think so.

larsbrinkhoff commented 7 years ago

Names are also truncated in other targets. Notably the x86 target.