Sam Steingold wrote: > > It would be worth trying to not --avoid=unistd in the modules > > subdirectories. > > This should lead to a different <unistd.h> being generated for the module > > subdirectory than for the clisp core, but a more complete one. > > > > More generally, you want to use --avoid for modules which generate code, > > and where duplicate functions in different .o files would lead to linker > > errors. But you may want to omit --avoid for modules which only provide > > autoconf macros and header files. > > the bottom line is: > if I add -I build/gnulib/ to module CFLAGS, then include_next will > make build/gnulib/unistd.h supersede build/syscalls/gnulib/unistd.h, > which is no good. > if I do NOT add -I build/gnulib/ to module CFLAGS, then > regexp/gnulib/regex.c will not find build/gnulib/alloca.h
Indeed, this is still somewhat weird. The include_next should work as expected if you massage the inclusion guard identifiers of the two unistd.h files so that they become different: On one of these, do a sed -e s/_GL_UNISTD_H/_GL_UNISTD_H_2/ Bruno